Skip to content

Commit

Permalink
[fixes #8469] - Minor changes to keycloak-authorization docs and lowe…
Browse files Browse the repository at this point in the history
…r case for enum properties
  • Loading branch information
pedroigor committed Jun 16, 2020
1 parent 1efbafe commit 5888c4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 5 additions & 4 deletions docs/src/main/asciidoc/security-keycloak-authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,17 @@ public class ProtectedResource {
== Mapping Protected Resources
By default, the extension loads all the protected resources managed by Keycloak where their `URI` are used to map the resources
in your application that should be protected. This is done during the application startup.
By default, the extension is going to fetch resources on-demand from Keycloak where their `URI` are used to map the resources in your application that should be protected.
If you want to disable this behavior and map resources on-demand, you can use the following configuration:
If you want to disable this behavior and fetch resources during startup, you can use the following configuration:
[source,properties]
----
quarkus.keycloak.policy-enforcer.lazy-load-paths=true
quarkus.keycloak.policy-enforcer.lazy-load-paths=false
----
Note that, depending on how many resources you have in Keycloak the time taken to fetch them may impact your application startup time.
== More About Configuring Protected Resources
In the default configuration, Keycloak is responsible for managing the roles and deciding who can access which routes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.quarkus.runtime.annotations.DefaultConverter;

@ConfigRoot(name = "keycloak", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public class KeycloakPolicyEnforcerConfig {
Expand Down Expand Up @@ -108,8 +107,7 @@ public static class PathConfig {
/**
* Specifies how policies are enforced
*/
@DefaultConverter
@ConfigItem(defaultValue = "ENFORCING")
@ConfigItem(defaultValue = "enforcing")
public PolicyEnforcerConfig.EnforcementMode enforcementMode;

/**
Expand Down Expand Up @@ -139,8 +137,7 @@ public static class MethodConfig {
/**
* A string referencing the enforcement mode for the scopes associated with a method
*/
@DefaultConverter
@ConfigItem(defaultValue = "ALL")
@ConfigItem(defaultValue = "all")
public PolicyEnforcerConfig.ScopeEnforcementMode scopesEnforcementMode;
}

Expand Down

0 comments on commit 5888c4c

Please sign in to comment.