[KEYCLOAK-7598] - Set CIP config when defining paths in policy enforcer config (#5264)
This commit is contained in:
parent
182c975e01
commit
d897159560
1 changed files with 10 additions and 0 deletions
|
@ -271,7 +271,17 @@ public class PolicyEnforcer {
|
||||||
List<ResourceRepresentation> matchingResources = authzClient.protection().resource().findByMatchingUri(targetUri);
|
List<ResourceRepresentation> matchingResources = authzClient.protection().resource().findByMatchingUri(targetUri);
|
||||||
|
|
||||||
if (!matchingResources.isEmpty()) {
|
if (!matchingResources.isEmpty()) {
|
||||||
|
Map<String, Map<String, Object>> cipConfig = null;
|
||||||
|
|
||||||
|
if (pathConfig != null) {
|
||||||
|
cipConfig = pathConfig.getClaimInformationPointConfig();
|
||||||
|
}
|
||||||
|
|
||||||
pathConfig = PathConfig.createPathConfig(matchingResources.get(0));
|
pathConfig = PathConfig.createPathConfig(matchingResources.get(0));
|
||||||
|
|
||||||
|
if (cipConfig != null) {
|
||||||
|
pathConfig.setClaimInformationPointConfig(cipConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception cause) {
|
} catch (Exception cause) {
|
||||||
LOGGER.errorf(cause, "Could not lazy load resource with path [" + targetUri + "] from server");
|
LOGGER.errorf(cause, "Could not lazy load resource with path [" + targetUri + "] from server");
|
||||||
|
|
Loading…
Reference in a new issue