gPlazma2: Plugins and Configuration Karsten Schwank Zeuthen, - - PowerPoint PPT Presentation

gplazma2 plugins and configuration karsten schwank
SMART_READER_LITE
LIVE PREVIEW

gPlazma2: Plugins and Configuration Karsten Schwank Zeuthen, - - PowerPoint PPT Presentation

gPlazma2: Plugins and Configuration Karsten Schwank Zeuthen, 17.4.2012 Overview Basics Plugins Migrating from v1 to v2 Introducing Argus Introducing Kerberos Examples The WLCG Case Using Kerberos and NIS


slide-1
SLIDE 1

gPlazma2: Plugins and Configuration Karsten Schwank Zeuthen, 17.4.2012

slide-2
SLIDE 2 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 2

Overview

  • Basics
  • Plugins
  • Migrating from v1 to v2
  • Introducing Argus
  • Introducing Kerberos
  • Examples
  • The WLCG Case
  • Using Kerberos and NIS
  • Summary
slide-3
SLIDE 3 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 3

Basics

Authorization with gPlazma2 is

  • A 4 step process
  • Authenticate – “Who are we talking to?”
  • Map – “How does the authenticated user fit into
  • ur site?”
  • Account – “Is the account currently banned?”
  • Session – “What is the user allowed to access?”

Configuration of gPlazma2 is

  • Done via the file /etc/dcache/gplazma.conf
slide-4
SLIDE 4 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 4

Step 1: Authentication (auth)

Who are we talking to?

  • Pin “Principals” to the subject
  • Plugins:
  • KPWD – dCache's own file based mechanism
  • VOMS – Virtual Organization Membership Service
  • X509 – X.509 certificate extractor
  • JAAS – Java Authentication and Authorization Service
  • XACML – Use a XACML server (e.g., GUMS)
  • gPlazma1 – Use old gPlazma
slide-5
SLIDE 5 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 5

auth:kpwd

  • KPWD
gplazma.kpwd.file [/etc/dcache/dcache.kpwd]

Username+Password kpwd Principal

login behrmann read-write 1000 1000 /foo /bar / /O=Grid/O=NorduGrid/OU=ndgf.org/CN=Gerd Behrmann behrmann@ndgf.org passwd behrmann aec59c36 read-write 1000 1000 / /
slide-6
SLIDE 6 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 6

auth:x509

  • X.509 certificate extractor

X.509 chain DN

slide-7
SLIDE 7 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 7

auth:voms

  • Virtual Organization Membership Service

X.509 chain FQAN

gplazma.vomsdir.ca [/etc/grid-security/certificates] gplazma.vomsdir.dir [/etc/grid-security/vomsdir]
slide-8
SLIDE 8 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 8

auth:xacml

  • XACML

X.509 chain Username

gplazma.vomsdir.ca [/etc/grid-security/certificates] gplazma.vomsdir.dir [/etc/grid-security/certificates] gplazma.voms.validate gplazma.xacml.service.url gplazma.xacml.client.type
slide-9
SLIDE 9 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 9

auth:jaas

  • Java Authentication and Authorization

Service

Username+Password Username

gplazma.jaas.name
slide-10
SLIDE 10 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 10

auth:gplazma1

  • Use gPlazma1 as a plugin
gplazma.legacy.config [/etc/dcache/dcachesrm-gplazma.policy]

gPlazma1 supported credentials gPlazma1 supported User information

slide-11
SLIDE 11 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 11

Step 2: Mapping (map)

How does the authenticated user fit in our site?

  • Use the “principals” from auth step to assign a local name to

the subject

  • Plugins:
  • KPWD: dCache's file based solution
  • KRB5: Kerberos
  • NSSwitch: Username and Groupname
  • NIS: Network Information System
  • AuthzDB: Local file based solution
  • GridMap: Local file based solution
  • VoRoleMap: Local file based solution
  • gPlazma1
slide-12
SLIDE 12 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 12

map:kpwd

  • KPWD
gplazma.kpwd.file [/etc/dcache/dcache.kpwd]

DN/Kerberos Username

mapping "/O=Grid/O=NorduGrid/OU=ndgf.org/CN=Gerd Behrmann" behrmann
slide-13
SLIDE 13 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 13

map:krb5

  • Kerberos

Kerberos Username

slide-14
SLIDE 14 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 14

map:gridmap

  • GridMap

DN Username

gplazma.gridmap.file [/etc/grid-security/grid-mapfile] "/O=GermanGrid/OU=DESY/CN=Tigran Mkrtchyan" tigran
slide-15
SLIDE 15 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 15

map:vorolemap

  • VoRolemap

DN+FQAN Username

gplazma.vorolemap.file [/etc/grid-security/grid-vorolemap] "/O=GermanGrid/OU=DESY/CN=Tigran Mkrtchyan" "/dteam" tigran
slide-16
SLIDE 16 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 16

map:nsswitch

  • NSSwitch

Username UID+GID

/etc/nsswitch.conf
slide-17
SLIDE 17 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 17

map:nis

  • NIS

Username UID+GID

gplazma.nis.domain [domain.com] gplazma.nis.server [niserv.domain.com]
slide-18
SLIDE 18 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 18

map:authzdb

  • AuthzDB

Username UID+GID

gplazma.authzdb.file [/etc/grid-security/storage-authzdb] authorize behrmann read-write 1000 1000 / /data/ /data/
slide-19
SLIDE 19 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 19

map:gplazma1

  • gPlazma1
gplazma.legacy.config [/etc/dcache/dcachesrm-gplazma.policy]

gPlazma1 supported user information More gPlazma1 User information

slide-20
SLIDE 20 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 20

Step 3: Account

Is the account currently banned?

  • Check if we have any reason not to allow

the user to access our system

  • Plugins:
  • KPWD: dCache's file based solution
  • Argus: a hierarchical centralized authentication

and authorization service

slide-21
SLIDE 21 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 21

account:kpwd

  • KPWD
gplazma.kpwd.file [/etc/dcache/dcache.kpwd]

Username Banned?

passwd behrmann # read-write 1000 1000 / /
slide-22
SLIDE 22 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 22

account:argus

  • Argus
gplazma.argus.hostcert [/etc/grid-security/hostcert.pem]

DN Banned?

gplazma.argus.hostkey [/etc/grid-security/hostkey.pem] gplazma.argus.ca [/etc/grid-security/certificates] gplazma.argus.endpoint [https://localhost:8154/authz]
slide-23
SLIDE 23 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 23

Step 4: Session

What is the user allowed to access?

  • Use the local name to assign home and root

directory.

  • Plugins:
  • KPWD: dCache's file based solution
  • NIS: Network Information System
  • NSSwitch: Name Service Switch
  • AuthzDB: Local file based solution
  • gPlazma1: Use old gPlazma as plugin
slide-24
SLIDE 24 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 24

session:kpwd

  • KPWD
gplazma.kpwd.file [/etc/dcache/dcache.kpwd]

Username Home+Root+RO/RW

login behrmann read-write 1000 1000 /home /root / /O=Grid/O=NorduGrid/OU=ndgf.org/CN=Gerd Behrmann behrmann@ndgf.org passwd behrmann aec59c36 read-write 1000 1000 / /
slide-25
SLIDE 25 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 25

session:nis

  • NIS

Username Home+Root

gplazma.nis.domain [domain.com] gplazma.nis.server [niserv.domain.com]
slide-26
SLIDE 26 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 26

session:nsswitch

  • NSSwitch

UID+GID Home+Root

/etc/nsswitch.conf
slide-27
SLIDE 27 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 27

session:authzdb

  • AuthzDB

Username Home+Root+RW/RO

gplazma.authzdb.file [/etc/grid-security/storage-authzdb] authorize behrmann read-write 1000 1000 / /data/ /data/
slide-28
SLIDE 28 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 28

session:gplazma1

  • gPlazma1
gplazma.legacy.config [/etc/dcache/dcachesrm-gplazma.policy]

More gPlazma1 user information Home+Root+RW/RO

slide-29
SLIDE 29 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 29

Moving from v1 to v2

slide-30
SLIDE 30 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 30

v1 v2 plugins →

gPlazma v1 plugin gPlazma v2 plugins, for each phases Auth Map Account Session

kpwd

  • pt: x509,
  • pt: kpwd

suf: kpwd

req: kpwd

suf: kpwd grid-mapfile

  • pt: x509
  • pt: gridmap,

suf: authzdb req: gridmap suf: authzdb gplazmalite- vorole-mapping

  • pt: x509,
  • pt: voms
  • pt: vorolemap,

suf: authzdb req: vorolemap suf: authzdb xacml-vo- mapping

  • pt: xacml

suf: authzdb req: authzdb suf: authzdb

Key: opt = optional, suf = sufficient, req = requisite

slide-31
SLIDE 31 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 31

v1 v2: example →

  • Top part of gPlazma

v1 config file

slide-32
SLIDE 32 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 32

v1 v2: example →

  • Ignore plugins that

are switched off

slide-33
SLIDE 33 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 33

v1 v2: example →

  • Consider the

remaining plugins in their execution

  • rder
slide-34
SLIDE 34 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 34
  • Use table to build

initial gPlazma2 configuration

slide-35
SLIDE 35 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 35

v1 v2: example →

  • Notice that there

are some duplicates

slide-36
SLIDE 36 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 36

v1 v2: example →

  • Adjust configuration

to remove duplication

slide-37
SLIDE 37 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 37

Commercials

Argus

slide-38
SLIDE 38 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 38

Introducing Argus

  • Centralized Policies
  • Hierarchical Distribution
  • Authentication
  • Authorization

subject,action resource poll request

Policy Administration Policy Decision Policy Enforcement

slide-39
SLIDE 39 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 40

Commercials End

See now: The standard case feat. Argus

slide-40
SLIDE 40 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 41

Example: WLCG

# step modifier plugin params k=v

/etc/dcache/gplazma.conf

slide-41
SLIDE 41 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 42

Example: WLCG

  • Users are authenticated by X.509 certificates with

voms

# step modifier plugin params k=v auth optional x509 auth optional voms

/etc/dcache/gplazma.conf

slide-42
SLIDE 42 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 43

Example: WLCG

  • Users are authenticated by X.509 certificates with

voms

  • Mapping by VoRoleMap and AuthzDB
# step modifier plugin params k=v auth optional x509 auth optional voms map optional vorolemap map optional authzdb

/etc/dcache/gplazma.conf

slide-43
SLIDE 43 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 44

Example: WLCG

  • Users are authenticated by X.509 certificates with

voms

  • Mapping by VoRoleMap and AuthzDB
  • Banning by Argus
# step modifier plugin params k=v auth optional x509 auth optional voms map optional vorolemap map optional authzdb account requisite argus

/etc/dcache/gplazma.conf

slide-44
SLIDE 44 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 45

Example: WLCG

  • Users are authenticated by X.509 certificates with

voms

  • Mapping by VoRoleMap and AuthzDB
  • Banning by Argus
  • Session parameters by AuthzDB
# step modifier plugin params k=v auth optional x509 auth optional voms map optional vorolemap map optional authzdb account requisite argus session optional authzdb

/etc/dcache/gplazma.conf

slide-45
SLIDE 45 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 46

Example: WLCG

x509 vorolemap authzdb authzdb argus X.509 Chain + DN DN + FQAN + Username Username + UID + GID UID+GID + home folder + root folder DN + banned? voms X.509 Chain +FQAN

slide-46
SLIDE 46 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 47

More commercials

Identity mapping and Kerberos

slide-47
SLIDE 47 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 48

Identity Service

What's your name again?

  • Map Username to UID and reverse
  • Is not part of the login process
  • Used by NFS 4.1 server
  • Plugins:
  • NIS
  • NSSwitch
slide-48
SLIDE 48 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 49

identity:nis

  • NIS

UID+GID Username

gplazma.nis.domain [domain.com] gplazma.nis.server [niserv.domain.com]
slide-49
SLIDE 49 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 50

identity:nss

  • NSSwitch

UID+GID Username

/etc/nsswitch.conf
slide-50
SLIDE 50 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 54

Another example

Identity mapping and Kerberos in action

slide-51
SLIDE 51 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 55

Example: Kerberos + NIS

# step modifier plugin params k=v

/etc/dcache/gplazma.conf

slide-52
SLIDE 52 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 56

Example: Kerberos + NIS

  • Authentication is done by dCache “door”.
# step modifier plugin params k=v

/etc/dcache/gplazma.conf

slide-53
SLIDE 53 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 57

Example: Kerberos + NIS

  • Authentication is done by dCache “door”
  • Mapping to Username is done by krb5 plugin
# step modifier plugin params k=v map optional krb5

/etc/dcache/gplazma.conf

slide-54
SLIDE 54 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 58

Example: Kerberos + NIS

  • Authentication is done by dCache “door”
  • Mapping to Username is done by krb5 plugin
  • Mapping to UID+GID is done by NIS plugin
# step modifier plugin params k=v map optional krb5 map optional nis

/etc/dcache/gplazma.conf

slide-55
SLIDE 55 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 59

Example: Kerberos + NIS

  • Authentication is done by dCache “door”
  • Mapping to Username is done by krb5 plugin
  • Mapping to UID+GID is done by NIS plugin
  • Session attributes are added by NIS plugin
# step modifier plugin params k=v map optional krb5 map optional nis session optional nis

/etc/dcache/gplazma.conf

slide-56
SLIDE 56 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 60

Example: Kerberos + NIS

  • Authentication is done by dCache “door”
  • Mapping to Username is done by krb5 plugin
  • Mapping to UID+GID is done by NIS plugin
  • Session attributes are added by NIS plugin
  • Identity mapping by NIS plugin
# step modifier plugin params k=v map optional krb5 map optional nis session optional nis identity optional nis

/etc/dcache/gplazma.conf

slide-57
SLIDE 57 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 61

Example: Kerberos + NIS

krb5 nis Loginname + Kerberos Kerberos + Username Username + UID + GID

( )

nis UID+GID + home folder + root folder nis Username ↔ UID

slide-58
SLIDE 58 Gplazma2: Plugins and Configuration | Karsten Schwank | 17.4.2012 | Page 62

Summary

Use gPlazma2.