Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set token expiration and force_revokable from Artifactory 7.50.3 #40

Closed
TJM opened this issue Feb 24, 2023 · 3 comments · Fixed by #45
Closed

Set token expiration and force_revokable from Artifactory 7.50.3 #40

TJM opened this issue Feb 24, 2023 · 3 comments · Fixed by #45
Assignees
Labels
enhancement New feature or request

Comments

@TJM
Copy link
Contributor

TJM commented Feb 24, 2023

https://www.jfrog.com/confluence/display/JFROG/JFrog+Platform+REST+API#JFrogPlatformRESTAPI-CreateToken

From Artifactory 7.50.3, the "force revocable" flag in the tokens has been removed as a default setting and is now a Boolean parameter called force_revocable in the Create Token REST API. When this parameter is set to true, we will add the force_revocable flag to the token's extension.

I think this will allow us to set the expiration date on the tokens themselves too, while still allowing them to be revokable (without messing with the config)... This will help prevent the "orphaned tokens" we are seeing periodically.

@alexhung
Copy link
Member

Yes, as long as the expiration date is translated to number of seconds and that value does not exceed the system's max expiry.

@alexhung alexhung added the enhancement New feature or request label Feb 24, 2023
@alexhung alexhung self-assigned this Feb 24, 2023
@TJM
Copy link
Contributor Author

TJM commented Feb 27, 2023

I wonder if those values are queryable? By default, max-expiration appears to be 0 (unlimited) and 0 is also what the code is using, so if they have a max expiration set, I'd bet this code would fail. (testing that)

@alexhung
Copy link
Member

I wonder if those values are queryable?

Not that I'm aware of through APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants