-
Notifications
You must be signed in to change notification settings - Fork 44
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 ServerConfig tags, export TLSClientAuth #176
add ServerConfig tags, export TLSClientAuth #176
Conversation
CAs: []string{"/path/to/ca.crt"}, | ||
ClientAuth: TLSClientAuthNone, | ||
}, | ||
clientAuth: TLSClientAuthNone, // FIXME test fails, it serializes to required |
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 test is failing because of the omitempty
tag on the ClientAuth attribute of the struct.
TLSClientAuthNone
corresponds with a zero value, so it will not be serialized if it is set in the struct.
If we remove the omitempty
tag, the "with ca" unit test will fail (none will serialize, and the Unpack
method will not insert the required val (current default when a CA is specified).
I can try to change ClientAuth to be a pointer value instead, so there is a difference between no value, and a none (0) val
💚 Build Succeeded
History
|
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.
Looks good.
Thanks for all the additional testing.
What does this PR do?
add ServerConfig tags, export TLSClientAuth
Why is it important?
We want to enable mTLS args as part of elastic-agent's CLI. These args should be parsed and passed to fleet-server. YAML tags are needed to allow for serialization.