Skip to content

Enforce managed authentication requirements locally - #37132

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/efef22b248f3c3333e9aa55423e539efa2d2dd48
Aug 5, 2026
Merged

Enforce managed authentication requirements locally#37132
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/efef22b248f3c3333e9aa55423e539efa2d2dd48

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 5, 2026

Copy link
Copy Markdown

Enforce managed authentication requirements locally

Why

Authentication restrictions must apply before stored or environment-provided credentials can be used, including during bootstrap before cloud requirements are fetched.

What changed

  • Add local requirements.toml allowlists for login methods and ChatGPT workspaces. Ignore these fields in cloud-provided requirements.
  • Combine managed workspace allowlists with existing workspace restrictions by intersection, and fail closed when the resulting policy permits no usable login method.
  • Centralize policy checks in the authentication manager so CLI, TUI, app-server, external-auth, and credential-loading paths consistently reject disallowed authentication before token hydration or network requests.

Testing

  • Cover policy composition, workspace intersection, invalid stored and external credentials, bootstrap enforcement, and login endpoint restrictions.

## Why

Authentication restrictions must apply before stored or environment-provided credentials can be used, including during bootstrap before cloud requirements are fetched.

## What changed

- Add local `requirements.toml` allowlists for login methods and ChatGPT workspaces. Ignore these fields in cloud-provided requirements.
- Combine managed workspace allowlists with existing workspace restrictions by intersection, and fail closed when the resulting policy permits no usable login method.
- Centralize policy checks in the authentication manager so CLI, TUI, app-server, external-auth, and credential-loading paths consistently reject disallowed authentication before token hydration or network requests.

## Testing

- Cover policy composition, workspace intersection, invalid stored and external credentials, bootstrap enforcement, and login endpoint restrictions.

GitOrigin-RevId: efef22b248f3c3333e9aa55423e539efa2d2dd48
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/efef22b248f3c3333e9aa55423e539efa2d2dd48 branch from b58c586 to 2994f54 Compare August 5, 2026 18:10
@copyberry
copyberry Bot merged commit 2994f54 into main Aug 5, 2026
22 of 26 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/efef22b248f3c3333e9aa55423e539efa2d2dd48 branch August 5, 2026 18:11
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants