11---
2- # HSM Integration Control (set to false for standard adoption)
3- barbican_hsm_enabled : " {{ enable_hsm_integration | default( false) }} "
2+ # Minimal HSM support - single boolean flag
3+ barbican_hsm_enabled : false
44
5- # Detection helper - set automatically based on source environment
6- barbican_detected_hsm : false
7-
8- # Multi-phase adoption control for HSM environments
9- barbican_use_phased_approach : " {{ enable_phased_hsm_adoption | default(false) }}"
10-
11- # HSM vendor override (can be set externally)
12- hsm_vendor_override : " {{ hsm_vendor | default('') }}"
13-
14- # Vendor-specific detection patterns
15- hsm_vendor_indicators :
16- proteccio :
17- library_path : " /opt/tw_proteccio/lib/libnethsm.so"
18- config_pattern : " proteccio.rc"
19- luna :
20- library_path : " /usr/lib/libCryptoki2_64.so"
21- config_pattern : " crystoki.ini"
22- ncipher :
23- library_path : " /opt/nfast/toolkits/pkcs11/libcknfast.so"
24- config_pattern : " cknfastrc"
25-
26- # Standard Barbican patch (enhanced to support conditional HSM)
5+ # Standard Barbican patch
276barbican_patch : |
287 spec:
298 barbican:
@@ -42,22 +21,36 @@ barbican_patch: |
4221 database: BarbicanDatabasePassword
4322 service: BarbicanPassword
4423 simplecryptokek: BarbicanSimpleCryptoKEK
45- {% if barbican_hsm_enabled %}
46- # HSM-specific configuration when enabled
47- customServiceConfig: |
48- [DEFAULT]
49- debug = {{ barbican_debug | default('False') }}
50-
51- [simple_crypto_plugin]
52- kek = {{ barbican_simple_crypto_kek | default('') }}
24+ barbicanAPI:
25+ replicas: 1
26+ override:
27+ service:
28+ internal:
29+ metadata:
30+ annotations:
31+ metallb.universe.tf/address-pool: internalapi
32+ metallb.universe.tf/allow-shared-ip: internalapi
33+ metallb.universe.tf/loadBalancerIPs: {{ internalapi_prefix | default('172.17.0') }}.80
34+ spec:
35+ type: LoadBalancer
36+ barbicanWorker:
37+ replicas: 1
38+ barbicanKeystoneListener:
39+ replicas: 1
5340
54- {% if barbican_detected_hsm %}
41+ # Minimal HSM patch for Proteccio
42+ barbican_hsm_patch : |
43+ spec:
44+ barbican:
45+ enabled: true
46+ template:
47+ customServiceConfig: |
5548 [p11_crypto_plugin]
5649 plugin_name = PKCS11
5750 library_path = {{ proteccio_library_path | default('/opt/tw_proteccio/lib/libnethsm.so') }}
58- token_labels = {{ proteccio_token_labels | default(['VHSM1']) | join(',') }}
59- mkek_label = {{ proteccio_mkek_label | default('adoption_mkek_1') }}
60- hmac_label = {{ proteccio_hmac_label | default('adoption_hmac_1') }}
51+ token_labels = {{ proteccio_hsm_tokens | default(['VHSM1']) | join(',') }}
52+ mkek_label = {{ proteccio_mkek_name | default('adoption_mkek_1') }}
53+ hmac_label = {{ proteccio_hmac_name | default('adoption_hmac_1') }}
6154 encryption_mechanism = CKM_AES_CBC
6255 hmac_key_type = CKK_GENERIC_SECRET
6356 hmac_keygen_mechanism = CKM_GENERIC_SECRET_KEY_GEN
@@ -67,38 +60,9 @@ barbican_patch: |
6760 always_set_cka_sensitive = true
6861 os_locking_ok = false
6962 login = {{ proteccio_login_password | default('') }}
70- {% endif %}
71- globalDefaultSecretStore: {{ barbican_default_secret_store | default('pkcs11' if barbican_detected_hsm else 'simple_crypto') }}
72- enabledSecretStores:
73- - simple_crypto
74- {% if barbican_detected_hsm %}
75- - pkcs11
76- {% endif %}
77- {% if barbican_detected_hsm %}
63+ globalDefaultSecretStore: pkcs11
64+ enabledSecretStores: ["simple_crypto", "pkcs11"]
7865 pkcs11:
79- loginSecret: {{ proteccio_login_secret | default('hsm-login') }}
80- clientDataSecret: {{ proteccio_client_data_secret | default('proteccio-data') }}
81- clientDataPath: {{ proteccio_client_data_path | default('/etc/proteccio') }}
82- {% endif %}
83- {% endif %}
84- barbicanAPI:
85- replicas: {{ barbican_api_replicas | default(1) }}
86- override:
87- service:
88- internal:
89- metadata:
90- annotations:
91- metallb.universe.tf/address-pool: internalapi
92- metallb.universe.tf/allow-shared-ip: internalapi
93- {% if ipv6_enabled | default(false) -%}
94- metallb.universe.tf/loadBalancerIPs: {{ internalapi_prefix_ipv6 | default('2620:cf:cf:bbbb') }}::50
95- {%- else -%}
96- metallb.universe.tf/loadBalancerIPs: {{ internalapi_prefix | default('172.17.0') }}.80
97- {%- endif %}
98-
99- spec:
100- type: LoadBalancer
101- barbicanWorker:
102- replicas: {{ barbican_worker_replicas | default(1) }}
103- barbicanKeystoneListener:
104- replicas: {{ barbican_keystone_listener_replicas | default(1) }}
66+ loginSecret: hsm-login
67+ clientDataSecret: proteccio-data
68+ clientDataPath: /etc/proteccio
0 commit comments