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

Minor changes to keycloak-authorization docs and lower case for enum properties #9972

Merged
merged 1 commit into from
Jun 17, 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
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