github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.9.x/enterprise/saml_usage.md (about) 1 ## Use SAML 2 3 This section walks you through an example of using Pachyderm's experimental SAML 4 support. We'll describe: 5 6 1. Authenticating via a SAML ID Provider 7 1. Authenticating in the CLI 8 1. Authorizing a user or group to access data 9 10 ## Setup 11 12 Follow the instructions in [Configure SAML](saml_setup.md) to enable auth in a 13 Pachyderm cluster and connect it to a SAML ID provider. Then, we'll authenticate 14 as a cluster admin in one console and set up our [open CV 15 demo](https://github.com/pachyderm/pachyderm/blob/master/examples/opencv/README.md). 16 17 In the CLI, that would look like: 18 19 ``` 20 (admin)$ pachctl auth use-auth-token 21 Please paste your Pachyderm auth token: 22 <auth token> 23 24 (admin)$ pachctl auth whoami 25 You are "robot:admin" 26 You are an administrator of this Pachyderm cluster 27 28 (admin)$ pachctl create repo images 29 (admin)$ pachctl create pipeline -f examples/opencv/edges.json 30 (admin)$ pachctl create pipeline -f examples/opencv/montage.json 31 (admin)$ pachctl put file images@master -i examples/opencv/images.txt 32 (admin)$ pachctl put file images@master -i examples/opencv/images2.txt 33 34 (admin)$ pachctl list repo 35 NAME CREATED SIZE (MASTER) ACCESS LEVEL 36 montage 2 minutes ago 1.653MiB OWNER 37 edges 2 minutes ago 133.6KiB OWNER 38 images 2 minutes ago 238.3KiB OWNER 39 40 (admin)$ pachctl list job 41 ID OUTPUT COMMIT STARTED DURATION RESTART PROGRESS DL UL STATE 42 023a478b16e849b4996c19632fee6782 montage/e3dd7e9cacc5450c92e0e62ab844bd26 2 minutes ago 8 seconds 0 1 + 0 / 1 371.9KiB 1.283MiB success 43 fe8b409e0db54f96bbb757d4d0679186 edges/9cc634a63f794a14a78e931bea47fa73 2 minutes ago 5 seconds 0 2 + 1 / 3 181.1KiB 111.4KiB success 44 152cb8a0b0854d44affb4bf4bd57228f montage/82a49260595246fe8f6a7d381e092650 2 minutes ago 5 seconds 0 1 + 0 / 1 79.49KiB 378.6KiB success 45 86e6eb4ae1e74745b993c2e47eba05e9 edges/ee7ebdddd31d46d1af10cee25f17870b 2 minutes ago 4 seconds 0 1 + 0 / 1 57.27KiB 22.22KiB success 46 ``` 47 48 ## Authenticating via a SAML ID Provider (in the dashboard) 49 Before authenticating, navigating to the dash will yield a blank screen: 50 51  52 53 Even through the dash suggests logging in via GitHub, we will log in using a 54 SAML IdP (which has hopefully already been configured). To see your Pachyderm 55 DAG, navigate to your SAML ID provider and sign in to your Pachyderm cluster 56 there (currently Pachyderm only supports IdP-initiate SAML authentication). 57 58  59 60 Once you've authenticated, you'll be redirected to the Pachyderm dash (the 61 redirect URL is configured in the Pachyderm auth system). You'll be given the 62 opportunity to generate a one-time password (OTP), though you can always do this 63 later from the settings panel. 64 65  66 67 After closing the OTP panel, you'll be able to see the Pachyderm DAG, but you 68 may not have access to any of the repos inside (a repo that you cannot read is 69 indicated by a lock symbol): 70 71  72 73 ## Authenticating in the CLI 74 After authenticating in the dash, you'll be given the opportunity to generate a 75 one-time password (OTP) and sign in on the CLI. You can also generate an OTP 76 from the settings panel: 77 78  79 80 ``` 81 (user)$ pachctl auth login --code auth_code:73db4686e3e142508fa74aae920cc58b 82 (user)$ pachctl auth whoami 83 You are "saml:msteffen@pachyderm.io" 84 session expires: 14 Sep 18 20:55 PDT 85 ``` 86 87 Note that this session expires after 8 hours. The duration of sessions is 88 configurable in the Pachyderm auth config, but it's important that they be 89 relatively short, as SAML group memberships are only updated when users sign in. 90 If a user is removed from a group, they'll still be able to access the group's 91 resources until their session expires. 92 93 ## Authorizing a user or group to access data 94 95 First, we'll give the example of an admin granting a user access. This can be 96 accomplished on the CLI like so: 97 98 ``` 99 (admin)$ pachctl auth set saml:msteffen@pachyderm.io reader images 100 ``` 101 102 Now, the `images` repo is no longer locked when that user views the DAG: 103 104  105 106 At this point, you can click on the `images` repo and preview data inside: 107 108  109 110 Likewise, you can grant access to repos via groups. You'll need a SAML ID 111 provider that supports group attributes, and you'll need to put the name of that 112 attribute in the Pachyderm auth config. Here, we'll grant access to the Everyone 113 group: 114 115 ``` 116 (admin)$ pachctl auth set group/saml:Everyone owner edges 117 ``` 118 119 Now, the edges repo is also not locked: 120 121  122 123 Also, becase `msteffen@pachyderm.io` has OWNER provileges in the `edges` repo 124 (via the Everyone group), the ACL for `edges` can be edited. 125 `msteffen@pachyderm.io` will use OWNER privileges gained via the Everyone group 126 to add `msteffen@pachyderm.io` (the user principal) directly to that ACL: 127 128  129 130 this change is reflected in the CLI as well: 131 132 ```shell 133 (admin)$ pachctl auth get edges 134 pipeline:edges: WRITER 135 pipeline:montage: READER 136 group/saml:Everyone: OWNER 137 saml:msteffen@pachyderm.io: READER 138 robot:admin: OWNER 139 ``` 140 141 ## Conclusion 142 143 This is just an example of Pachyderm's auth system, meant to illustrate the 144 general nature of available features. Hopefully, it clarifies whether Pachyderm 145 can meet your requirements.