Skip to content
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

KNOX-3020 - Introducing the 'type' metadata for Knox Tokens #881

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

smolnar82
Copy link
Contributor

@smolnar82 smolnar82 commented Mar 13, 2024

What changes were proposed in this pull request?

Introduced new metadata called type, this can be any of:

  • JWT (default)
  • KNOXSSO_COOKIE
  • CLIENT_ID

The default is JWT. The KNOXSSO_COOKIE is set when tokens are participating in KNOX SSO Cookie management we introduced in #797 .
CLIENT_ID can be set via a KnoxToken API call with metadata name, type. For instance:

curl -iku admin:admin-password https://localhost:8443/gateway/sandbox/knoxtoken/api/v2/token?md_type=CLIENT_ID

The Token Management UI is updated: instead of adding new columns per type, only a one column exists and the relevant type icon is displayed.

How was this patch tested?

Ran build/unit tests and deployed Knox. Then I

  • generated a regular JWT token on the Token Generation UI
  • enabled the KnoxSSO cookie management feature and re-logged in to Knox Home
  • used the above curl request to generate a CLIENT_ID type token

Confirmed the tokens were created and they were displayed properly on the Token Management UI:

Screenshot 2024-03-13 at 19 03 50

@smolnar82 smolnar82 self-assigned this Mar 13, 2024
@smolnar82 smolnar82 marked this pull request as draft March 13, 2024 18:56
@smolnar82 smolnar82 marked this pull request as ready for review March 13, 2024 19:05
Copy link
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.

Few minor things but overall 👍 love the icons :)

Copy link
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, thanks!

@smolnar82 smolnar82 merged commit 67ebe9a into apache:master Mar 14, 2024
2 checks passed
@smolnar82 smolnar82 deleted the KNOX-3020 branch March 14, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants