The question authentication never asks

A hostile server does not need to forge every layer. It can let discovery lie and authentication tell the truth.

Picture a client hunting for the root of an organisation's file namespace. An unprotected DNS SRV answer points at a machine an attacker controls. The machine holds a valid credential for its own hostname — honestly issued, correctly presented. A host-based authentication check sails through exactly as designed: the box proves it is the box named in the poisoned answer. What nobody has proved is the thing the user actually cares about — that this box may speak for the organisation's file service.

RFC 5178 was written for that crack. It adds no replacement DNS and no magic trust bit. It changes the name handed to GSS-API so the intended authority survives discovery. The name carries the service, the domain being served, and the concrete hostname discovery selected. A server must authenticate a credential for the whole triple.

That third field flips the question from “who owns this host name?” to “who authorized this host to provide this service for that domain?”

Discovery is a proposal, not an appointment

Service discovery earns its keep by letting an administrator shuffle a service between machines, publish replicas, and add capacity without touching every client. The same indirection opens an authority hole. A discovery record proposes where a client should try. If the record is insecure, it cannot also be the final proof that the proposed target was entitled to answer.

Host-based service names bind a service to a single host, usually in a form like service [AT] hostname. That is fine when the host is already known through trusted configuration or a separate policy fixes its role. It is weaker when the host itself arrived from an untrusted lookup. The client would be using the disputed statement — “this is the server” — to build the identity that confirms the statement.

RFC 5178 keeps the intended resource domain outside that loop. Its syntax:

service [AT] domain [AT] hostname

The three fields are not synonyms. The service names the function requested. The domain states the administrative or resource scope. The hostname identifies the concrete acceptor. The domain need not even be an Internet DNS domain, though DNS names are the expected form.

Holding a credential for this name is the authorization. That is the mechanism's power and its governance burden. Whoever mints nfs [AT] example.net [AT] nfs2.example.net has done more than serialize three strings. They have handed one machine the ability to authenticate as an NFS server for the example.net domain.

The credential issuer, in other words, sits in the service control plane.

A successful context makes a bounded claim

If a client builds the intended typed name and stands up a GSS security context with an acceptor that proves the matching credential, the result means something. The client has more than an arbitrary discovery target and more than an authenticated hostname. It has cryptographic evidence tied to the service-domain-host scope.

The result is still bounded.

It does not say the discovery record was authentic. It does not say the administrator meant the credential to stay valid today. It does not say the application authorized the requested operation, returned the right file tree, enforced the right tenant boundary, or finished a user's work. A stolen or mistakenly issued credential can satisfy the name while defeating the policy that motivated it.

That is why the operational record needs the whole chain: the domain the user intended; the discovery query and its validation state; the returned candidates and the selected host; the exact name type and input representation; the mechanism-canonical name; the credential issuer and lifetime; the GSS result; the application authorization decision; and an independent service observation.

Compress those into “Kerberos succeeded” or “GSS authenticated” and you throw away the most important scope.

The fallback is not merely compatibility

RFC 5178 knew a new name type could not ship on unilateral client preference. Some mechanisms cannot negotiate it. Some acceptors do not support it. LDAP installations may already expect host-based names and lack domain-scoped acceptor credentials. Switch on the new form before servers and credentials are ready and interoperability breaks.

None of that makes host-based fallback harmless. The standard requires initiators that fall back — and initiators that lack domain-based support entirely — to verify separately that the host-based identity is authorized to provide the service for the intended domain.

That requirement is easy to lose in an implementation toggle. A box labelled “use legacy naming” may restore connectivity while quietly removing the authorization property that justified discovery in the first place. The right fallback receipt is not “retry succeeded.” It is “this exact host identity appears in a current, accountable authorization set for this service domain.”

Fail closed and fail open are too coarse as labels. A planned fallback can keep both service and authority. An unexamined fallback keeps traffic by changing the question.

Printable equality is not identity equality

The internationalization sections expose a second boundary. RFC 5178 was written against the IDNA2003 model. Its ordinary import interface must accept ACE-encoded domain names. It also recommends a UTF-8 import function that takes UTF-8 or ACE. Ordinary display emits ASCII or ACE; the UTF-8 display variant emits UTF-8 and must not emit ACE.

These are representation rules, not authority transformations.

GSS-API already separates an imported internal name, a displayed string, a mechanism name, and an exported name. RFC 2743 warns that displaying an imported name need not reproduce the original string, and the output name type need not match the identifier used for import. Name comparison belongs to GSS comparison and canonicalisation semantics — not to a byte comparison between two log lines.

The distinction sharpened historically because RFC 3490 was later obsoleted and IDNA2008 introduced A-label and U-label terminology. That later change does not retroactively rewrite RFC 5178. It does require an implementation to record which profile and conversion path produced the name it used. Two interfaces can show different strings for the same intended domain; two visually similar strings can also represent different security names.

An audit that saves only the prettiest Unicode rendering may be unable to reproduce the authenticated mechanism name. An audit that saves only ACE may conceal what the operator believed they approved. Keep both, along with the typed name and the mechanism result.

Kerberos keeps the three scopes distinct

RFC 5179 supplies the Kerberos V mapping. The service becomes the first principal component, the hostname the second, the domain the third. It recommends the Kerberos name type NT-SRV-HST-DOMAIN, value 12, though NT-UNKNOWN is permitted.

The realm is a separate decision. The spec says it corresponds to the domain treated as a hostname, and its security section insists realm derivation proceed from the hostname rather than simply trusting the domain slot of the supplied string. That distinction stops the asserted service scope from appointing its own authentication realm without the normal Kerberos mapping logic.

RFC 5179 also wears its date. With Kerberos internationalization incomplete, it requires ACE-encoded internationalized domain names for the host and domain components. That rule is evidence of a compatibility boundary, not proof that every contemporary library exposes or compares those forms the same way.

The useful engineering test is therefore not “can the library parse this string?” It is “which principal did the active mechanism derive, which realm did it consult, which credential answered, and did the resulting name match the application's domain-service policy?”

NFS shows what the separation buys

RFC 6641 later used the model for a global NFSv4 namespace. A client can query DNS SRV for root servers associated with an organisation. DNSSEC should be used where available. Domain-based service principals are an additional control: the administrator can arrange that only approved NFS root servers hold credentials for names like nfs [AT] example.net [AT] nfs2.example.net.

This construction lets discovery stay replaceable. DNS proposes a member of the server set. The credential system states whether that member is authorized for the domain root. NFS then negotiates security and applies its own protocol rules. The mounted namespace and the data returned remain downstream observations.

No single layer has to impersonate the others. That is the design's strength.

It is also why a credential inventory matters as much as a DNS inventory. Pull a server from SRV without revoking its domain-service credential and you stop ordinary discovery while leaving the machine able to authenticate if reached another way. Revoke the credential while leaving the SRV target and you get a discoverable but unusable endpoint. The two actions are related, not interchangeable.

Authority is located in the issuance record

The symbol looks small: one extra domain component and one registered OID. The institutional change is larger. Authority no longer follows automatically from a discovered address or a host's ability to authenticate. It is localized in a credential whose scope can be inspected, issued, and withdrawn.

That fits a wider Internet coordination principle. Shared syntax should be minimal and deterministic; local actors should keep control over the decisions the syntax expresses. RFC 5178 defines enough common structure for a client and server to agree on the question. It creates no central service-authority registry and claims no single deployment policy every application must adopt.

The clarity can feel inconvenient because it reveals who made the decision. If the wrong server authenticates the right triple, the failure is not “DNS did something strange.” Someone issued, copied, retained, or failed to revoke an authorization-bearing credential. If a fallback accepts a host without domain approval, someone chose compatibility over the missing scope. The evidence becomes actionable because the layers stay separate.

The server's identity was never the whole question. RFC 5178 made the intended mandate part of the name.

Sources