-
Notifications
You must be signed in to change notification settings - Fork 46
/
spec
315 lines (288 loc) · 10.9 KB
/
spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
---
name: credhub
templates:
# Lifecycle scripts
pre-start.erb: bin/pre-start
post-start.erb: bin/post-start
drain.erb: bin/drain
# bbr scripts
pre-backup-lock.sh: bin/bbr/pre-backup-lock
post-backup-unlock.sh: bin/bbr/post-backup-unlock
pre-restore-lock.sh: bin/bbr/pre-restore-lock
post-bbr-start.erb: bin/bbr/post-bbr-start
post-restore-unlock.sh: bin/bbr/post-restore-unlock
wait-for-stop.sh.erb: bin/bbr/wait-for-stop
identify-postgres-server-version.erb: bin/bbr/identify-postgres-server-version
metadata.sh.erb: bin/bbr/metadata
# Other scripts
ctl.erb: bin/ctl
init_key_stores.erb: bin/init_key_stores.sh
configure_hsm.erb: bin/configure_hsm.sh
#Consul scripts
dns_health_check.erb: bin/dns_health_check
wait_for_uaa.erb: bin/wait_for_uaa
# Config
validation_authorization.yml.erb: config/validation_authorization.yml
validation_data_storage.yml.erb: config/validation_data_storage.yml
validation_encryption.yml.erb: config/validation_encryption.yml
validation_logging.yml.erb: config/validation_logging.yml
validation_uaa.yml.erb: config/validation_uaa.yml
log4j2.properties.erb: config/log4j2.properties
encryption.conf.erb: config/encryption.conf
application_auth_server.yml.erb: config/application/auth-server.yml
application_encryption.yml.erb: config/application/encryption.yml
application_logging.yml: config/application/logging.yml
application_security.yml.erb: config/application/security.yml
application_server.yml.erb: config/application/server.yml
application_spring.yml.erb: config/application/spring.yml
# CAs
database_ca.pem.erb: config/database_ca.pem
# BPM
bpm.yml.erb: config/bpm.yml
credhub.erb: bin/credhub
# Utils
utils.sh: bin/utils.sh
packages:
- openjdk_17.0
- luna-hsm-client-7.4
- credhub
provides:
- name: credhub
type: credhub
properties:
- credhub.port
- credhub.ca_certificate
- credhub.internal_url
- name: credhub_db
type: credhub_db
properties:
- credhub.data_storage.database
- credhub.data_storage.host
- credhub.data_storage.hostname_verification.enabled
- credhub.data_storage.password
- credhub.data_storage.port
- credhub.data_storage.require_tls
- credhub.data_storage.tls_ca
- credhub.data_storage.type
- credhub.data_storage.username
consumes:
- name: postgres
type: database
optional: true
properties:
credhub.connection-timeout:
description: "The maximum amount of time the server will wait for the client to make their request after connecting before the connection is closed"
default: 5s
credhub.port:
description: "Listening port for the CredHub API"
default: 8844
credhub.health_endpoint_port:
description: "Listening port for the CredHub Health Endpoint"
default: 8845
# CA certificate used for credhub TLS
credhub.ca_certificate:
description: "Optional parameter to provide the CA certificate for TLS connection to CredHub API as a link"
type: certificate
default: ""
example: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
# Internal URL
credhub.internal_url:
description: "Optional parameter to provide the CredHub internal URL as a link"
default: ""
example: "credhub.service.cf.internal"
# Encryption properties
credhub.encryption.keys:
description: |
A list of active and inactive encryption keys, specifying the provider name and the encryption key name or value. One key must be marked as active.
See below for example keys for each supported provider type.
The internal provider accepts an encryption_password (minimum length 20).
example:
- provider_name: internal-provider
key_properties:
encryption_password: example-encryption-password
- provider_name: hsm-provider
key_properties:
encryption_key_name: active-hsm-key-name
active: true
- provider_name: hsm-provider
key_properties:
encryption_key_name: inactive-hsm-key-name
- provider_name: kms-plugin
key_properties:
encryption_key_name: kms-plugin-key-name
credhub.encryption.providers:
description: |
A list of all providers used for the current set of encryption keys.
See below for example structures of all supported provider types.
HSM port will default to 1792, if not provided.
example:
- name: internal-provider
type: internal
- name: kms-plugin-provider
type: kms-plugin
connection_properties:
endpoint: unix:///tmp/socketfile.sock
host: example.com
ca: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
- name: hsm-provider
type: hsm
connection_properties:
partition: my-hsm-partition
partition_password: example-hsm-password
client_certificate: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
client_key: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
servers:
- host: 10.0.1.1
port: 1792
partition_serial_number: 123123
certificate: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
- host: 10.0.1.2
port: 1792
partition_serial_number: 456456
certificate: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
# TLS configuration for the server
credhub.tls:
description: "Certificate and private key for TLS connection to CredHub API"
type: certificate
example: |
certificate: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
private_key: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
# Data storage
credhub.data_storage.type:
description: "Database type. Accepted values are in-memory, mysql, or postgres"
credhub.data_storage.username:
description: "Username for authenticating with targeted database server"
credhub.data_storage.password:
description: "Password for authenticating with targeted database server"
credhub.data_storage.host:
description: "Host address of targeted database server"
credhub.data_storage.port:
description: "Listening port of targeted database server"
credhub.data_storage.database:
description: "Name of database in which to store data on targeted database server (must exist prior to deployment)"
default: "credhub"
credhub.data_storage.require_tls:
description: "Requires only TLS connections to targeted database server"
default: true
credhub.data_storage.hostname_verification.enabled:
description: "Enables hostname verification for TLS connections to targeted database server. This property is only respected when targeting a MariaDB database. Hostname verification cannot be disabled for TLS connections to postgres databases."
default: true
credhub.data_storage.tls_ca:
description: "CA trusted for making TLS connections to targeted database server"
# UAA Authentication
credhub.authentication.uaa.enabled:
description: "Enables authentication via OAuth using UAA"
default: true
credhub.authentication.uaa.url:
description: "URL of UAA server which issues trusted tokens for authentication"
example: "https://uaa.example.com:8443"
credhub.authentication.uaa.internal_url:
description: "Optional URL for reaching UAA server over internal networking"
example: "https://uaa.example.internal:8443"
credhub.authentication.uaa.ca_certs:
description: "List of CAs trusted when making TLS connections to UAA server"
credhub.authentication.uaa.wait_for_start:
description: "Waits for UAA to be available before starting CredHub"
default: true
credhub.authentication.uaa.wait_for_start_max_timeout:
description: "Max timeout in seconds for curl to UAA during wait-for-start script"
default: 300
credhub.authentication.uaa.wait_for_start_connect_timeout:
description: "Connect timeout in seconds for curl to UAA during wait-for-start script"
default: 120
# Mutual TLS Authentication
credhub.authentication.mutual_tls.trusted_cas:
description: "List of CAs trusted to sign client certificates for mutual TLS authentication"
default: []
# Authorization
credhub.authorization.acls.enabled:
description: "Enables authorization via credential access control lists"
default: true
credhub.authorization.permissions:
description: "Giving permission for a path to an actor"
default: []
example: |
- path: /your/credential
actors:
- uaa-user:me
- uaa-user:me2
operations:
- read
- write
- delete
- read_acl
- write_acl
# Logging
credhub.log_level:
description: "Application log level. Accepted values are none, error, warn, info or debug"
default: info
# JVM configuration
credhub.max_heap_size:
description: "Maximum memory heap size in MB for CredHub JVM"
default: 1024
# CredHubDeprecatedStartingAfter(2.1.2)
credhub.java7_tls_ciphers_enabled:
description: "Enables CBC TLS cipher suites to enable TLS communication with Java 7 clients. Deprecated, as of CredHub 2.x.y. Java 7 was decommissioned by Oracle in 2015."
default: false
# Certificates
credhub.certificates.concatenate_cas:
description: "Enables the concatenation of CAs when there is a transitional CA for a certificate."
default: true
credhub.certificates.ca_minimum_duration_in_days:
description: "CA certificates will be generated/regenerated with this value when
the user provided duration is shorter, ensuring that every certificate
is created with at least this value."
default: 0
credhub.certificates.leaf_minimum_duration_in_days:
description: "Leaf certificates will be generated/regenerated with this value when
the user provided duration is shorter, ensuring that
every certificate is created with at least this
value."
default: 0
# Swappable Backend
credhub.backend.enable_swappable_backend:
description: "Enable the use of swappable backends for CredHub to use in place of the default CredHub backend"
default: false
credhub.backend.socket_file:
description: "Path of socket file for swappable backend to use"
default: ""
example: "/tmp/socket/test.sock"
credhub.backend.host:
description: "Common name of the backend's certificate"
default: ""
example: "example.com"
credhub.backend.ca_cert:
description: "CA cert used to sign the backend's certificate"
default: ""
example: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
# BPM
bpm.enabled:
description: "Enable Bosh Process Manager. Deprecated; CredHub 3.x.x and later with require BPM to be enabled."
default: false