Introduce a REST API endpoint for validating authentication tokens #11903

Closed
opened 2025-12-29 21:51:21 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 5, 2025).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.4.7

Feature type

New functionality

Proposed functionality

Introduce a new authenticated REST API endpoint (e.g. /api/auth-check/) that simply returns the user to whom the authentication credentials belong. A successfully authenticated request would return a serialized representation of the user. Failed authentication would return a 403 as with any other endpoint.

Use case

With the complete removal of API token plaintext retrieval in NetBox v4.5 (per #20492), there is no longer any means for an administrator to query for a user given a token plaintext (perhaps captured in the course of troubleshooting). This endpoint provides that functionality.

Database changes

N/A

External dependencies

N/A

Originally created by @jeremystretch on GitHub (Dec 5, 2025). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.4.7 ### Feature type New functionality ### Proposed functionality Introduce a new authenticated REST API endpoint (e.g. `/api/auth-check/`) that simply returns the user to whom the authentication credentials belong. A successfully authenticated request would return a serialized representation of the user. Failed authentication would return a 403 as with any other endpoint. ### Use case With the complete removal of API token plaintext retrieval in NetBox v4.5 (per #20492), there is no longer any means for an administrator to query for a user given a token plaintext (perhaps captured in the course of troubleshooting). This endpoint provides that functionality. ### Database changes N/A ### External dependencies N/A
adam added the status: acceptedtype: featurenetboxcomplexity: low labels 2025-12-29 21:51:21 +01:00
adam closed this issue 2025-12-29 21:51:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11903