-
When I use Postman for testing, the API token I (the administrator) create is always unavailable and keeps returning a 401 error. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Ah, interesting! This is a good point and is an oversight that we should address. I can explain why it's happening: in Malcolm, all of the external access is reverse proxied through an NGINX server that acts as a reverse proxy and also handles all of the authentication across all of the components. This is so the authentication can happen in one place, rather than having to be controlled individually across the components. However, this means that even for something like an API call for netbox that is using a token, it's still going through the same authentication path, as in this case NGINX doesn't know the difference between your token-authenticated API call and access to NetBox's user interface. So it's still going to ask for the authentication username/password as it would another user, even though it's passing the NetBox API token along. I'm sure there's something we can do to make this work the way it should, but as of today that's unfortunately what's going on. I'm going to log an issue in the issue tracker to figure out how to address this in an upcoming release. See idaholab#532 |
Beta Was this translation helpful? Give feedback.
-
Thank you for your prompt reply, which has helped me a lot. I have a few more questions:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Ah, interesting! This is a good point and is an oversight that we should address. I can explain why it's happening: in Malcolm, all of the external access is reverse proxied through an NGINX server that acts as a reverse proxy and also handles all of the authentication across all of the components. This is so the authentication can happen in one place, rather than having to be controlled individually across the components.
However, this means that even for something like an API call for netbox that is using a token, it's still going through the same authentication path, as in this case NGINX doesn't know the difference between your token-authenticated API call and access to NetBox's user …