communication #160508
closedRFC: Disable stale Heroes accounts
0%
Description
To reduce the intrusion surface from credentials sitting with people who no longer use them, I propose to:
- contact users who did not authenticate to the Heroes VPN for >= 6 months
- if no response + login within 2 weeks, disable Heroes IDM account and revoke the corresponding VPN client certificate
This would be manifested in the infrastructure policy, and could be partially automated.
Updated by kskarthik 7 months ago
crameleon wrote:
To reduce the intrusion surface from credentials sitting with people who no longer use them, I propose to:
- contact users who did not authenticate to the Heroes VPN for >= 6 months
- if no response + login within 2 weeks, disable Heroes IDM account and revoke the corresponding VPN client certificate
This would be manifested in the infrastructure policy, and could be partially automated.
I feel this can be fully automated, if we can have proper way to extract vpn logs of users
Updated by crameleon 7 months ago ยท Edited
I realize we should also consider accounts which do not have any login log file (for example people who never connected).
To find all relevant users we can use:
$ kanidm group get vpn
To find email addresses we can use:
$ kanidm person get crameleon
With both of these one can add -o json
after get
which makes for JSON output to feed into jq
(for example something like kanidm group get -o json vpn|jq '.["member"][]'
) or similar.
That is for shell, of course, if you prefer a different language, the same can be achieved using the HTTP API.
For development you can authenticate interactively with kanidm login -D kskarthik
, for the automation in some systemd service we can then configure an application token.
Updated by kskarthik 6 months ago
crameleon wrote in #note-7:
I realize we should also consider accounts which do not have any login log file (for example people who never connected).
To find all relevant users we can use:
$ kanidm group get vpn
To find email addresses we can use:
$ kanidm person get crameleon
With both of these one can add
-o json
afterget
which makes for JSON output to feed intojq
(for example something likekanidm group get -o json vpn|jq '.["member"][]'
) or similar.That is for shell, of course, if you prefer a different language, the same can be achieved using the HTTP API.
For development you can authenticate interactively with
kanidm login -D kskarthik
, for the automation in some systemd service we can then configure an application token.
My user on odin cannot access the vpn logs dir which is required for the script to run. please enable read access for my username
Updated by kskarthik 5 months ago
crameleon wrote in #note-4:
As per discussion in the meeting on 04/07/2024:
- automate sending email to user if no login >= 6 months
- send email to admin@ (i.e. create ticket here) if still no login 2 weeks after the email, asking an admin to disable the user / revoke their account
Since we have achieved the desired behavior, Shall we close this ticket ?