Keystone V3 API 新特性


今天公司内部同事整理了Keystone v3的新特性,概括得很好。html


Keystone V3 API 新特性linux

Keystone V3 作出了许多变化和改进,咱们选取其中较为重要的进行阐述:windows

  • 将 Tenant 改称为 Projectapi

  • 引入 Domain 的概念架构

  • 引入 Group 的概念app

将 Tenant 改成 Project 并在其上添加 Domain 的概念,这更加符合现实世界和云服务的映射。dom

V3 利用 Domain 实现真正的多租户(multi-tenancy)架构,Domain 担任 Project 的高层容器。云服务的客户是 Domain 的全部者,他们能够在本身的 Domain 中建立多个 Projects、Users、Groups 和 Roles。经过引入 Domain,云服务客户能够对其拥有的多个 Project 进行统一管理,而没必要再向过去那样对每个 Project 进行单独管理。ide

Group 是一组 Users 的容器,能够向 Group 中添加用户,并直接给 Group 分配角色,那么在这个 Group 中的全部用户就都拥有了 Group 所拥有的角色权限。经过引入 Group 的概念,Keystone V3 实现了对用户组的管理,达到了同时管理一组用户权限的目的。这与 V2 中直接向 User/Project 指定 Role 不一样,使得对云服务进行管理更加便捷。spa


图 2. Domain、Group、Project、User 和 Role 的关系图htm

wKioL1eOHFbwE-fBAACKdMHPx9I266.png


如图 2 所示,在一个 Domain 中包含 3 个 Projects,能够经过 Group1 将 Role Sysadmin直接赋予 Domain,那么 Group1 中的全部用户将会对 Domain 中的全部 Projects 都拥有管理员权限。也能够经过 Group2 将 Role Engineer 只赋予 Project3,这样 Group2 中的 User 就只拥有对 Project3 相应的权限,而不会影响其它 Projects。


KeyStone名词解释

Domain

An Identity service API v3 entity. Domains are a collection of projects and users that define administrative boundaries for managing Identity entities.  Each group and project is owned by exactly one domain.  Domains can represent an individual, company, or operator-owned space. They expose administrative activities directly to system users. Users can be granted the administrator role for a domain. A domain administrator can create projects, users, and groups in a domain and assign roles to users and groups in a domain.

感受domain相似于命名空间这样的概念,限制了group和user的做用域。在不一样的domain之间,用户名、project、group名字能够相同,好像domain和role必须全局惟一。一个用户能够授予域的管理员角色,域管理员能够在域中建立项目、用户和组,并将角色分配给域中的用户和组。


Group

An Identity service API v3 entity. Groups are a collection of users owned by a domain. A group role, granted to a domain or project, applies to all users in the group. Adding or removing users to or from a group grants or revokes their role and authentication to the associated domain or project.

组感受和linux,windows用户组的概念相似,能够给组赋予权限,在同一组中的用户享有组所具备的权限(角色)。授予一个域或项目的组角色,适用于组中的全部用户。添加或删除用户或组授予或撤销他们的角色和身份验证相关的领域或项目。


Project

A container that groups or isolates resources or identity objects. Depending on the service operator, a project might map to a customer, account, organization, or tenant.

就是v2的tenant概念。


Region

An Identity service API v3 entity. Represents a general division in an OpenStack deployment. You can associate zero or more sub-regions with a region to make a tree-like structured hierarchy. Although a region does not have a geographical connotation, a deployment can use a geographical name for a region, such as us-east.

一个区域的概念,树状层次结构。例如,无锡,这样一个地区,在无锡又有多个数据中心,而每一个数据中心,又可能部署了多个openstack环境。


Catalog

A service catalog lists the services that are available to the caller based upon the current authorization.You can create, list, show details for, update, and delete endpoints.

就是目录或者注册表,能够提供service的索引服务,告诉用户有哪些service以及如何找到这些服务(endpoint)。以前咱们是用keystone endpoint-list查看endpoint,而v3就能够经过 catalog来查看。

 

Policy

A policy is an arbitrarily serialized policy engine rule set to be consumed by a remote service.

Policy提供了RBAC(Role based access control)功能,policy是由每一个服务本身来管理的,由一组rule组成, 每一个service定义本身的rule。 用户访问服务提供的API时,要告诉service你是

一个什么角色,可是service本身来解读role的含义。好比一个用户具备一个service的管理员权限(policy限制),可是有可能对其它service来讲,不具有任何权限。


User

顾名思义就是使用服务的用户,能够是人、服务或者是系统,只要是使用了 Openstack 服务的对象均可以称为用户。


Role

角色,用于分配操做的权限。角色能够被指定给用户,使得该用户得到角色对应的操做权限。


Token

指的是一串比特值或者字符串,用来做为访问资源的记号。Token 中含有可访问资源的范围和有效时间。


参考连接

http://developer.openstack.org/api-ref/identity/v3/index.html

http://www.ibm.com/developerworks/cn/cloud/library/1506_yuwz_keystonev3/index.html

相关文章
相关标签/搜索