Skip to content

[codex] Use Cloudflare Access for Dragonfly API#318

Open
import-pandas-as-numpy wants to merge 1 commit into
mainfrom
fix/bot-cloudflare-access
Open

[codex] Use Cloudflare Access for Dragonfly API#318
import-pandas-as-numpy wants to merge 1 commit into
mainfrom
fix/bot-cloudflare-access

Conversation

@import-pandas-as-numpy

Copy link
Copy Markdown
Member

What changed

  • switched the bot's Dragonfly client from Auth0 password-grant auth to Cloudflare Access service-token headers
  • wired the bot runtime to use DRAGONFLY_API_URL with CF_ACCESS_CLIENT_ID and CF_ACCESS_CLIENT_SECRET
  • added a focused test covering the Dragonfly request header behavior

Why

The staging bot is supposed to authenticate to Dragonfly through Cloudflare Access, but the code was still using the legacy Auth0 flow and secret contract.

Impact

The bot can now authenticate to Dragonfly with the same Cloudflare Access service-token pattern already used by other staging callers. This removes the remaining Auth0 dependency from the bot code path once the deployment secret is updated.

Validation

  • UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/test_dragonfly_services.py
  • UV_CACHE_DIR=/tmp/uv-cache uv run ruff check src/bot/constants.py src/bot/dragonfly_services.py src/bot/__main__.py tests/test_dragonfly_services.py

@import-pandas-as-numpy import-pandas-as-numpy marked this pull request as ready for review April 7, 2026 02:41
@import-pandas-as-numpy import-pandas-as-numpy requested review from a team as code owners April 7, 2026 02:41
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