[ 
https://issues.apache.org/jira/browse/KNOX-2597?focusedWorklogId=590898&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590898
 ]

ASF GitHub Bot logged work on KNOX-2597:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Apr/21 09:12
            Start Date: 29/Apr/21 09:12
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request #441:
URL: https://github.com/apache/knox/pull/441


   ## 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 to start
   - 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
   <img width="590" alt="Screen Shot 2021-04-29 at 10 25 03 AM" 
src="https://user-images.githubusercontent.com/34065904/116528018-99688480-a8db-11eb-838a-ab61abf2f4c9.png";>
   
   2. Token management is set to DB, but I misconfigured it in 
`gateway-site.xml` -> falling back to `AliasBasedtokenStateService`
   <img width="592" alt="Screen Shot 2021-04-29 at 10 21 13 AM" 
src="https://user-images.githubusercontent.com/34065904/116527966-8c4b9580-a8db-11eb-8eb6-cb7d9c43bc3a.png";>
   
   3. 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`
   <img width="584" alt="Screen Shot 2021-04-29 at 10 28 15 AM" 
src="https://user-images.githubusercontent.com/34065904/116528118-b9984380-a8db-11eb-8957-47daf53e81c4.png";>
   
   4. Token management is set to DB and made sure it's properly configured
   <img width="585" alt="Screen Shot 2021-04-29 at 10 27 16 AM" 
src="https://user-images.githubusercontent.com/34065904/116528132-be5cf780-a8db-11eb-9f94-0178e6063e8c.png";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 590898)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fallback to AliasBasedTokenStateService in case of DB errors
> ------------------------------------------------------------
>
>                 Key: KNOX-2597
>                 URL: https://issues.apache.org/jira/browse/KNOX-2597
>             Project: Apache Knox
>          Issue Type: Task
>    Affects Versions: 1.6.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We recently added support to pure JDBC-based token state management. It'd be 
> great to make deployments smooth with the following safety net: if there is 
> (are) any issue(s) with the configured DB connection, the Knox Gateway should 
> start using the {{AliasBasedTokenStateService}} instead of fail-fast. 
> Additionally, the {{tokengen}} UI should indicate the fact if the underlying 
> token back-end is the one the user configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to