Skip to content

Commit

Permalink
Remove keycloak specific configuration
Browse files Browse the repository at this point in the history
Keycloak integration is now made independent of this cookiecutter.

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored and osfrickler committed Feb 4, 2025
1 parent daadf93 commit c16d604
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 222 deletions.
1 change: 0 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"with_ceph": 1,
"with_keycloak": 0,
"ceph_network": "192.168.16.0/20",
"ceph_version": "quincy",
"domain": "osism.xyz",
Expand Down
4 changes: 0 additions & 4 deletions hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ if [[ {{ cookiecutter.with_ceph }} == 0 ]]; then
rm -rf environments/kolla/files/overlays/haproxy/services.d
fi

if [[ {{ cookiecutter.with_keycloak }} == 0 ]]; then
rm -rf environments/kolla/files/overlays/keystone
fi

for script in $(find scripts.d -type f -perm -111 -print); do
echo run additional script $script
$script
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
---
{%- if cookiecutter.with_keycloak|int %}
# keycloak-oidc-client-config
{% raw -%}
keycloak_admin_id: "admin"
keycloak_key_provider_component_name: "rsa-for-keystone"

keystone_client_id: "keystone"
keystone_redirect_uris:
- "https://{{ kolla_external_fqdn }}:5000/redirect_uri"
- "https://{{ kolla_external_fqdn }}"
- "https://{{ kolla_external_vip_address }}:5000/redirect_uri"
- "https://{{ kolla_external_vip_address }}"

keycloak_private_key_file_path: "{{ configuration_directory }}/environments/custom/files/keycloak/private_key.pem"
keycloak_private_key_data: "{{ lookup('file', keycloak_private_key_file_path)| regex_replace('\n', '\\\\n') }}"

keycloak_certificate_file_path: "{{ configuration_directory }}/environments/custom/files/keycloak/cert.crt"
keycloak_certificate_data: "{{ lookup('file', keycloak_certificate_file_path)| regex_replace('\n', '\\\\n') }}"
{%- endraw %}
{%- else %}
# Dummy variable to avoid error because ansible does not recognize the
# file as a good configuration file when no variable in it.
dummy:
{%- endif %}
21 changes: 0 additions & 21 deletions {{cookiecutter.project_name}}/environments/kolla/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,6 @@ ceph_nova_user: nova
ceph_public_network: {{cookiecutter.ceph_network}}
{%- endif %}

{%- if cookiecutter.with_keycloak|int %}
##########################################################
# keystone
keystone_identity_providers:
- name: "keycloak"
openstack_domain: "keycloak"
protocol: "openid"
identifier: "https://keycloak.{{cookiecutter.domain}}/auth/realms/osism"
public_name: "Authenticate via Keycloak"
attribute_mapping: "mappingId1"
{%- raw %}
metadata_folder: "{{ node_custom_config }}/keystone/federation/oidc/metadata"
certificate_file: "{{ node_custom_config }}/keystone/federation/oidc/kD9RIBcPiCOVO8wOM2VbZD5XnpgSkf-tWdSmhurxmJo.pem"
keystone_identity_mappings:
- name: "mappingId1"
file: "{{ node_custom_config }}/keystone/federation/oidc/attribute_maps/oidc_attribute_mappingId1.json"
# Keystone auth endpoint
keystone_logout_url: "https://{{ kolla_external_fqdn }}/auth/"
{%- endraw %}
{%- endif %}

#########################################################
# other

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,3 @@
"external": False,
},
]

{%- if cookiecutter.with_keycloak|int %}
LOGOUT_URL = "https://keycloak.{{cookiecutter.domain}}/auth/realms/osism/protocol/openid-connect/logout/?client_id=keystone&post_logout_redirect_uri=https%3A%2F%2F{{ '{{' }} kolla_external_fqdn {{ '}}' }}%3A5000%2Fredirect_uri%3Flogout%3Dhttps%3A%2F%2F{{ '{{' }} kolla_external_fqdn {{ '}}' }}%3A5000%2Flogout"

WEBSSO_ENABLED = False
{% raw -%}
WEBSSO_KEYSTONE_URL = "https://{{ kolla_external_fqdn }}:5000/v3"
{%- endraw %}
WEBSSO_CHOICES = (
("credentials", "Keystone Credentials"),
("keycloak", "Authenticate via Keycloak"),
)

WEBSSO_IDP_MAPPING = {
"keycloak": ("keycloak", "openid"),
}
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,3 @@ USER_MENU_LINKS = [
"external": False,
},
]

{%- if cookiecutter.with_keycloak|int %}
LOGOUT_URL = "https://keycloak.{{cookiecutter.domain}}/auth/realms/osism/protocol/openid-connect/logout/?client_id=keystone&post_logout_redirect_uri=https%3A%2F%2F{{ '{{' }} kolla_external_fqdn {{ '}}' }}%3A5000%2Fredirect_uri%3Flogout%3Dhttps%3A%2F%2F{{ '{{' }} kolla_external_fqdn {{ '}}' }}%3A5000%2Flogout"

WEBSSO_ENABLED = False
{% raw -%}
WEBSSO_KEYSTONE_URL = "https://{{ kolla_external_fqdn }}:5000/v3"
{%- endraw %}
WEBSSO_CHOICES = (
("credentials", "Keystone Credentials"),
("keycloak", "Authenticate via Keycloak"),
)

WEBSSO_IDP_MAPPING = {
"keycloak": ("keycloak", "openid"),
}
{%- endif %}

This file was deleted.

0 comments on commit c16d604

Please sign in to comment.