1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

keycloak_client: add aliases for module options (matching API) (#39507)

* add aliases for module options which match API endpoint

* directAccessGrantsEnabled fixed in docs
This commit is contained in:
Eike Frost 2018-05-01 21:10:41 +02:00 committed by Adam Miller
parent c11248c456
commit 6b554deb28

View file

@ -29,7 +29,8 @@ description:
to your needs and a user having the expected roles. 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 - The names of module options are snake_cased versions of the camelCase ones found in the
Keycloak API and its documentation at U(http://www.keycloak.org/docs-api/3.3/rest-api/) Keycloak API and its documentation at U(http://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 - 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. SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful.
@ -49,6 +50,8 @@ options:
- Client id of client to be worked on. This is usually an alphanumeric name chosen by - 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. you. Either this or I(id) is required. If you specify both, I(id) takes precedence.
This is 'clientId' in the Keycloak REST API. This is 'clientId' in the Keycloak REST API.
aliases:
- clientId
id: id:
description: description:
@ -67,16 +70,22 @@ options:
description: description:
- Root URL appended to relative URLs for this client - Root URL appended to relative URLs for this client
This is 'rootUrl' in the Keycloak REST API. This is 'rootUrl' in the Keycloak REST API.
aliases:
- rootUrl
admin_url: admin_url:
description: description:
- URL to the admin interface of the client - URL to the admin interface of the client
This is 'adminUrl' in the Keycloak REST API. This is 'adminUrl' in the Keycloak REST API.
aliases:
- adminUrl
base_url: base_url:
description: description:
- Default URL to use when the auth server needs to redirect or link back to the client - 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. This is 'baseUrl' in the Keycloak REST API.
aliases:
- baseUrl
enabled: enabled:
description: description:
@ -91,6 +100,8 @@ options:
to configure its behavior. to configure its behavior.
This is 'clientAuthenticatorType' in the Keycloak REST API. This is 'clientAuthenticatorType' in the Keycloak REST API.
choices: ['client-secret', 'client-jwt'] choices: ['client-secret', 'client-jwt']
aliases:
- clientAuthenticatorType
secret: secret:
description: description:
@ -104,72 +115,100 @@ options:
- The registration access token provides access for clients to the client registration - The registration access token provides access for clients to the client registration
service. service.
This is 'registrationAccessToken' in the Keycloak REST API. This is 'registrationAccessToken' in the Keycloak REST API.
aliases:
- registrationAccessToken
default_roles: default_roles:
description: description:
- list of default roles for this client. If the client roles referenced do not exist - list of default roles for this client. If the client roles referenced do not exist
yet, they will be created. yet, they will be created.
This is 'defaultRoles' in the Keycloak REST API. This is 'defaultRoles' in the Keycloak REST API.
aliases:
- defaultRoles
redirect_uris: redirect_uris:
description: description:
- Acceptable redirect URIs for this client. - Acceptable redirect URIs for this client.
This is 'redirectUris' in the Keycloak REST API. This is 'redirectUris' in the Keycloak REST API.
aliases:
- redirectUris
web_origins: web_origins:
description: description:
- List of allowed CORS origins. - List of allowed CORS origins.
This is 'webOrigins' in the Keycloak REST API. This is 'webOrigins' in the Keycloak REST API.
aliases:
- webOrigins
not_before: not_before:
description: description:
- Revoke any tokens issued before this date for this client (this is a UNIX timestamp). - Revoke any tokens issued before this date for this client (this is a UNIX timestamp).
This is 'notBefore' in the Keycloak REST API. This is 'notBefore' in the Keycloak REST API.
aliases:
- notBefore
bearer_only: bearer_only:
description: description:
- The access type of this client is bearer-only. - The access type of this client is bearer-only.
This is 'bearerOnly' in the Keycloak REST API. This is 'bearerOnly' in the Keycloak REST API.
aliases:
- bearerOnly
consent_required: consent_required:
description: description:
- If enabled, users have to consent to client access. - If enabled, users have to consent to client access.
This is 'consentRequired' in the Keycloak REST API. This is 'consentRequired' in the Keycloak REST API.
aliases:
- consentRequired
standard_flow_enabled: standard_flow_enabled:
description: description:
- Enable standard flow for this client or not (OpenID connect). - Enable standard flow for this client or not (OpenID connect).
This is 'standardFlowEnabled' in the Keycloak REST API. This is 'standardFlowEnabled' in the Keycloak REST API.
aliases:
- standardFlowEnabled
implicit_flow_enabled: implicit_flow_enabled:
description: description:
- Enable implicit flow for this client or not (OpenID connect). - Enable implicit flow for this client or not (OpenID connect).
This is 'implictFlowEnabled' in the Keycloak REST API. This is 'implictFlowEnabled' in the Keycloak REST API.
aliases:
- implicitFlowEnabled
direct_access_grants_enabled: direct_access_grants_enabled:
description: description:
- Are direct access grants enabled for this client or not (OpenID connect). - Are direct access grants enabled for this client or not (OpenID connect).
This is 'directAccessGrantsEnabled' in the Keycloak REST API. This is 'directAccessGrantsEnabled' in the Keycloak REST API.
aliases:
- directAccessGrantsEnabled
service_accounts_enabled: service_accounts_enabled:
description: description:
- Are service accounts enabled for this client or not (OpenID connect). - Are service accounts enabled for this client or not (OpenID connect).
This is 'serviceAccountsEnabled' in the Keycloak REST API. This is 'serviceAccountsEnabled' in the Keycloak REST API.
aliases:
- serviceAccountsEnabled
authorization_services_enabled: authorization_services_enabled:
description: description:
- Are authorization services enabled for this client or not (OpenID connect). - Are authorization services enabled for this client or not (OpenID connect).
This is 'authorizationServicesEnabled' in the Keycloak REST API. This is 'authorizationServicesEnabled' in the Keycloak REST API.
aliases:
- authorizationServicesEnabled
public_client: public_client:
description: description:
- Is the access type for this client public or not. - Is the access type for this client public or not.
This is 'publicClient' in the Keycloak REST API. This is 'publicClient' in the Keycloak REST API.
aliases:
- publicClient
frontchannel_logout: frontchannel_logout:
description: description:
- Is frontchannel logout enabled for this client or not. - Is frontchannel logout enabled for this client or not.
This is 'frontchannelLogout' in the Keycloak REST API. This is 'frontchannelLogout' in the Keycloak REST API.
aliases:
- frontchannelLogout
protocol: protocol:
description: description:
@ -180,54 +219,74 @@ options:
description: description:
- Is the "Full Scope Allowed" feature set for this client or not. - Is the "Full Scope Allowed" feature set for this client or not.
This is 'fullScopeAllowed' in the Keycloak REST API. This is 'fullScopeAllowed' in the Keycloak REST API.
aliases:
- fullScopeAllowed
node_re_registration_timeout: node_re_registration_timeout:
description: description:
- Cluster node re-registration timeout for this client. - Cluster node re-registration timeout for this client.
This is 'nodeReRegistrationTimeout' in the Keycloak REST API. This is 'nodeReRegistrationTimeout' in the Keycloak REST API.
aliases:
- nodeReRegistrationTimeout
registered_nodes: registered_nodes:
description: description:
- dict of registered cluster nodes (with C(nodename) as the key and last registration - dict of registered cluster nodes (with C(nodename) as the key and last registration
time as the value). time as the value).
This is 'registeredNodes' in the Keycloak REST API. This is 'registeredNodes' in the Keycloak REST API.
aliases:
- registeredNodes
client_template: client_template:
description: description:
- Client template to use for this client. If it does not exist this field will silently - Client template to use for this client. If it does not exist this field will silently
be dropped. be dropped.
This is 'clientTemplate' in the Keycloak REST API. This is 'clientTemplate' in the Keycloak REST API.
aliases:
- clientTemplate
use_template_config: use_template_config:
description: description:
- Whether or not to use configuration from the I(client_template). - Whether or not to use configuration from the I(client_template).
This is 'useTemplateConfig' in the Keycloak REST API. This is 'useTemplateConfig' in the Keycloak REST API.
aliases:
- useTemplateConfig
use_template_scope: use_template_scope:
description: description:
- Whether or not to use scope configuration from the I(client_template). - Whether or not to use scope configuration from the I(client_template).
This is 'useTemplateScope' in the Keycloak REST API. This is 'useTemplateScope' in the Keycloak REST API.
aliases:
- useTemplateScope
use_template_mappers: use_template_mappers:
description: description:
- Whether or not to use mapper configuration from the I(client_template). - Whether or not to use mapper configuration from the I(client_template).
This is 'useTemplateMappers' in the Keycloak REST API. This is 'useTemplateMappers' in the Keycloak REST API.
aliases:
- useTemplateMappers
surrogate_auth_required: surrogate_auth_required:
description: description:
- Whether or not surrogate auth is required. - Whether or not surrogate auth is required.
This is 'surrogateAuthRequired' in the Keycloak REST API. This is 'surrogateAuthRequired' in the Keycloak REST API.
aliases:
- surrogateAuthRequired
authorization_settings: authorization_settings:
description: description:
- a data structure defining the authorization settings for this client. For reference, - a data structure defining the authorization settings for this client. For reference,
please see the Keycloak API docs at U(http://www.keycloak.org/docs-api/3.3/rest-api/index.html#_resourceserverrepresentation). please see the Keycloak API docs at U(http://www.keycloak.org/docs-api/3.3/rest-api/index.html#_resourceserverrepresentation).
This is 'authorizationSettings' in the Keycloak REST API. This is 'authorizationSettings' in the Keycloak REST API.
aliases:
- authorizationSettings
protocol_mappers: protocol_mappers:
description: description:
- a list of dicts defining protocol mappers for this client. - a list of dicts defining protocol mappers for this client.
This is 'protocolMappers' in the Keycloak REST API. This is 'protocolMappers' in the Keycloak REST API.
aliases:
- protocolMappers
suboptions: suboptions:
consentRequired: consentRequired:
description: description:
@ -592,41 +651,41 @@ def main():
realm=dict(type='str', default='master'), realm=dict(type='str', default='master'),
id=dict(type='str'), id=dict(type='str'),
client_id=dict(type='str'), client_id=dict(type='str', aliases=['clientId']),
name=dict(type='str'), name=dict(type='str'),
description=dict(type='str'), description=dict(type='str'),
root_url=dict(type='str'), root_url=dict(type='str', aliases=['rootUrl']),
admin_url=dict(type='str'), admin_url=dict(type='str', aliases=['adminUrl']),
base_url=dict(type='str'), base_url=dict(type='str', aliases=['baseUrl']),
surrogate_auth_required=dict(type='bool'), surrogate_auth_required=dict(type='bool', aliases=['surrogateAuthRequired']),
enabled=dict(type='bool'), enabled=dict(type='bool'),
client_authenticator_type=dict(type='str', choices=['client-secret', 'client-jwt']), client_authenticator_type=dict(type='str', choices=['client-secret', 'client-jwt'], aliases=['clientAuthenticatorType']),
secret=dict(type='str', no_log=True), secret=dict(type='str', no_log=True),
registration_access_token=dict(type='str'), registration_access_token=dict(type='str', aliases=['registrationAccessToken']),
default_roles=dict(type='list'), default_roles=dict(type='list', aliases=['defaultRoles']),
redirect_uris=dict(type='list'), redirect_uris=dict(type='list', aliases=['redirectUris']),
web_origins=dict(type='list'), web_origins=dict(type='list', aliases=['webOrigins']),
not_before=dict(type='int'), not_before=dict(type='int', aliases=['notBefore']),
bearer_only=dict(type='bool'), bearer_only=dict(type='bool', aliases=['bearerOnly']),
consent_required=dict(type='bool'), consent_required=dict(type='bool', aliases=['consentRequired']),
standard_flow_enabled=dict(type='bool'), standard_flow_enabled=dict(type='bool', aliases=['standardFlowEnabled']),
implicit_flow_enabled=dict(type='bool'), implicit_flow_enabled=dict(type='bool', aliases=['implicitFlowEnabled']),
direct_access_grants_enabled=dict(type='bool'), direct_access_grants_enabled=dict(type='bool', aliases=['directAccessGrantsEnabled']),
service_accounts_enabled=dict(type='bool'), service_accounts_enabled=dict(type='bool', aliases=['serviceAccountsEnabled']),
authorization_services_enabled=dict(type='bool'), authorization_services_enabled=dict(type='bool', aliases=['authorizationServicesEnabled']),
public_client=dict(type='bool'), public_client=dict(type='bool', aliases=['publicClient']),
frontchannel_logout=dict(type='bool'), frontchannel_logout=dict(type='bool', aliases=['frontchannelLogout']),
protocol=dict(type='str', choices=['openid-connect', 'saml']), protocol=dict(type='str', choices=['openid-connect', 'saml']),
attributes=dict(type='dict'), attributes=dict(type='dict'),
full_scope_allowed=dict(type='bool'), full_scope_allowed=dict(type='bool', aliases=['fullScopeAllowed']),
node_re_registration_timeout=dict(type='int'), node_re_registration_timeout=dict(type='int', aliases=['nodeReRegistrationTimeout']),
registered_nodes=dict(type='dict'), registered_nodes=dict(type='dict', aliases=['registeredNodes']),
client_template=dict(type='str'), client_template=dict(type='str', aliases=['clientTemplate']),
use_template_config=dict(type='bool'), use_template_config=dict(type='bool', aliases=['useTemplateConfig']),
use_template_scope=dict(type='bool'), use_template_scope=dict(type='bool', aliases=['useTemplateScope']),
use_template_mappers=dict(type='bool'), use_template_mappers=dict(type='bool', aliases=['useTemplateMappers']),
protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec), protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']),
authorization_settings=dict(type='dict'), authorization_settings=dict(type='dict', aliases=['authorizationSettings']),
) )
argument_spec.update(meta_args) argument_spec.update(meta_args)