Commit 5a598ffc authored by Vibhuti Sharma [Microsoft]'s avatar Vibhuti Sharma [Microsoft]
Browse files

nit

parent 52f5d9d1
Pipeline #61218 failed with stages
in 82 minutes and 18 seconds
......@@ -3,6 +3,7 @@ package org.opengroup.osdu.schema.security;
import com.azure.spring.autoconfigure.aad.UserPrincipal;
import com.nimbusds.jwt.JWTClaimsSet;
import net.minidev.json.JSONArray;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
......@@ -48,7 +49,7 @@ public class AzureIstioSecurityFilter extends OncePerRequestFilter {
protected void doFilterInternal(final HttpServletRequest servletRequest, final HttpServletResponse servletResponse, final FilterChain filterChain) throws ServletException, IOException {
final String istioPayload = servletRequest.getHeader(X_ISTIO_CLAIMS_PAYLOAD);
LOGGER.info(String.format("Received headers list: %s", Collections.list(servletRequest.getHeaderNames())));
LOGGER.debug("Received headers list: {}", Collections.list(servletRequest.getHeaderNames()));
try {
if (hasText(istioPayload)) {
......@@ -77,7 +78,7 @@ public class AzureIstioSecurityFilter extends OncePerRequestFilter {
}
} catch (ParseException ex) {
LOGGER.error("Failed to initialize UserPrincipal.", ex);
throw new ServletException(ex);
throw new AppException(500, "Unable to parse claims in istio payload", ex.getMessage());
}
try {
filterChain.doFilter(servletRequest, servletResponse);
......
......@@ -21,9 +21,9 @@ AUTHORIZE_API_KEY=${entitlements_service_api_key}
# Azure AD configuration, commented below settings to disable AAD AuthN,
# Uncomment it In the Istio AUTHN disabled Scenario
azure.activedirectory.client-id=${aad_client_id}
azure.activedirectory.AppIdUri=api://${azure.activedirectory.client-id}
azure.activedirectory.session-stateless=true
# azure.activedirectory.client-id=${aad_client_id}
# azure.activedirectory.AppIdUri=api://${azure.activedirectory.client-id}
# azure.activedirectory.session-stateless=true
# Azure CosmosDB configuration
azure.cosmosdb.database=${cosmosdb_database}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment