hierarchical multitenancy and projects acting as domains ... · hierarchical multitenancy enables...

49
Flat no more! Hierarchical multitenancy and projects acting as domains in OpenStack 1 Andrey Brito, Henrique Truta and Raildo Mascena Universidade Federal de Campina Grande

Upload: others

Post on 13-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Flat no more! Hierarchical multitenancy and projects acting as domains in

OpenStack

1

Andrey Brito, Henrique Truta and Raildo MascenaUniversidade Federal de Campina Grande

Page 2: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Andrey BritoProfessor - Universidade Federal de Campina Grande (Brazil)

Henrique TrutaLead Software Engineer - Universidade Federal de Campina Grande (Brazil)OpenStack ATC

Raildo MascenaSoftware Engineer - Universidade Federal de Campina Grande (Brazil)OpenStack ATC

Presenters

2

Page 3: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Agenda● Introduction of OpenStack

● Introduction of Keystone

● Hierarchical Multitenancy

● Nested Quotas

● Projects acting as domains

● Next steps

3

Page 4: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

4

Page 5: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Keystone● The OpenStack component responsible for Identity management

○ Authorization○ Authentication○ Audit

● Supports multiple Identity providers○ Federation

● Support for auth backends and frameworks such as LDAP and OAuth● Enables Multitenancy

5

Page 6: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Multitenancy:

“A single instance of software that runs on a server and serves multiple tenants. A tenant is a group of users who

share a common access with specific privileges to the software instance”

6

Page 7: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

A bit of history

7

Page 8: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Multitenancy in OpenStack● From Austin to Cactus:

○ One user → One tenant○ A user could not belong to more than one tenant○ Nova handled the authentication

● From Diablo to Folsom:○ Keystone released in Diablo with API 2.0○ Kept the “one user → one tenant” model○ Simple RBAC existed: Hardcoded to admin and member operations

8

Page 9: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Multitenancy in OpenStack● Grizzly and Havana:

○ v3 release■ Domains introduced: Container of projects■ Tenants became projects■ Users no longer belong to the tenant, but to the domain

○ One user → Many projects○ RBAC via policy file introduced○ “admin” role is global

9

Page 10: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Multitenancy in OpenStack● Icehouse and Juno:

○ First efforts to eliminate global admin○ Improvements on domain usage

■ Domain specific backends■ Possibility of domain policy enforcement

● And Kilo...

10

Page 11: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Hierarchical Multitenancy

11

Page 12: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

How to better represent that?

12

UFCG CLOUD

LSD ANALYTICSSPLAB

FOGBOW OPENSTACK BIGDATA DIFERENTONA PRE SMART CITIES

KEYSTONE IRONIC MONASCADEV CI

...

Page 13: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Project .

Project .

Domain

Project .

Project .

Project .

Workaround in a flat way

13

Domain

· UFCG Cloud · LSD · LSD_Fogbow

· LSD_BigData

· LSD_OpenStack_Keystone

· LSD_OpenStack_Ironic

· LSD_OpenStack_Monasca

· Analytics · Analytics_Research

Project

Page 14: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Subproject

Project

Domain

Domain

Subproject

Subproject

Subproject

Project

Project

Hierarchical Multitenancy

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · FOGBOW · Dev · CI · Analytics · ...

HierarchicalMultitenancy

(HMT)

14

Page 15: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Basic operations

14

Operation OpenStack Call

Create project create <p-name> [ --parent <parent_name> ]

Read project show <p-name> [ --parents ][ --subtree ]

Update project set <p-name> --description <p-description>

Delete project delete <p-name>

15

Page 16: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

How can we improve the access control?

16

Page 17: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Henrique as PM

Henrique as Project Manager

Henrique as PM

How to grant a role to a user on a

project subtree?

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

17

Usual role assignments

Page 18: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Henrique as Project Manager

Inherited role assignments

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

Keystone Inherited Roles Assignment

Concept

18

Page 19: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Role assignment operations

Operation OpenStack Call

Create role add <r-name> --user <u-name> --project <p-name> [ --inherited ]

Read role assignment list --user <u-name> [ --inherited | --effective ]

Delete role remove <r-name> --user <u-name> --project <p-name> [ --inherited ]

19

Page 20: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Set Up

· UFCG Cloud

· LSD domain create lsd

· OpenStack Henrique as PM project create openstack --domain lsd

· Keystone project create keystone --domain lsd --parent openstack

· Monasca project create monasca --domain lsd --parent openstack

· Projects Hierarchy

· User & Grant● user create henrique--domain lsd --password tough_password● role add project_manager --user henrique --project openstack --inherited

20

Page 21: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Enforcing quota

21

Page 22: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

The current quota implementation● The existing driver is useful to enforce quotas when projects are independent,

but... ○ A quota for a subproject can exceed its parent’s quota○ The project manager cannot control the subprojects’ quotas

● Others services do not support domains○ Consequently, there are no quotas for domains○ If you want project admins to handle their own users (i.e., give them domains),

then you cannot control their quotas

22

Page 23: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Quota Instance = 60

Quota Instance = 30

Quota Instance = 70

Quota Instance = 10

Quota Instance = 100

Quota Instance = 50

Current Quota Driver

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

Nested Quota

23

Page 24: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Nested Quota● New driver that enforces quotas in nested projects

● Allocate part of the parents’ quota to their subtree○ The project manager shares his quota: split his resources among his subprojects○ Quota for a subproject will always be lower than its parent project

24

Page 25: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Quota Instance = 60

Quota Instance = 30

Quota Instance = 70

Quota Instance = 10

Quota Instance = 100

Quota Instance = 50

Current Quota Driver

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

Nested Quota

25

Page 26: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Quota Instance = 30

Quota Instance = 30

Quota Instance = 70

Quota Instance = 10

Quota Instance = 100

Quota Instance = 50

Nested Quota

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

Nested Quota

26

Page 27: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

What is the expected visibility of the cloud admin?

27

Page 28: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Cloud admin delegating control

28

Cloud admin creates domain and gives to the PM

Domain

CA

P

PM

PM creates users, hierarchies and is able to set unlimited quotas

P

Sets qu

ota=1

00.00

0 Sets quota=100.000

CA

creates A domain

Page 29: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Cloud admin controlling

29

Cloud admin creates domain, but it will not be a black box anymore

Domain

CA

P

PM

PM contacts CA when needs an operation like project creation and quota sets

P

Sets quota=100

CA

creates

contacts

Sets quota=20

A domain

Page 30: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Challenge:Give project managers the control of their resources, without giving them all resources of the cloud

30

Page 31: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Projects acting as domains

31

Page 32: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Subproject

Project

Domain

Domain

Subproject

Subproject

Subproject

Project

Project

Representing with HMT

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

HMT

32

Page 33: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Subproject

Project

Project that acts as a Domain

Project that acts as Domain

Subproject

Subproject

Subproject

Project

Project

New Representation with PAAD

· UFCG Cloud · LSD · OpenStack · Keystone · Monasca · Fogbow · Dev · CI · Analytics · ...

Projects Acting as Domains (PAAD)

33

Page 34: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

What has changed● “LSD” is now a project (but also a domain)

○ Internally represented by the flag “is_domain”○ It is still the container of users and projects

● But now the cloud admin is able to set its quota

● And the project managers can distribute their quota across the tree, as they creates subprojects

34

Page 35: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Creating a new hierarchy

35

Page 36: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Step 1: Cloud admin creates the project that acts as a domain

36

POST /v3/projects

Body:{“name”: “LSD”,“description”: “My root project that acts as a domain”,“is_domain”: true }

LSDis_domain=Trueparent_id=Nonedomain_id=None

Page 37: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Alternative step 1: Using the domain API

37

POST /v3/domains

Body:{“name”: “LSD”,“description”: “My root project that acts as a domain”}

In the CLI:

domain create lsd --description “My root project that acts as a domain”

LSDis_domain=Trueparent_id=Nonedomain_id=None

Page 38: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Step 2: User creates a regular projectPOST /v3/projects

Body:{“name”: “OpenStack”,“description”: “Project of OpenStack group”,“is_domain”: false,“parent_id”: <lsd id> }

In the CLI:

project create openstack --parent lsd --domain lsd

38

LSDis_domain=Trueparent=Nonedomain=None

is_domain=Falseparent=LSDdomain=LSD

OpenStack

Page 39: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

POST /v3/projects

Body:{“name”: “National marketing”,“description”: “Project of keystone team”,“is_domain”: false,“parent_id”: <openstack id>}

In the CLI:

project create keystone --parent openstack --domain lsd

Step 3: User creates subprojects

39

LSDis_domain=Trueparent=Nonedomain=None

is_domain=Falseparent=LSDdomain=LSD

OpenStack

is_domain=Falseparent=OpenStackdomain=LSD

Keystone

Page 40: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Summary & Next steps

40

Page 41: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Summary● Hierarchical Multitenancy enables better management of resource

● It is a combination of several features○ Creating hierarchical relationships between projects○ Assigning roles to users in projects using these hierarchical○ Managing resource limits hierarchically○ Delegating control of a subtree

41

Page 42: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Next steps: Reseller● Subprojects may want to manage their users from the parent

● Delegating user management across the tree○ Subprojects manage their own users, acting also as domains○ Resource usage controlled by the parent PM○ Different user backends (LDAP, SQL, AD)

● Enables reselling part of the resources

42

Page 43: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Next steps: Reseller

43

LSD

OpenStack

Keystone

Fogbow

LDAPbackend

SQL backend

DevIronic CI

Page 44: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Next steps: Nested Quota

● Already works on Cinder

● Under review in Nova○ But there is work to do: a common quota library for all services○ Contributors are welcome

■ Contribute code■ Share use cases■ Review!■ Channel: #openstack-quota

44

Page 45: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

45

Next steps: UX

Page 46: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

46

Next steps: UX

Page 47: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Besides us, a couple more users believe this is pretty relevant

47

Page 48: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

48

Page 49: Hierarchical multitenancy and projects acting as domains ... · Hierarchical Multitenancy enables better management of resource It is a combination of several features Creating hierarchical

Thank you!

Flat no more! Hierarchical multitenancy and projects

acting as domains in OpenStack

{andrey, henrique, raildo}@lsd.ufcg.edu.brIRC: abrito, htruta, raildo

49