-
Notifications
You must be signed in to change notification settings - Fork 4.7k
credentials: implement file-based JWT Call Credentials (part 1 for A97) #8431
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
6e63daa
xds: read JWT credentials from file as per A97
dimpavloff 3268ea5
remove example
dimpavloff b18a1f5
refactor test creation
dimpavloff eb391af
refactor token string padding
dimpavloff d43893a
remove example; mark as experimental
dimpavloff 167b86e
reorganise struct attributes
dimpavloff 439d28c
rename methods with Locked suffix
dimpavloff b36d4b6
remove context param from refreshTokenSync
dimpavloff 26e0451
reformat comments; remove redundant cachedErrorTime field
dimpavloff da2de8c
add defaultTestTimeout const
dimpavloff 51ce34c
refactor test to use wantErr string only
dimpavloff f87f1f2
fix punctuation
dimpavloff 15dd057
less prosaic subtest names
dimpavloff 54cbbcb
remove unit test
dimpavloff 9c5035d
rename preemptiveRefresh to forceRefresh
dimpavloff ec915dc
remove unused context param
dimpavloff 1d95fa2
rename files
dimpavloff a797ed9
use cond variable
dimpavloff fd388d1
refactor to no longer need cond
dimpavloff 790a2d9
fix docstring comment
dimpavloff 6713190
cache authorization header instead of token
dimpavloff 3f563eb
remove internal/ and xds/ changes
dimpavloff a38573b
remove xds/bootstrap
dimpavloff 12fedd5
fix comment docstrings
dimpavloff 52445c7
remove newJWTFileReader
dimpavloff 1678016
make ReadToken private method
dimpavloff 1be843b
use subtests
dimpavloff 8ac3296
use writeTempFile
dimpavloff b0bdc70
add comment about RPC queue behaviour
dimpavloff e4f955c
remove needsPreemptiveRefreshLocked method
dimpavloff f78178c
split NewTokenFileCallCredentials tests
dimpavloff bbeb759
remove leftover os.MkdirTemp
dimpavloff bba5d34
remove audience parameter and do not set it at all for test tokens
dimpavloff 607868b
test for grpc codes in TestTokenFileCallCreds_GetRequestMetadata
dimpavloff bc2d327
use cmp.Diff in TestTokenFileCallCreds_TokenCaching
dimpavloff 330d9a8
fix createTestJWT docstring
dimpavloff 774d83e
refactor readToken() and tests to use error values
dimpavloff b9dcfcb
remove errJWTFormat in favour of validation error
dimpavloff 6ee5ba7
error wrapping
dimpavloff 14c5ccd
subtests with underscores only
dimpavloff ca8227d
change credentials.CheckSecurityLevel error mgs; success path identation
dimpavloff ff50123
re-order assertions
dimpavloff c05da9f
remove string comparisons
dimpavloff 3f9195e
add TODO to tests
dimpavloff 2c9a06d
rename jWTFileReader to jwtFileReader
dimpavloff 42c6804
move error wrapping
dimpavloff f1a1cd3
remove leftover package docstring
dimpavloff 2b8ae01
use RawURLEncoding.DecodeString
dimpavloff 1b5a609
%v instead of %w in credentials.CheckSecurityLevel error string
dimpavloff 4c30c68
single check for preemptive refresh
dimpavloff 0c15d73
clarify why lock is not used and document concurrent calls for jwtFil…
dimpavloff 7d5f578
rename test suite function name
dimpavloff c8852fc
trailing brace in comment
dimpavloff 0be0243
add comments to clarify we do not trigger refresh on updating the cac…
dimpavloff 36042db
shouldTriggerRefresh failure message update
dimpavloff 7e50e3e
re-use err instead of err1,2,3,4,5
dimpavloff 8e3b91b
improve err==nil failure message in test
dimpavloff 4ac6f4c
t.Fatal and t.Error message capitalisation where possible
dimpavloff e83fbee
combine t.Error into a single t.Fatal and indent
dimpavloff 75fbc02
attempt to make the token referesh retry backoff test more readable
dimpavloff eae450a
rename function, omit zero value param, formatting
dimpavloff 3b651c2
strip jwt_ prefix from filenames
dimpavloff 4336d04
use strings.Cut to extract claims
dimpavloff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.