This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only allow user principals to refresh their token and limit the numbe…
…r… (#52) Only only user principals to refresh there token and limit the number of refreshes.
- Loading branch information
Showing
6 changed files
with
129 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,9 @@ This endpoint will take a Users credentials and proxy the request to Vault to ge | |
"metadata": { | ||
"username": "[email protected]", | ||
"is_admin": "false", | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal" | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal", | ||
"refresh_count": 1, | ||
"max_refresh_count": 24 | ||
}, | ||
"lease_duration": 3600, | ||
"renewable": true | ||
|
@@ -97,7 +99,9 @@ This endpoint will take a Users credentials and proxy the request to Vault to ge | |
"metadata": { | ||
"username": "[email protected]", | ||
"is_admin": "false", | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal" | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal", | ||
"refresh_count": 1, | ||
"max_refresh_count": 24 | ||
}, | ||
"lease_duration": 3600, | ||
"renewable": true | ||
|
@@ -110,6 +114,8 @@ This endpoint will take a Users credentials and proxy the request to Vault to ge | |
### Refresh the user's token [GET] | ||
|
||
This endpoint allows a user to exchange their current token for a new one with updated policies. | ||
There is a limit to the number of times this call can be made with a token and is store in the metadata | ||
refresh_count and max_refresh_count can be used to determine when a re-authentication is required. | ||
|
||
+ Request (application/json) | ||
|
||
|
@@ -133,7 +139,9 @@ This endpoint allows a user to exchange their current token for a new one with u | |
"metadata": { | ||
"username": "[email protected]", | ||
"is_admin": "false", | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal" | ||
"groups": "Lst-CDT.CloudPlatformEngine.FTE,Lst-digital.platform-tools.internal", | ||
"refresh_count": 2, | ||
"max_refresh_count": 24 | ||
}, | ||
"lease_duration": 3600, | ||
"renewable": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters