Class: Ansible::Ruby::Modules::Keycloak_client

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb

Overview

This module allows the administration of Keycloak clients via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. The names of module options are snake_cased versions of the camelCase ones found in the Keycloak API and its documentation at U(www.keycloak.org/docs-api/3.3/rest-api/). Aliases are provided so camelCased versions can be used as well. The Keycloak API does not always enforce for only sensible settings to be used – you can set SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#admin_urlString?

Returns URL to the admin interface of the client This is ‘adminUrl’ in the Keycloak REST API.

Returns:

  • (String, nil)

    URL to the admin interface of the client This is ‘adminUrl’ in the Keycloak REST API.



42
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 42

attribute :admin_url

#attributesHash?

Returns A dict of further attributes for this client. This can contain various configuration settings; an example is given in the examples section. While an exhaustive list of permissible options is not available; possible options as of Keycloak 3.4 are listed below. The Keycloak API does not validate whether a given option is appropriate for the protocol used; if specified anyway, Keycloak will simply not use it.

Returns:

  • (Hash, nil)

    A dict of further attributes for this client. This can contain various configuration settings; an example is given in the examples section. While an exhaustive list of permissible options is not available; possible options as of Keycloak 3.4 are listed below. The Keycloak API does not validate whether a given option is appropriate for the protocol used; if specified anyway, Keycloak will simply not use it.



161
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 161

attribute :attributes

#authorization_services_enabledBoolean?

Returns Are authorization services enabled for this client or not (OpenID connect). This is ‘authorizationServicesEnabled’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Are authorization services enabled for this client or not (OpenID connect). This is ‘authorizationServicesEnabled’ in the Keycloak REST API.



106
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 106

attribute :authorization_services_enabled

#authorization_settingsObject?

Returns a data structure defining the authorization settings for this client. For reference, please see the Keycloak API docs at U(www.keycloak.org/docs-api/3.3/rest-api/index.html#_resourceserverrepresentation). This is ‘authorizationSettings’ in the Keycloak REST API.

Returns:



154
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 154

attribute :authorization_settings

#base_urlString?

Returns Default URL to use when the auth server needs to redirect or link back to the client This is ‘baseUrl’ in the Keycloak REST API.

Returns:

  • (String, nil)

    Default URL to use when the auth server needs to redirect or link back to the client This is ‘baseUrl’ in the Keycloak REST API.



46
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 46

attribute :base_url

#bearer_onlyBoolean?

Returns The access type of this client is bearer-only. This is ‘bearerOnly’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    The access type of this client is bearer-only. This is ‘bearerOnly’ in the Keycloak REST API.



82
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 82

attribute :bearer_only

#client_authenticator_type:"client-secret", ...

Returns How do clients authenticate with the auth server? Either C(client-secret) or C(client-jwt) can be chosen. When using C(client-secret), the module parameter I(secret) can set it, while for C(client-jwt), you can use the keys C(use.jwks.url), C(jwks.url), and C(jwt.credential.certificate) in the I(attributes) module parameter to configure its behavior. This is ‘clientAuthenticatorType’ in the Keycloak REST API.

Returns:

  • (:"client-secret", :"client-jwt", nil)

    How do clients authenticate with the auth server? Either C(client-secret) or C(client-jwt) can be chosen. When using C(client-secret), the module parameter I(secret) can set it, while for C(client-jwt), you can use the keys C(use.jwks.url), C(jwks.url), and C(jwt.credential.certificate) in the I(attributes) module parameter to configure its behavior. This is ‘clientAuthenticatorType’ in the Keycloak REST API.



54
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 54

attribute :client_authenticator_type

#client_idString?

Returns Client id of client to be worked on. This is usually an alphanumeric name chosen by you. Either this or I(id) is required. If you specify both, I(id) takes precedence. This is ‘clientId’ in the Keycloak REST API.

Returns:

  • (String, nil)

    Client id of client to be worked on. This is usually an alphanumeric name chosen by you. Either this or I(id) is required. If you specify both, I(id) takes precedence. This is ‘clientId’ in the Keycloak REST API.



22
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 22

attribute :client_id

#client_templateString?

Returns Client template to use for this client. If it does not exist this field will silently be dropped. This is ‘clientTemplate’ in the Keycloak REST API.

Returns:

  • (String, nil)

    Client template to use for this client. If it does not exist this field will silently be dropped. This is ‘clientTemplate’ in the Keycloak REST API.



134
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 134

attribute :client_template

Returns If enabled, users have to consent to client access. This is ‘consentRequired’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    If enabled, users have to consent to client access. This is ‘consentRequired’ in the Keycloak REST API.



86
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 86

attribute :consent_required

#default_rolesArray<String>, ...

Returns list of default roles for this client. If the client roles referenced do not exist yet, they will be created. This is ‘defaultRoles’ in the Keycloak REST API.

Returns:

  • (Array<String>, String, nil)

    list of default roles for this client. If the client roles referenced do not exist yet, they will be created. This is ‘defaultRoles’ in the Keycloak REST API.



66
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 66

attribute :default_roles

#descriptionString?

Returns Description of the client in Keycloak.

Returns:

  • (String, nil)

    Description of the client in Keycloak



34
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 34

attribute :description

#direct_access_grants_enabledBoolean?

Returns Are direct access grants enabled for this client or not (OpenID connect). This is ‘directAccessGrantsEnabled’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Are direct access grants enabled for this client or not (OpenID connect). This is ‘directAccessGrantsEnabled’ in the Keycloak REST API.



98
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 98

attribute :direct_access_grants_enabled

#enabledBoolean?

Returns Is this client enabled or not?.

Returns:

  • (Boolean, nil)

    Is this client enabled or not?



50
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 50

attribute :enabled

#frontchannel_logoutBoolean?

Returns Is frontchannel logout enabled for this client or not. This is ‘frontchannelLogout’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Is frontchannel logout enabled for this client or not. This is ‘frontchannelLogout’ in the Keycloak REST API.



114
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 114

attribute :frontchannel_logout

#full_scope_allowedBoolean?

Returns Is the “Full Scope Allowed” feature set for this client or not. This is ‘fullScopeAllowed’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Is the “Full Scope Allowed” feature set for this client or not. This is ‘fullScopeAllowed’ in the Keycloak REST API.



122
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 122

attribute :full_scope_allowed

#idString?

Returns Id of client to be worked on. This is usually an UUID. Either this or I(client_id) is required. If you specify both, this takes precedence.

Returns:

  • (String, nil)

    Id of client to be worked on. This is usually an UUID. Either this or I(client_id) is required. If you specify both, this takes precedence.



26
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 26

attribute :id

#implicit_flow_enabledBoolean?

Returns Enable implicit flow for this client or not (OpenID connect). This is ‘implictFlowEnabled’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Enable implicit flow for this client or not (OpenID connect). This is ‘implictFlowEnabled’ in the Keycloak REST API.



94
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 94

attribute :implicit_flow_enabled

#nameString?

Returns Name of the client (this is not the same as I(client_id)).

Returns:

  • (String, nil)

    Name of the client (this is not the same as I(client_id))



30
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 30

attribute :name

#node_re_registration_timeoutInteger?

Returns Cluster node re-registration timeout for this client. This is ‘nodeReRegistrationTimeout’ in the Keycloak REST API.

Returns:

  • (Integer, nil)

    Cluster node re-registration timeout for this client. This is ‘nodeReRegistrationTimeout’ in the Keycloak REST API.



126
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 126

attribute :node_re_registration_timeout

#not_beforeInteger?

Returns Revoke any tokens issued before this date for this client (this is a UNIX timestamp). This is ‘notBefore’ in the Keycloak REST API.

Returns:

  • (Integer, nil)

    Revoke any tokens issued before this date for this client (this is a UNIX timestamp). This is ‘notBefore’ in the Keycloak REST API.



78
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 78

attribute :not_before

#protocol:"openid-connect", ...

Returns Type of client (either C(openid-connect) or C(saml).

Returns:

  • (:"openid-connect", :saml, nil)

    Type of client (either C(openid-connect) or C(saml).



118
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 118

attribute :protocol

#protocol_mappersArray<Hash>, ...

Returns a list of dicts defining protocol mappers for this client. This is ‘protocolMappers’ in the Keycloak REST API.

Returns:

  • (Array<Hash>, Hash, nil)

    a list of dicts defining protocol mappers for this client. This is ‘protocolMappers’ in the Keycloak REST API.



157
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 157

attribute :protocol_mappers

#public_clientBoolean?

Returns Is the access type for this client public or not. This is ‘publicClient’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Is the access type for this client public or not. This is ‘publicClient’ in the Keycloak REST API.



110
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 110

attribute :public_client

#realmString?

Returns The realm to create the client in.

Returns:

  • (String, nil)

    The realm to create the client in.



18
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 18

attribute :realm

#redirect_urisArray<String>, ...

Returns Acceptable redirect URIs for this client. This is ‘redirectUris’ in the Keycloak REST API.

Returns:

  • (Array<String>, String, nil)

    Acceptable redirect URIs for this client. This is ‘redirectUris’ in the Keycloak REST API.



70
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 70

attribute :redirect_uris

#registered_nodesHash?

Returns dict of registered cluster nodes (with C(nodename) as the key and last registration time as the value). This is ‘registeredNodes’ in the Keycloak REST API.

Returns:

  • (Hash, nil)

    dict of registered cluster nodes (with C(nodename) as the key and last registration time as the value). This is ‘registeredNodes’ in the Keycloak REST API.



130
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 130

attribute :registered_nodes

#registration_access_tokenString?

Returns The registration access token provides access for clients to the client registration service. This is ‘registrationAccessToken’ in the Keycloak REST API.

Returns:

  • (String, nil)

    The registration access token provides access for clients to the client registration service. This is ‘registrationAccessToken’ in the Keycloak REST API.



62
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 62

attribute :registration_access_token

#root_urlString?

Returns Root URL appended to relative URLs for this client This is ‘rootUrl’ in the Keycloak REST API.

Returns:

  • (String, nil)

    Root URL appended to relative URLs for this client This is ‘rootUrl’ in the Keycloak REST API.



38
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 38

attribute :root_url

#secretString?

Returns When using I(client_authenticator_type) C(client-secret) (the default), you can specify a secret here (otherwise one will be generated if it does not exit). If changing this secret, the module will not register a change currently (but the changed secret will be saved).

Returns:

  • (String, nil)

    When using I(client_authenticator_type) C(client-secret) (the default), you can specify a secret here (otherwise one will be generated if it does not exit). If changing this secret, the module will not register a change currently (but the changed secret will be saved).



58
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 58

attribute :secret

#service_accounts_enabledBoolean?

Returns Are service accounts enabled for this client or not (OpenID connect). This is ‘serviceAccountsEnabled’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Are service accounts enabled for this client or not (OpenID connect). This is ‘serviceAccountsEnabled’ in the Keycloak REST API.



102
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 102

attribute :service_accounts_enabled

#standard_flow_enabledBoolean?

Returns Enable standard flow for this client or not (OpenID connect). This is ‘standardFlowEnabled’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Enable standard flow for this client or not (OpenID connect). This is ‘standardFlowEnabled’ in the Keycloak REST API.



90
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 90

attribute :standard_flow_enabled

#state:present, ...

Returns State of the client,On C(present), the client will be created (or updated if it exists already).,On C(absent), the client will be removed if it exists.

Returns:

  • (:present, :absent, nil)

    State of the client,On C(present), the client will be created (or updated if it exists already).,On C(absent), the client will be removed if it exists



14
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 14

attribute :state

#surrogate_auth_requiredBoolean?

Returns Whether or not surrogate auth is required. This is ‘surrogateAuthRequired’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Whether or not surrogate auth is required. This is ‘surrogateAuthRequired’ in the Keycloak REST API.



150
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 150

attribute :surrogate_auth_required

#use_template_configBoolean?

Returns Whether or not to use configuration from the I(client_template). This is ‘useTemplateConfig’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Whether or not to use configuration from the I(client_template). This is ‘useTemplateConfig’ in the Keycloak REST API.



138
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 138

attribute :use_template_config

#use_template_mappersBoolean?

Returns Whether or not to use mapper configuration from the I(client_template). This is ‘useTemplateMappers’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Whether or not to use mapper configuration from the I(client_template). This is ‘useTemplateMappers’ in the Keycloak REST API.



146
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 146

attribute :use_template_mappers

#use_template_scopeBoolean?

Returns Whether or not to use scope configuration from the I(client_template). This is ‘useTemplateScope’ in the Keycloak REST API.

Returns:

  • (Boolean, nil)

    Whether or not to use scope configuration from the I(client_template). This is ‘useTemplateScope’ in the Keycloak REST API.



142
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 142

attribute :use_template_scope

#web_originsArray<String>, ...

Returns List of allowed CORS origins. This is ‘webOrigins’ in the Keycloak REST API.

Returns:

  • (Array<String>, String, nil)

    List of allowed CORS origins. This is ‘webOrigins’ in the Keycloak REST API.



74
# File 'lib/ansible/ruby/modules/generated/identity/keycloak/keycloak_client.rb', line 74

attribute :web_origins