Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Partition
Commits
0e00500a
Commit
0e00500a
authored
Aug 26, 2021
by
Vibhuti Sharma [Microsoft]
Browse files
addressing MR comments
parent
c5773b74
Pipeline
#61105
failed with stages
in 1 minute and 50 seconds
Changes
3
Pipelines
5
Expand all
Show whitespace changes
Inline
Side-by-side
NOTICE
View file @
0e00500a
This diff is collapsed.
Click to expand it.
provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/security/AzureIstioSecurityFilter.java
View file @
0e00500a
...
...
@@ -3,6 +3,7 @@ package org.opengroup.osdu.partition.provider.azure.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
;
...
...
@@ -44,7 +45,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
))
{
...
...
@@ -73,7 +74,7 @@ public class AzureIstioSecurityFilter extends OncePerRequestFilter {
}
}
catch
(
ParseException
ex
)
{
LOGGER
.
error
(
"Failed to initialize UserPrincipal."
,
ex
);
throw
new
Servlet
Exception
(
ex
);
throw
new
App
Exception
(
500
,
"Unable to parse claims in istio payload"
,
ex
.
getMessage
()
);
}
try
{
filterChain
.
doFilter
(
servletRequest
,
servletResponse
);
...
...
provider/partition-azure/src/main/resources/application-local.properties
0 → 100644
View file @
0e00500a
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
runtime.env.local
=
true
azure.activedirectory.client-id
=
${aad_client_id}
azure.activedirectory.AppIdUri
=
api://${azure.activedirectory.client-id}
azure.activedirectory.session-stateless
=
true
# Istio Auth Enabled
azure.istio.auth.enabled
=
false
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment