From 0a53fd69b19010e39bb017fbd3c46c25f7befa27 Mon Sep 17 00:00:00 2001 From: pik4ez-canonical Date: Fri, 15 Nov 2024 12:07:22 +0200 Subject: [PATCH 1/3] Fix Vault charm authorization instructions for newer Vault charm version Newer Vault charm version requires `secret-id` param for the `authorize-charm` action instead of `token` in previous versions. --- tutorial/deploy_jaas_microk8s.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tutorial/deploy_jaas_microk8s.rst b/tutorial/deploy_jaas_microk8s.rst index f874880..28c7667 100644 --- a/tutorial/deploy_jaas_microk8s.rst +++ b/tutorial/deploy_jaas_microk8s.rst @@ -255,7 +255,14 @@ Run the following command to unseal Vault and export the unseal token and root k export VAULT_TOKEN=$(echo "$key_init" | sed -n -e 's/.*Root Token: //p'); echo "Root Token = $VAULT_TOKEN" export UNSEAL_KEY=$(echo "$key_init" | sed -n -e 's/.*Unseal Key 1: //p'); echo "Unseal Key = $UNSEAL_KEY" vault operator unseal "$UNSEAL_KEY" - juju run vault/leader authorize-charm token="$VAULT_TOKEN" + +Authorizes the charm to be able to interact with Vault to manage its operations. + +.. code:: bash + vault_secret_id=$(juju add-secret vault-token token="$VAULT_TOKEN") + juju grant-secret vault-token vault + juju run vault/leader authorize-charm secret-id="$vault_secret_id" + juju remove-secret "vault-token" Now run ``juju status`` again and confirm your Vault unit is in an active state. From 0d4ed9aab22752e52c33b22b8a08869ca4e1bb4d Mon Sep 17 00:00:00 2001 From: pik4ez-canonical Date: Wed, 20 Nov 2024 11:59:39 +0200 Subject: [PATCH 2/3] fix: code block formatting --- tutorial/deploy_jaas_microk8s.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/tutorial/deploy_jaas_microk8s.rst b/tutorial/deploy_jaas_microk8s.rst index 28c7667..728981f 100644 --- a/tutorial/deploy_jaas_microk8s.rst +++ b/tutorial/deploy_jaas_microk8s.rst @@ -259,6 +259,7 @@ Run the following command to unseal Vault and export the unseal token and root k Authorizes the charm to be able to interact with Vault to manage its operations. .. code:: bash + vault_secret_id=$(juju add-secret vault-token token="$VAULT_TOKEN") juju grant-secret vault-token vault juju run vault/leader authorize-charm secret-id="$vault_secret_id" From 4c7ad2433fd5dba56b66a0b099727eef4acef52e Mon Sep 17 00:00:00 2001 From: pik4ez-canonical Date: Wed, 20 Nov 2024 12:07:14 +0200 Subject: [PATCH 3/3] fix: authorizes -> authorises --- tutorial/deploy_jaas_microk8s.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/deploy_jaas_microk8s.rst b/tutorial/deploy_jaas_microk8s.rst index 728981f..eadab6e 100644 --- a/tutorial/deploy_jaas_microk8s.rst +++ b/tutorial/deploy_jaas_microk8s.rst @@ -256,7 +256,7 @@ Run the following command to unseal Vault and export the unseal token and root k export UNSEAL_KEY=$(echo "$key_init" | sed -n -e 's/.*Unseal Key 1: //p'); echo "Unseal Key = $UNSEAL_KEY" vault operator unseal "$UNSEAL_KEY" -Authorizes the charm to be able to interact with Vault to manage its operations. +Authorises the charm to be able to interact with Vault to manage its operations. .. code:: bash