Repository navigation
TPT-4740: Add MFA enforcement support - #1062
Open
zliang-akamai wants to merge 1 commit into
Open
zliang-akamai wants to merge 1 commit into
zliang-akamai wants to merge 1 commit into
Conversation
zliang-akamai
requested review from
jriddle-linode and
mawilk90
and removed request for
a team
October 23, 2026 19:42
Contributor
There was a problem hiding this comment.
🟢 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
TFAEnforcedon 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
self-requested a review
October 27, 2026 20:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Add SDK support for account-level MFA enforcement and user exemptions:
ListTFAOptionalUsersandUpdateTFAOptionalUserswith typed request and response models.TFAEnforcedon account settings, users, and profiles, and allow updating the account enforcement policy.✔️ How to Test
Run
make TEST_ARGS="-run '^(TestAccountTFAOptionalUsers_|TestAccountSettings_TFAEnforced|TestProfile_TFAEnforced)'" test-int.