Skip to content

Commit 9d0cdcb

Browse files
Introduce schema_version in the federated attribute mapping API
Keystone add support to attribute mapping schema versioning. Therefore, it is interesting to also support this mechanism in Kolla-ansible. The use of "schema_version" option in the attribute mapping is optional; if none is provided, the default defined in Keystoen will be used. Depends-On: https://review.opendev.org/#/c/749572/ Change-Id: I4e6d751330effc0bfeaaded9280a6e64c080e40f Signed-off-by: Rafael Weingärtner <rafael@apache.org> Co-Authored-by: Taavi Ansper <taaviansperr@gmail.com>
1 parent 603685a commit 9d0cdcb

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

ansible/group_vars/all/keystone.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,21 @@ keystone_default_user_role: "member"
6868
# The configuration of attribute mappings is a list of objects, where each
6969
# object must have a 'name' (that mapps to the 'attribute_mapping' to the IdP
7070
# object in the IdPs set), and the 'file' with a full qualified path to a mapping file.
71+
#
72+
# The "schema_version" attribute is optional. Here we just demonstrate a few examples of
73+
# configuration; before using them, one must check the supported version by Keystone. If
74+
# one wants to use the default of Keystone, she/he can omit the "schema_version" option.
75+
#
7176
# keystone_identity_mappings:
7277
# - name: "mappingId1"
7378
# file: "/full/qualified/path/to/mapping/json/file/to/mappingId1"
79+
# schema_version: "1.0"
7480
# - name: "mappingId2"
7581
# file: "/full/qualified/path/to/mapping/json/file/to/mappingId2"
82+
# schema_version: "2.0"
7683
# - name: "mappingId3"
7784
# file: "/full/qualified/path/to/mapping/json/file/to/mappingId3"
85+
# schema_version: "3.0"
7886
keystone_identity_providers: []
7987
keystone_identity_mappings: []
8088
keystone_public_port: "{{ haproxy_single_external_frontend_public_port if haproxy_single_external_frontend | bool else keystone_public_listen_port }}"

ansible/roles/keystone/tasks/register_identity_providers.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
ca_cert: "{{ openstack_cacert if openstack_cacert != '' else omit }}"
6262
name: "{{ item.name }}"
6363
rules: "{{ '{{ keystone_identity_mapping_rules | from_json }}' }}"
64+
schema_version: "{{ item.schema_version | default(omit) }}"
6465
state: present
6566
module_extra_vars:
6667
keystone_identity_mapping_rules: "{{ lookup('ansible.builtin.file', item.file) }}"

doc/source/reference/shared-services/keystone-guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ below:
8787
keystone_identity_mappings:
8888
- name: "mappingId1"
8989
file: "/full/qualified/path/to/mapping/json/file/to/mappingId1"
90+
schema_version: "2.0"
9091
9192
In some cases it's necessary to add JWKS (JSON Web Key Set) uri.
9293
It is required for auth-openidc endpoint - which is
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
Add support to ``schema_version`` in the federated attribute mapping API
5+
of Keystone.

0 commit comments

Comments
 (0)