-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ACL Token ExpirationTTL is broken or not documented properly #15960
Comments
Hi @gbolo and thanks for raising this issue.
This is how it should be working, so I'll take a look into this along with improving the documentation around min/max values. |
Thanks @jrasell Would you mind if I also take a stab at this with you. Thinking it might be a good opportunity for a me to make my first PR to this project, as I been using nomad for about a year now and enjoy writing go code. |
Absolutely and thank you! I can't assign the ticket to you as you're not an internal member, so I'll keep it self assigned. If you have any questions feel free to ping me and I'll try to respond quickly. As an initial pointer, I believe on main there is code we use for |
Ahh I see, seems like this PR may need a more significant amount of work then I have initially anticipated (may not be a good fit for my first PR here). My apologies for flip flopping on this @jrasell Please carry on with your approach and I will stay tuned for the solution to this to familiarise myself with the code base. |
Nomad version
Nomad v1.4.3 (f464aca721d222ae9c1f3df643b3c3aaa20e2da7)
Issue
According to the documentation:
Create Token
POST /acl/token
Parameters:
As described above, one would assume that they can use a human readable string such as
"1h"
or"30m"
. However, this is not the case. Seems like the nomad API does not properly unmarshal this field intotime.Duration
. As such, only an integer representing nano seconds seems to be an acceptable value for this field, but that is not documented. Also it is not documented that there is an acceptable range:between 1m0s and 24h0m0s
according to the API responses I am receiving when using an integer.Reproduction steps
wont accept friendly string (despite being documented as a "convenience field" ;)
apparently there are also undocumented min/max values for this field:
Expected Result
I expect that the friendly strings should work, or that it is documented that this field should be an integer that represents how many nano seconds in the future that this token will be valid for. Also please document that acceptable range.
The text was updated successfully, but these errors were encountered: