Skip to content
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

API token is passed to retrieve NetBox version #641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kani999
Copy link
Contributor

@Kani999 Kani999 commented Aug 30, 2024

Fixes: #640

  • Updated the version property in pynetbox/core/api.py to pass the API token when calling get_version.
  • No problem raised even if the token is None
  • This change addresses the issue where nb.version returns an empty string when using an OIDC proxy, due to unauthorized requests being redirected to the login page.

Closes #640

- Updated the `version` property in `pynetbox/core/api.py` to pass the API token when calling `get_version`.
- No problem raised even if the token is None
- This change addresses the issue where `nb.version` returns an empty string when using an OIDC proxy, due to unauthorized requests being redirected to the login page.
Copy link

@rondemena rondemena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a non-breaking unfortunately necessary change to get operations successful without local circumventions, can we get this drawn in?

@rondemena
Copy link

It was not my intent to trigger git checks and move to the next step but to bring relevance to the fix is desired in other places and reinforce the proposed change, apologies to the maintainers.

@mmauksch
Copy link

someone correct me if I'm wrong but isn't this already addressed and merged in #616
I've stumbled over the same problem regarding netbox-community/Device-Type-Library-Import#134

@Kani999
Copy link
Contributor Author

Kani999 commented Sep 19, 2024

someone correct me if I'm wrong but isn't this already addressed and merged in #616 I've stumbled over the same problem regarding netbox-community/Device-Type-Library-Import#134

I don't think so. With our specific configuration, where a redirect occurs when the user is not authorized, it won't trigger a 403 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nb.version Returns an Empty String Due to OIDC Proxy Configuration
3 participants