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

user_token refresh issue #217

Open
elestedt opened this issue Oct 23, 2024 · 1 comment
Open

user_token refresh issue #217

elestedt opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elestedt
Copy link

Describe the bug
When only user_token is used getVersion fails onread after access token has expired, doesn't seem to use the refresh_token in this case

** Versions **

  • Plugin: 1.8.0
  • Vault: Enterprise 1.17.3
  • Artifactory 7.90.8 which requires user authentication on everything except ping

To Reproduce
Steps to reproduce the behavior:

  1. Clean plugin install
  2. vault write artifactory/config/admin only, no token, other settings might be ok
  3. Write in user token
USERNAME=$(whoami)
TOKEN=
REFRESH=
vault write artifactory/config/user_token/${USERNAME} access_token=${TOKEN} refresh_token=${REFRESH}
  1. Read token to verify
vault read artifactory/user_token/${USERNAME}
  1. Wait longer than token expiry, but shorter than refresh token expiry
  2. `vault read now fails and logs shows only when debug logs are activated
 [ERROR] secrets.artifactory.artifactory_fd15a342.artifactory.artifactory-secrets-plugin_1.8.0: Unable to get Artifactory Version. Check url and access_token fields. TLS connection verification with Artifactory can be skipped by setting bypass_artifactory_tls_verification field to ‘true’: err=\“could not get the system version: HTTP response 401\” func=checkVersion ver=\“\"

Expected behavior
Token refreshed and a new token issued

@elestedt elestedt added the bug Something isn't working label Oct 23, 2024
@alexhung
Copy link
Member

@elestedt Thanks for the report! I've added this to our plan to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants