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

Non-K8s name resolvers need to support namespacing #3179

Open
1 of 5 tasks
ItalyPaleAle opened this issue Oct 14, 2023 · 1 comment
Open
1 of 5 tasks

Non-K8s name resolvers need to support namespacing #3179

ItalyPaleAle opened this issue Oct 14, 2023 · 1 comment
Labels
kind/bug Something isn't working P0 pinned Issue does not get stale
Milestone

Comments

@ItalyPaleAle
Copy link
Contributor

ItalyPaleAle commented Oct 14, 2023

Spin-off from #3178 (comment)

Currently, all name resolvers except the K8s one do not support namespacing. This includes: consul, mDNS, and the upcoming SQLite (#3178).

Although those resolvers are primarily meant for local development, where namespacing is perhaps less used, it should still be implemented to support advanced scenarios and improve security.

Implementing namespacing is currently not possible unless the runtime participates too.

  • Update nameresolution.Metadata to add a pre-defined constant for NAMESPACE (as a side note, we should probably use something with stronger typing than just a map of strings with pre-defined keys)
  • Update the runtime to pass the namespace when registering with a name resolver
  • Update the mDNS component to register the app using namespaces
  • Update the Consul component to register the app using namespaces
  • Update the SQLite component to register the app using namespaces

Important: To preserve backwards-compat, with mDNS and Consul if the namespace is the default one ("default") we must register the app both with and without a namespace. Or older versions of Dapr won't be able to invoke this app. This behavior must be supported for at least N+2 releases.

@ItalyPaleAle ItalyPaleAle added the kind/bug Something isn't working label Oct 14, 2023
ItalyPaleAle added a commit to ItalyPaleAle/dapr-components-contrib that referenced this issue Oct 14, 2023
See dapr#3179

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@ItalyPaleAle ItalyPaleAle added this to the v1.13 milestone Oct 14, 2023
@ItalyPaleAle ItalyPaleAle added P1 pinned Issue does not get stale labels Oct 14, 2023
@JoshVanL
Copy link
Contributor

I think we should make this a high priority item. Ignoring namespaces in name resolution means that any app can spoof the App ID of any other in another namespace, meaning they can receive traffic on their behalf. Even with mTLS enabled in 1.12 Dapr clusters, daprd will continue to send traffic to fraudulent daprds because of the legacy mTLS servers & clients accepting generic cluster.local DNS identities.

Given the severity of this vulnerability, I think having backwards compat for N+1 is more appropriate imo.

@ItalyPaleAle ItalyPaleAle added P0 and removed P1 labels Oct 16, 2023
@ItalyPaleAle ItalyPaleAle modified the milestones: v1.13, v1.14 Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working P0 pinned Issue does not get stale
Projects
None yet
Development

No branches or pull requests

2 participants