HomePhabricator

Update `bin/auth` MFA commands for the new "MFA Provider" indirection layer

Description

Update bin/auth MFA commands for the new "MFA Provider" indirection layer

Summary:
Ref T13222. This updates the CLI tools and documentation for the changes in D19975.

The flags --type and --all-types retain their current meaning. In most cases, bin/auth strip --type totp is sufficient and you don't need to bother looking up the relevant provider PHID. The existing bin/auth list-factors is also unchanged.

The new --provider flag allows you to select configs from a particular provider in a more granular way. The new bin/auth list-mfa-providers provides an easy way to get PHIDs.

(In the Phacility cluster, the "Strip MFA" action just reaches into the database and deletes rows manually, so this isn't terribly important. I verified that the code should still work properly.)

Test Plan:

  • Ran bin/auth list-mfa-providers.
  • Stripped by user / type / provider.
  • Grepped for list-factors and auth strip.
  • Hit all (?) of the various possible error cases.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13222

Differential Revision: https://secure.phabricator.com/D19976