Automatically Deactivate Invalid 10up User WordPress Accounts#95
Open
bengreeley wants to merge 19 commits intodevelopfrom
Open
Automatically Deactivate Invalid 10up User WordPress Accounts#95bengreeley wants to merge 19 commits intodevelopfrom
bengreeley wants to merge 19 commits intodevelopfrom
Conversation
…ccount should be deactivated
…nterpret the appropraite data.
Author
|
@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. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_deactivatedwill 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_tenuppersData 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: