Skip to content

KNOX-2266 - Tokens Should Include a Unique Identifier#284

Merged
pzampino merged 1 commit intoapache:masterfrom
pzampino:master
Mar 10, 2020
Merged

KNOX-2266 - Tokens Should Include a Unique Identifier#284
pzampino merged 1 commit intoapache:masterfrom
pzampino:master

Conversation

@pzampino
Copy link
Copy Markdown
Contributor

@pzampino pzampino commented Mar 9, 2020

What changes were proposed in this pull request?

JWTs issued and validated by Knox now include a unique identifier as a private claim. This is mostly to guarantee token uniqueness, even for multiple requests within the same second.
Further, the TokenStateService has been updated to leverage this unique identifier as the key for handling token state. This identifier is less susceptible to the nuances of some storage mechanisms.

How was this patch tested?

Mulitple existing tests were modified to accommodate this change while ensuring the maintenance of existing behavior. TokenServiceResourceTest#testConcurrentGetToken was added to validate these changes. I've also done a bit of manual testing.

Copy link
Copy Markdown
Contributor

@moresandeep moresandeep left a comment

Choose a reason for hiding this comment

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

Looks good, few minor things.

@pzampino pzampino force-pushed the master branch 2 times, most recently from 5eb2293 to 73610ea Compare March 10, 2020 13:22
@pzampino pzampino merged commit e2ea842 into apache:master Mar 10, 2020
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
Change-Id: I2e221099c55cc60b125505b45c23a28b7602c9bb
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
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