Skip to content

Verify organization 2FA and SSO requirements before fetching - #1237

Open
ericmj wants to merge 2 commits into
mainfrom
organization-tfa-enforcement
Open

Verify organization 2FA and SSO requirements before fetching#1237
ericmj wants to merge 2 commits into
mainfrom
organization-tfa-enforcement

Conversation

@ericmj

@ericmj ericmj commented Sep 9, 2026

Copy link
Copy Markdown
Member

When private dependencies require renewed organization authentication, Hex names the affected organizations and displays separate 2FA and SSO requirements. The shared browser verification flow refreshes scopes afterward and preserves outstanding requirements when authentication is cancelled, expires, or receives EOF.

Vendor the corresponding hex_core protocol changes and add integration coverage against Hexpm for organization scope filtering, verification requests, and OTP restoration. The full Hex suite against the changed server passed 661 tests with one existing skip; formatting passed.

Depends on hexpm/hex_core#222, vendored from hexpm/hex_core@b3757c5.

Related drafts: hexpm/hexpm#1913, hexpm/hex_core#222, #1237, https://github.com/hexpm/hexpm-ops/pull/325.

Draft CI runs against the organization-tfa-enforcement server branch from hexpm/hexpm#1913. Restore HEXPM_BRANCH: main after that server change merges and before merging this PR.

Staging validation passed with the changed server, Hex client and Fastly services: real Chrome TOTP and private-documentation return, existing-cookie renewal, sign-in after browser revocation, cancellation, expired/mismatched/revoked requests, and CLI reauthorization followed by a cold private-package fetch, compilation and execution. The CLI also refused noninteractive/declined verification and retained control-organization access. Session expiry and copied proof timestamps were checked, including source-browser revocation. Desktop (1440px) and mobile-width (375px) screenshots were inspected.

The staging fixture uses synthetic accounts and complimentary billing. Verification ages were changed only on fixture sessions. Live SSO-provider authentication, enrollment, email delivery and billing-provider behavior weren't exercised in staging.

HEXPM_OTP: OTP-28.5
HEXPM_ELIXIR: v1.19.5
HEXPM_BRANCH: main
HEXPM_BRANCH: organization-tfa-enforcement

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This needs reverting back to main before merging.

@ericmj
ericmj marked this pull request as ready for review September 10, 2026 02:28
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.

1 participant