adutra commented on code in PR #848:
URL: https://github.com/apache/polaris/pull/848#discussion_r1930509114
##########
service/common/src/main/java/org/apache/polaris/service/context/DefaultRealmIdResolver.java:
##########
@@ -36,15 +37,15 @@ public DefaultRealmIdResolver(RealmContextConfiguration
configuration) {
}
@Override
- public RealmId resolveRealmContext(
+ public RealmId resolveRealmId(
String requestURL, String method, String path, Map<String, String>
headers) {
String realm;
if (headers.containsKey(configuration.headerName())) {
realm = headers.get(configuration.headerName());
if (!configuration.realms().contains(realm)) {
- throw new IllegalArgumentException("Unknown realm: " + realm);
+ throw new NotAuthorizedException("Unknown realm: " + realm);
}
} else {
realm = configuration.defaultRealm();
Review Comment:
I completely agree, I think that having a default realm is a potential
security issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]