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

Stop mandate organization qualified paths for organization resource access #246

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ protected synchronized void startInternal() throws LifecycleException {
contextsToRewrite = getContextsToRewrite();
contextListToOverwriteDispatch = getContextListToOverwriteDispatchLocation();
ignorePathListForOverwriteDispatch = getIgnorePathListForOverwriteDispatch();
organizationRoutingOnlySupportedAPIPaths = getOrganizationRoutingOnlySupportedAPIPaths();
isTenantQualifiedUrlsEnabled = isTenantQualifiedUrlsEnabled();

}
Expand Down Expand Up @@ -118,20 +117,6 @@ public void invoke(Request request, Response response) throws IOException, Servl
getNext().invoke(request, response);
return;
}
if (isWebApp) {
boolean organizationRoutingOnlySupportedAPIPath = false;
for (String path : organizationRoutingOnlySupportedAPIPaths) {
if (StringUtils.contains(requestURI, path)) {
organizationRoutingOnlySupportedAPIPath = true;
break;
}
}
// Tenant context rewriting should not happen for organization routing only supported API paths.
if (organizationRoutingOnlySupportedAPIPath) {
getNext().invoke(request, response);
return;
}
}

tenantManager = ContextRewriteValveServiceComponentHolder.getInstance().getRealmService()
.getTenantManager();
Expand Down Expand Up @@ -241,11 +226,6 @@ private List<String> getIgnorePathListForOverwriteDispatch() {
return getConfigValues("TenantContextsToRewrite.OverwriteDispatch.IgnorePath");
}

private List<String> getOrganizationRoutingOnlySupportedAPIPaths() {

return getConfigValues("OrgRoutingOnlySupportedAPIPaths.Path");
}

private List<String> getConfigValues(String elementPath) {

Map<String, Object> configuration = IdentityConfigParser.getInstance().getConfiguration();
Expand Down