Closed TJM closed 4 months ago
I updated the test data to support the usr.isAdmin
, and while I was in there, added a unit test for testing a non-admin user. Also updated the readme, fixing a few lint issues while adding a note about non-admin tokens.
The "RotateCurrentToken
" tries to maintain the current expiration duration. If the initial "main" token has a duration of 1 day, it will rotate every minute (periodicFunc frequency), as the default auto_rotate_before
is also 24h
. The token would always expire in less than 24h (well there might be one minute per day that it won't try to rotate). This is not related to allowing a non-admin token to rotate. Also, the debug log messages are excessive, so I am going to start a different MR to clean some that up, and maybe look into limiting or at least sending a WARNING when this happens.
@ilijamt I don't mean to pressure you (much), but I need to know if you could review/merge/release this, or if I need to try to figure out how to get it released in my fork. Thanks in advance :) Tommy
I'm checking it, I'm running into some issues. Need to do some more testing. And checking to see what are the possibilities, and if there is another way.
I'm checking it, I'm running into some issues. Need to do some more testing. And checking to see what are the possibilities, and if there is another way.
Let me know, happy to try to help. The "go test -v
" worked for me, but the workflows above haven't run yet, so I don't know what other problems there might be.
It has been more than a month, I know this isn't probably your primary job, but can I do anything to move this along, please and thanks in advance? :)
@TJM can you test out #97 and let me know if there are any issues?
I used part of your code in #97 thanks for the help. I decided instead of keeping two paths for token rotation to just use it's own endpoint instead, so that will make it easier in the future.
Initial attempt at catching non-admin users and using the token rotation API
Rotation tested!
I was going to add acceptance testing, but it doesn't look like that is very far along yet. ;)
Closes #89