-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: Certificates management #1086
Conversation
if err := server.importConfig(); err != nil { | ||
logging.S.Error(fmt.Errorf("import config: %w", 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.
unrelated change here. I think this is functionally equivalent to what the TODO comment says it should have done
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 think Mike is changing this in #1068 too
internal/server/server.go
Outdated
@@ -60,14 +70,23 @@ type Options struct { | |||
Secrets []SecretProvider `mapstructure:"secrets"` | |||
|
|||
Import *config.Config `mapstructure:"import"` | |||
|
|||
NetworkEncryption string `yaml:"networkEncryption"` // mtls (default), e2ee, none. |
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.
--experimental-enable-mtls
or similar is a better flag for this
Also use mapstructure
so flags work
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 imagine in the future this will also support e2ee, so the options would be mtls
, e2ee
, or none
. If I go with boolean flags there will be two flags, and I'm not sure if it makes sense to do both mtls and e2ee.
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.
This is a big lift, thanks for putting the work in on this
- support passing in starting cert - use db for cert backend
had to rebase with latest main |
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 for addressing my questions, this is good to go for me.
// type Signer interface { | ||
// SignCert() | ||
// } | ||
func MakeUserCert(commonName string, lifetime time.Duration) (*KeyPair, 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.
minor: would prefer without abbreviations, MakeUserCertificate
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.
start of certificates management