You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keycloak uses a database to persist all the information of the system, this database is connected by a datasource defined in the underlying EAP platform without any kind of sanity or check process. It is a good practice to enable some validations in the datasource for a healhty life cycle and avoid issues in runtime when the connections are not running successfuly or they are suffering some issues.
This feature request wants to provide a way to setup this kind of validations in the KeycloakDS datasource as part of the collection, and it is open for discussion with the community.
Implementation Approach
For example a way of implementation could be defining a set of new properties to enable these properties, for example with something similar to:
- name: Playbook for Red Hat SSO Hostshosts: ssovars_files:
- ../vars/variables.ymlcollections:
- redhat.ssotasks:
- name: Include SSO roleansible.builtin.include_role:
name: redhat.sso.ssovars:
sso_offline_install: Truesso_apply_patches: "{{ rh_sso_apply_patches }}"eap_properties:
- name: property1-namevalue: property1-value
- name: property2-namevalue: property2-valuedatasource:
validation:
enabled: truevalid_connection_sql: Select 1
A new set of variables under a new datasource group are proposed, such as:
validation.enabled - boolean variable to enable this feature
validation.valid_connection_sql- String variable to identify a SQL sentence to check the connectio
The implementation could be done updating the standalone.xml.j2, standalone-ha.xml.j2 templates, or include some extra tasks using the cli enabling this feature.
The following tasks using the CLI could be an example of implementation:
SUMMARY
Keycloak uses a database to persist all the information of the system, this database is connected by a datasource defined in the underlying EAP platform without any kind of sanity or check process. It is a good practice to enable some validations in the datasource for a healhty life cycle and avoid issues in runtime when the connections are not running successfuly or they are suffering some issues.
References:
This feature request wants to provide a way to setup this kind of validations in the KeycloakDS datasource as part of the collection, and it is open for discussion with the community.
Implementation Approach
For example a way of implementation could be defining a set of new properties to enable these properties, for example with something similar to:
A new set of variables under a new
datasource
group are proposed, such as:validation.enabled
- boolean variable to enable this featurevalidation.valid_connection_sql
- String variable to identify a SQL sentence to check the connectioThe implementation could be done updating the
standalone.xml.j2
,standalone-ha.xml.j2
templates, or include some extra tasks using the cli enabling this feature.The following tasks using the CLI could be an example of implementation:
NOTE: Sorry, I am not an Ansible expert, sorry for any typo in the Ansible syntax.
ISSUE TYPE
The text was updated successfully, but these errors were encountered: