我可以在 openstack 的 ACL 中使用用户名 swift

Can I use username in ACL of openstack swift

doc 开始,ACL 应该类似于 <project-id>:<user-id>

但是 <project-id>:<user-name> 也有效吗?

根据 NOTE 在 link 到 doc 你提供的:

Keystone project (tenant) or user names (i.e., project-name:user-name) must no longer be used because with the introduction of domains in Keystone, names are not globally unique. You should use user and project ids instead.

For backwards compatibility, ACLs using names will be granted by keystoneauth when it can be established that the grantee project, the grantee user and the project being accessed are either not yet in a domain (e.g. the X-Auth-Token has been obtained via the Keystone V2 API) or are all in the default domain to which legacy accounts would have been migrated.

如果 X-Auth-Token 是使用 Keystone v2 API 获得的,或者所有三个 grantee 用户、grantee 项目和项目都属于默认域,则使用 <project-id>:<user-name> 会起作用。

但是,鉴于 Keystone v2 将在未来很快被弃用并且在 Keystone 中引入域之后,我认为这就是为什么 swift 文档明确试图禁止进一步使用 <user-name> 在 ACL 中。