-
Notifications
You must be signed in to change notification settings - Fork 516
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
Admin Swagger UI not available when using api-key #567
Comments
I think this mainly because the swagger doc route is also protected. I used a chrome extension called |
Thanks @msembinelli, that is a good suggestion! I personally would prefer if the doc route was unprotected in view mode, and requested an api-key could be entered in the swagger UI directly (see here as an example). It may not be possible or easy to implement in our case though, I haven't looked into it yet - maybe @andrewwhitehead, @nrempel or @sklump can weigh in since they are more familiar with the swagger docs for aca-py. Either way, having the workaround tracked here will be useful for future developers :) |
No problem @esune , I banged my head against the wall at this one for awhile. I agree that adding the auth button to input the token on swagger would be a much desired change. As for unprotecting the route, maybe this is something that can be turned on with a debug parameter (so not as to use it in production)? |
How to reproduce
Start an instance of aca-py using the following command:
This will start aca-py and activate its admin interface, expose it on port 5000 and protect requests targeting it using the specified api-key.
Expected result:
Navigating to http://localhost:5000 in the web browser results in the Swagger UI being displayed. Requests made through the UI will not work unless the api-key is provided (Swagger has a mechanism that allows to do so).
Actual result:
The agent returns the error message
401: unauthorized
This is an issue during development as it forces developers to start another instance of the agent just to check the Swagger docs, while it should be possible to use the currently running instance.
The text was updated successfully, but these errors were encountered: