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
Support for setting expiration time when using the API token provisioning endpoint (/api/users/tokens/provision/) #12870
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Comments
iamroddo
added
the
type: bug
A confirmed report of unexpected behavior in the application
label
Jun 12, 2023
iamroddo
changed the title
Unable to set expiry time for token via API
Unable to set expiry time for token via API (api/users/tokens/provision/)
Jun 12, 2023
jeremystretch
changed the title
Unable to set expiry time for token via API (api/users/tokens/provision/)
Support for setting expiration time when using the API token provisioning endpoint (/api/users/tokens/provision/)
Jun 14, 2023
jeremystretch
added
type: feature
Introduction of new functionality to the application
status: needs owner
This issue is tentatively accepted pending a volunteer committed to its implementation
and removed
type: bug
A confirmed report of unexpected behavior in the application
labels
Jun 14, 2023
stuntguy3000
added a commit
to stuntguy3000/netbox
that referenced
this issue
Jun 15, 2023
…de All Token values
@stuntguy3000 Can you please comment on the issue so that I can it this to you? |
Sure |
abhi1693
added
status: accepted
This issue has been accepted for implementation
and removed
status: needs owner
This issue is tentatively accepted pending a volunteer committed to its implementation
labels
Jun 16, 2023
abhi1693
added a commit
that referenced
this issue
Aug 30, 2023
abhi1693
added a commit
that referenced
this issue
Aug 30, 2023
jeremystretch
pushed a commit
that referenced
this issue
Sep 1, 2023
jeremystretch
added a commit
that referenced
this issue
Sep 1, 2023
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
NetBox version
v3.5.3
Python version
3.10
Steps to Reproduce
API ignores "expires" attribute when generating a token for a user and sets value to null.
{"id":40,"url":"https://<netbox hostname>/api/users/tokens/40/","display":"<key>","user":{"id":1,"url":"https://<netbox hostname>/api/users/users/1/","display":"admin","username":"admin"},"created":"2023-06-12T12:51:57.222273Z","expires":null,"last_used":null,"key":"<key>","write_enabled":true,"description":"","allowed_ips":null}
If an invalid date string is set to the value of "expires" the same thing happens.
Expected Behavior
The response should be that the "expires" is set to that which is in the request payload, or an error if it is invalid and not setting it to null which has the result that the token has unlimited validity.
Observed Behavior
All tokens set via the API have unlimited validity.
The text was updated successfully, but these errors were encountered: