Skip to content

Commit

Permalink
feat(seal): add support for ocikms
Browse files Browse the repository at this point in the history
  • Loading branch information
michelmzs authored and bbaassssiiee committed May 3, 2023
1 parent 9bc39e5 commit eea06b9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ vault_gkms_key_ring: 'vault'
vault_gkms_crypto_key: 'vault_key'
vault_gkms_copy_sa: true

# ocikms seal
vault_ocikms: false
vault_ocikms_backend: vault_seal_ocikms.j2
vault_ocikms_auth_type_api_key: false
vault_ocikms_key_id: "{{ lookup('env','VAULT_OCIKMS_SEAL_KEY_ID') | default('', false) }}"
vault_ocikms_crypto_endpoint: "{{ lookup('env','VAULT_OCIKMS_CRYPTO_ENDPOINT') | default('', false) }}"
vault_ocikms_management_endpoint: "{{ lookup('env','VAULT_OCIKMS_MANAGEMENT_ENDPOINT') | default('', false) }}"

# pkcs11 seal
vault_enterprise_premium_hsm: false
# WARNING: the following variable is deprecated as this section will become
Expand Down
4 changes: 4 additions & 0 deletions templates/vault_main_configuration.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ ui = {{ vault_ui | bool | lower }}
{% include vault_backend_gkms with context %}
{% endif %}

{% if vault_ocikms | bool -%}
{% include vault_ocikms_backend with context %}
{% endif %}

{% if vault_telemetry_enabled | bool -%}
telemetry {
{% if vault_statsite_address is defined %}
Expand Down
10 changes: 10 additions & 0 deletions templates/vault_seal_ocikms.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
seal "ocikms" {
key_id = "{{ vault_ocikms_key_id }}"
auth_type_api_key = "{{ vault_ocikms_auth_type_api_key }}"
{% if vault_ocikms_crypto_endpoint is string and vault_ocikms_crypto_endpoint|length %}
crypto_endpoint = "{{ vault_ocikms_crypto_endpoint }}"
{% endif %}
{% if vault_ocikms_management_endpoint is string and vault_ocikms_management_endpoint|length %}
management_endpoint = "{{ vault_ocikms_management_endpoint }}"
{% endif %}
}

0 comments on commit eea06b9

Please sign in to comment.