-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically Deactivate Invalid 10up User WordPress Accounts #95
base: develop
Are you sure you want to change the base?
Automatically Deactivate Invalid 10up User WordPress Accounts #95
Conversation
…ccount should be deactivated
…nterpret the appropraite data.
@tlovett1 @TheLastCicada If either of you guys have a chance to look at this sometime, I'd love to get your thoughts. I'm going to deploy the new endpoint that this functionality needs to the staging and production Support Monitor sites and it would be great if we could set it up on a couple of internal sites and test it out. I'd be interested in thoughts in regards to security and to try to poke any holes in the logic. |
Description of the Change
This PR introduces functionality that will allow expired 10up accounts to be automatically 'deactivated'. The logic works as follows:
/wp-json/tenup/support-monitor/v1/is_user_deactivated
will check for the environment authentication key before being able to be used and checks whether the e-mail addresses that are sent to the endpoint are active or not.tenup_support_monitor_deactivate_expired_tenuppers
Data flow is outlined at https://docs.google.com/drawings/d/1TSiC7LxwNBtQ6ojGTTdZuFuqmjA7_m_uC45TZ3eBIak/edit
Benefits
This will add an additional layer of security for 10up clients to ensure when a 10upper leaves the company that their account isn't able to be logged into on sites. When a user leaves 10up, their account is deactivated and SSO will no longer work, but their account still remains and the user could potentially still log in if they have set their password in the past. Not all 10up client projects utilize the SSO and users need to log in with a username and password.
Possible Drawbacks
There's an extra request from Support Monitor to the API endpoint during the daily report process. This isn't expected to add much overhead to the site.
Verification Process
To verify this functionality, I created accounts for e-mail addresses that are known to no longer be valid 10up accounts and gave them permissions to the site. When running the debug 'Sent Message' functionality I verified I am no longer able to log in as the user (password reset) and the user no longer has any roles.
Checklist: