Skip to content

Commit

Permalink
Merge pull request #9583 from pedroigor/issue-8469
Browse files Browse the repository at this point in the history
Configuration properties references for keycloak-authorization extension
  • Loading branch information
gsmet authored May 26, 2020
2 parents 3f8ef97 + ff108c0 commit 8569b49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/src/main/asciidoc/security-keycloak-authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ In the default configuration, Keycloak is responsible for managing the roles and
To configure the protected routes using the `@RolesAllowed` annotation or the `application.properties` file, check the link:security-openid-connect[Using OpenID Connect Adapter to Protect JAX-RS Applications] guide. For more details, check the link:security[Security guide].
== Configuration Reference
The configuration is based on the official https://www.keycloak.org/docs/latest/authorization_services/index.html#_enforcer_filter[Keycloak Policy Enforcer Configuration]. If you are looking for more details about the different configuration options, please take a look at this documentation,
include::{generated-dir}/config/quarkus-keycloak-keycloak-policy-enforcer-config.adoc[opts=optional]
== References
* https://www.keycloak.org/documentation.html[Keycloak Documentation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ private PolicyEnforcerConfig getPolicyEnforcerConfig(KeycloakPolicyEnforcerConfi
PolicyEnforcerConfig enforcerConfig = new PolicyEnforcerConfig();

enforcerConfig.setLazyLoadPaths(config.policyEnforcer.lazyLoadPaths);
enforcerConfig.setEnforcementMode(
PolicyEnforcerConfig.EnforcementMode.valueOf(config.policyEnforcer.enforcementMode));
enforcerConfig.setEnforcementMode(config.policyEnforcer.enforcementMode);
enforcerConfig.setHttpMethodAsScope(config.policyEnforcer.httpMethodAsScope);

KeycloakPolicyEnforcerConfig.KeycloakConfigPolicyEnforcer.PathCacheConfig pathCache = config.policyEnforcer.pathCache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public static class KeycloakConfigPolicyEnforcer {
/**
* Specifies how policies are enforced.
*/
@ConfigItem(defaultValue = "ENFORCING")
public String enforcementMode;
@ConfigItem(defaultValue = "enforcing")
public PolicyEnforcerConfig.EnforcementMode enforcementMode;

/**
* Specifies the paths to protect.
Expand Down

0 comments on commit 8569b49

Please sign in to comment.