Add config option to not expose SWAGGER schemas to unauthenticated users #8984

Closed
opened 2025-12-29 20:43:48 +01:00 by adam · 3 comments
Owner

Originally created by @XioNoX on GitHub (Dec 18, 2023).

NetBox version

3.2

Feature type

Change to existing functionality

Proposed functionality

Swagger metadata are by default opened to unauthenticated users.
I'd like to add a configuration option to be able to only expose them to authenticated users.

Even though it's only the metadata (and not read or write operations) public Netbox instances attract a significant amount of "Google traffic" and people experimenting with the API, slowing down Netbox. This is a real world issue we're having at Wikimedia.

An alternative would be to disable it by default (and not configuration option) to keep the config more learn, but this might be a breaking change for existing users.

I already have a working change on 14472c0cf4 (tested on 3.6) so I can send a PR if this is approved.

Use case

See above.

Database changes

None.

External dependencies

None.

Originally created by @XioNoX on GitHub (Dec 18, 2023). ### NetBox version 3.2 ### Feature type Change to existing functionality ### Proposed functionality Swagger metadata are by default opened to unauthenticated users. I'd like to add a configuration option to be able to only expose them to authenticated users. Even though it's only the metadata (and not read or write operations) public Netbox instances attract a significant amount of "Google traffic" and people experimenting with the API, slowing down Netbox. This is a real world issue we're having at Wikimedia. An alternative would be to disable it by default (and not configuration option) to keep the config more learn, but this might be a breaking change for existing users. I already have a working change on https://github.com/XioNoX/netbox/commit/14472c0cf4bc48f066af6da1c8f8b05084bd78d4 (tested on 3.6) so I can send a PR if this is approved. ### Use case See above. ### Database changes None. ### External dependencies None.
adam added the type: featurestatus: needs ownerpending closurecomplexity: medium labels 2025-12-29 20:43:48 +01:00
adam closed this issue 2025-12-29 20:43:48 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Dec 19, 2023):

Thanks for the feature suggestion, and particularly for teeing up a working change set. Please go ahead and make a PR.

@jeffgdotorg commented on GitHub (Dec 19, 2023): Thanks for the feature suggestion, and particularly for teeing up a working change set. Please go ahead and make a PR.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 21, 2024):

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 (Aug 21, 2024): 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/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Sep 20, 2024):

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 (Sep 20, 2024): 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#8984