Closed elwood218 closed 5 days ago
Yes, the master cluster mode did not exist when this was created. I'm not really familiar with the new architecture, but read up to understand the required changes.
Would you be able to test if the following patch fixes the issue and does not cause another one?
diff --git a/src/saltext/vault/runners/vault.py b/src/saltext/vault/runners/vault.py
index ffd3a92..d44b41a 100644
--- a/src/saltext/vault/runners/vault.py
+++ b/src/saltext/vault/runners/vault.py
@@ -916,7 +916,10 @@ def _validate_signature(minion_id, signature, impersonated_by_master):
Validate that either minion with id minion_id, or the master, signed the
request
"""
- pki_dir = __opts__["pki_dir"]
+ if not impersonated_by_master and __opts__.get("cluster_id") is not None:
+ pki_dir = __opts__["cluster_pki_dir"]
+ else:
+ pki_dir = __opts__["pki_dir"]
if impersonated_by_master:
public_key = f"{pki_dir}/master.pub"
else:
You should find the file to patch in /opt/saltstack/salt/extras-3.10/saltext/vault/runners/vault.py
. After patching, don't forget to restart the masters.
Oh didn't expect a answer today :) But very thank you! Yes it worked with that patch! So far I don't see any other issue.
Description Hello, I have tried the 3007.1 and the new feature of master cluster. I am new to Salt and also wanted to try the new saltext-vault extension. I have tried to use it in state file and read there from vault.
Setup State file:
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior When I apply the state I get following error:
Expected behavior As I am using a master cluster and have configured
cluster_pki_dir
which is not/etc/salt/pki/master/..
like said in the error message. So it seems like it does not search in thecluster_pki_dir
.Screenshots
Versions Report
Additional context The ext_pillar in general was working but I am fighting still with the templating so I don't have to build up Vault after Salt and can configure Salt like the Vault structure already is.