jfrog / vault-plugin-secrets-artifactory

HashiCorp Vault Secrets Plugin for Artifactory
https://jfrog.com
Apache License 2.0
39 stars 20 forks source link

include_reference_token and refreshable not working when configured by default #154

Closed loicgreffier closed 6 months ago

loicgreffier commented 6 months ago

Describe the bug

When configuring the user_token with include_reference_token and refreshable parameters set to true, requesting a user token seems to not return the reference_token and refresh_token by default.

To Reproduce Steps to reproduce the behavior:

  1. Configure the user_token
vault write artifactory/config/user_token max_ttl=600 default_ttl=600 include_reference_token=true refreshable=true
  1. Check it has been activated
Key                        Value
---                        -----
audience                   n/a
default_description        Generated by Vault
default_ttl                10m
include_reference_token    true
max_ttl                    10m
refreshable                true
  1. Request a token
vault read artifactory/user_token/myUser
  1. In the response, reference token and refresh token are missing
Key                Value
---                -----
...
reference_token    n/a
refresh_token      n/a
...

However, when specifying the include_reference_token and refreshable parameters when requesting the token

vault read artifactory/user_token/myUser include_reference_token=true refreshable=true

It works, the tokens are returned as expected

Requirements for and issue

Expected behavior I was expecting to not having to specify the parameters when requesting the token, as they were defined to true on the default configuration. Is this current behaviour the expected behaviour, or did I miss something ?

alexhung commented 6 months ago

@loicgreffier The fix was added in PR #152. I have some more feature/update to add before I can cut a release. Expect to complete this week.

loicgreffier commented 6 months ago

@alexhung Thank you for the information, the issue can be closed I guess

alexhung commented 6 months ago

@loicgreffier Let's keep it open until the updates are released 😄