smolnar82 opened a new pull request #433:
URL: https://github.com/apache/knox/pull/433
## What changes were proposed in this pull request?
//TODO:
## How was this patch tested?
//TODO
Some manual test results:
```
2021-04-13 21:51:01,961 INFO service.knoxtoken
(TokenResource.java:getAuthenticationToken(419)) - Knox Token service
(homepage) issued token eyJhbG...da7ZZg (d7c693d1-6d16-40cd-9333-fc978f2b6561)
2021-04-13 21:51:01,981 DEBUG token.state
(DefaultTokenStateService.java:addToken(144)) - Added token
d7c693d1...fc978f2b6561, expiration 2021-05-13T19:51:01.952Z
2021-04-13 21:51:02,137 DEBUG token.state
(JDBCTokenStateService.java:addToken(61)) - Token d7c693d1...fc978f2b6561 has
been saved in the database
2021-04-13 21:51:02,170 DEBUG token.state
(JDBCTokenStateService.java:addMetadata(172)) - Updated metadata for
d7c693d1...fc978f2b6561 in the database
2021-04-13 21:51:02,170 DEBUG service.knoxtoken
(TokenResource.java:getAuthenticationToken(446)) - Knox Token service
(homepage) stored state for token eyJhbG...da7ZZg
(d7c693d1-6d16-40cd-9333-fc978f2b6561)
...
2021-04-13 21:52:00,877 INFO service.knoxtoken
(TokenResource.java:getAuthenticationToken(419)) - Knox Token service
(homepage) issued token eyJhbG...AqsuAg (0406d03b-2cde-48e0-8c4d-5e2282dd3cea)
2021-04-13 21:52:00,878 DEBUG token.state
(DefaultTokenStateService.java:addToken(144)) - Added token
0406d03b...5e2282dd3cea, expiration 2021-04-14T19:52:00.871Z
2021-04-13 21:52:00,893 DEBUG token.state
(JDBCTokenStateService.java:addToken(61)) - Token 0406d03b...5e2282dd3cea has
been saved in the database
2021-04-13 21:52:00,908 DEBUG token.state
(JDBCTokenStateService.java:addMetadata(172)) - Updated metadata for
0406d03b...5e2282dd3cea in the database
2021-04-13 21:52:00,909 DEBUG service.knoxtoken
(TokenResource.java:getAuthenticationToken(446)) - Knox Token service
(homepage) stored state for token eyJhbG...AqsuAg
(0406d03b-2cde-48e0-8c4d-5e2282dd3cea)
```
```
postgres=# select * FROM KNOX_TOKENS;
token_id | issue_time | expiration |
max_lifetime | username | comment
--------------------------------------+---------------+---------------+---------------+----------+---------
d7c693d1-6d16-40cd-9333-fc978f2b6561 | 1618343461978 | 1620935461952 |
1618948261978 | admin |
0406d03b-2cde-48e0-8c4d-5e2282dd3cea | 1618343520878 | 1618429920871 |
1618948320878 | admin |
(2 rows)
```
--
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]