DEV Community

StarkMan
StarkMan

Posted on

Kerberos delegation needs a review of protocol transition

Kerberos delegation needs a review of protocol transition

Kerberos delegation lets a service use a user's authentication context to reach another service. It is useful for multi-tier applications, but it can turn a compromised front end into a path to a back-end system. Windows supports constrained delegation in several forms, and the security difference between them depends on which services are allowed, how the user's identity is obtained, and whether protocol transition is enabled.

Microsoft's constrained delegation documentation describes delegation based on a forwarded ticket-granting ticket and the Service for User extensions. A front-end service may authenticate a user and then request a service ticket for a specific back-end service. Resource-based constrained delegation moves part of the authorization decision to the resource and changes how the trusted-to-authenticate-for-delegation bit applies.

The protocol transition question

Protocol transition lets a service obtain a Kerberos service ticket without a forwarded user ticket when the user authenticated through another mechanism. It is convenient for applications that accept forms, certificates, or another identity protocol but need Kerberos for a back-end service. The same capability can widen the impact of a service compromise because the service may be able to act for users who did not present a Kerberos ticket to it.

The allowed target list is the next control. A delegation entry should name the specific service and service principal, not an entire host or domain. Review the account's msDS-AllowedToDelegateTo values, the resource's allowed-to-act list, and the presence of the trusted-to-authenticate-for-delegation flag. Confirm that the service account is not marked sensitive and cannot be delegated, and check whether the application still needs the feature.

Privilege and monitoring

The ability to modify delegation settings is privileged. Restrict who can edit service account properties and resource-based delegation entries. Record changes with the actor, target, before and after values, and the ticket request that motivated the change. Monitor unusual service ticket requests, especially requests for services that the account has not used before.

Do not rely on a single event. Correlate directory changes with authentication logs, service startup events, and application deployment records. A new back-end service may legitimately need a new target. An unexpected target or a sudden increase in ticket requests from one account deserves investigation.

Reducing the attack surface

Prefer designs that avoid delegation when a service only needs to act as itself. Use separate service identities for different trust boundaries. If a front end must impersonate users, limit the target services, require strong authentication, and keep the front end on a hardened network with a narrow egress policy. Resource-based delegation can be safer when it is configured deliberately, but it still trusts the resource and the account that controls the delegation entry.

Test the failure cases. Confirm that an account without the delegation right cannot obtain a ticket for a protected service. Confirm that removing a target actually takes effect after the expected cache and ticket lifetime. Verify that old service tickets and cached sessions do not preserve access longer than the intended policy.

Kerberos delegation is not inherently unsafe. The risk comes from granting a reusable authority without documenting the service, the user population, and the exact target. A periodic review that connects those three facts is more useful than a one-time checkbox.

References

Top comments (0)