Automattic / Automattic/jetpack-force-2fa

Entries to test proper functionality

Open
#1 0 comments 0 reactions 1 assignee Claimed by @kraftbj View on GitHub
Dominant language
PHP
Stars
7
Forks
2
PR merge metrics
No merged PRs in 30d

Description

List of ways to login to check (will edit this original post with any new ways)

The desired default is no login form shown (JS-enabled) at all. Separate, but related, is a better way to hide login form beside JS which require an upstream JP and, from my first look, a Core change.
## Login page /wp-login.php
### Admin User (currently the forced class per code)
- [ ] Normal /wp-login.php login. Pass condition: No login displayed, forced over to wp.com
- [ ] Login with wp.com account without SSO enabled, no 2fa enabled (user e-mail already mapped locally) Pass condition: Login failure due to lack of 2fa, no local login form (unknown: error messaging?)
- [ ] Login with wp.com account without SSO enabled,2fa enabled (user e-mail already mapped locally) Pass condition: Login successful per matching e-mail address
### Tests assume a non-forced user role
- [ ] Normal /wp-login.php. Pass condition: No login displayed, forced to wp.com
- [ ] Login with wp.com account without SSO enabled, no 2fa enabled (user e-mail already mapped locally) Pass condition: Login successful per matching e-mail address
- [ ] Login with wp.com account without SSO enabled,2fa enabled (user e-mail already mapped locally) Pass condition: Login successful per matching e-mail address
### Tests assume an unknown actor
- [ ] Login with wp.com account without SSO enabled (unknown user e-mail address, site registration off) Pass: Login fails with a local nojoy. No login displayed on error page
- [ ] Login with wp.com account without SSO enabled (unknown e-mail, registration on) Pass: Login successful with new user created at default role
### Bad Actor
- [ ] Login using the form (disabled JS, etc). Pass: No joy for even correct password.
## Password Reset page /wp-login.php?action=lostpassword
- [ ] Attempt to access page directly. Pass: No option to attempt password reset locally.
- [ ] Attempt to spoof form submissions. Pass: Fails to work (unsure if form sets nonce or required cookie, etc)
## Registration page /wp-login.php?action=register
- [ ] Access form with registration enabled. Pass: Forwards to wp.com? (Total unknown here)
- [ ] Access form with registration disabled. Pass: Typical WP behavior resulting in fail
## Logout page /wp-login.php?action=logout
- [ ] Logout page. Pass: Displayed logout confirmation message with no local login, button to login via wp.com
## xmlrpc.php

Should only allow JP via JP's different filters. Normal xmlrpc requires user/pass, which should fail. Any external needs should be handled via JP's WP.com API
- [ ] Jetpack. Pass: Jetpack Debugger reports all green
- [ ] Normal XMLRPC use. Pass: XMLRPC client fails, 403 lack of auth.
## Multisite
- [ ] Admin of one site logging on via another that they don't have admin access. Pass: wp.com 2fa required (since logging into one gains access to the cookie)
- [ ] Super admin logging in on a site they're not a member Pass: wp.com 2fa required
## Edge cases?
- [ ] Authenticated request via WP REST API plugin? - I'm not familiar enough with this to know the various cases. Can you use it by submitting your user/pass directly? I assume not, so need to check their oauth flow to see how it behaves with wp.com SSO. Total unknown.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.