Classes
Public Classes
keycloak
: Manage Keycloakkeycloak::config
: Private class.keycloak::datasource::h2
: Private class.keycloak::install
: Private class.keycloak::service
: Private class.keycloak::sssd
: Private class.
Private Classes
keycloak::datasource::mysql
: Manage MySQL datasourcekeycloak::datasource::oracle
: Manage Oracle datasourcekeycloak::datasource::postgresql
: Manage postgresql datasourcekeycloak::resources
: Define Keycloak resources
Defined types
keycloak::client_scope::oidc
: Manage Keycloak OpenID Connect client scope using built-in mapperskeycloak::client_scope::saml
: Manage Keycloak SAML client scope using built-in mapperskeycloak::spi_deployment
: Manage Keycloak SPI deploymentkeycloak::truststore::host
: Add host to Keycloak truststore
Resource types
keycloak_api
: Type that configures API connection parameters for other keycloak types that use the Keycloak API.keycloak_client
: Manage Keycloak clientskeycloak_client_protocol_mapper
: Manage Keycloak protocol mapperskeycloak_client_scope
: Manage Keycloak client scopeskeycloak_conn_validator
: Verify that a connection can be successfully established between a node and the keycloak server. Its primary use is as a precondition to prekeycloak_flow
: Manage a Keycloak flow Autorequires *keycloak_realm
defined forrealm
parameter *keycloak_flow
offlow_alias
if `top_level=falskeycloak_flow_execution
: Manage a Keycloak flow Autorequires *keycloak_realm
defined forrealm
parameter *keycloak_flow
of value defined forflow_alias
keycloak_identity_provider
: Manage Keycloak identity providerskeycloak_ldap_mapper
: Manage Keycloak LDAP attribute mapperskeycloak_ldap_user_provider
: Manage Keycloak LDAP user providerskeycloak_protocol_mapper
: Manage Keycloak client scope protocol mapperskeycloak_realm
: Manage Keycloak realmskeycloak_resource_validator
: Verify that a specific Keycloak resource is availablekeycloak_sssd_user_provider
: Manage Keycloak SSSD user providers
Manage Keycloak
include ::keycloak
The following parameters are available in the keycloak
class.
Data type: Boolean
Install Keycloak from upstream Keycloak tarball. Set to false to manage installation of Keycloak outside this module and set $install_dir to match. Defaults to true.
Default value: true
Data type: String
Version of Keycloak to install and manage.
Default value: '8.0.1'
Data type: Optional[Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]]
URL of the Keycloak download. Default is based on version.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The directory of where to install Keycloak.
Default is /opt/keycloak-${version}
.
Default value: undef
Data type: String
Keycloak service name.
Default is keycloak
.
Default value: 'keycloak'
Data type: String
Keycloak service ensure property.
Default is running
.
Default value: 'running'
Data type: Boolean
Keycloak service enable property.
Default is true
.
Default value: true
Data type: Boolean
Keycloak service hasstatus parameter.
Default is true
.
Default value: true
Data type: Boolean
Keycloak service hasrestart parameter.
Default is true
.
Default value: true
Data type: Stdlib::IP::Address
Bind address for Keycloak service. Default is '0.0.0.0'.
Default value: '0.0.0.0'
Data type: Optional[Variant[String, Array]]
Sets additional options to Java virtual machine environment variable.
Default value: undef
Data type: Boolean
Determine if $JAVA_OPTS should be appended to when setting java_opts
parameter
Default value: true
Data type: Optional[String]
Additional options added to the end of the service command-line.
Default value: undef
Data type: Boolean
Defines if the module should manage the Linux user for Keycloak installation
Default value: true
Data type: String
Keycloak user name.
Default is keycloak
.
Default value: 'keycloak'
Data type: Stdlib::Absolutepath
Keycloak user shell.
Default value: '/sbin/nologin'
Data type: String
Keycloak user group name.
Default is keycloak
.
Default value: 'keycloak'
Data type: Optional[Integer]
Keycloak user UID.
Default is undef
.
Default value: undef
Data type: Optional[Integer]
Keycloak user group GID.
Default is undef
.
Default value: undef
Data type: String
Keycloak administrative username.
Default is admin
.
Default value: 'admin'
Data type: String
Keycloak administrative user password.
Default is changeme
.
Default value: 'changeme'
Data type: Boolean
Boolean that determines if configured datasource will be managed.
Default is true
.
Default value: true
Data type: Enum['h2', 'mysql', 'oracle', 'postgresql']
Datasource driver to use for Keycloak.
Valid values are h2
, mysql
, 'oracle' and 'postgresql'
Default is h2
.
Default value: 'h2'
Data type: Optional[String]
Datasource host.
Only used when datasource_driver is mysql
, 'oracle' or 'postgresql'
Default is localhost
for MySQL.
Default value: undef
Data type: Optional[Integer]
Datasource port.
Only used when datasource_driver is mysql
, 'oracle' or 'postgresql'
Default is 3306
for MySQL.
Default value: undef
Data type: Optional[String]
Datasource url. Default datasource URLs are defined in init class.
Default value: undef
Data type: String
Datasource database name.
Default is keycloak
.
Default value: 'keycloak'
Data type: String
Datasource user name.
Default is sa
.
Default value: 'sa'
Data type: String
Datasource user password.
Default is sa
.
Default value: 'sa'
Data type: Optional[String]
Package to add specified datasource support
Default value: undef
Data type: Optional[String]
Source for datasource JDBC driver - could be puppet link or local file on the node.
Default is dependent on value for datasource_driver
.
This parameter is required if datasource_driver
is oracle
.
Default value: undef
Data type: Optional[String]
Source for datasource module.xml. Default depends on datasource_driver
.
Default value: undef
Data type: Optional[String]
MySQL Connector/J JDBC driver xa-datasource class name
Default value: undef
Data type: Boolean
Boolean that sets if HTTPS proxy should be enabled.
Set to true
if proxying traffic through Apache.
Default is false
.
Default value: false
Data type: Boolean
Boolean that sets if truststore should be used.
Default is false
.
Default value: false
Data type: Hash
Hash that is used to define keycloak::turststore::host
resources.
Default is {}
.
Default value: {}
Data type: String
Truststore password.
Default is keycloak
.
Default value: 'keycloak'
Data type: Enum['WILDCARD', 'STRICT', 'ANY']
Valid values are WILDCARD
, STRICT
, and ANY
.
Default is WILDCARD
.
Default value: 'WILDCARD'
Data type: Integer
HTTP port used by Keycloak.
Default is 8080
.
Default value: 8080
Data type: Integer
Max cache age in seconds of static content.
Default is 2592000
.
Default value: 2592000
Data type: Boolean
Boolean that sets if themes should be cached.
Default is true
.
Default value: true
Data type: Boolean
Boolean that sets if templates should be cached.
Default is true
.
Default value: true
Data type: Hash
Hash that is used to define keycloak_realm resources.
Default is {}
.
Default value: {}
Data type: Boolean
Boolean that sets if realms
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak::client_scope::oidc resources.
Default is {}
.
Default value: {}
Data type: Boolean
Boolean that sets if oidc_client_scopes
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak::client_scope::saml resources.
Default is {}
.
Default value: {}
Data type: Boolean
Boolean that sets if saml_client_scopes
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak_identity_provider resources.
Default value: {}
Data type: Boolean
Boolean that sets if identity_providers
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak_client_scope resources.
Default value: {}
Data type: Boolean
Boolean that sets if client_scopes
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak_protocol_mapper resources.
Default value: {}
Data type: Boolean
Boolean that sets if protocol_mappers
should be merged from Hiera.
Default value: false
Data type: Hash
Hash that is used to define keycloak_client resources.
Default value: {}
Data type: Boolean
Boolean that sets if clients
should be merged from Hiera.
Default value: false
Data type: Hash
Hash taht is used to define keycloak_flow resources.
Default value: {}
Data type: Boolean
Boolean that sets if flows
should be merged from Hiera.
Default value: false
Data type: Hash
Hash taht is used to define keycloak_flow resources.
Default value: {}
Data type: Boolean
Boolean that sets if flows
should be merged from Hiera.
Default value: false
Data type: Boolean
Boolean that determines if SSSD user provider support should be available
Default value: false
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]
Source URL of libunix-dbus-java
Default value: 'https://github.com/keycloak/libunix-dbus-java/archive/libunix-dbus-java-0.8.0.tar.gz'
Data type: Boolean
Boolean that determines of libunix-dbus-java build dependencies are managed by this module
Default value: true
Data type: Array
Packages needed to build libunix-dbus-java
Default value: []
Data type: Stdlib::Absolutepath
Path to directory to install libunix-dbus-java libraries
Default value: '/usr/lib64'
Data type: String
Package name for jna
Default value: 'jna'
Data type: Boolean
Boolean that determines if SSSD ifp config for Keycloak is managed
Default value: true
Data type: Array
user_attributes to define for SSSD ifp service
Default value: []
Data type: Boolean
Boolean that determines if SSSD should be restarted
Default value: true
Data type: Optional[Stdlib::Absolutepath]
Path to the file with environment variables for the systemd service
Default value: undef
Data type: Enum['standalone', 'clustered']
Keycloak operating mode deployment
Default value: 'standalone'
Data type: Boolean
Use JDBC_PING to discover the nodes and manage the replication of data
More info: http://jgroups.org/manual/#_jdbc_ping
Only applies when operating_mode
is clustered
JDBC_PING uses port 7600 to ensure cluster members are discoverable by each other
This module does not manage firewall changes
Default value: false
Data type: Stdlib::IP::Address
JBoss bind public IP address
Default value: $facts['networking']['ip']
Data type: Stdlib::IP::Address
JBoss bind private IP address
Default value: $facts['networking']['ip']
Data type: Boolean
Boolean that determines if userCache is enabled
Default value: true
Data type: Array
List of technology Preview features to enable
Default value: []
Data type: Boolean
Set if exploded deployements will be auto deployed
Default value: false
Data type: Boolean
Set if zipped deployments will be auto deployed
Default value: true
Data type: Hash
Hash used to define keycloak::spi_deployment resources
Default value: {}
Data type: Optional[String]
Custom configuration content to be added to config.cli
Default value: undef
Data type: Optional[Variant[String, Array]]
Custom configuration source file to be added to config.cli
Default value: undef
Private class.
Private class.
Private class.
Private class.
Private class.
Manage Keycloak OpenID Connect client scope using built-in mappers
keycloak::client_scope::oidc { 'oidc-clients':
realm => 'test',
}
The following parameters are available in the keycloak::client_scope::oidc
defined type.
Data type: String
Realm of the client scope.
Data type: String
Name of the client scope resource
Default value: $name
Manage Keycloak SAML client scope using built-in mappers
keycloak::client_scope::saml { 'saml-clients':
realm => 'test',
}
The following parameters are available in the keycloak::client_scope::saml
defined type.
Data type: String
Realm of the client scope.
Data type: String
Name of the client scope resource
Default value: $name
}
keycloak::spi_deployment { 'duo-spi':
ensure => 'present',
deployed_name => 'keycloak-duo-spi-jar-with-dependencies.jar',
source => 'file:///path/to/source/keycloak-duo-spi-jar-with-dependencies.jar',
}
keycloak::spi_deployment { 'duo-spi':
deployed_name => 'keycloak-duo-spi-jar-with-dependencies.jar',
source => 'file:///path/to/source/keycloak-duo-spi-jar-with-dependencies.jar',
test_url => 'authentication/authenticator-providers',
test_key => 'id',
test_value => 'duo-mfa-authenticator',
test_realm => 'test',
before => Keycloak_flow_execution['duo-mfa-authenticator under form-browser-with-duo on test'],
The following parameters are available in the keycloak::spi_deployment
defined type.
Data type: Enum['present', 'absent']
State of the deployment
Default value: 'present'
Data type: String[1]
Name of the file to be deployed. Defaults to $name
.
Default value: $name
Data type: Variant[Stdlib::Filesource, Stdlib::HTTPSUrl]
Source of the deployment, supports 'file://', 'puppet://', 'https://' or 'http://'
Data type: Optional[String]
URL to test for existance of resources created by this SPI
Default value: undef
Data type: Optional[String]
Key of resource when testing for resource created by this SPI
Default value: undef
Data type: Optional[String]
Value of the test_key
when testing for resources created by this SPI
Default value: undef
Data type: Optional[String]
Realm to query when looking for resources created by this SPI
Default value: undef
Add host to Keycloak truststore
keycloak::truststore::host { 'ldap1.example.com':
certificate => '/etc/openldap/certs/0a00000.0',
}
The following parameters are available in the keycloak::truststore::host
defined type.
Data type: String
Path to host certificate
Data type: Enum['latest', 'present', 'absent']
Host ensure value passed to java_ks
resource.
Default value: 'latest'
Type that configures API connection parameters for other keycloak types that use the Keycloak API.
keycloak_api { 'keycloak'
install_dir => '/opt/keycloak',
server => 'http://localhost:8080/auth',
realm => 'master',
user => 'admin',
password => 'changeme',
}
The following parameters are available in the keycloak_api
type.
namevar
Keycloak API config
Install location of Keycloak
Default value: /opt/keycloak
Auth URL for Keycloak server
Default value: http://localhost:8080/auth
Realm for authentication
Default value: master
User for authentication
Default value: admin
Password for authentication
Default value: changeme
Valid values: true
, false
Boolean that determines if kcadm_wrapper.sh should be used
Default value: false
Manage Keycloak clients
keycloak_client { 'www.example.com':
ensure => 'present',
realm => 'test',
redirect_uris => [
"https://www.example.com/oidc",
"https://www.example.com",
],
default_client_scopes => ['profile','email'],
secret => 'supersecret',
}
The following properties are available in the keycloak_client
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: openid-connect, saml
protocol
Default value: openid-connect
clientAuthenticatorType
Default value: client-secret
defaultClientScopes
Default value: []
optionalClientScopes
Default value: []
Valid values: true
, false
fullScopeAllowed
Default value: true
Valid values: true
, false
enabled
Default value: true
Valid values: true
, false
standardFlowEnabled
Default value: true
Valid values: true
, false
implicitFlowEnabled
Default value: false
Valid values: true
, false
enabled
Default value: true
Valid values: true
, false
serviceAccountsEnabled
Default value: false
Valid values: true
, false
authorizationServicesEnabled
Default value: false
Valid values: true
, false
enabled
Default value: false
rootUrl
redirectUris
Default value: []
baseUrl
webOrigins
Default value: []
login_theme
Default value: absent
access.token.lifespan
The following parameters are available in the keycloak_client
type.
namevar
The client name
clientId. Defaults to name
.
Id. Defaults to client_id
realm
secret
Manage Keycloak protocol mappers
keycloak_client_protocol_mapper { "email for test.example.com on test":
claim_name => 'email',
user_attribute => 'email',
}
The following properties are available in the keycloak_client_protocol_mapper
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: openid-connect, saml
protocol
Default value: openid-connect
user.attribute. Default to resource_name
for type
oidc-usermodel-property-mapper
or saml-user-property-mapper
json.type.label. Default to String
for type
oidc-usermodel-property-mapper
and oidc-group-membership-mapper
.
Valid values: true
, false
full.path. Default to false
for type
oidc-group-membership-mapper
.
friendly.name. Default to resource_name
for type
saml-user-property-mapper
.
attribute.name Default to resource_name
for type
saml-user-property-mapper
.
claim.name
Valid values: true
, false
id.token.claim. Default to true
for protocol
openid-connect
.
Valid values: true
, false
access.token.claim. Default to true
for protocol
openid-connect
.
Valid values: true
, false
userinfo.token.claim. Default to true
for protocol
openid-connect
except type
of oidc-audience-mapper
.
attribute.nameformat
Valid values: true
, false
single. Default to false
for type
saml-role-list-mapper
.
Script, only valid for type
of saml-javascript-mapper
'
Array values will be joined with newlines. Strings will be kept unchanged.
included.client.audience Required for type
of oidc-audience-mapper
The following parameters are available in the keycloak_client_protocol_mapper
type.
namevar
The protocol mapper name
Id.
The protocol mapper name. Defaults to name
.
client
realm
Valid values: oidc-usermodel-property-mapper, oidc-full-name-mapper, oidc-group-membership-mapper, oidc-audience-mapper, saml-user-property-mapper, saml-role-list-mapper
protocolMapper.
Default is oidc-usermodel-property-mapper
for protocol
openid-connect
and
saml-user-property-mapper
for protocol
saml
.
Manage Keycloak client scopes
keycloak_client_scope { 'email on test':
protocol => 'openid-connect',
}
The following properties are available in the keycloak_client_scope
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: openid-connect, saml
protocol
Default value: openid-connect
consent.screen.text
Valid values: true
, false
display.on.consent.screen
Default value: true
The following parameters are available in the keycloak_client_scope
type.
namevar
The client scope name
The client scope name. Defaults to name
.
Id. Defaults to resource_name
.
realm
Verify that a connection can be successfully established between a node and the keycloak server. Its primary use is as a precondition to prevent configuration changes from being applied if the keycloak server cannot be reached, but it could potentially be used for other purposes such as monitoring.
The following properties are available in the keycloak_conn_validator
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the keycloak_conn_validator
type.
namevar
An arbitrary name used as the identity of the resource.
The DNS name or IP address of the server where keycloak should be running.
Default value: localhost
The port that the keycloak server should be listening on.
Default value: 8080
Whether the connection will be attemped using https
Default value: false
URL to use for testing if the Keycloak database is up
Default value: /auth/admin/serverinfo
The max number of seconds that the validator should wait before giving up and deciding that keycloak is not running; defaults to 15 seconds.
Default value: 30
Manage a Keycloak flow Autorequires
keycloak_realm
defined forrealm
parameterkeycloak_flow
offlow_alias
iftop_level=false
keycloak_flow
offlow_alias
if otherindex
is lower and iftop_level=false
keycloak_flow_execution
ifflow_alias
is the same and otherindex
is lower and iftop_level=false
keycloak_flow { 'browser-with-duo':
ensure => 'present',
realm => 'test',
}
keycloak_flow { 'form-browser-with-duo under browser-with-duo on test':
ensure => 'present',
index => 2,
requirement => 'ALTERNATIVE',
top_level => false,
}
The following properties are available in the keycloak_flow
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
execution index, only applied to top_level=false, required for top_level=false
description
Valid values: DISABLED, ALTERNATIVE, REQUIRED, CONDITIONAL, disabled, alternative, required, conditional
requirement, only applied to top_level=false and defaults to DISABLED
The following parameters are available in the keycloak_flow
type.
namevar
The flow name
Id. Default to $alias-$realm
when top_level is true. Only applies to top_level=true
Alias. Default to name
.
flowAlias, required for top_level=false
realm
Valid values: basic-flow, form-flow
providerId
Default value: basic-flow
sub-flow execution provider, default to registration-page-form
for top_level=false and does not apply to top_level=true
Valid values: true
, false
topLevel
Default value: true
Manage a Keycloak flow Autorequires
keycloak_realm
defined forrealm
parameterkeycloak_flow
of value defined forflow_alias
keycloak_flow
if they share sameflow_alias
value and the other resourceindex
is lowerkeycloak_flow_execution
ifflow_alias
is the same and otherindex
is lower
keycloak_flow_execution { 'auth-cookie under browser-with-duo on test':
ensure => 'present',
configurable => false,
display_name => 'Cookie',
index => 0,
requirement => 'ALTERNATIVE',
}
keycloak_flow_execution { 'auth-username-password-form under form-browser-with-duo on test':
ensure => 'present',
configurable => false,
display_name => 'Username Password Form',
index => 0,
requirement => 'REQUIRED',
}
keycloak_flow_execution { 'duo-mfa-authenticator under form-browser-with-duo on test':
ensure => 'present',
configurable => true,
display_name => 'Duo MFA',
alias => 'Duo',
config => {
"duomfa.akey" => "foo-akey",
"duomfa.apihost" => "api-foo.duosecurity.com",
"duomfa.skey" => "secret",
"duomfa.ikey" => "foo-ikey",
"duomfa.groups" => "duo"
},
requirement => 'REQUIRED',
index => 1,
}
The following properties are available in the keycloak_flow_execution
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
execution index
Valid values: true
, false
configurable
Valid values: DISABLED, ALTERNATIVE, REQUIRED, CONDITIONAL, disabled, alternative, required, conditional
requirement
Default value: DISABLED
execution config
The following parameters are available in the keycloak_flow_execution
type.
namevar
The flow execution name
read-only Id
provider
flowAlias
realm
displayName
alias
read-only config ID
Manage Keycloak identity providers
keycloak_identity_provider { 'cilogon on test':
ensure => 'present',
display_name => 'CILogon',
provider_id => 'oidc',
first_broker_login_flow_alias => 'browser',
client_id => 'cilogon:/client_id/foobar',
client_secret => 'supersecret',
user_info_url => 'https://cilogon.org/oauth2/userinfo',
token_url => 'https://cilogon.org/oauth2/token',
authorization_url => 'https://cilogon.org/authorize',
}
The following properties are available in the keycloak_identity_provider
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
displayName
Valid values: true
, false
enabled
Default value: true
Valid values: on, off
updateProfileFirstLoginMode
Default value: on
Valid values: true
, false
trustEmail
Default value: false
Valid values: true
, false
storeToken
Default value: false
Valid values: true
, false
addReadTokenRoleOnCreate
Default value: false
Valid values: true
, false
authenticateByDefault
Default value: false
Valid values: true
, false
linkOnly
Default value: false
firstBrokerLoginFlowAlias
Default value: first broker login
postBrokerLoginFlowAlias
Valid values: true
, false
hideOnLoginPage
Default value: false
userInfoUrl
Valid values: true
, false
validateSignature
Default value: false
clientId
clientSecret
Valid values: client_secret_post, client_secret_basic, client_secret_jwt, private_key_jwt
clientAuthMethod
Default value: client_secret_post
tokenUrl
Valid values: true
, false
uiLocales
Default value: false
Valid values: true
, false
backchannelSupported
Default value: false
Valid values: true
, false
useJwksUrl
Default value: true
Valid values: true
, false
loginHint
Default value: false
authorizationUrl
Valid values: true
, false
disableUserInfo
Default value: false
logoutUrl
issuer
default_scope
Valid values: none, consent, login, select_account
prompt
allowedClockSkew
forwardParameters
The following parameters are available in the keycloak_identity_provider
type.
namevar
The identity provider name
The identity provider name. Defaults to name
.
internalId. Defaults to "alias
-realm
"
realm
Valid values: oidc
providerId
Default value: oidc
Manage Keycloak LDAP attribute mappers
keycloak_ldap_mapper { 'full name for LDAP-test on test:
ensure => 'present',
type => 'full-name-ldap-mapper',
ldap_attribute => 'gecos',
}
The following properties are available in the keycloak_ldap_mapper
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
ldap.attribute
user.model.attribute
is.mandatory.in.ldap. Defaults to false
unless type
is full-name-ldap-mapper
.
Valid values: true
, false
always.read.value.from.ldap. Defaults to true
if type
is user-attribute-ldap-mapper
.
Valid values: true
, false
read.only
Valid values: true
, false
write.only. Defaults to false
if type
is full-name-ldap-mapper
.
Valid values: READ_ONLY, LDAP_ONLY
mode, only for type
of group-ldap-mapper
and role-ldap-mapper
Valid values: DN, UID
membership.attribute.type, only for type
of group-ldap-mapper
and role-ldap-mapper
Valid values: LOAD_GROUPS_BY_MEMBER_ATTRIBUTE, GET_GROUPS_FROM_USER_MEMBEROF_ATTRIBUTE, LOAD_GROUPS_BY_MEMBER_ATTRIBUTE_RECURSIVELY, LOAD_ROLES_BY_MEMBER_ATTRIBUTE, GET_ROLES_FROM_USER_MEMBEROF_ATTRIBUTE, LOAD_ROLES_BY_MEMBER_ATTRIBUTE_RECURSIVELY
user.roles.retrieve.strategy, only for type
of group-ldap-mapper
and role-ldap-mapper
group.name.ldap.attribute, only for type
of group-ldap-mapper
Valid values: true
, false
ignore.missing.groups, only for type
of group-ldap-mapper
membership.user.ldap.attribute, only for type
of group-ldap-mapper
and role-ldap-mapper
membership.ldap.attribute, only for type
of group-ldap-mapper
and role-ldap-mapper
Valid values: true
, false
preserve.group.inheritance, only for type
of group-ldap-mapper
groups.dn, only for type
of group-ldap-mapper
mapped.group.attributes, only for type
of group-ldap-mapper
groups.ldap.filter, only for type
of group-ldap-mapper
memberof.ldap.attribute, only for type
of group-ldap-mapper
and role-ldap-mapper
group.object.classes, only for type
of group-ldap-mapper
Valid values: true
, false
drop.non.existing.groups.during.sync, only for type
of group-ldap-mapper
roles.dn, only for type
of role-ldap-mapper
role.name.ldap.attribute, only for type
of role-ldap-mapper
role.object.classes, only for type
of role-ldap-mapper
roles.ldap.filter, only for type
of role-ldap-mapper
Valid values: true
, false
use.realm.roles.mapping, only for type
of role-ldap-mapper
client.id, only for type
of role-ldap-mapper
The following parameters are available in the keycloak_ldap_mapper
type.
namevar
The LDAP mapper name
Id.
The LDAP mapper name. Defaults to name
Valid values: user-attribute-ldap-mapper, full-name-ldap-mapper, group-ldap-mapper, role-ldap-mapper
providerId
Default value: user-attribute-ldap-mapper
realm
parentId
Manage Keycloak LDAP user providers
keycloak_ldap_user_provider { 'LDAP on test':
ensure => 'present',
users_dn => 'ou=People,dc=example,dc=com',
connection_url => 'ldaps://ldap1.example.com:636 ldaps://ldap2.example.com:636',
import_enabled => false,
use_truststore_spi => 'never',
}
The following properties are available in the keycloak_ldap_user_provider
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: true
, false
enabled
Default value: true
Valid values: none, simple
authType
Default value: none
Valid values: READ_ONLY, WRITABLE, UNSYNCED
editMode
Default value: READ_ONLY
Valid values: ad, rhds, tivoli, eDirectory, other
vendor
Default value: other
Valid values: always, ldapsOnly, never
useTruststoreSpi
Default value: ldapsOnly
usersDn
connectionUrl
priority
Default value: 0
batchSizeForSync
Default value: 1000
usernameLdapAttribute
Default value: uid
rdnLdapAttribute
Default value: uid
uuidLdapAttribute
Default value: entryUUID
bindDn
bindCredential
Valid values: true
, false
importEnabled
Default value: true
Valid values: true
, false
useKerberosForPasswordAuthentication
userObjectClasses
Default value: ['inetOrgPerson', 'organizationalPerson']
Valid values: one, one_level, subtree, 1, 2, 1, 2
searchScope
Valid values: %r{.*}, absent
customUserSearchFilter
Default value: absent
The following parameters are available in the keycloak_ldap_user_provider
type.
namevar
The LDAP user provider name
The LDAP user provider name. Defaults to name
.
Id. Defaults to "resource_name
-realm
"
parentId
Manage Keycloak client scope protocol mappers
keycloak_protocol_mapper { "email for oidc-clients on test":
claim_name => 'email',
user_attribute => 'email',
}
The following properties are available in the keycloak_protocol_mapper
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: openid-connect, saml
protocol
Default value: openid-connect
user.attribute. Default to resource_name
for type
oidc-usermodel-property-mapper
or saml-user-property-mapper
json.type.label. Default to String
for type
oidc-usermodel-property-mapper
and oidc-group-membership-mapper
.
Valid values: true
, false
full.path. Default to false
for type
oidc-group-membership-mapper
.
friendly.name. Default to resource_name
for type
saml-user-property-mapper
.
attribute.name Default to resource_name
for type
saml-user-property-mapper
.
claim.name
Valid values: true
, false
id.token.claim. Default to true
for protocol
openid-connect
.
Valid values: true
, false
access.token.claim. Default to true
for protocol
openid-connect
.
Valid values: true
, false
userinfo.token.claim. Default to true
for protocol
openid-connect
except type
of oidc-audience-mapper
.
attribute.nameformat
Valid values: true
, false
single. Default to false
for type
saml-role-list-mapper
or saml-javascript-mapper
.
Script, only valid for type
of saml-javascript-mapper
'
Array values will be joined with newlines. Strings will be kept unchanged.
included.client.audience Required for type
of oidc-audience-mapper
The following parameters are available in the keycloak_protocol_mapper
type.
namevar
The protocol mapper name
Id.
The protocol mapper name. Defaults to name
.
client scope
realm
Valid values: oidc-usermodel-property-mapper, oidc-full-name-mapper, oidc-group-membership-mapper, oidc-audience-mapper, saml-user-property-mapper, saml-role-list-mapper
protocolMapper.
Default is oidc-usermodel-property-mapper
for protocol
openid-connect
and
saml-user-property-mapper
for protocol
saml
.
Manage Keycloak realms
keycloak_realm { 'test':
ensure => 'present',
remember_me => true,
login_with_email_allowed => false,
login_theme => 'my_theme',
}
The following properties are available in the keycloak_realm
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
displayName
displayNameHtml
loginTheme
Default value: keycloak
accountTheme
Default value: keycloak
adminTheme
Default value: keycloak
emailTheme
Default value: keycloak
Valid values: true
, false
internationalizationEnabled
Default value: false
ssoSessionIdleTimeout
ssoSessionMaxLifespan
accessCodeLifespan
accessCodeLifespanUserAction
accessTokenLifespan
accessTokenLifespanForImplicitFlow
Valid values: true
, false
enabled
Default value: true
Valid values: true
, false
rememberMe
Default value: false
Valid values: true
, false
loginWithEmailAllowed
Default value: true
browserFlow
Default value: browser
registrationFlow
Default value: registration
directGrantFlow
Default value: direct grant
resetCredentialsFlow
Default value: reset credentials
clientAuthenticationFlow
Default value: clients
dockerAuthenticationFlow
Default value: docker auth
Default Client Scopes
Optional Client Scopes
Supported Locales
contentSecurityPolicy
Default value: frame-src 'self'; frame-ancestors 'self'; object-src 'none';
Valid values: true
, false
eventsEnabled
Default value: false
eventsExpiration
eventsListeners
Default value: ['jboss-logging']
Valid values: true
, false
adminEventsEnabled
Default value: false
Valid values: true
, false
adminEventsDetailsEnabled
Default value: false
smtpServer user
smtpServer password
smtpServer host
smtpServer port
Valid values: true
, false
smtpServer auth
Valid values: true
, false
smtpServer starttls
Valid values: true
, false
smtpServer ssl
smtpServer from
smtpServer envelope_from
smtpServer fromDisplayName
smtpServer replyto
smtpServer replyToDisplayName
The following parameters are available in the keycloak_realm
type.
namevar
The realm name
Id. Default to name
.
Verify that a specific Keycloak resource is available
The following properties are available in the keycloak_resource_validator
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the keycloak_resource_validator
type.
namevar
An arbitrary name used as the identity of the resource.
URL to use for testing if the Keycloak database is up
Key to lookup
Value to lookup
Realm to query
The max number of seconds that the validator should wait before giving up and deciding that keycloak is not running; defaults to 15 seconds.
Default value: 30
Manage Keycloak SSSD user providers
keycloak_sssd_user_provider { 'SSSD on test':
ensure => 'present',
}
The following properties are available in the keycloak_sssd_user_provider
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: true
, false
enabled
Default value: true
priority
Default value: 0
Valid values: DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, NO_CACHE
cachePolicy
Default value: DEFAULT
evictionDay
evictionHour
evictionMinute
maxLifespan
The following parameters are available in the keycloak_sssd_user_provider
type.
namevar
The SSSD user provider name
The SSSD user provider name. Defaults to name
.
Id. Defaults to "resource_name
-realm
"
parentId