Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow config of TLS cipher suites and min version #256

Merged
merged 4 commits into from Sep 16, 2022
Merged

Conversation

bboreham
Copy link
Collaborator

@bboreham bboreham commented Sep 1, 2022

Add a single parameter for each, not split across HTTP and gRPC.

Requires change upstream - prometheus/exporter-toolkit#110. This PR is temporarily using a replace directive to use that code.

Downstream projects rely on CLI parameters to generate docstrings, so we add --server.tls-cipher-suites and --server.tls-min-version. Both CLI and yaml require comma-separated lists of cipher suites, which is different to the yaml array format supported by prometheus/exporter-toolkit.

The names accepted are from Go, listed here: https://pkg.go.dev/crypto/tls#pkg-constants

Fixes #248 (partial, but I haven't seen a justification to do the curves, max version, etc).

Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

Wondering if the parameters shouldn't also be applied for gRPC.

server/server.go Show resolved Hide resolved
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

LGTM, except you should probably drop the replace now that the PR is merged.

go.mod Outdated Show resolved Hide resolved
server/tls_config.go Outdated Show resolved Hide resolved
server/tls_config_test.go Show resolved Hide resolved
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

LGTM

Edit: Oof,linting fails in CI. An updated dependency probably requires a Go upgrade.

@bboreham
Copy link
Collaborator Author

bboreham commented Sep 9, 2022

Trying to fix the build at #258

Add a single parameter for each, not split across HTTP and gRPC.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This brings in a few other dependency updates.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
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.

Enable advanced TLS configuration parameters
2 participants