Hello again!

Based on my previous question (“Cross-Realm Admins” from last month) we’re now 
using a model with separate admin principals per realm, and a large keyring of 
keytab files.  This seems to be working *mostly* fine.

Where we run into issues is with creating the cross-realm trusts, specifically 
one-way trusts with a sub-realm trusting our master realm.  When our automation 
tries to create the trust, it often fails with the following log messages:

KerberosService - Running [kadmin, -r, A.VIASAT.IO, -p, api/[email protected], 
-kt, /path/to/keytab-A.VIASAT.IO, -q, add_principal -pw **random stuff** 
krbtgt/[email protected]]
WARNING: no policy specified for krbtgt/[email protected]; defaulting to no 
policy
Authenticating as principal api/[email protected] with keytab 
/path/to/keytab-A.VIASAT.IO.
Principal "krbtgt/[email protected]" created.
KerberosService - Running [kadmin, -r, VIASAT.IO, -p, api/[email protected], -kt, 
/path/to/keytab-VIASAT.IO, -q, add_principal -pw **the same random stuff** 
krbtgt/[email protected]]
WARNING: no policy specified for krbtgt/[email protected]; defaulting to no 
policy
add_principal: Principal or policy already exists while creating 
"krbtgt/[email protected]".
Authenticating as principal api/[email protected] with keytab 
/path/to/keytab-VIASAT.IO.

The principals do not exist before this point, I am 100% certain.  In our 
system, all realms are backed by the same LDAP database, under the container 
cn=Kerberos,dc=viasat,dc=io.  So we have separate krbRealmContainer objects 
cn=VIASAT.IO, cn=A.VIASAT.IO, and so on.  What’s happening, based on my manual 
duplication of these steps, is that the A.VIASAT.IO version of the principal is 
somehow “spilling over” into VIASAT.IO.  After diving into the code, it appears 
this behavior is intentional: is_principal_in_realm() in ldap_misc.c explicitly 
allows these cross-realm TGS principals, no matter which krbRealmContainer 
they’re in.

So I have two questions: first, is this behavior truly expected, or is there 
some kind of bug here?  It seems like a nice shortcut, but I want to make sure 
either way before we start depending on it in production.  Second, if it is 
expected, it’d be really nice for this feature to be documented.  Is it OK if I 
send in a pull request on GitHub, or some other patch for the docs to reflect 
this?



Thanks,
Stephan Kemper
ViaSat, Inc.


________________________________________________
Kerberos mailing list           [email protected]
https://mailman.mit.edu/mailman/listinfo/kerberos

Reply via email to