Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Create a grace period before MFA is required #723

Merged
merged 6 commits into from
Oct 1, 2020

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Sep 30, 2020

Issue #607

Proposed Changes

  • Adds a new realm setting for MFA required mode that allows users to skip MFA registration for a number of days.

TODO: Update the registration page to show days remaining

Release Note

MFA registration grace period

@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 30, 2020
Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small questions

pkg/controller/middleware/mfa.go Outdated Show resolved Hide resolved
pkg/controller/middleware/mfa.go Outdated Show resolved Hide resolved
pkg/database/duration.go Outdated Show resolved Hide resolved
ID: "00057-AddMFARequiredGracePeriod",
Migrate: func(tx *gorm.DB) error {
logger.Debugw("adding email verification required to realm")
return tx.Exec("ALTER TABLE realms ADD COLUMN IF NOT EXISTS mfa_required_grace_period BIGINT DEFAULT 0").Error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default be 0 or leave it as nullable?

Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sethvargo, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@whaught
Copy link
Contributor Author

whaught commented Oct 1, 2020

/hold

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@whaught
Copy link
Contributor Author

whaught commented Oct 1, 2020

/unhold

@sethvargo sethvargo added the lgtm label Oct 1, 2020
@google-oss-robot google-oss-robot merged commit 4c2389b into google:main Oct 1, 2020
@whaught whaught deleted the grace-perdiod branch October 1, 2020 23:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants