-
Notifications
You must be signed in to change notification settings - Fork 497
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
Add configuration on Agent to set X509SVID key type #3237
Conversation
Signed-off-by: Marcos Yacob <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @MarcosDY! Just a few comments.
cmd/spire-agent/cli/run/run_test.go
Outdated
msg: "workload_key_type invalid value", | ||
expectError: true, | ||
input: func(c *Config) { | ||
c.Agent.WorkloadKeyType = "no a key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "not a key"
pkg/agent/workloadkey/workloadkey.go
Outdated
return nil, fmt.Errorf("unknown key type %q", keyType) | ||
} | ||
|
||
func (keyType KeyType) SignatureAlgorithm() (x509.SignatureAlgorithm, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we shouldn't just rely on the Go standard library choice for the signature algorithm....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, I removed SignatureAlgorithm and rely on Go standard library
cmd/spire-agent/cli/run/run.go
Outdated
@@ -69,6 +70,7 @@ type agentConfig struct { | |||
ServerAddress string `hcl:"server_address"` | |||
ServerPort int `hcl:"server_port"` | |||
SocketPath string `hcl:"socket_path"` | |||
WorkloadKeyType string `hcl:"workload_key_type"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Wonder if we shouldn't be more specific that this is for the X509-SVID.... workload_x509_svid_key_type
? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like workload_x509_svid_key_type
I was thinking on something like that, to avoid confusion
Signed-off-by: Marcos Yacob <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Signed-off-by: Marcos Yacob <[email protected]>
Add configuration on Agent to set X509SVID key type
Which issue this PR fixes
fixes #3226