Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

*: add support for metrics signer - #24

Merged
abhinavdahiya merged 2 commits into
coreos:masterfrom
hexfusion:metrics
Mar 25, 2019
Merged

abhinavdahiya merged 2 commits into
coreos:masterfrom
hexfusion:metrics

Conversation

@hexfusion

@hexfusion hexfusion commented Mar 19, 2019 •

Copy link
Copy Markdown
Contributor

This PR adds support for a new profile EtcdMetric which signs CSR requests with a seperate chain of trust provided by the --metric-cacrt and --metric-cakey flags.

@hexfusion
hexfusion force-pushed the metrics branch 3 times, most recently from eb5aa56 to 35ddeef Compare March 20, 2019 16:06
Comment thread pkg/certsigner/signer.go Resolved
Comment thread pkg/certsigner/signer.go Resolved
@hexfusion

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya updated PTAL.

Comment thread pkg/certsigner/signer.go
cakey, err := ioutil.ReadFile(c.CAKeyFile)
switch profile {
case "EtcdMetric":
if sc.MetricCAKey != "" && sc.MetricCACert != "" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need this logic (somewhere) because we do not make the metrics flags mandatory. When EtcdMetric profile is passed it means we must make sure to sign using metrics CA. But we also need to make sure they exist. So we could make the flags mandatory but it seems metrics signer might be optional functionality. Does that answer your question?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Other option would be to fallback on the Peer/Server CA if we do not pass a separate CA for metrics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a flag that makes this a little more straightforward.

Comment thread pkg/certsigner/signer.go Resolved
@abhinavdahiya

Copy link
Copy Markdown
Contributor

This looks lgtm! lets clean up commits to non-wip

This PR add support for a new profile EtcdMetric which signs CSR
requests with a seperate chain of trust provided by the `--metric-cacrt`
and `--metric-cakey` flags.

Signed-off-by: Sam Batschelet <[email protected]>
@hexfusion hexfusion changed the title WIP: add support for metrics signer *: add support for metrics signer Mar 25, 2019

@abhinavdahiya abhinavdahiya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants