Skip to content
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

feature:Allow configuration of a preferred_mfa_provider #446

Merged

Conversation

schlueter
Copy link
Contributor

@schlueter schlueter commented Feb 7, 2024

Description

Allows for configuration of a preferred mfa provider which is used to more precisely select an available preferred mfa factor by filtering the list of available factors by provider in addition to type. This allows, for instance, a user to have setup both Google totp and Okta push and to have a preferred default used by gimme-aws-creds; currently in this situation, the user must select their preferred mfa factor at runtime as gimme-aws-creds will see both available and default to prompting the user to select one.

Related Issue

#445

Motivation and Context

In order to give myself options, I have both Google Authenticator and Okta Verify setup. In the past, I have disabled Okta Verify so that gimme-aws-creds only has one totp mfa to find, but this seems like an unnecessary concession.

How Has This Been Tested?

While using an Okta account with both Google Authenticator and Okta Verify setup:

  1. With preferred_mfa_type = token:software:totp and preferred_mfa_provider = GOOGLE in the global config, the user is prompted for an authentication token from Google.
  2. With preferred_mfa_type = token:software:totp and preferred_mfa_provider = OKTA in the global config, the user is prompted for an authentication token from Okta.
  3. With preferred_mfa_type = token:software:totp and preferred_mfa_provider = GOOGLE in an account configuration, the use is prompted for an authentication token from Google.
  4. With preferred_mfa_type = token:software:totp and preferred_mfa_provider = OKTA in an account config, the user is prompted for an authentication token from Okta.
  5. With neither preferred_mfa_type or preferred_mfa_provider configured, the user is prompted to select a factor as they were previously.
  6. With preferred_mfa_type = token:software:totp and preferred_mfa_provider unset, the user is prompted to select a factor as they were previously when a preferred type is configured.

I do not use DUO, and I am unaware of which other combinations of factors might be affected by this. I specifically included logic to avoid filtering out all potential factors if none match the preferred provider to minimize potential confusion.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@schlueter schlueter force-pushed the feature/configure-preferred-mfa-provider branch from 367c981 to bd1f068 Compare February 7, 2024 23:25
@schlueter
Copy link
Contributor Author

I just realized that this appears like a different implementation of #354.

@epierce epierce merged commit f7d4138 into Nike-Inc:master Apr 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants