第 5 章 配置集
Red Hat Single Sign-On 有两个配置集:产品和预览。产品配置集默认为启用,它会禁用一些技术预览功能。要启用功能,您可以切换到 preview 配置集或启用单个功能。
启用 preview 配置集启动服务器:
bin/standalone.sh|bat -Dkeycloak.profile=preview
bin/standalone.sh|bat -Dkeycloak.profile=preview
您可以通过在域模式中为 server-one
创建文件 standalone/configuration/profile.properties
(或 domain/servers/server-one/configuration/profile.properties
)来永久设置。在文件中添加以下内容:
profile=preview
profile=preview
可以启用和禁用的功能有:
Name | 描述 | 默认启用 |
---|---|---|
授权 | 授权服务 | 否 |
docker | Docker Registry 协议 | 否 |
模拟 | 管理员能够模拟用户 | 是 |
script | 使用 JavaScript 编写自定义验证器 | 否 |
要启用特定的功能,请使用以下内容启动服务器:
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=enabled
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=enabled
例如,启用 Docker 使用 -Dkeycloak.profile.feature.docker=enabled
。
要禁用特定的功能,请使用以下内容启动服务器:
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=disabled
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=disabled
例如,禁用 Impersonation use -Dkeycloak.profile.feature.impersonation=disabled
。
您可以通过添加以下内容在 profile.properties
文件中永久设置:
feature.impersonation=disabled
feature.impersonation=disabled
要在不启用完整预览配置集的情况下启用特定功能,您可以使用以下方法启动服务器:
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=enabled`
bin/standalone.sh|bat -Dkeycloak.profile.feature.<feature name>=enabled`
例如,要启用授权服务,请使用 -Dkeycloak.profile.feature.authorization=enabled
。
您可以通过添加以下内容在 profile.properties
文件中永久设置:
feature.authorization=enabled
feature.authorization=enabled