Skip to content

Issue with nb.version Returning an Empty String #639

Closed Answered by Kani999
Kani999 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi everyone,

I've figured out why the nb.version property was consistently returning an empty string.

The issue stems from the fact that we're using an OIDC (OpenID Connect) proxy for authentication when connecting to NetBox. In our Apache configuration, we have the following setup:

<Location /api>
    <If "-z req('authorization')">
      Require valid-user
    </If>
    <Else>
       Require ip <IP_ADDRESS_RANGE>
    </Else>
</Location>

This configuration requires authorization for accessing the NetBox API. If the request doesn't include an authorization token, the proxy redirects the user to the login page of the OIDC provider. As a result, when the get_version method in pynetbox tries …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kani999
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant