mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #44966 from rcallphin/fix-bug-vault-empty-policy
Fix bug with vault runner creating token on empty policy
This commit is contained in:
commit
fbbf33574e
1 changed files with 3 additions and 0 deletions
|
@ -56,6 +56,9 @@ def generate_token(minion_id, signature, impersonated_by_master=False):
|
|||
'metadata': audit_data
|
||||
}
|
||||
|
||||
if payload['policies'] == []:
|
||||
return {'error': 'No policies matched minion'}
|
||||
|
||||
log.trace('Sending token creation request to Vault')
|
||||
response = requests.post(url, headers=headers, json=payload)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue