openai / openai/codex

Network proxy certificates fail Python 3.13+ strict TLS verification: missing Authority Key Identifier

Open Beginner friendly
#45,202 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI connectivity sandbox
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

codex-cli 0.154.0

What subscription do you have?

Pro

Which model were you using?

gpt-6-astra

What platform is your computer?

Darwin 25.5.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

Codex 0.154.0’s network proxy generates host certificates without an Authority Key
Identifier (AKI). Python 3.14 rejects them under its default TLS verification settings:

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:
Missing Authority Key Identifier (_ssl.c:1077)

This causes otherwise-allowed HTTPS reads to fail inside the sandbox. The agent then
requests approval to retry outside it.

Environment

  • macOS ARM64
  • Official Codex 0.154.0, using app-server
  • Network proxy enabled, limited mode
  • api.fivetran.com explicitly allowed
  • Python 3.14, using urllib.request.urlopen() with default certificate verification

Suggested fix

In codex-rs/network-proxy/src/certs.rs, within issue_host_certificate_pem(), enable AKI
before signing:

  params.use_authority_key_identifier_extension = true;

Validation

Using the original and corrected certificate-generation functions with the pinned rcgen
0.14.9:

Verification Original certificate With AKI enabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OpenSSL verify -x509_strict Error 85: Missing Authority Key Pass
Identifier
─────────────────────────────────
Python 3.14 default TLS context Same verification failure Pass

The corrected certificate passes without disabling verification or changing trust policy.
Validation covered certificate generation and TLS handshakes; we have not rebuilt the full
Codex binary.

An HTTPS proxy regression test using Python’s default TLS context would help catch this;
HTTP-only proxy tests do not exercise certificate validation.

What steps can reproduce the bug?

Reproduction

  1. Enable the network proxy and allow an HTTPS destination.
  2. Execute a Python HTTPS GET inside the sandbox using urllib.request.urlopen().
  3. Observe the certificate verification failure.

A certificate-only probe through the proxy confirmed:

Subject: CN=rcgen self signed cert
Issuer: CN=network_proxy MITM CA
Extensions:
2.5.29.17 Subject Alternative Name
2.5.29.15 Key Usage
2.5.29.37 Extended Key Usage

Authority Key Identifier: absent

What is the expected behavior?

The corrected certificate passes without disabling verification or changing trust policy.
Validation covered certificate generation and TLS handshakes; we have not rebuilt the full
Codex binary.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codex-rs/network-proxy/src/certs.rs, in issue_host_certificate_pem(), and review the pinned rcgen 0.14.9 certificate options. Verify the generated certificate and an HTTPS proxy handshake with Python 3.14’s default TLS context; done means strict OpenSSL and Python verification pass without changing trust policy.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.