Repository navigation
Conversation
A JWT-bearer redemption checked the requested resource only against the subject binding, so an ID-JAG issued for one resource could be redeemed for any other resource the binding allowed. The request also had to carry a resource parameter, which Okta's documented redemption request omits. When the assertion carries a resource claim, the requested resource must be one of its values, or the grant fails with invalid_target. Without the parameter, a string claim is used; an array claim, or no claim, is refused with invalid_request. A malformed claim is invalid_grant. Ref: stacklok#6892 Signed-off-by: kanywst <45947799+kanywst@users.noreply.github.com>
kanywst
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
jhrozek,
rdimitrov and
tgrunnagle
as code owners
November 9, 2026 17:39
3 of 9 tasks
Contributor
|
Thanks for looking into this. We're going to close this one, for two reasons. First, #6892 wasn't claimed. CONTRIBUTING.md asks contributors to comment on an issue and wait to be assigned before starting work ("Claiming an issue"), so we don't end up with two implementations of the same thing. Second, the change goes into |
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
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.
Summary
resourceonly against the subject binding, so an ID-JAG issued for one resource could be redeemed for another one the binding allowed. It also requiredresource, which Okta's redemption request leaves out.resourceclaim, the requestedresourcemust be one of its values (invalid_targetotherwise). Without the parameter, a string claim is used; an array claim or no claim is refused withinvalid_request. A malformed claim isinvalid_grant.Ref #6892. Not
Fixes, since this wasn't tested against a real Okta-issued ID-JAG.Type of change
Test plan
go test ./pkg/authserver/...)golangci-lint run ./...)Does this introduce a user-facing change?
Yes. A redemption without
resourceworks when the ID-JAG has a stringresourceclaim, and aresourcethat is not in the claim is refused withinvalid_target.