Skip to content

TPT-4740: Add MFA enforcement support - #1062

Merged
zliang-akamai merged 5 commits into
mainfrom
tpt-4740-mfa-enforcement
Nov 2, 2026
Merged

zliang-akamai merged 5 commits into
mainfrom
tpt-4740-mfa-enforcement

Conversation

@zliang-akamai

Copy link
Copy Markdown
Member

📝 Description

Add SDK support for account-level MFA enforcement and user exemptions:

  • Add ListTFAOptionalUsers and UpdateTFAOptionalUsers with typed request and response models.
  • Expose TFAEnforced on account settings, users, and profiles, and allow updating the account enforcement policy.
  • Add unit tests and sanitized, fixture-backed integration coverage for exemptions, user filtering, and account/profile policy round trips.

✔️ How to Test

Run make TEST_ARGS="-run '^(TestAccountTFAOptionalUsers_|TestAccountSettings_TFAEnforced|TestProfile_TFAEnforced)'" test-int.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 19:42
@zliang-akamai
zliang-akamai requested review from a team as code owners October 23, 2026 19:42
@zliang-akamai
zliang-akamai requested review from jriddle-linode and mawilk90 and removed request for a team October 23, 2026 19:42
@zliang-akamai zliang-akamai added the new-feature for new features in the changelog. label Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The additive SDK changes follow established request patterns and have focused coverage with no identified blocking issues; tests were not executed.

No open issues 🎉

What changed in this PR

Adds account-level MFA enforcement and user exemption support to the Go SDK using existing request helpers.

Changes:

  • Adds typed methods to list and replace MFA exemptions.
  • Exposes TFAEnforced on account settings, users, and profiles, with account policy updates.
  • Adds unit and fixture-backed integration coverage for exemptions, filtering, policy round trips, and error handling.
File Description
test/​unit/​profile_tfa_test.go Tests errors when disabling enforced MFA.
test/​unit/​profile_test.go Checks profile enforcement decoding.
test/​unit/​fixtures/​profile_update.json Adds enabled profile enforcement.
test/​unit/​fixtures/​profile_get.json Adds disabled profile enforcement.
test/​unit/​fixtures/​account_users_update.json Adds enforcement to updated users.
test/​unit/​fixtures/​account_users_list.json Adds enforcement to listed users.
test/​unit/​fixtures/​account_users_get.json Adds enforcement to fetched users.
test/​unit/​fixtures/​account_users_create.json Adds enforcement to created users.
test/​unit/​fixtures/​account_tfa_optional_users_update.json Models exemption replacement results.
test/​unit/​fixtures/​account_tfa_optional_users_update_empty.json Models exemption clearing results.
test/​unit/​fixtures/​account_tfa_optional_users_list.json Models populated exemption lists.
test/​unit/​fixtures/​account_tfa_optional_users_list_empty.json Models empty exemption lists.
test/​unit/​fixtures/​account_settings_update.json Adds enabled account enforcement.
test/​unit/​fixtures/​account_settings_get.json Adds disabled account enforcement.
test/​unit/​account_users_test.go Tests enforcement decoding and filter forwarding.
test/​unit/​account_tfa_optional_users_test.go Tests exemptions, pagination, and API errors.
test/​unit/​account_settings_test.go Tests enforcement reads and updates.
test/​integration/​profile_test.go Checks profile enforcement consistency.
test/​integration/​fixtures/​TestProfile_TFAEnforced.yaml Records profile enforcement round trips.
test/​integration/​fixtures/​TestAccountTFAOptionalUsers_Update.yaml Records exemption updates and restoration.
test/​integration/​fixtures/​TestAccountTFAOptionalUsers_List.yaml Records exemption listing.
test/​integration/​fixtures/​TestAccountSettings_TFAEnforced.yaml Records account policy round trips.
test/​integration/​account_tfa_optional_users_test.go Exercises exemptions and user filtering.
test/​integration/​account_settings_test.go Exercises account enforcement round trips.
profile.go Exposes profile enforcement status.
account_users.go Exposes user enforcement status.
account_tfa_optional_users.go Adds exemption models and client methods.
account_settings.go Adds account enforcement status and update option.

Review effort: Balanced

@lgarber-akamai
lgarber-akamai self-requested a review October 27, 2026 20:50

@lgarber-akamai lgarber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@zliang-akamai
zliang-akamai merged commit 03124d9 into main Nov 2, 2026
10 checks passed
@zliang-akamai
zliang-akamai deleted the tpt-4740-mfa-enforcement branch November 2, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants