Skip to content

Commit f535c84

Browse files
committed
Add sufficient detail the the app creds fixes
Specify that app creds in Yoga are affected by the lack of implicit roles, so no assumptions are made that a system is safe if it is a relatively new deployment. Add a note to the issue of implicit reader roles seen at Bristol Uni. Add instructions on how to add the reader role to existing app creds, taken from Slack conversations
1 parent 05d32d4 commit f535c84

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

doc/source/operations/upgrading.rst

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,48 @@ Some things to watch out for:
6666
required by the secure RBAC policies.
6767
* Application credentials generated before the existence of any implicit roles
6868
will not be granted those roles. This may include the ``reader`` role, which
69-
is referenced in some of the new secure RBAC policies. See `Keystone bug
70-
2030061 <https://bugs.launchpad.net/keystone/+bug/2030061>`_.
69+
is referenced in some of the new secure RBAC policies. This issue has been
70+
seen in app creds generated in the Yoga release. See `Keystone bug 2030061
71+
<https://bugs.launchpad.net/keystone/+bug/2030061>`_.
72+
73+
While the Keystone docs suggest that the ``member`` role should imply the
74+
``reader`` role, it has been seen at a customer that newly-generated app
75+
creds in the Antelope release may need both the ``member`` and ``reader``
76+
role specified.
77+
78+
Here are some SQL scripts you can call to first see if any app creds are
79+
affected, and then add the reader role where needed. It is recommended to
80+
`backup the database
81+
<https://docs.openstack.org/kayobe/latest/administration/overcloud.html#performing-database-backups>`__
82+
before running these.
83+
84+
.. code-block:: sql
85+
86+
docker exec -it mariadb bash
87+
mysql -u root -p keystone
88+
# Enter the database password when prompted.
89+
90+
SELECT application_credential.internal_id, role.id AS reader_role_id
91+
FROM application_credential, role
92+
WHERE role.name = 'reader'
93+
AND NOT EXISTS (
94+
SELECT 1
95+
FROM application_credential_role
96+
WHERE application_credential_role.application_credential_id = application_credential.internal_id
97+
AND application_credential_role.role_id = role.id
98+
);
99+
100+
INSERT INTO application_credential_role (application_credential_id, role_id)
101+
SELECT application_credential.internal_id, role.id
102+
FROM application_credential, role
103+
WHERE role.name = 'reader'
104+
AND NOT EXISTS (
105+
SELECT 1
106+
FROM application_credential_role
107+
WHERE application_credential_role.application_credential_id = application_credential.internal_id
108+
AND application_credential_role.role_id = role.id
109+
);
110+
71111
* If you have overwritten ``[auth] tempest_roles`` in your Tempest config, such
72112
as to add the ``creator`` role for Barbican, you will need to also add the
73113
``member role``. eg:

0 commit comments

Comments
 (0)