mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 09:27:38 -02:30
Vault security hardening and role isolation
This commit is contained in:
21
roles/vault/tasks/shared/auth_backend.yml
Normal file
21
roles/vault/tasks/shared/auth_backend.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- name: shared/auth_backend | Test if the auth backend exists
|
||||
uri:
|
||||
url: "{{ vault_leader_url }}/v1/sys/auth/{{ auth_backend_path }}/tune"
|
||||
headers: "{{ vault_headers }}"
|
||||
validate_certs: false
|
||||
ignore_errors: true
|
||||
register: vault_auth_backend_check
|
||||
|
||||
- name: shared/auth_backend | Add the cert auth backend if needed
|
||||
uri:
|
||||
url: "{{ vault_leader_url }}/v1/sys/auth/{{ auth_backend_path }}"
|
||||
headers: "{{ vault_headers }}"
|
||||
method: POST
|
||||
body_format: json
|
||||
body:
|
||||
description: "{{ auth_backend_description|d('') }}"
|
||||
type: "{{ auth_backend_type }}"
|
||||
status_code: 204
|
||||
when: vault_auth_backend_check|failed
|
||||
Reference in New Issue
Block a user