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

Failed to revoke lease due to empty access token not allowed #237

Open
5 tasks
Claudiordev opened this issue Jan 7, 2025 · 2 comments
Open
5 tasks

Failed to revoke lease due to empty access token not allowed #237

Claudiordev opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Claudiordev
Copy link

Describe the bug
The path under the "artifactory/user_token/", is being managed by the artifactory plugin. Every time a refresh token is request, a lease is created in Vault, but due to a error on "missing access_token", related in the #236, the following error shows every time the vault automatically tries to revoke the lease:

"2025-01-03T14:27:12.776Z [ERROR] expiration: failed to revoke lease: lease_id=artifactory/user_token/bppmanap/0dAs9vq5DZEHNuK6fs9aQ6is error="failed to revoke entry: resp: (*logical.Response)(nil) err: empty access token not allowed" attempts=4 next_attempt=3m46.307019948s"

This is making the lease count in vault increase reaching the max lease count on it, disabling the users from logging in.

This instance is configured with the exceptional case of a configuration without a access token:
vault write artifactory/config/admin url=***
vault write artifactory/config/admin use_expiring_tokens=true
vault write artifactory/config/admin default_description="Generated by Vault" max_ttl=14400 default_ttl=3600
vault write artifactory/config/user_token use_expiring_tokens=true
vault write artifactory/config/user_token default_description="Generated by Vault" max_ttl=14400 default_ttl=3600
vault write artifactory/config/user_token scope="applied-permissions/user"
vault write artifactory/config/user_token audience="jfrt@* jfxr@*"

Artifactory version: 7.98.7
Vault version: 1.18.2
Vault plugin version: 1.8.4

To Reproduce
Steps to reproduce the behavior:

  1. Initiate vault instance and configure artifactory plugin on one of the paths as above
  2. Do the CLI "vault write artifactory/config/user_token/" and wait overtime for the lease to be created and revoked

Requirements for and issue

  • A description of the bug
  • A fully functioning vault configuration snippet that can be copy&pasted (no outside files or ENV vars unless that's part of the issue). If this is not supplied, this issue will likely be closed without any effort expended.
  • Your version of artifactory (you can curl it at $host/artifactory/api/system/version
  • Your version of vault
  • Your version of vault plugin
@alexhung
Copy link
Member

alexhung commented Jan 9, 2025

@Claudiordev @elestedt Even though the message above does not include the command to set access token for config/user_token, I assume the token is set and you still get the same issue?

@elestedt
Copy link

elestedt commented Jan 9, 2025

Yes. User has been able to retrieve tokens, then this appears.

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

3 participants