Next Generation Directory-Based User Management for Cloud - - PowerPoint PPT Presentation

next generation directory based
SMART_READER_LITE
LIVE PREVIEW

Next Generation Directory-Based User Management for Cloud - - PowerPoint PPT Presentation

Next Generation Directory-Based User Management for Cloud Infrastructure Nov 16, 2016 ApacheCon EU, Seville Introductions Katarina Valalikova Evolveum Shawn McKinney - Symas ApacheCon EU, Seville 2016 2 Security is Hard I had


slide-1
SLIDE 1

Next Generation Directory-Based User Management for Cloud Infrastructure

Nov 16, 2016 ApacheCon EU, Seville

slide-2
SLIDE 2

Introductions

  • Katarina Valalikova – Evolveum
  • Shawn McKinney - Symas

ApacheCon EU, Seville 2016 2

slide-3
SLIDE 3

Security is Hard

“I had to keep guessing at the channel; I had to discern, mostly by inspiration, the signs of hidden banks; I watched for sunken stones; When you have to attend to things of that sort, to the mere incidents of the surface, the reality—the reality, I tell you—fades. The inner truth is hidden.” Joseph Conrad, Heart of Darkness

https://en.wikipedia.org/wiki/File:VingtAnnees_286.jpg

ApacheCon EU, Seville 2016

slide-4
SLIDE 4

Session Objective

Uncover that hidden navigation channel for users and machines through ‘the cloud’.

ApacheCon EU, Seville 2016 4

slide-5
SLIDE 5

Session Agenda

  • History
  • Building Blocks
  • Model
  • Solution
  • Use Case
  • Demo
  • Questions

Image from: HTTP://EVENTS.LINUXFOUNDATION.ORG/EVENTS/APACHECON-NORTH-AMERICA

slide-6
SLIDE 6

Knowing the path forward necessarily means we understand where we’ve been.

ApacheCon EU, Seville 2016 6

History

slide-7
SLIDE 7

History

https://upload.wikimedia.org/wikipedia/commons/7/77/Unix_history-simple.svg

7

slide-8
SLIDE 8

History

RFC2307 PAM NSS sudo su dns users POSIX Security

ApacheCon EU, Seville 2016 8

NSS

Soup of the day

slide-9
SLIDE 9

Operating System

AIX ApacheCon EU, Seville 2016 9

should work

  • n most

unix platforms

slide-10
SLIDE 10

Cloud Infrastructure

ApacheCon EU, Seville 2016 10

must work

  • n all
slide-11
SLIDE 11

The Wheel

  • Let’s not reinvent

ApacheCon EU, Seville 2016 11

slide-12
SLIDE 12

Back in time

circa 1995

  • Internet went mainstream
  • Linux is viable
  • Sun released Java
  • Work on Apache HTTP server begun
  • The die was cast on LDAP

ApacheCon EU, Seville 2016 12

slide-13
SLIDE 13

Building Blocks

  • 1. POSIX security controls
  • 2. Directory services

ApacheCon EU, Seville 2016 13

Best practic ices es

slide-14
SLIDE 14

Fast Forward

  • 3. Mediator

New practic ice

ApacheCon EU, Seville 2016 14

slide-15
SLIDE 15

Building Blocks Conceptual

ApacheCon EU, Seville 2016 15

slide-16
SLIDE 16

Building Blocks Actual

ApacheCon EU, Seville 2016 16

slide-17
SLIDE 17

Building Blocks - AuthN

ApacheCon EU, Seville 2016 17

slide-18
SLIDE 18

Pluggable Authentication Module

  • Authentication
  • Coarse-grained Authorization

ApacheCon EU, Seville 2016 18

Jus ust an au authN N servic ice

slide-19
SLIDE 19

Building Blocks - AuthZ

ApacheCon EU, Seville 2016 19

slide-20
SLIDE 20

sudo

20

Just an a authZ service ce

slide-21
SLIDE 21

Building Blocks – Reporting

ApacheCon EU, Seville 2016 21

slide-22
SLIDE 22

Name Service Switch

  • Used by unix processes to lookup user and

group info

ApacheCon EU, Seville 2016 22

Jus ust a l lookup up servic ice

slide-23
SLIDE 23

What is LDAP

23

slide-24
SLIDE 24

Building Blocks - LDAP

System of record

  • Users
  • Passwords
  • Groups

ApacheCon EU, Seville 2016 24

Just a

slide-25
SLIDE 25

Building Blocks - Mediator

  • Keeps things in synch between the machines

and LDAP as things change.

ApacheCon EU, Seville 2016 25

slide-26
SLIDE 26

Mediator

  • 1. Machine added to network, notifies mediator
  • 2. Based on policies stored in DB
  • 3. Updates ldap accordingly

1 3 2

ApacheCon EU, Seville 2016 26

slide-27
SLIDE 27

Model

amsouth

  • m1001

m1002 m1003 … afnorth

  • m2010

..... aspac

  • m3100

ApacheCon EU, Seville 2016 27

Requir iremen ements ts

slide-28
SLIDE 28

Three Kinds of Security Checks

  • 1. Authentication with LDAP
  • 2. Coarse-grained authZ - memberOf target machine

– (i.e. LDAP group name == hostname)

  • 3. Medium-grained authZ. memberOf at least one:

– Admin - root access – User - typical user access – Auditor - read-only access to entire machine.

sudo PAM

ApacheCon EU, Seville 2016 28

slide-29
SLIDE 29

Three Types of Groups

  • 1. Machine Sets
  • 2. Machines
  • 3. Security Roles

mediator tor PAM sudo

ApacheCon EU, Seville 2016 29

slide-30
SLIDE 30

m1set

  • m1001

m1002 m1003 … m2set

  • m2010

m2020 m2030 … m3set

  • m3100

m3200 m3300 …

ApacheCon EU, Seville 2016 30

  • 1. Machine Sets

Used d by mediator tor to compute te polici cies es

slide-31
SLIDE 31
  • 2. Machines

Used d by PAM

ApacheCon EU, Seville 2016 31

slide-32
SLIDE 32
  • 3. Security Roles

Used d by sudo

ApacheCon EU, Seville 2016 32

slide-33
SLIDE 33

m1set

  • m1001

m1002 m1003 … m2set

  • m2010

m2020 m2030 … m3set

  • m3100

m3200 m3300 …

User, r, role and machine e set

ApacheCon EU, Seville 2016 33

admin auditor user

Policy Combiner

The mediato tor r can do this

slide-34
SLIDE 34

Pick Two

ApacheCon EU, Seville 2016 34

slide-35
SLIDE 35

Solution

ApacheCon EU, Seville 2016 35

slide-36
SLIDE 36

Target System Architecture

36

slide-37
SLIDE 37

Client-side Solution

Script during machine instantiation:

  • 1. Configures pam, sudo & nss to LDAP
  • 2. Call mediator to add LDAP machine group
  • 3. Call mediator to recompute LDAP groups

ApacheCon EU, Seville 2016

slide-38
SLIDE 38

Server-side Solution

  • 1. MidPoint - mediator

– delegated admin, approvals, audit – html & http admin services

  • 2. PostGreSQL – master database

– users, roles, orgs, svcs

  • 3. OpenLDAP – security database

– users, groups – posixAccount, posixGroup

38

slide-39
SLIDE 39

High-level Solution Design

ApacheCon EU, Seville 2016 39

slide-40
SLIDE 40

Detail Design

slide-41
SLIDE 41

Data Models

  • 1. LDAP Hierarchical Database

– data used for the posix security access control

  • 2. Midpoint Relational Database

– stores master copy of all data used across all repositories

ApacheCon EU, Seville 2016 41

slide-42
SLIDE 42

LDAP Data Model

Standard object schemas:

  • 1. RFC2307bis

– posixAccount – posixGroup

  • 2. SudoRole

ApacheCon EU, Seville 2016 42

slide-43
SLIDE 43

LDAP Data Model

Hierarchica archical

ApacheCon EU, Seville 2016 43

slide-44
SLIDE 44

Use RFC2307bis LDAP Schema

ApacheCon EU, Seville 2016 44

slide-45
SLIDE 45

Machine Set M1

dn: cn=m1set, ou=Groups, ... description: Machine Set 1 member: cn=m1001,... member: cn=m1002,... member: cn=m1003,...

ApacheCon EU, Seville 2016 45

slide-46
SLIDE 46

Machine M1001

dn: cn=m1001, ou=Groups,…

  • bjectClass: posixGroup

description: Machine Group M1001 member: uid=curly,ou=People,… member: uid=frank,ou=People,… member: uid=marla,ou=People,…

ApacheCon EU, Seville 2016 46

slide-47
SLIDE 47

Security Role M1Admin

dn: cn=m1admin, ou=Groups, ...

  • bjectClass: posixGroup

description: Admin Machine Set 1 cn: m1admin member: uid=curly,ou=People,... member: uid=frank,ou=People,... member: uid=marla,ou=People,...

ApacheCon EU, Seville 2016 47

slide-48
SLIDE 48

sudo LDAP Schema

  • bjectclass ( 1.3.6.1.4.1.15953.9.2.1

NAME 'sudoRole' SUP top STRUCTURAL DESC 'Sudoer Entries' MUST ( cn ) MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $ sudoRunAsGroup $ sudoOption $ sudoNotBefore $ sudoNotAfter $ sudoOrder $ description ) )

ApacheCon EU, Seville 2016 48

slide-49
SLIDE 49

sudo M1Admin

dn: cn=admin access to m1,ou=sudo,dc=example,dc=com

  • bjectClass: sudoRole

cn: admin access to m1 sudoUser: %m1admin sudoHost: m1001 sudoHost: m1002 sudoHost: m1003 sudoHost: m1004

ApacheCon EU, Seville 2016 49

slide-50
SLIDE 50

MidPoint Data Model

Rela lational tional

50

slide-51
SLIDE 51

Provisioning Overview

1. Adding a new User into LDAP triggers into midpoint DB and vice versa. 2. Adding a new machine group as a memberOf a particular machine set group it automatically adds eligible users as membersOf of the same machine group. 3. Assigning a Role with a parameterized Org to a User automatically adds to memberOf associated machine and security groups in LDAP.

ApacheCon EU, Seville 2016 51

slide-52
SLIDE 52

Data Mapping

Use midpoin int t paramete eterized rized roles

52

slide-53
SLIDE 53

Midpoint (mediator)

53

slide-54
SLIDE 54

Midpoint manages the LDAP groups

54

slide-55
SLIDE 55
slide-56
SLIDE 56

Users

ApacheCon EU, Seville 2016 56

slide-57
SLIDE 57

OpenLDAP Resource

ApacheCon EU, Seville 2016 57

slide-58
SLIDE 58

Use Cases

Manage a large cluster of machines for a technology company with 100 employees and 100,000 customers.

ApacheCon EU, Seville 2016 58

slide-59
SLIDE 59

Overview

  • Many types of machines but here we’ll be

using Debian and Redhat systems.

  • These deploy into the cloud of a well-known

provider.

  • Must maintain strict control over who may

access the machines to verify compliance.

ApacheCon EU, Seville 2016 59

slide-60
SLIDE 60

Use Case 1

Create a New Machine

  • Assigns authorized Users as members of the

Machine Group

  • New machine uses the Machine Group in PAM
  • Uses the security roles in SUDO

ApacheCon EU, Seville 2016 60

slide-61
SLIDE 61

Use Case 2

Remove a Machine:

  • Deletes the Machine Group from LDAP

ApacheCon EU, Seville 2016 61

slide-62
SLIDE 62

Use Case 3

Assigning a User to a Role:

  • Add to corresponding Security Role
  • Adds to corresponding Machine Groups

ApacheCon EU, Seville 2016 62

slide-63
SLIDE 63

Use Case 4

Deassigning a User from a Role:

  • Removes User from corresponding Security

Role

  • Removes User from corresponding Machine

Groups

ApacheCon EU, Seville 2016 63

slide-64
SLIDE 64

Machine Sets

Each machine resides es in a si single le domain

ApacheCon EU, Seville 2016 64

slide-65
SLIDE 65

Machines

ApacheCon EU, Seville 2016 65

slide-66
SLIDE 66

Security Roles

ApacheCon EU, Seville 2016 66

slide-67
SLIDE 67

67

slide-68
SLIDE 68

Demo

  • 1. Assign Users to Roles / Machine Sets
  • 2. Deassign Users from Roles / Machine Sets
  • 3. Add New Machines
  • 4. Remove Machines

ApacheCon EU, Seville 2016 68

slide-69
SLIDE 69

Role- machine m1001 m1002 m1003 m2010 m2020 m2030 m3100 m3200 m3300 M1Admin T T T M1User T T T M1Auditor T T T M2Admin T T T M2User T T T M2Auditor T T T T T T M3User T T T M3Auditor T T T

Demo Role to Machine

69 ApacheCon EU, Seville 2016

slide-70
SLIDE 70

User- Role- Machine m1001 m1002 m1003 m2010 m2020 m2030 m3100 m3200 m3300

Curly

Admin Admin Admin

Moe

Auditor Auditor Auditor

Larry

User User User

Demo User to Role to Machine

70 ApacheCon EU, Seville 2016

<-----

  • ---- Set 1------
  • -----> <------
  • --Set

Set 2 2 ------

  • -----> <-----
  • ---- Set 3

3 -----

  • ---->
slide-71
SLIDE 71

Wrap-up

ApacheCon EU, Seville 2016 71