github.com/pachyderm/pachyderm@v1.13.4/doc/docs/master/enterprise/auth/enable-auth.md (about) 1 # Enable Access Controls 2 3 Before you can enable access controls, make sure that 4 you have activated Pachyderm Enterprise Edition 5 as described in [Deploy Enterprise Edition](../deployment.md). 6 7 When you initially enable access controls, data access 8 is restricted to an *initial admin*, most often yourself. 9 This *initial admin* will have `admin` privileges in the 10 Pachyderm cluster. 11 Then, the `admin` user can configure Pachyderm to work with 12 a identity management provider (IdP) of your choice. 13 14 If you want to configure a SAML IdP, such as Okta, you need 15 to create an initial robot admin account by using the 16 `--initial-admin=robot:<user>` flag. 17 18 To enable access controls, complete the following steps: 19 20 1. Verify the status of the Enterprise 21 features by opening the Pachyderm dashboard in your browser or 22 by running the following `pachctl` command: 23 24 ```shell 25 pachctl enterprise get-state 26 ``` 27 28 **System response:** 29 30 ```shell 31 ACTIVE 32 ``` 33 34 1. Activate the Enterprise access control features by completing 35 the steps in one of these sections: 36 37 * To activate through the CLI, follow the steps in 38 [Activate Access Control with pachctl](#activate-access-controls-with-pachctl). 39 * To activate through the Pachyderm Dashboard, follow the steps in 40 [Activate Access Control by Using the Dashboard](#activate-access-controls-by-using-the-dashboard). 41 42 ## Activate Access Controls with `pachctl` 43 44 You can configure any type of supported users through `pachctl`. For 45 more information about the types of supported users, see [Account Types](../). 46 47 To activate access controls with `pachctl`, complete the following steps: 48 49 * If you are authenticating as a `robot`, OIDC, or SAML user, activate 50 access controls by specifying a robot user as an initial admin: 51 52 ```shell 53 pachctl auth activate --initial-admin=robot:<user> 54 ``` 55 56 57 58 When you authenticate as a `robot` user, 59 Pachyderm generates and returns a Pachyderm auth token 60 that issued to authenticate as the initial robot admin by using 61 `pachctl auth use-auth-token`. Then, follow the steps in the 62 corresponding section to configure a selected type of user: 63 64 * To configure a SAML user, follow the steps in [Configure a SAML Auth Provider](). 65 * To configure a OIDC user, follow the steps in [Configure an OIDC Auth Provider](). 66 67 * Activate access controls with a GitHub account: 68 69 ```shell 70 pachctl auth activate 71 ``` 72 73 Pachyderm prompts you to log in with your GitHub account. The 74 GitHub account that you sign in with is the only admin until 75 you add more by running `pachctl auth modify-admins`. 76 77 ## Activate Access Controls by Using the Dashboard 78 79 !!! note 80 Currently, you can only configure a GitHub user in the UI. 81 If you want to set up any other type of user, use `pachctl`. 82 83 To activate access controls in the Pachyderm dashboard, 84 complete the following steps: 85 86 1. Go to the **Settings** page. 87 1. Click the **Activate Access Controls** button. 88 89 After you click the button, Pachyderm enables you to add GitHub users 90 as cluster admins and activate access control: 91 92  93 94 After activating access controls, you should see the following screen 95 that asks you to log in to Pachyderm: 96 97  98 99 ## Log in to Pachyderm 100 101 After you activate access controls, log in to your cluster either 102 through the dashboard or CLI. The CLI and the dashboard have 103 independent login workflows: 104 105 - [Log in to the dashboard](#log-in-to-the-dashboard). 106 - [Log in to the CLI](#log-in-to-the-cli). 107 108 ### Log in to the Dashboard 109 110 After you have activated access controls for Pachyderm, you 111 need to log in to use the Pachyderm dashboard as shown above 112 in [Activate Access Controls by Using the Dashboard](#activate-access-controls-by-using-the-dashboard). 113 114 To log in to the dashboard, complete the following steps: 115 116 1. Click the **Get GitHub token** button. If you 117 have not previously authorized Pachyderm on GitHub, an option 118 to **Authorize Pachyderm** appears. After you authorize 119 Pachyderm, a Pachyderm user token appears: 120 121  122 123 1. Copy and paste this token back into the Pachyderm login 124 screen and press **Enter**. You are now logged in to Pachyderm, 125 and you should see your GitHub avatar and an indication of your 126 user in the upper left-hand corner of the dashboard: 127 128  129 130 131 ### Log in to the CLI 132 133 To log in to `pachctl`, complete the following steps: 134 135 * To log in with a GitHub user: 136 137 1. Type the following command: 138 139 ```shell 140 pachctl auth login 141 ``` 142 143 When you run this command, `pachctl` provides 144 you with a GitHub link to authenticate as a 145 GitHub user. 146 147 If you have not previously authorized Pachyderm on GitHub, an option 148 to **Authorize Pachyderm** appears. After you authorize Pachyderm, 149 a Pachyderm user token appears: 150 151  152 153 1. Copy and paste this token back into the terminal and press enter. 154 155 You are now logged in to Pachyderm! 156 157 1. Alternatively, you can run the command: 158 159 ```shell 160 pachctl auth use-auth-token 161 ``` 162 163 1. Paste an authentication token received from 164 `pachctl auth activate --initial-admin=robot:<user>` or 165 `pachctl auth get-auth-token`. 166 167 ## Manage and update user access 168 169 You can manage user access in the UI and CLI. 170 For example, you are logged in to Pachyderm as the user `dwhitena` 171 and have a repository called `test`. Because the user `dwhitena` created 172 this repository, `dwhitena` has full `OWNER`-level access to the repo. 173 You can confirm this in the dashboard by navigating to or clicking on 174 the repo `test`: 175 176  177 178 179 Alternatively, you can confirm your access by running the 180 `pachctl auth get ...` command. 181 182 !!! example 183 184 ``` 185 pachctl auth get dwhitena test 186 ``` 187 188 **System response:** 189 190 ```shell 191 OWNER 192 ``` 193 194 An OWNER of `test` or a cluster admin can then set other user’s 195 level of access to the repo by using 196 the `pachctl auth set ...` command or through the dashboard. 197 198 For example, to give the GitHub users `JoeyZwicker` and 199 `msteffen` `READER`, but not `WRITER` or `OWNER`, access to 200 `test` and `jdoliner` `WRITER`, but not `OWNER`, access, 201 click on **Modify access controls** under the repo details 202 in the dashboard. This functionality allows you to add 203 the users easily one by one: 204 205  206 207 ## Behavior of Pipelines as Related to Access Control 208 209 In Pachyderm, you do not explicitly grant users access to 210 pipelines. Instead, pipelines infer access from their input 211 and output repositories. To update a pipeline, you must have 212 at least `READER`-level access to all pipeline inputs and at 213 least `WRITER`-level access to the pipeline output. This is 214 because pipelines read from their input repos and write 215 to their output repos, and you cannot grant a pipeline 216 more access than you have yourself. 217 218 - An `OWNER`, `WRITER`, or `READER` of a repo can subscribe a 219 pipeline to that repo. 220 - When a user subscribes a pipeline to a repo, Pachyderm sets 221 that user as an `OWNER` of that pipeline's output repo. 222 - If additional users need access to the output repository, 223 the initial `OWNER` of a pipeline's output repo, or an admin, 224 needs to configure these access rules. 225 - To update a pipeline, you must have `WRITER` access to the 226 pipeline's output repos and `READER` access to the 227 pipeline's input repos. 228 229 230 ## Manage the Activation Code 231 232 When an enterprise activation code expires, an auth-activated 233 Pachyderm cluster goes into an `admin-only` state. In this 234 state, only admins have access to data that is in Pachyderm. 235 This safety measure keeps sensitive data protected, even when 236 an enterprise subscription becomes stale. As soon as the enterprise 237 activation code is updated by using the dashboard or CLI, the 238 Pachyderm cluster returns to its previous state. 239 240 When you deactivate access controls on a Pachyderm cluster 241 by running `pachctl auth deactivate`, the cluster returns 242 its original state that including the 243 following changes: 244 245 - All ACLs are deleted. 246 - The cluster returns to being a blank slate in regards to 247 access control. Everyone that can connect to Pachyderm can access 248 and modify the data in all repos. 249 - No users are present in Pachyderm, and no one can log in to Pachyderm.