-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Prevent the retrieval of API tokens after creation #8853
Comments
Just to add, as I can potentially see it being an ask in the future, maybe also have a "Allow Token Retrieval" permission so that that can be locked down to a specific user/group. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide. |
you could show the first 4 and last 4 digits, so that there still is a way to link an token in a 'lost' script to an account |
Would this also somehow scramble it in the DB? Because it's a simple query to retrieve it for anyone access to the shell. |
@jeremystretch do we want to encrypt this in the database? Or just mask it on the frontend? |
I personally don't see the point. Anyone who has access to the Shell has access to do a lot more then simply obtain the API key, all without logging as well. |
NetBox version
v3.1.9
Feature type
New functionality
Proposed functionality
I'm opening this FR to explore the idea of preventing the export of API tokens after their creation. Upon creating a token, users would have one opportunity to copy the token out of NetBox, after which it will be functional but no longer accessible.
As there are likely use cases where retaining the ability to retrieve tokens is necessary, this should be implemented as a configuration parameter (e.g.
ALLOW_TOKEN_RETRIEVAL = False
). I don't anticipate any changes to the database, unless agreement is reached to remove this ability entirely.Use case
Provides greater security, as users can no longer retrieve API tokens from NetBox. If a token is lost, it will need to be replaced and all API consumers which used it will need to be updated with the new token.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: