Skip to content

Commit 369f886

Browse files
committed
Add information about public ca key, access key, and secret key.
Signed-off-by: Ian Maddaus <[email protected]>
1 parent b09c947 commit 369f886

File tree

1 file changed

+72
-2
lines changed

1 file changed

+72
-2
lines changed

content/360/saas/get_started/enroll_nodes.md

+72-2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,74 @@ To configure the cookbooks and define enrollment settings, follow these steps:
150150
depends 'chef360-node-enroll', '~> 1.0.0'
151151
```
152152
153+
1. Create a copy of the Chef 360 SaaS public key and add it to the wrapper cookbook's `files` directory:
154+
155+
```plaintext
156+
-----BEGIN CERTIFICATE-----
157+
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4
158+
GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbF
159+
NpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwM
160+
zE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzET
161+
MBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQY
162+
JKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2Ec
163+
WtiHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUh
164+
hB5uzsTgHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL
165+
0gRgykmmKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65
166+
TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rU
167+
AVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCA
168+
wEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
169+
BBYEFI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNv
170+
AUKr+yAzv95ZURUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8
171+
dEe3jgr25sbwMpjjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw
172+
8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0
173+
095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVE
174+
TI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02
175+
JQZR7rkpeDMdmztcpHWD9f
176+
-----END CERTIFICATE-----
177+
```
178+
179+
This public key expires on March 18, 2029.
180+
181+
1. Create an attribute file that includes the path to the public key. For example:
182+
183+
```ruby
184+
default['enroll']['root_ca'] = '<COOKBOOK_NAME>/files/default/root_ca.pem'
185+
```
186+
187+
Replace `<COOKBOOK_NAME>` with the name of the wrapper cookbook.
188+
189+
1. On a computer registered with the Chef 360 Server, generate an access key and secret key:
190+
191+
```bash
192+
chef-platform-auth-cli user-account self create-token --body '{"expiration": "<EXPIRATION_DATE>", "name": "<TOKEN_NAME>"}' --profile <PROFILE_NAME>
193+
```
194+
195+
Replace:
196+
197+
- `<EXPIRATION_DATE>` with a date and time in ISO 8601 format (for example, `2027-12-31T11:42:23-05:00`).
198+
- `<TOKEN_NAME>` with a meaningful token name for easy identification.
199+
- `<PROFILE_NAME>` with a profile that has the node-manager role assigned to it.
200+
201+
The response includes an access key and secret key and is similar to the following:
202+
203+
```json
204+
{
205+
"item": {
206+
"accessKey": "6QIUKP4WIXD4RVAF0BQ3",
207+
"expiration": "2027-12-31T11:42:23-05:00",
208+
"id": "bcba5b7a-fb0b-4a62-b442-7ba7bda5e05a",
209+
"name": "CI-CD Token",
210+
"role": {
211+
"id": "5fcb0235-1e56-4ece-8857-404a5d39a290",
212+
"name": "tenant-admin"
213+
},
214+
"secretKey": "x6aCg1NckQoLsQnere26fmGgD0RiWOrf4RNXBhlg"
215+
}
216+
}
217+
```
218+
219+
1. Store the access key and secret key using an [encrypted Chef data bag](https://docs.chef.io/data_bags/) or with a [secrets manager](https://docs.chef.io/infra_language/secrets/).
220+
153221
1. Define the `node_management_enroll` resource in your wrapper cookbook's recipe:
154222
155223
```ruby
@@ -162,6 +230,7 @@ To configure the cookbooks and define enrollment settings, follow these steps:
162230
cohort_id '<COHORT_ID>'
163231
hab_builder_url '<HABITAT_BUILDER_URL>'
164232
working_dir_path '<VALID_DIR_PATH>'
233+
root_ca <CHEF_360_SAAS_PUBLIC_KEY>
165234
upgrade_skills <UPGRADE_SKILLS>
166235
end
167236
```
@@ -171,11 +240,12 @@ To configure the cookbooks and define enrollment settings, follow these steps:
171240
- `<CHEF_360_FQDN>` with the fully qualified domain name (FQDN) for your Chef 360 SaaS deployment.
172241
- `<ENROLLMENT_TYPE>` with either `full` or `partial` depending on the form of enrollment. Use `full` unless you must `partial`.
173242
- `<API_PORT>` with the API port configured in Chef 360 SaaS. The default value is `31000`.
174-
- `<ACCESS_KEY>` with an access key for secure communication with Chef 360 SaaS. Store securely using an [encrypted Chef data bag](https://docs.chef.io/data_bags/) or a [secrets manager](https://docs.chef.io/infra_language/secrets/).
175-
- `<SECRET_KEY>` with a secret key for secure communication with Chef 360 SaaS. Store securely using an [encrypted Chef data bag](https://docs.chef.io/data_bags/) or a [secrets manager](https://docs.chef.io/infra_language/secrets/).
243+
- `<ACCESS_KEY>` with the access key for secure communication with Chef 360 SaaS. Store securely using an [encrypted Chef data bag](https://docs.chef.io/data_bags/) or a [secrets manager](https://docs.chef.io/infra_language/secrets/).
244+
- `<SECRET_KEY>` with the secret key for secure communication with Chef 360 SaaS. Store securely using an [encrypted Chef data bag](https://docs.chef.io/data_bags/) or a [secrets manager](https://docs.chef.io/infra_language/secrets/).
176245
- `<COHORT_ID>` with a valid cohort UUID. The cohort defines all skills and settings installed on the node.
177246
- `<HABITAT_BUILDER_URL>` with the URL of the Chef Habitat Builder used by your organization. Default value: `https://bldr.habitat.sh`
178247
- `<VALID_DIR_PATH>` with a temporary working directory where all required builds are downloaded. Specify a valid path based on the OS. Default value: `/tmp`.
248+
- `<CHEF_360_SAAS_PUBLIC_KEY>` with the attribute for the root CA public key. For example, `node['enroll']['root_ca']`.
179249
- `<UPGRADE_SKILLS>` with `true` or `false`. If `true`, Chef 360 SaaS checks for the latest skill versions and installs them if found. Default value: `false`.
180250
181251
1. Push the wrapper cookbook or policy to the Chef Infra Server.

0 commit comments

Comments
 (0)