Skip to content

Add --ca-file flag for custom TLS trust#1370

Merged
ervcz merged 2 commits into
mainfrom
ervin/ca-file-flag
Apr 22, 2026
Merged

Add --ca-file flag for custom TLS trust#1370
ervcz merged 2 commits into
mainfrom
ervin/ca-file-flag

Conversation

@ervcz
Copy link
Copy Markdown
Collaborator

@ervcz ervcz commented Apr 20, 2026

Nebraska only trusts system CAs. If your OIDC provider or update server uses a certificate from an internal or non-public CA, Nebraska refuses to connect. The only workaround today is modifying the container's system trust store, which is inconvenient.

This PR adds a --ca-file flag that points to a PEM file with one or more CA certificates. These CAs are added to the system trust store — nothing is replaced. The custom trust applies to both the OIDC client and the syncer. When the flag is omitted, behaviour is identical to before.

If the file is missing, unreadable, or contains no valid PEM data, Nebraska fails at startup with a clear error message.

The flag is also exposed in the Helm chart as config.caFile, and documented in the OIDC migration guide.

@ervcz ervcz requested a review from a team as a code owner April 20, 2026 19:06
@ervcz ervcz force-pushed the ervin/ca-file-flag branch from f5842c5 to 44eab10 Compare April 20, 2026 19:06
@ervcz
Copy link
Copy Markdown
Collaborator Author

ervcz commented Apr 21, 2026

Makes #1239 deprecated.

@ervcz ervcz force-pushed the ervin/ca-file-flag branch from 44eab10 to 0f5ffb4 Compare April 21, 2026 07:47
@ervcz ervcz changed the title feat(auth): add custom CA support for OIDC TLS Add --oidc-ca-file flag for custom OIDC provider TLS trust Apr 21, 2026
@ervcz ervcz requested a review from a team April 21, 2026 08:13
@ervcz ervcz force-pushed the ervin/ca-file-flag branch from d9389e8 to e234d2f Compare April 21, 2026 13:20
- Add `--oidc-ca-file` flag to trust custom CA certificates for OIDC provider TLS
- Implement TLS client configuration with additive certificate pool
- Expose `config.auth.oidc.caFile` in Helm chart values and deployment

Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
@ervcz ervcz force-pushed the ervin/ca-file-flag branch from e234d2f to d94dcc9 Compare April 21, 2026 13:26
@ervcz
Copy link
Copy Markdown
Collaborator Author

ervcz commented Apr 21, 2026

To be documented on the website by: flatcar/flatcar-website#562

John15321

This comment was marked as outdated.

Comment thread backend/pkg/config/config.go
@ervcz ervcz changed the title Add --oidc-ca-file flag for custom OIDC provider TLS trust Add --ca-file flag for custom TLS trust Apr 22, 2026
…pport

- Rename flag and config from `--oidc-ca-file` to `--ca-file` for broader TLS use
- Extend custom CA certificate support to the syncer component
- Build CA pool once at startup and share via config struct
- Fix syncer's downloadPackage to use the struct's HTTP client

Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
@ervcz ervcz force-pushed the ervin/ca-file-flag branch from d94dcc9 to 6bc56fe Compare April 22, 2026 13:18
Copy link
Copy Markdown
Member

@John15321 John15321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thank you!

@ervcz ervcz merged commit ca62954 into main Apr 22, 2026
9 checks passed
@ervcz ervcz deleted the ervin/ca-file-flag branch April 22, 2026 13:54
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.

2 participants