I am developing a kerberized application in C++ which makes use of the krb5 library. It is also intended to support multi realm kerberos, so the service it self runs in a realm such as HADOOP.COM
and users are connecting from realm USERS.COM
. For a tangential purpose, I need to know the KDC of the USERS.COM
realm. I know the info is in the "realms" section of krb5.conf, but I need to be able to look this up programmatically.
So the problem is, given a realm, is there a way to look up the associated KDC using just the krb5 API (i.e. not manually parsing the krb5.conf file)
The API I am referencing is documented here