Repository navigation
fix(config): read nested options such as OIDC__CLIENT_ID from environment variables - #41
Conversation
…ironment The environment source had no separator, so OIDC__* variables never reached the oidc section. Use `__` as the separator, and accept a comma-separated string for oidc.allowed_redirect_urls so it can be set from the environment too.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The server ignored nested environment variables such as
OIDC__PROVIDER_URL. The environment source had no separator, so OIDC could only be configured inconfig.toml.__as the separator.OIDC__CLIENT_IDsetsclient_idin[oidc]. Flat variables such asSECRET_KEYandTRUSTED_PROXY_HOPSwork as before.allowed_redirect_urlsalso accepts a comma-separated string, soOIDC__ALLOWED_REDIRECT_URLS=myapp://oidc,https://app.example.com/oidcworks. Without it, an environment-only OIDC setup can't log anyone in, because the server refuses OIDC login while that list is empty.RateLimiter::checknow notes that failed attempts count toward the limit on purpose. If they didn't, password guessing would be unlimited.Proof: a new unit test sets
OIDC__*variables. It failed before the change ("OIDC__* variables should setoidc") and passes now. A second test checks that an environment variable overrides one option of aconfig.tomlsection.cargo fmt,cargo clippy -D warningsandcargo testpass.Reviewed with sol-loop: 1 round with gpt-6.1-sol on high.
Sol verdict: approved
Changes made by Claude Opus 5.5 in Claude Code (T3 Code).