Comment 3 for bug 2004261

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

thanks for reporting.

Everything is scoped now and even with the old account.yaml, the scope will be set to 'project' by L132.

This code of storing the account with role is wrong as we should not store the same account in two places, one with role L145 and the other with scope L147. It should be stored with scope only. We can replace this for loop[1] with the below so that we store the account with only <scope>_<role> hash only

             for role in roles:
                if scope:
                    hash_dict = cls._append_scoped_role(
                        scope, role, temp_hash_key, hash_dict)
                else:
                    hash_dict = cls._append_role(
                        role, temp_hash_key, hash_dict)

[1] https://github.com/openstack/tempest/blob/1632cf5085de995206ec97788b4b546c13466860/tempest/lib/common/preprov_creds.py#L143-L148