Skip to content
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

only add istio automtls when label has value #10574

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

stevenctl
Copy link

@stevenctl stevenctl commented Jan 15, 2025

The previous logic didn't cover the possible values described in Istio. disabled should not result in us sending mTLS.
BOT NOTES:
resolves #10575

@stevenctl stevenctl requested a review from yuval-k January 15, 2025 19:42
@solo-changelog-bot
Copy link

Issues linked to changelog:
#10575

func AddIstioAutomtlsMetadata(
metadata *envoy_config_core_v3.Metadata,
workloadLabels map[string]string,
enableAutoMtls bool,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know this is a copy/paste of an existing function, so I'm happy to leave it as is. It feels strange to me that we pass a boolean and only perform an action if that's true. It feels like we could just have the function only be called if the enableAutoMtls value is true

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk, I'd rather have "pass the global setting in, let some shared code interpret it" than have that conditional in multiple places, as easy as it may be.

enableAutoMtls bool,
) *envoy_config_core_v3.Metadata {
if enableAutoMtls {
// Valid label values are 'istio', 'disabled'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to add a link to the istio ref for these values? I already have forgotten the istio semantics regarding these

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also just for for clarity i was thinking adding this link to the comment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linked to the Istio API def that outlines it.

@stevenctl stevenctl enabled auto-merge (squash) January 16, 2025 20:45
Copy link

@lgadban lgadban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stevenctl stevenctl merged commit 4f8afe2 into solo-io:main Jan 17, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Istio automtls mode with security.istio.io/tlsMode=disabled results in sending mTLS
3 participants