🧑💻 Developer Guide
Instructions for developing and testing the Dex companion proxy.
🧩 Architecture
The Dex companion proxy (companion/src/) sits between the
DTaaS client and the Dex identity provider. It forwards all
HTTP requests to Dex and injects a profile claim into
/dex/userinfo responses when preferred_username is present.
| Module | Purpose |
|---|---|
config.py |
Environment variables and constants |
http_utils.py |
URL handling and HTTP connections |
profile.py |
Profile claim construction and injection |
handler.py |
HTTP request handler (proxy class) |
__main__.py |
Server entry point |
Project Structure
Prerequisites
- Python 3.12+
- pip
Setup
Install test dependencies:
Install linting tools:
Running Tests
From the deploy/workspace/dex/localhost/ directory:
Linting
From the deploy/workspace/dex/localhost/ directory:
Docker
The docker-compose.yml mounts only companion/src/ into the
dex-companion container at /app/companion/src/. The container
runs python -m companion.src from /app.
To test locally without Docker: