-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INFOPLAT-1562 dynamic expiring auth headers #974
Open
hendoxc
wants to merge
28
commits into
main
Choose a base branch
from
INFOPLAT-1562-dynamic-expiring-auth-headers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+408
−19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hendoxc
had a problem deploying
to
integration
December 13, 2024 21:05 — with
GitHub Actions
Failure
cll-gg
reviewed
Dec 16, 2024
cll-gg
reviewed
Dec 16, 2024
cll-gg
reviewed
Dec 16, 2024
4of9
reviewed
Dec 16, 2024
- Adds function for signing publickey + timestamp. - Adjusts `BuildAuthHeaders` to take variadic args allowing backwards compatibiilty INFOPLAT-1559 Fixes some lint issues INFOPLAT-1559 Handles edge case of negative timestamps INFOPLAT-1559 Switches to exposing new function - go recommended way to add extend a function - added Config as 2nd arg as opposed to optional args INFOPLAT-1559 Adjusts `authHeaderVersion2` - minor refactor of test INFOPLAT-1559 Tightens time range for test Update pkg/beholder/auth.go Co-authored-by: 4of9 <177086174+4of9@users.noreply.github.com>
- allows for dynamic headers auth tokens to be used in GRPC request headers - auto refreshes the token on interval
…c `AuthHeaders` Need this for migration of existing usage - current users of beholder can still use never verions while using static headers, but can make the switch across to setting `AuthHeaderProvider`
hendoxc
force-pushed
the
INFOPLAT-1562-dynamic-expiring-auth-headers
branch
from
December 17, 2024 18:18
2ed4940
to
e40e8fd
Compare
hendoxc
had a problem deploying
to
integration
December 17, 2024 18:18 — with
GitHub Actions
Failure
bit more clear conceptually
protects against concurrent calls of `refresh` INFOPLAT-1560 Makes `refresh` thread safe
hendoxc
force-pushed
the
INFOPLAT-1562-dynamic-expiring-auth-headers
branch
from
January 8, 2025 20:12
f196c1a
to
2bb5c5c
Compare
pkg/beholder/auth.go
Outdated
|
||
// authHeaderPerRPCredentials is a PerRPCCredentials implementation that provides the auth headers | ||
type authHeaderPerRPCCredentials struct { | ||
privKey ed25519.PrivateKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing a private key around will make eventual isolation of the keystore difficult. If possible, I'd like to see us use the keystore directly here
…ble refresh refersh mechanism is configurable such that it can be used in loops where gRPC calls back to the core node. On the core node itself, the csa private key is accessible though the keystore, so we can just call `BuildAuthHeadersV2`
…com:smartcontractkit/chainlink-common into INFOPLAT-1562-dynamic-expiring-auth-headers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
INFOPLAT-1560
What
Allows usage of dynamic auth headers by implementing
grpc.PerRPCCredentials
& setting as aDialOption
on the otel clientWhy
Makes tokens expire, in the case that one is leaked or intercepted.
2
tokens have their timestamp part checkedtime.Now > timestamp > time.Now - serverTTL
Notes
Current users of the client can still configure static headers using the
AuthHeaders
field of beholder clientConfig
. To enable dynamic headers they instead should configureAuthHeaderProvider