cardano-tracer: Add TLS (SSL) functionality to EKG/Prometheus. #6433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement TLS (SSL) functionality for EKG and Prometheus services.
SSL enforcement is configurable on a per-endpoint basis, users can now secure metrics exposure over HTTPS. An endpoint is either accessed through HTTP or HTTPS.
When
epForceSSL(optional field) is enabled for an endpoint and valid certificates are provided, the servers (EKG and Prometheus) switch to using warp-tls for secure connections. This incorporates error handling and tracing for missing or invalid certificates. Not available for RTView.{ "hasEKG": { "epHost": "127.0.0.1" , "epPort": 3100 , "epForceSSL": true } , "hasPrometheus": { "epHost": "127.0.0.1" , "epPort": 3000 , "epForceSSL": true } , .. }Supports a new certificate configuration (certificate, certificate key and optional certificate chain list), by specifying the optional
tlsCertificatefield. There is only one certificate that applies to all services.{ "tlsCertificate": { "certificateFile": "/path/to/certificate.pem" , "certificateKeyFile": "/path/to/key.pem" , "certificateChain": ["/path/to/intermediate1.pem", "/path/to/intermediate2.pem"] } , .. }Checklist
See Runnings tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12