Skip to content

Safer SE API changes#3729

Open
ilrudie wants to merge 2 commits into
istio:masterfrom
ilrudie:safer-serviceentry
Open

Safer SE API changes#3729
ilrudie wants to merge 2 commits into
istio:masterfrom
ilrudie:safer-serviceentry

Conversation

@ilrudie

@ilrudie ilrudie commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This adds the API changes to mesh config discussed in the Safer ServiceEntry proposal.

TL;DR: Allows a mesh administrator to control which namespaces are allowed to "publish" a service entry at a scope above "namespace" while offering flexibility for future matching options to further constrain this publishing, such as "address within cidr" or "hostname re/suffix/exact").

This is the shape discussed, however we did not bikeshed the precise wording of the api in the proposal.

Signed-off-by: Ian Rudie <ian.rudie@solo.io>
@ilrudie ilrudie requested a review from a team as a code owner June 23, 2026 21:27
@istio-policy-bot

Copy link
Copy Markdown

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-policy-bot

Copy link
Copy Markdown

😊 Welcome @ilrudie! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 23, 2026
Comment thread mesh/v1alpha1/config.proto Outdated
// external admission validation. When unset, ServiceEntry behaves as it does
// today (published cluster-wide; ambient ignores `exportTo`). See the
// ServiceEntryPublishing message for details.
ServiceEntryPublishing service_entry_publishing = 72;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: ServiceEntryVisibility might be a better name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, visibility is good.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 on visibility is better :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated with visibility instead of publish. Thanks for the feedback. This suggestion allowed cleaning up the surrounding verbiage as well. Much appreciated.

Comment thread mesh/v1alpha1/config.proto Outdated
// Policies are evaluated in order; the first policy whose rules all match sets
// the ServiceEntry's publish scope. If no policy matches, `defaultPublishScope`
// applies. When this entire message is absent from `MeshConfig`, every
// ServiceEntry is published `CLUSTER_LOCAL`, preserving current Istio behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does this mean publishing to CLUSTER_LOCAL mean? In sidecar world, if you create a ServiceEntry in Primary/Config cluster, it is visible to dataplanes in all clusters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The intention was to avoid the term "global" per some of the feedback during discussions of the proposal in WG. This was to avoid making the impression that it would be visible across a multi-primary cluster boundary. The behavior seems like it should be "visible to all things programmed by this cluster" in a shared primary.

I'm very open to suggestions here for either a clarifying rename, or a new visibility. CONTROL_LOCAL perhaps, meaning everything programmed by this control plane has it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess one question to nail down, if we have something which means "visible to everything programmed by this control plane", does a cluster visibility provide much utility any more? It seems like those can be combined without much loss of expressiveness.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think when we have some thing like visible to everything programmed by a specific control plane, cluster visibility IMO does not make sense. May be another visibility type like "MESH" expresses that it is visible to all clusters managed by the control plane?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about "mesh" too, but to my mind it would mean the whole multi-cluster mesh (as in distributed to all the other primaries as well). That's not what we plan to implement in this unit of work at least. I suppose tbd if we land there in future which is part of why this api shape is flexible for being able to express something like that.

@linsun linsun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm overall some nitpicks on publish/visibility scope and naming

Comment thread mesh/v1alpha1/config.proto Outdated
// external admission validation. When unset, ServiceEntry behaves as it does
// today (published cluster-wide; ambient ignores `exportTo`). See the
// ServiceEntryPublishing message for details.
ServiceEntryPublishing service_entry_publishing = 72;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 on visibility is better :)


// Visible to the entire cluster. Equivalent to the legacy `exportTo: "*"`.
CLUSTER_LOCAL = 3;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could these two be combined to local vs remote?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think I understand. Is the suggestion to a visibily like cluster_local and cluster_remote to be able to distinguish visibility in the shared primary approach?

Signed-off-by: Ian Rudie <ian.rudie@solo.io>
@istio-testing

Copy link
Copy Markdown
Collaborator

@ilrudie: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
release-notes_api fa05e11 link false /test release-notes
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants