Expand Token functionality #10557

Closed
opened 2025-12-29 21:33:06 +01:00 by adam · 2 comments
Owner

Originally created by @ihumster on GitHub (Dec 10, 2024).

NetBox version

v4.0.11

Feature type

Change to existing functionality

Triage priority

N/A

Proposed functionality

Currently, the Token model doesn't inherit CustomValidationMixin, which prevents adding Token Validation Rules to objects and extending functionality via Custom Validation Rules.

Need extend Token model with CustomValidationMixin and add configuration parameter (Dynamic I'm mean) for validate max expires lifetime

Use case

For security reasons, it is necessary to prohibit the creation of tokens:

  1. without expiration
  2. with a validity period of more than {TOKEN_EXPIRES_MAX}

Database changes

No response

External dependencies

No response

Originally created by @ihumster on GitHub (Dec 10, 2024). ### NetBox version v4.0.11 ### Feature type Change to existing functionality ### Triage priority N/A ### Proposed functionality Currently, the [Token model doesn't inherit CustomValidationMixin](https://github.com/netbox-community/netbox/discussions/18189#discussioncomment-11520982), which prevents adding Token Validation Rules to objects and extending functionality via Custom Validation Rules. Need extend Token model with CustomValidationMixin and add configuration parameter (Dynamic I'm mean) for validate max expires lifetime ### Use case For security reasons, it is necessary to prohibit the creation of tokens: 1. without expiration 2. with a validity period of more than {TOKEN_EXPIRES_MAX} ### Database changes _No response_ ### External dependencies _No response_
adam closed this issue 2025-12-29 21:33:06 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (May 15, 2025):

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. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (May 15, 2025): 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. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jun 15, 2025):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Jun 15, 2025): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10557