Skip to content

Conversation

@smolnar82
Copy link
Contributor

@smolnar82 smolnar82 commented Apr 29, 2021

What changes were proposed in this pull request?

The following features are implemented by this change:

  • if there is a misconfiguration in JDBCTokenState service, the AliasBasedTokenStateService is going to be used instead of failing the Knox Gateway at startup
  • a new REST API is added to get the status of the token management backend
  • on the tokengen UI there is new information displayed about token management

How was this patch tested?

Updated and executed JUnit test. I also run manual testing:

  1. Token management is disabled in the homepage topology

Screen Shot 2021-04-29 at 10 25 03 AM

  1. Token management is set to DB, but I misconfigured it in gateway-site.xml -> falling back to AliasBasedtokenStateService

Screen Shot 2021-04-29 at 10 21 13 AM

  1. Token management is set to DB, but I misconfigured it in gateway-site.xml -> falling back to AliasBasedtokenStateService. I also set knox.token.exp.tokengen.allowed.tss.backends in the homepage.xml to JDBCTokenStateService

Screen Shot 2021-04-29 at 10 28 15 AM

  1. Token management is set to DB and made sure it's properly configured

Screen Shot 2021-04-29 at 10 27 16 AM

Copy link
Contributor

@lmccay lmccay 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, Sandor.
Just a couple nits.

… configuration issues

Additionally, we display informative status messages on the tokengen application UI about the configured token management backend.
Copy link
Contributor

@pzampino pzampino left a comment

Choose a reason for hiding this comment

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

LGTM

@smolnar82 smolnar82 merged commit b7e4075 into apache:master May 3, 2021
@smolnar82 smolnar82 deleted the KNOX-2597 branch May 3, 2021 19:32
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
… case of DB configuration issues (apache#441)

Additionally, we display informative status messages on the tokengen application UI about the configured token management backend.

Change-Id: I54541e03f1db8a22e00ffdad5ef8ddc971f7547c
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
…cdpd-master

* changes:
  CDPD-25826 KNOX-2602 - Added the enabled flag and related token service API into the tokens' metadata. (apache#447)
  CDPD-25826 KNOX-2600 - It's now possible to setup a PostgreSQL connection using a JDBC URL (apache#444)
  CDPD-25826 KNOX-2599 - Improve tokengen UI (apache#443)
  CDPD-25826 KNOX-2598 - Added SSL connection support for PostgreSQL database type in JDBC token state management (apache#442)
  CDPD-25826 KNOX-2597 - Falling back to AliasBasedTokenStateService in case of DB configuration issues (apache#441)
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.

3 participants