Forum Discussion
Kill all sessions for a user via API
We are using LTM/APM 11.5.1 and would like to be able to get all the session ids for a particular user and kill them (or at least dead-end their traffic). I know we can do this via the GUI but am looking for ways this can be automated if it is detected the account is compromised. Is it possible via REST?
3 Replies
- kunjan
Nimbostratus
How about eliminate this issue, by restricting the users to limited sessions using "Max Sessions Per User"?
On cli
can be used to filter the session id belong to a particular user and pipe to delete it. But that is resource intensive.sessiondump -allkeysAn extreme option is to delete all sessions something like:
sessiondump -list | awk '{ print $1}' | xargs -L 1 sessiondump -delete' - coriolis_75734
Nimbostratus
Limiting the max number of sessions per user wouldn't help in the situation where a user account has been compromised and being used by an unauthorised third party.
We do not wish to kill all sessions and ideally I'm looking for a solution where I can give the operations team a script to run which just requires a username input and the specified user's sessions will be killed.
- kunjan
Nimbostratus
A shell script like following:
sessiondump -allkeys | grep $1 | cut -d. -f1 | xargs -L 1 sessiondump -delete.. and call like
./removeUser.sh user1
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com