bundles/icinga2: allow limiting permissions for api users
This commit is contained in:
parent
374ba3c16a
commit
0b52f8e7e6
2 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
% for user, password in sorted(node.metadata.get('icinga2', {}).get('api_users', {}).items()):
|
% for user, config in sorted(node.metadata.get('icinga2', {}).get('api_users', {}).items()):
|
||||||
object ApiUser "${user}" {
|
object ApiUser "${user}" {
|
||||||
password = "${password}"
|
password = "${config['password']}"
|
||||||
permissions = [ "*" ]
|
permissions = [ "${'", "'.join(sorted(config['permissions']))}" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -30,7 +30,12 @@ defaults = {
|
||||||
},
|
},
|
||||||
'icinga2': {
|
'icinga2': {
|
||||||
'api_users': {
|
'api_users': {
|
||||||
'root': repo.vault.password_for(f'{node.name} icinga2 api root'),
|
'root': {
|
||||||
|
'password': repo.vault.password_for(f'{node.name} icinga2 api root'),
|
||||||
|
'permissions': {
|
||||||
|
'*',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'icinga2_api': {
|
'icinga2_api': {
|
||||||
|
|
Loading…
Reference in a new issue