How would you sequence a Kerberos migration off etype 23 across depot services whose owners you cannot compel to change?
answer
- capability, then keys, then withdrawal
- enabling a profile creates no key
- string-to-key runs per etype
- the weakest party on a path wins
- measure tickets issued, not principals enabled
basics
~20 sAdd capability first, then keys, then withdraw etype 23 last. A principal only gains an AES key when its long-term key is set again, so removing the old profile before that is what causes authentication failures rather than the removal itself.
solid answer
~50 sTreat it as three ordered phases, not a switch. **Capability**: every KDC and every party on an authentication path must support an AES profile, or the weakest common etype survives. **Keys**: a principal holds a key for an etype only once its long-term key has been set again, because `string-to-key` runs per profile with its own salt and parameters — enabling an etype creates no key by itself. **Withdrawal**: only when every principal on a path holds an AES key can etype 23 be removed, and it must be removed last. The two observable failures tell you which phase you got wrong: `KDC_ERR_ETYPE_NOSUPP (14)` means no shared profile, while a service reporting `KRB_AP_ERR_MODIFIED` on a ticket it cannot decrypt means keys were rotated out from under it. For services you do not own, the lever is a deadline plus visibility of which principals are still holding etype 23 keys.
go deeper
Recall that moving off the old rc4-hmac encryption type is not a single setting: each account needs a new key created for the new profile before the old one can be taken away.
Explain why string-to-key running per etype means a key must be set again, and what KDC_ERR_ETYPE_NOSUPP (14) tells you about which side is missing a key.
Show the operational order and its failure modes, including a service reporting KRB_AP_ERR_MODIFIED after a rotation it never picked up, and migration by path rather than by inventory.
Own the sequencing across teams you do not control: visibility, a deadline with a stated failure mode, reversibility until the last step, and honesty about the password-derived keys that remain.
## Why this is a sequencing problem, not a setting A Kerberos encryption type is not negotiated afresh per connection. It is decided by **which keys each principal actually holds**, and a key for a given etype only comes into existence when that principal's long-term key is set, because `string-to-key` runs **per profile**, with that profile's salt and parameters. Enabling etype 18 on a KDC therefore creates nothing. Until a principal's key is set again, that principal still has only its `rc4-hmac` key, and the KDC will keep using etype 23 for anything sealed under it — because the alternative is to fail. That single fact sets the order of the whole programme, and inverting it is the classic outage. ## The three phases and what each one costs to get wrong 1. **Capability.** Every KDC, every client and every service on an authentication path must be able to use an AES profile. Anything that cannot keeps etype 23 alive for every exchange it takes part in, however modern the rest of the estate is. 2. **Keys.** Each principal's long-term key is set again so that a key exists for the new profile. For human principals this is a password change; for service principals it is a key rotation the service owner has to accept and pick up, because the service must load the new key to open tickets sealed with it. 3. **Withdrawal.** Only now is etype 23 removed from the permitted set — and only for principals and paths where phase 2 is complete. | mis-ordering | what happens | how it shows | |---|---|---| | Withdraw before keys exist | no shared profile between requester and the key held | `KDC_ERR_ETYPE_NOSUPP (14)` at the KDC | | Rotate a service key the service does not pick up | tickets sealed with a key the service cannot open | `KRB_AP_ERR_MODIFIED` reported by the service | | Rename or re-home a principal mid-flight | derived keys no longer match the salt used | pre-authentication failures, `KDC_ERR_PREAUTH_FAILED` | | Declare done on the KDC's setting alone | principals still holding only etype 23 keys | tickets still sealed with etype 23 | The third row is worth dwelling on: the default salt is built from the realm and the principal's name components, so a change to the principal's name is a change to the derivation input. ## Services whose owners you cannot compel This is the part that makes it a judgment call rather than a runbook. You have no change control over the other team's release, and a forced rotation breaks them at a time you chose. What you do have: - **Visibility.** Publish, per service principal, which etypes it holds a key for and when that key was last set. The list is the argument; nobody defends a position they can see. - **A deadline with a demonstrated cost.** Tie it to something the owner already cares about, and be explicit that the failure mode after the deadline is authentication failure, not degraded security. - **Sequencing by path, not by inventory.** Migrate one authentication path end to end rather than one class of principal across the estate, so that any breakage is bounded to a path you chose and can reverse. - **A reversible step.** Keeping etype 23 permitted while AES keys are created is what makes the programme safe; the irreversible step is the withdrawal, and it belongs last and per-path. - **A replacement for the weak input.** Where a service principal's key is derived from a password a person chose, the migration is the moment to replace it with a long machine-generated key. Otherwise you have repriced offline guessing without removing it. ## What to measure - The count of principals holding **only** an etype 23 key — the real backlog. - The count of tickets actually issued sealed with etype 23 — the residual exposure, which can be non-zero long after the backlog looks small, because one unmigrated party on a path is enough. - The count of `KDC_ERR_ETYPE_NOSUPP (14)` refusals after each withdrawal — the signal that a path was withdrawn too early. The programme is finished when the second number is zero and stays zero for a full business cycle, not when the first one is. ## The trade-off to state out loud Withdrawing etype 23 removes a profile whose key derivation is unsalted and single-pass, so it cuts the cost of every offline guess against every principal on the estate by orders of magnitude and ends the reuse of precomputed work. It does not, by itself, protect any principal whose password a person chose badly. A lead who runs the migration and leaves the password-derived service keys in place has bought a large improvement and should say which risk remains rather than declaring the class closed. **Version note.** Etype 23 is deprecated, not absent, which is why the withdrawal is a decision rather than an upgrade. The SHA-2 profiles 19 and 20 defined by RFC 8009 are a further step and are not present everywhere, so a migration target of etype 18 and a later move to the SHA-2 family are two programmes, not one.
- Why does enabling etype 18 on the KDC not migrate anything by itself?Because a key for a profile exists only once the principal's long-term key has been set again: `string-to-key` runs per etype, with that profile's salt and parameters. Until then the principal holds only its old key, and the KDC will seal anything for that principal with the etype it can actually open — etype 23.
- A service starts rejecting tickets with KRB_AP_ERR_MODIFIED right after a key rotation. What happened?It was handed tickets sealed under a key it does not hold, so decryption fails the profile's integrity check and the service reports the ticket as modified. Usually the service did not pick up the rotated key, or it is running instances with different key versions. It is a key-distribution failure at the service, not a tampering event.
- How do you know the migration is genuinely finished?When no ticket is being issued sealed with etype 23 and none has been for a full business cycle — not when the principal inventory looks clean. Seasonal and quarterly workloads authenticate rarely, and one unmigrated party on an authentication path keeps the old profile in use for everyone on it.
- Is there an argument for leaving etype 23 permitted indefinitely for a few principals?Only with a stated expiry and a bounded blast radius, because the profile's derivation is unsalted, so its weakness is not confined to the principals still using it in any precomputation sense. If a service genuinely cannot move, the better containment is to make its key long and machine-generated, which removes the guessing target even under the old profile.
saying these in an interview costs you the question
- Thinks enabling an etype on the KDC creates the keys
- Withdraws etype 23 before AES keys exist
- Counts enabled principals instead of issued tickets
- Assumes AES keys are converted from existing rc4-hmac keys
- Declares the risk closed while service passwords stay human-chosen
- Migrates by principal class rather than by authentication path