You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/advanced-puppet-master.md
+23-5
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,11 @@ Please note the following caveats:
8
8
9
9
0. You will need to deploy your Puppet code to an environment on your Puppet Master prior to running `octocatalog-diff` for that environment. `octocatalog-diff` does not deploy code for you.
10
10
11
-
0. You will need to configure authorization for one or more whitelisted certificates on your Puppet Master. The default permissions allow a node to retrieve its own catalog via the API, but you need a certificate for `octocatalog-diff` that permits it to retrieve any catalog. See the [Certificate authorization](#certificate-authorization) section below.
11
+
0. You will need to configure authorization for one or more whitelisted certificates on your Puppet Master. The default permissions allow a node to retrieve its own catalog via the API, but you need a certificate for `octocatalog-diff` that permits it to retrieve any catalog. See the [Certificate authorization](#certificate-authorization) section below. If you are using Puppet Enterprise and use
12
+
the Puppet Master v4 API you may also use a Puppet Enterprise RBAC token. The user owning the token will need the "Puppet Server Compile catalogs for remote nodes" permission.
13
+
See the [PE RBAC Token Authorization](#pe-rbac-token-authorization) section below.
14
+
15
+
0. If you are using the v2 or v3 PuppetServer APIs with Octocatalog-Diff to compile catalogs, then those catalogs and facts will be automatically stored in PuppetDB. However, when using the v4 PuppetServer API with Octocatalog-Diff, facts and catalogs are *not* automatically stored in PuppetDB - persistence is optional and may be enabled with the appropriate Octocatalog-Diff CLI flag. If your environment depends on the accuracy of exported resources or facts in PuppetDB, you may wish to upgrade and use the V4 API, to avoid unintentional side-effects.
12
16
13
17
## Command line options
14
18
@@ -18,11 +22,15 @@ The following command line options are used to retrieve a catalog from a Puppet
18
22
| ------ | ----------- |
19
23
|`-f ENVIRONMENT`| Environment name to use for the "from" catalog |
20
24
|`-t ENVIRONMENT`| Environment name to use for the "to" catalog |
21
-
| `--puppet-master HOSTNAME:PORT| The hostname and port number of the Puppet Master. (By default the port used by Puppet Master is 8140.) |
22
-
| `--puppet-master-api-version VERSION | The API version used by the Puppet Master. API versions 2and 3 are supported. Puppet Master 3.x uses API version 2, and the PuppetServer for Puppet 4.x uses API version 3. By default, API version 3 is used, so you only need to set this option if you are using Puppet Master 3.x. |
25
+
|`--puppet-master HOSTNAME:PORT`| The hostname and port number of the Puppet Master. (By default the port used by Puppet Master is 8140.) |
26
+
|`--puppet-master-api-version VERSION`| The API version used by the Puppet Master. API versions 2, 3,and 4 are supported. Puppet Master 3.x uses API version 2, and the PuppetServer for Puppet 4.x uses API version 3. PuppetServer 6.3.0 introduced the optional use of the v4 API but still fully supports the v3 API. By default, API version 3 is used, so you only need to set this option if you are using Puppet Master 3.x or wish to use the newer v4 API with PuppetServer 6. |
23
27
|`--puppet-master-ssl-ca PATH`| Path to the CA certificate (public portion of certificate only) for your Puppet Master. This file will be on your Puppet Master and all Puppet agents. You can find it by running `puppet config print cacert` on any Puppet-managed host. |
24
-
|`--puppet-master-ssl-client-cert PATH`| Path to the client certificate. Please see the section below on certificate authentication. |
25
-
|`--puppet-master-ssl-client-key PATH`| Path to the client private key. Please see the section below on certificate authentication. |
28
+
|`--puppet-master-ssl-client-cert PATH`| Path to the client certificate. Please see the section below on certificate authentication. This can be omitted if using PE RBAC token based auth with the v4 API. |
29
+
|`--puppet-master-ssl-client-key PATH`| Path to the client private key. Please see the section below on certificate authentication. This can be omitted if using PE RBAC token based auth with the v4 API. |
30
+
|`--puppet-master-token STRING`| A PE RBAC token used to authenticate a v4 catalog compile, in lieu of using certificate authentication. Please see the section below on token authentication. |
31
+
|`--puppet-master-token-file PATH`| A path to a file containing a PE RBAC token used to authenticate a v4 catalog compile, in lieu of using certificate authentication. If this and `--puppet-master-token` are both specified, `--puppet-master-token` will be used instead. Please see the section below on token authentication. |
32
+
|`--puppet-master-update-catalog`| When using the v4 API, instruct the PuppetServer to update the catalog generated from the compile in its PuppetDB instance. When using v2 and v3 APIs the catalog is always updated and this option is ignored. |
33
+
|`--puppet-master-update-facts`| When using the v4 API, instruct the PuppetServer to update the facts used during the compile in its PuppetDB instance. When using v2 and v3 APIs the facts are always updated and this option is ignored. |
26
34
27
35
If you wish to use a different Puppet Master to compile the "to" and "from" catalogs, you may prefix any of the `--puppet-master...` options with `to` or `from`. For example, perhaps you are testing an upgrade from Puppet 3.x to 4.x. You could use:
28
36
@@ -48,3 +56,13 @@ allow $1
48
56
```
49
57
50
58
Please follow the instructions for the version of Puppet Master, PuppetServer, or Puppet Enterprise that you are using in order to generate and authorize the certificates.
59
+
60
+
## PE RBAC Token authorization
61
+
62
+
In newer versions of Puppet Enterprise you can authenticate using a valid PE RBAC token with appropriate permissions as long as it is authorized in the PuppetServer `auth.conf` file.
63
+
64
+
By default this permission is enabled and controlled by the `puppet_enterprise::master::tk_authz::allow_rbac_catalog_compile` Hiera setting.
65
+
66
+
The user the token was issued to must have the `puppetserver:compile_catalogs:*` permission.
67
+
68
+
Note: A Puppet catalog may contain unencrypted secrets, even ones marked as `Sensitive`. In order to perform its job, Octocatalog-Diff needs access to the catalog. By granting a user the above RBAC permission you are granting them the ability to retrieve and view the complete catalog resulting from a compile, including any included secrets.
0 commit comments