Add FHEM mTLS or Authelia auth with static upstream Basic Auth#80
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61c446683b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| handle @missing_mTLS_cert { | ||
| respond "mTLS client certificate required" 403 | ||
| } | ||
| handle @n8nWebHooks { |
There was a problem hiding this comment.
Restore Authelia fallback for workflow webhooks
This route now returns 403 for any request without a client cert before webhook handling, which removes the Authelia-based fallback that existed in caddy/Caddyfile on the parent commit. As a result, non-mTLS users can no longer reach the workflow webhook/UI paths (for example /webhook/github-pr-dashboard) via forward_auth, so the previously supported access flow is broken.
Useful? React with 👍 / 👎.
| condition: service_completed_successfully | ||
| volumes: | ||
| - ./caddy:/etc/caddy | ||
| - ./Caddyfile:/etc/caddy/Caddyfile |
There was a problem hiding this comment.
Validate the deployed Caddyfile in CI
Switching the compose mount to ./Caddyfile changes production to use the repo-root config, but the lint workflow still validates /work/caddy/Caddyfile; this means CI no longer checks the file that will actually be loaded by Caddy. A syntax or routing error in the root Caddyfile can therefore pass checks and fail only at deploy/runtime.
Useful? React with 👍 / 👎.
61c4466 to
8b33e03
Compare
Summary
fhem.*requests with either a valid client certificate or a successful Autheliaforward_authcheckAuthorizationheader for FHEM fromFHEM_BASIC_AUTH_HEADER503when the FHEM upstream Basic Auth secret is missing instead of proxying without backend credentialsValidation
Caddyfilewithcaddy validate --config /etc/caddy/Caddyfile --adapter caddyfilein a one-offcaddy:2.11.2container using dummy environment values and mounted local PKI filesNotes
one_factoraccess policy because FHEM no longer depends on Authelia accepting Basic Auth itself