In Kerberos, how does a researcher whose principal exists only in a partner realm get a service ticket in the archive's realm?
answer
- no accounts are copied anywhere
- one shared key, named as a principal
- the name states the direction
- two hops: home realm, then the target's
- transited records the path for policy
basics
~20 sThe two realms share an inter-realm key, registered as the principal krbtgt/MET.[email protected]. The home KDC issues a cross-realm ticket-granting ticket sealed under it; the archive's ticket-granting service opens that and issues a service ticket sealed under the archive service's own key.
solid answer
~40 sNo account is copied. The realms establish a **shared inter-realm key**, held as a principal named for the direction it serves: `krbtgt/[email protected]` lets principals of `INSTITUTE.EXAMPLE` reach services in `MET.EXAMPLE`. The researcher's client asks its **home** ticket-granting service for a ticket for that principal and receives a cross-realm ticket-granting ticket sealed under the shared key. It presents that to `MET.EXAMPLE`'s ticket-granting service, which opens it with the same key and issues a service ticket for `archive/[email protected]`, sealed under the archive service's own long-term key. The `EncTicketPart` keeps the researcher's original `cname` and `crealm`, and its `transited` field records the realms crossed. The trust is directional: the reverse direction needs its own key and its own principal.
code
pseudocode · 22 linesclient [email protected] wants archive/[email protected]
hop 1 - home ticket-granting service
TGS-REQ realm = INSTITUTE.EXAMPLE
sname = krbtgt/MET.EXAMPLE
presents the local ticket-granting ticket
TGS-REP cross-realm ticket-granting ticket,
sealed under the inter-realm key shared by the two realms
hop 2 - the archive realm's ticket-granting service
TGS-REQ realm = MET.EXAMPLE
sname = archive/store1.met.example
presents the cross-realm ticket-granting ticket
TGS-REP service ticket, sealed under the archive service's long-term key
EncTicketPart: crealm = INSTITUTE.EXAMPLE
cname = mkeita
transited = realms crossed on the way here
at the archive server
AP-REQ open the service ticket with the service's own long-term key
check transited against policy if no KDC has already done so
map the foreign name onto local rights, or refusego deeper
The takeaway is that two realms can be joined by a shared key so users of one reach services in the other without ever getting an account there.
Explain the two hops and be able to write the cross-realm principal name in the right direction, saying which realm it is registered in and which realm's ticket-granting service it names.
Show the operational detail: directionality as a diagnosis for one-way failures, the transited path and who checks it, and the local authorization mapping that cross-realm authentication does not provide.
The lead's question is how many trusts an estate should hold and in which directions, since each one is a key whose custody spans two organisations and whose withdrawal is the only revocation available.
## The problem: a name the archive's KDC cannot resolve A meteorological office runs its archive in realm `MET.EXAMPLE`. Researchers at a partner institute live in `INSTITUTE.EXAMPLE` and have no principal in the office's database at all. To the archive's key distribution centre, `[email protected]` is not a bad credential — it is a name it cannot resolve and holds no long-term key for. Nothing the researcher can present would help, because the office's KDC has no key with which to check it. Cross-realm authentication solves that without provisioning anybody. The realms share one key. ## What the trust is actually made of Two realms establish a **inter-realm key** and register it as a principal whose name states the direction it serves. For principals of `INSTITUTE.EXAMPLE` reaching services in `MET.EXAMPLE`, that principal is: `krbtgt/[email protected]` Read it as any other service principal: the *service* named is the ticket-granting service of `MET.EXAMPLE`, and the *realm* it is registered in is `INSTITUTE.EXAMPLE`. Both KDCs hold the key. That is the entire trust: one shared key, in one direction. - **Direction matters.** The reverse relationship — office principals reaching the institute's services — is a second principal, `krbtgt/[email protected]`, with its own key. Establishing one does not establish the other, which is why a partnership that "works one way" is a normal, diagnosable state rather than a bug. - **No replication happens.** Neither database learns the other's principals or keys. The archive's KDC never holds anything belonging to a researcher. ## The two hops 1. The client, holding an ordinary ticket-granting ticket for `krbtgt/[email protected]`, sends a `TGS-REQ` to its **home** ticket-granting service asking for `krbtgt/MET.EXAMPLE`. The `TGS-REP` returns a **cross-realm ticket-granting ticket** sealed under the shared inter-realm key. 2. The client sends a `TGS-REQ` to **`MET.EXAMPLE`'s** ticket-granting service, presenting that cross-realm ticket. That KDC opens it with the shared key — which is exactly what convinces it the other realm vouched for this client — and returns a service ticket for `archive/[email protected]`, sealed under the archive service's own long-term key. The researcher then runs an `AP-REQ` against the archive server as any local user would. The archive server opens the ticket with its own key, reads `crealm = INSTITUTE.EXAMPLE` and `cname = mkeita` from the sealed `EncTicketPart`, and never contacts the institute at all. ## Chains, and the transited field Where no direct key exists between two realms, the path can run through intermediate realms along a realm-name hierarchy, each hop issuing the next cross-realm ticket-granting ticket. Every realm crossed is recorded in the ticket's **`transited`** field, encoded as a `TransitedEncoding` with a registered `tr-type` and its `contents`. That field exists because a chain is only as trustworthy as its weakest hop: an intermediate realm could have put any client name into the ticket it passed on. So the list is not decoration — it is the evidence a policy decision is made against: - A KDC may check the transited path against policy when it issues, and record that it did so in the ticket's flags. - Where that has not been done, the end service should apply the check itself before trusting the name inside. - Either way, "the name is authenticated" means "authenticated by this path", and the path is part of the claim. ## What crossing a realm does not grant | the ticket proves | the ticket does not decide | |---|---| | the client is `[email protected]` | what that researcher may download | | a realm the archive trusts vouched for the name | that the name maps to any local identity | | the KDC of `MET.EXAMPLE` issued this service ticket | that the partnership works in the other direction | Authorization stays local to the archive. A cross-realm ticket hands the service a **foreign, authenticated name**; deciding what that name may read is the service's own problem, and it is the step most often skipped when a trust is first turned on and everything suddenly "works".
- The office's staff now need the institute's services too. What has to be created?A second, separate key, registered as `krbtgt/[email protected]`. A cross-realm relationship is one-directional per key: the existing principal only lets institute principals reach office services. Making it bidirectional means two principals and two keys, each of which can be withdrawn on its own.
- There is no direct key between the researcher's realm and the archive's. Can the login still cross?Yes, if a chain of realms exists that does have keys hop by hop, typically along the realm-name hierarchy. Each hop issues the next cross-realm ticket-granting ticket and appends itself to the `transited` field, so the end service can see the path it came by and judge it against policy.
- Does a valid cross-realm ticket tell the archive what the researcher may download?No. It authenticates a name belonging to another realm, and nothing more. The archive must map that foreign name onto local rights, or refuse it. Treating successful cross-realm authentication as authorization is how a newly established trust silently widens access far beyond what was agreed.
Two research libraries honour each other's reader cards under one signed reciprocity agreement, rather than each re-registering the other's readers. The desk still decides which shelves a visiting reader may take books from.
saying these in an interview costs you the question
- Says the archive's KDC needs an entry for each visiting researcher.
- Believes one inter-realm key makes the trust work in both directions.
- Claims the archive service contacts the researcher's home KDC to check the ticket.
- Treats a valid cross-realm ticket as authorization to read the archive.
- Says the transited realm list needs no checking by anyone.