mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #14077 from Security-Onion-Solutions/jertel/wip
invalidate user sessions when an admin changes the user's password
This commit is contained in:
@@ -241,6 +241,10 @@ function updatePassword() {
|
|||||||
[[ $? != 0 ]] && fail "Unable to clear aal2 identity IDs"
|
[[ $? != 0 ]] && fail "Unable to clear aal2 identity IDs"
|
||||||
echo "delete from identity_credentials where identity_id='${identityId}' and identity_credential_type_id in (select id from identity_credential_types where name in ('totp', 'webauthn', 'oidc'));" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
echo "delete from identity_credentials where identity_id='${identityId}' and identity_credential_type_id in (select id from identity_credential_types where name in ('totp', 'webauthn', 'oidc'));" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
||||||
[[ $? != 0 ]] && fail "Unable to clear aal2 identity credentials"
|
[[ $? != 0 ]] && fail "Unable to clear aal2 identity credentials"
|
||||||
|
echo "delete from session_devices where session_id in (select id from sessions where identity_id='${identityId}');" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
||||||
|
[[ $? != 0 ]] && fail "Unable to clear session devices"
|
||||||
|
echo "delete from sessions where identity_id='${identityId}';" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
||||||
|
[[ $? != 0 ]] && fail "Unable to clear sessions"
|
||||||
echo "update identities set available_aal='aal1' where id='${identityId}';" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
echo "update identities set available_aal='aal1' where id='${identityId}';" | sqlite3 -cmd ".timeout ${databaseTimeout}" "$databasePath"
|
||||||
[[ $? != 0 ]] && fail "Unable to reset aal"
|
[[ $? != 0 ]] && fail "Unable to reset aal"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user