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

Configuration properties references for keycloak-authorization extension #9583

Merged
merged 2 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
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
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