Skip to content

Support of dns:name URIs #10824

Open
Open
@FyiurAmron

Description

@FyiurAmron

As it currently stands, the URI validation and parsing for dns schema in grpc-java is in contradiction of both RFC-4501 and (not relevant really) core gRPC specs by rejecting dns:name-type URIs (no slash). This generates discrepancies between different gRPC implementations and is generally problematic. Currently we have 6 (yes, literally six) competing standards as to what URIs are allowed, none of which are actually aligned, and all of them are "official" in some way. The only thing that's missing for grpc-java to be a strict superset here (and thus reduce the incompatibilities and confusion) is to have dns:name allowed as per RFC-4501 spec (ditto).

A fully backwards-compatible solution would be to change https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/internal/DnsNameResolverProvider.java#L56 to allow any reasonable/valid RFC-4501-compliant (ditto) URI to be accepted. Code-wise, it's trivial, has no parsing ambiguities and has no negative impact on the existing code solutions.

Describe the solution you'd like

dns:name would be included as valid , RFC-4501-type URIs would be better (ditto) and supported, confusion and discrepancies would be reduced.

Additional context

grpc/grpc#35539 & grpc-ecosystem/grpc-spring#1024
If a PR is needed, I'll gladly do it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions