openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
419 stars 512 forks source link

Restore `--base-wallet-routes` flag functionality #3344

Open esune opened 12 hours ago

esune commented 12 hours ago

Resolves #3283

The tenant_authentication has been updated to also allow access to the base wallet when the route matches a path defined using --base-wallet-routes.

Please note that, when compared to the previous implementation, the matcher has been made more greedy to tighten security: if an extra route of /test is specified, the matcher will only match that and not /testA or /test-something-else as it appears it would have done before.

One drawback of having to use this matcher inside the decorator is that I could not think of an elegant way of caching the compiled pattern for reuse - suggestions on how to achieve that, if desirable/required, will be welcome.

sonarcloud[bot] commented 11 hours ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

dbluhm commented 9 hours ago

Thanks @esune! I will test this in the scenario we're using and report back whether it works as expected.