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

相關文章
相關標籤/搜索