Skip to content

Commit 1a0205c

Browse files
committed
Add documentation for TLS roles
Signed-off-by: Jim Enright <jenright@cloudera.com>
1 parent 11af982 commit 1a0205c

File tree

8 files changed

+244
-255
lines changed

8 files changed

+244
-255
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2024 Cloudera, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
17+
argument_specs:
18+
main:
19+
short_description: "Bring CA root and intermediate cert back to controller"
20+
description:
21+
- Fetch the named root and intermediate CA TLS Certificates from the CA Server.
22+
author:
23+
- "Jim Enright <jenright@cloudera.com>"
24+
options:
25+
ca_server_intermediate_path:
26+
description: "Path to intermediate CA cert on the CA server"
27+
default: "/ca/intermediate/certs"
28+
type: "str"
29+
ca_server_intermediate_cert_name:
30+
description: "Name of the intermediate CA cert file"
31+
type: "str"
32+
default: "intermediate.cert.pem"
33+
ca_server_root_path:
34+
description: "Path to root CA cert on the CA server"
35+
default: "/ca/certs"
36+
type: "str"
37+
ca_server_root_cert_name:
38+
description: "Name of the root CA cert file"
39+
type: "str"
40+
default: "ca.cert.pem"
41+
local_ca_certs_dir:
42+
description: "Directory on Ansible controller to store the root and intermediate CA cert files"
43+
type: "str"
44+
required: true

roles/tls_generate_csr/defaults/main.yml

Lines changed: 0 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
---
16-
keytool_path: /usr/bin/keytool
1716
openssl_path: /usr/bin/openssl
1817

1918
base_dir_security: /opt/cloudera/security
@@ -22,7 +21,6 @@ tls_csr_config_path: "{{ base_dir_security_pki }}/csr.cnf"
2221
tls_csr_path: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.csr"
2322

2423
# local_csrs_dir: "/tmp/csrs"
25-
# subject_alternative_names # optional variable which can be defined for each host
2624

2725
ca_server_attrs_general:
2826
OU: PS
@@ -31,248 +29,6 @@ ca_server_attrs_general:
3129
C: US
3230

3331

34-
tls_keystore_password: changeme
3532
tls_key_password: changeme
3633

37-
tls_keystore_path: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.jks"
38-
tls_keystore_path_generic: "{{ base_dir_security_pki }}/host.jks"
39-
40-
tls_key_password_file: "{{ base_dir_security_pki }}/host.key.pw"
41-
4234
tls_key_path: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.key"
43-
tls_key_path_generic: "{{ base_dir_security_pki }}/host.key"
44-
45-
tls_key_path_plaintext: "{{ tls_key_path }}.unenc"
46-
tls_key_path_plaintext_generic: "{{ tls_key_path_generic }}.unenc"
47-
48-
49-
local_accounts:
50-
51-
- user: accumulo
52-
home: /var/lib/accumulo
53-
comment: Accumulo
54-
55-
- user: atlas
56-
home: /var/lib/atlas
57-
comment: Atlas
58-
extra_groups: [hadoop]
59-
60-
- user: cloudera-scm
61-
home: /var/lib/cloudera-scm-server
62-
comment: Cloudera Manager
63-
mode: '770'
64-
keystore_acl: True
65-
key_acl: True
66-
key_password_acl: True
67-
68-
- user: cruisecontrol
69-
home: /var/lib/cruise_control
70-
comment: Cruise Control
71-
keystore_acl: True
72-
73-
- user: druid
74-
home: /var/lib/druid
75-
comment: Druid
76-
extra_groups: [hadoop]
77-
78-
- user: flink
79-
home: /var/lib/flink
80-
comment: Flink
81-
keystore_acl: True
82-
83-
- user: ssb
84-
home: /var/lib/ssb
85-
comment: SQL Stream Builder
86-
keystore_acl: True
87-
key_acl: True
88-
key_password_acl: True
89-
90-
- user: flume
91-
home: /var/lib/flume-ng
92-
comment: Flume
93-
keystore_acl: True
94-
95-
- user: hbase
96-
home: /var/lib/hbase
97-
comment: HBase
98-
keystore_acl: True
99-
100-
- user: hdfs
101-
home: /var/lib/hadoop-hdfs
102-
comment: Hadoop HDFS
103-
extra_groups: [hadoop]
104-
105-
- user: hive
106-
home: /var/lib/hive
107-
comment: Hive
108-
keystore_acl: True
109-
110-
- user: httpfs
111-
home: /var/lib/hadoop-httpfs
112-
comment: Hadoop HTTPFS
113-
keystore_acl: True
114-
115-
- user: hue
116-
home: /usr/lib/hue
117-
comment: Hue
118-
key_acl: True
119-
key_password_acl: True
120-
121-
- user: impala
122-
home: /var/lib/impala
123-
comment: Impala
124-
extra_groups: [hive]
125-
key_acl: True
126-
key_password_acl: True
127-
128-
- user: kafka
129-
home: /var/lib/kafka
130-
comment: Kafka
131-
keystore_acl: True
132-
133-
- user: keytrustee
134-
home: /var/lib/keytrustee
135-
comment: KeyTrustee KMS
136-
keystore_acl: True
137-
key_acl: True
138-
key_password_acl: True
139-
140-
- user: kms
141-
home: /var/lib/hadoop-kms
142-
comment: Hadoop KMS
143-
keystore_acl: True
144-
145-
- user: knox
146-
home: /var/lib/knox
147-
comment: Knox
148-
extra_groups: [hadoop]
149-
keystore_acl: True
150-
151-
- user: kudu
152-
home: /var/lib/kudu
153-
comment: Kudu
154-
key_acl: True
155-
key_password_acl: True
156-
157-
- user: livy
158-
home: /var/lib/livy
159-
comment: Livy
160-
keystore_acl: True
161-
162-
- user: mapred
163-
home: /var/lib/hadoop-mapreduce
164-
comment: Hadoop MapReduce
165-
extra_groups: [hadoop]
166-
167-
- user: nifi
168-
home: /var/lib/nifi
169-
command: NiFi
170-
keystore_acl: True
171-
172-
- user: nifiregistry
173-
home: /var/lib/nifiregistry
174-
command: NiFi Registry
175-
keystore_acl: True
176-
177-
- user: nifi
178-
home: /var/lib/nifi
179-
command: NiFi
180-
181-
- user: nifiregistry
182-
home: /var/lib/nifiregistry
183-
command: NiFi Registry
184-
185-
- user: oozie
186-
home: /var/lib/oozie
187-
comment: Oozie User
188-
keystore_acl: True
189-
190-
- user: phoenix
191-
home: /var/lib/phoenix
192-
comment: Phoenix User
193-
194-
- user: ranger
195-
home: /var/lib/ranger
196-
comment: Ranger
197-
extra_groups: [hadoop]
198-
199-
- user: rangerraz
200-
home: /var/lib/rangerraz
201-
comment: Ranger Raz User
202-
extra_groups: [ranger, hadoop]
203-
204-
- user: rangertagsync
205-
home: /var/lib/rangertagsync
206-
comment: Ranger Tagsync User
207-
extra_groups: [ranger, hadoop]
208-
209-
- user: schemaregistry
210-
home: /var/lib/schemaregistry
211-
comment: Schema Registry
212-
keystore_acl: True
213-
214-
- user: sentry
215-
home: /var/lib/sentry
216-
comment: Sentry
217-
218-
- user: solr
219-
home: /var/lib/solr
220-
comment: Solr
221-
keystore_acl: True
222-
223-
- user: spark
224-
home: /var/lib/spark
225-
comment: Spark
226-
keystore_acl: True
227-
228-
- user: spark2
229-
home: /var/lib/spark2
230-
comment: Spark2
231-
232-
- user: sqoop
233-
home: /var/lib/sqoop
234-
comment: Sqoop
235-
236-
- user: sqoop2
237-
home: /var/lib/sqoop2
238-
comment: Sqoop2
239-
extra_groups: [sqoop]
240-
241-
- user: streamsmsgmgr
242-
home: /var/lib/streams_messaging_manager
243-
comment: Streams Messaging Manager
244-
keystore_acl: True
245-
key_acl: True
246-
247-
- user: streamsrepmgr
248-
home: /var/lib/streams_replication_manager
249-
comment: Streams Replication Manager
250-
keystore_acl: True
251-
252-
- user: superset
253-
home: /var/lib/superset
254-
comment: Superset
255-
256-
- user: yarn
257-
home: /var/lib/hadoop-yarn
258-
comment: Hadoop Yarn
259-
extra_groups: [hadoop, spark]
260-
261-
- user: zeppelin
262-
home: /var/lib/zeppelin
263-
comment: Zeppelin
264-
keystore_acl: True
265-
266-
- user: zookeeper
267-
home: /var/lib/zookeeper
268-
comment: ZooKeeper
269-
keystore_acl: True
270-
271-
ecs_accounts:
272-
- user: cloudera-scm
273-
home: /var/lib/cloudera-scm-server
274-
comment: Cloudera Manager
275-
mode: '770'
276-
keystore_acl: True
277-
key_acl: True
278-
key_password_acl: True
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Copyright 2024 Cloudera, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
17+
argument_specs:
18+
main:
19+
short_description: "Generates a CSR on each host and copies it back to the Ansible controller"
20+
description:
21+
- Generates a TLS Certificate Signing Request (CSR).
22+
- Once created the CSR file is copied back to the Ansibles controller.
23+
author:
24+
- "Jim Enright <jenright@cloudera.com>"
25+
options:
26+
openssl_path:
27+
description: "Absolute path to the C(openssl) executable"
28+
default: "/usr/bin/openssl"
29+
type: "str"
30+
base_dir_security:
31+
description: "Base directory for Cloudera CDP security related files"
32+
type: "str"
33+
default: "/opt/cloudera/security"
34+
base_dir_security_pki:
35+
description: "Base directory for Cloudera CDP PKI security related files"
36+
type: "str"
37+
default: "{{ base_dir_security }}/pki"
38+
tls_csr_config_path:
39+
description:
40+
- Location of the OpenSSL configuration file that will be created by the role.
41+
- This file will be generated by the C(csr.cnf.j2) template file.
42+
type: "str"
43+
default: "{{ base_dir_security_pki }}/csr.cnf"
44+
tls_csr_path:
45+
description: "Location of the OpenSSL Certificate Signing Request file that will be created by the role"
46+
type: "str"
47+
default: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.csr"
48+
ca_server_attrs_general:
49+
description: "Attributes to use in the certificate signing request"
50+
type: "dict"
51+
default:
52+
OU: PS
53+
O: "Cloudera, Inc."
54+
ST: "CA"
55+
C: "US"
56+
tls_key_password:
57+
description: "Password for the TLS Key."
58+
type: "str"
59+
default: "changeme"
60+
tls_key_path:
61+
description: "Location of the TLS key."
62+
type: "str"
63+
default: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.key"
64+
local_csrs_dir:
65+
description: "Location on the Ansible Controller where the CSR will be copied."
66+
type: "str"
67+
default: "{{ base_dir_security_pki }}/{{ inventory_hostname }}.key"

0 commit comments

Comments
 (0)