-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Dashboard TLS Configuration Details Bug #23726
Conversation
Build Results: |
// consider tls enabled if tls_disable is undefined or false AND both tls_cert_file and tls_key_file are defined | ||
const tlsListener = this.args.vaultConfiguration?.listeners.find((listener) => { | ||
const { tls_disable, tls_cert_file, tls_key_file } = listener.config || {}; | ||
return (tls_disable === undefined || tls_disable === false) && tls_cert_file && tls_key_file; |
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.
Good to know that the vault listener config gets returned with tls_cert_file
and tls_key_file
as an option.
Could we do !tls_disable && tls_cert_file && tls_key_file
instead?
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.
Yes good catch! I believe that 0
and 1
are accepted in the config as well which this would not account for.
@@ -19,7 +19,7 @@ | |||
</B.Tr> | |||
<B.Tr> | |||
<B.Td>TLS</B.Td> | |||
<B.Td data-test-vault-config-details="tls_disable">{{this.tlsDisabled}}</B.Td> | |||
<B.Td data-test-vault-config-details="tls">{{this.tls}}</B.Td> |
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.
🎉
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 tackling this Jordan 🎉
* fixes issues displaying accurate tls state in dashboard configuration details * adds changelog entry * updates tls getter to look for falsy in configuration details card
The TLS field of the configuration details section on the dashboard was not displaying accurately based on the configuration settings. Since the
tls_disable
default value isfalse
, it doesn't need to be defined and could be missing from the configuration. In addition, when using TLS thetls_cert_file
andtls_key_file
values are required. I updated to check thattls_disable
is eitherundefined
orfalse
and both file properties have value to determine if TLS is enabled.The screen shot below is after the changes with the following config:
I also noticed when running a dev server that it was incorrectly reporting that TLS was Enabled which is now showing Disabled as expected.
Closes #23371