Skip to content

Introduce a REST API endpoint for validating authentication tokens #20936

@jeremystretch

Description

@jeremystretch

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

Metadata

Metadata

Assignees

Labels

complexity: lowRequires minimal effort to implementnetboxstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions