Skip to content

Knox 3405 08 06 - #1340

Open
hsheinblatt wants to merge 2 commits into
apache:knox_idffrom
hsheinblatt:KNOX-3405-08-06
Open

Knox 3405 08 06#1340
hsheinblatt wants to merge 2 commits into
apache:knox_idffrom
hsheinblatt:KNOX-3405-08-06

Conversation

@hsheinblatt

Copy link
Copy Markdown

KNOX-3405 - Extend JWTFederationFilter for dynamic JWKS and iss attribute on token-exchange

How was this patch tested?

Unit tests were added

Integration Tests

N/A Will be added once flow is complete

Harrison added 2 commits August 6, 2026 16:26
…bute on token-exchange

Test issues to improve:
Several tests use a helper rather than a mock, DynamicJwksPassTokenAuthority.
This causes ambiguity in what method precisely was called and what failed.
Additionally, fixing that becomes more complex because the token exchange
requests use both a subject token and an actor token, so both tokens are
validated, and it's either ambiguous or complex to ensure that each token
validation path is correct. EasyMock should allow a range of times(0, 1)
to be called, so we can make the appropriate signature verification optional
for negative tests. That is, we can write the tests so that the order of
enforcement for each condition is arbitrary: all the other conditions would
evaluate to true if executed first.
Once the actor token is made optional, we can simplify the negative test
cases to use only a subject token, and then specify the mocks precisely
so each negative test case validates the correct methods are called, if
called, and no extra methods are called, the test can be insensitive to
the order of validation checks, and we can remove the
DynamicJwksPassTokenAuthority helper.
…alidation

independent, and ensure that both the single subject token and the subject plus
actor token request paths are covered.

@lmccay lmccay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hsheinblatt - please provide more of a description and some details of the tests that you added and ran altogether. I'd also like to make sure that if some error messages/logs were changed for certain behavior that we know what they are. It looks like you probably fixed some previously inaccurate log messages. There may be implications for others tests and integrations. Also, change the PR Title to reflect the Jira name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants