-
Notifications
You must be signed in to change notification settings - Fork 6
put options to validate certs in an object #90
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
Conversation
config.go
Outdated
type ChainValidationConfig struct { | ||
// Path to the file containing root certificates that are acceptable to the | ||
// log. The certs are served through get-roots endpoint. | ||
RootsPemFile string |
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: RootsPEMFile
(https://google.github.io/styleguide/go/decisions.html#initialisms)
cmd/gcp/main.go
Outdated
if err != nil { | ||
klog.Exitf("Failed to create checkpoint signer: %v", err) | ||
klog.Exitf("Failed to initialize log config: %v", err) |
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.
klog.Exitf("Failed to initialize log config: %v", err) | |
klog.Exitf("Invalid log config: %v", err) |
cmd/gcp/main.go
Outdated
if err != nil { | ||
klog.Exitf("Invalid config: %v", err) | ||
klog.Exitf("Failed to initiate storage backend: %v", err) |
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.
klog.Exitf("Failed to initiate storage backend: %v", err) | |
klog.Exitf("Failed to initialize storage backend: %v", err) |
config.go
Outdated
@@ -29,6 +29,35 @@ import ( | |||
"k8s.io/klog/v2" | |||
) | |||
|
|||
type ChainValidationConfig struct { | |||
// Path to the file containing root certificates that are acceptable to the |
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 on doc comments in this struct - they should really start with the name of the thing being commented on, e.g. "RootsPEMFile
is the path to a file con..."
Probably worth a comment on the struct too since it's exported?
config.go
Outdated
// If RejectExpired is true then the certificate validity period will be | ||
// checked against the current time during the validation of submissions. | ||
// This will cause expired certificates to be rejected. | ||
RejectExpired bool | ||
// If RejectUnexpired is true then CTFE rejects certificates that are either | ||
// currently valid or not yet valid. | ||
RejectUnexpired bool |
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.
Not for this PR, but do we still need RejectUnexpired
?
And if not, would the user setting NotAfterStart
or NotAfterLimit
to non-nil values be enough?
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.
Left a TODO. It's currently used by daedalus.
Towards #5
This PR puts settings related to chain validation into their own object.