So I ran "openstack user list --os-domain-name default", trying to get a domain scoped token, with the admin role, since my default admin user in the default domain, has the admin role on both default domain, and the admin project in the default domain. (Which seems to be a requirement, even for a local-domain admin)
However, because of (I assume) the OS_PROJECT_NAME env, the token is created with a:
{"auth": {"scope": {"project": {"domain": {"name": "Default"}, "name": "admin"}}, "identity": {"password": {"user": {"domain": {"name": "Default"}, "password": "admin00", "name": "admin"}}, "methods": ["password"]}}}
Now, yes, defining both OS_PROJECT_NAME and using --os-domain-name default is of course kinda stupid, but since I can only have EITHER project scoped OR domain scoped tokens, isnt it kind of a bug that the openstack CLI is trying to give me a project scoped token, using the DOMAIN NAME???
However, it still doesnt work 100% correctly I think. Undefining OS_PROJECT NAME, and running
"openstack user list --os-domain-name Default"
Will still not work. I have to do:
"openstack user list --os-domain-name Default --domain default "
And the reason I dont like that, is that I have to know the domain
UUID(default), which a normal project/domain-*local* admin cant find out, because of the rule for identity:get_domain which said:
"identity:get_domain": "rule:cloud_admin or rule:admin_and_matching_domain_id or token.project.domain.id:%(
target.domain.id)s",
The only way I can do openstack domain show <domain>, is if I already now the uuid to begin with...
Running
openstack user list --os-domain-name Default --domain Default
openstack domain show --os-domain-name Default Default
result in: "Could not find resource Default"
So. Maybe I can fix this by allowing domain-names in the rule for get_domain, but since I cant fathom that I would be the first to try to list users with a domain local admin-user, I cant believe that I need to change the recently downloaded policy file.
Surely the major users of Openstack have started using domains by now?
Best Regards
Taisto Qvist