mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
fix issue with first-time api client permission toggling
This commit is contained in:
@@ -20,13 +20,11 @@ sync_es_users:
|
|||||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users
|
- /opt/so/saltstack/local/salt/elasticsearch/files/users
|
||||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users_roles
|
- /opt/so/saltstack/local/salt/elasticsearch/files/users_roles
|
||||||
- /opt/so/conf/soc/soc_users_roles
|
- /opt/so/conf/soc/soc_users_roles
|
||||||
- /opt/so/conf/soc/soc_clients_roles
|
|
||||||
- show_changes: False
|
- show_changes: False
|
||||||
- require:
|
- require:
|
||||||
- docker_container: so-kratos
|
- docker_container: so-kratos
|
||||||
- http: wait_for_kratos
|
- http: wait_for_kratos
|
||||||
- file: so-user.lock # require so-user.lock file to be missing
|
- file: so-user.lock # require so-user.lock file to be missing
|
||||||
- file: so-client.lock # require so-client.lock file to be missing
|
|
||||||
|
|
||||||
# we dont want this added too early in setup, so we add the onlyif to verify 'startup_states: highstate'
|
# we dont want this added too early in setup, so we add the onlyif to verify 'startup_states: highstate'
|
||||||
# is in the minion config. That line is added before the final highstate during setup
|
# is in the minion config. That line is added before the final highstate during setup
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ function createFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ensureRoleFileExists() {
|
function ensureRoleFileExists() {
|
||||||
if [[ ! -f "$socRolesFile" || ! -s "$socRolesFile" ]]; then
|
if [[ ! -f "$socRolesFile" ]]; then
|
||||||
# Generate the new roles file
|
# Generate the new roles file
|
||||||
rolesTmpFile="${socRolesFile}.tmp"
|
rolesTmpFile="${socRolesFile}.tmp"
|
||||||
createFile "$rolesTmpFile" "$soUID" "$soGID"
|
createFile "$rolesTmpFile" "$soUID" "$soGID"
|
||||||
|
|||||||
Reference in New Issue
Block a user