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

OPTIONS requests should be allowed without requiring Authorization token #1989

Closed
rpobulic opened this issue Oct 26, 2022 · 7 comments
Closed

Comments

@rpobulic
Copy link

rpobulic commented Oct 26, 2022

On current main, similar to #1575 , but while using multitenant.
log:
Handler error with exception: Unauthorized
10.0.0.231 [26/Oct/2022:10:03:31 +0000] "OPTIONS /connections HTTP/1.1" 401 178 "https://...

@rpobulic
Copy link
Author

rpobulic commented Nov 6, 2022

I made a successful fix in aries_cloudagent/admin/server.py in my local rep:

            # base wallet is not allowed to perform ssi related actions.
            # Only multitenancy and general server actions
            if (
                not authorization_header
                and not is_multitenancy_path
                and not is_server_path
                and not is_unprotected_path(path)
                and not base_limited_access_path
                and not (request.method == "OPTIONS")# CORS fix
            ):
                raise web.HTTPUnauthorized()

Tested for several days, no problems.
If this logic is OK, can it be fixed in main?

@swcurran
Copy link
Contributor

swcurran commented Nov 8, 2022

@TimoGlastra @ianco -- thoughts on this one? Should that be allowed?

@ianco
Copy link
Contributor

ianco commented Nov 8, 2022

Seems ok to me. @rpobulic can you provide a PR?

@rpobulic
Copy link
Author

rpobulic commented Nov 8, 2022

I am not a Python programmer, so I am not contributing to aca-py, thus I am not setup for providing a PR. Please, can you just copy that one line and make a PR?

@ianco
Copy link
Contributor

ianco commented Nov 21, 2022

FYI taking a look at this now ...

@ianco
Copy link
Contributor

ianco commented Nov 24, 2022

@rpobulic the fix is in the main branch

@rpobulic
Copy link
Author

Works OK now, thank you!

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

No branches or pull requests

3 participants