Scenario:
- We want to connect to multiple AD domains to fetch AD object information.
- For authentication, we want to use Kerberos.
- This is done simultaneously, meaning, fetching data from multiple AD domains is expected to be done in a single request - either interchangeably or in multi-threaded environment.
The Problem:
Kerberos authentication takes time and is proving to be performance hit
So, caching the TGT credentials on the application machine would solve the issue for us
A single cache file stores only one principal TGT. So to support multiple domains, we have to persist multiple cache files and dynamically choose which cache file to be used for current context creation.
This is indeed a valid solution, but the problem is about the security concerns: How?
We are caching the TGT using kinit in different cache files, but the drawback of this solution is that, if the security of the application machine is compromised, then those TGTs could be utilized by any different applications for authentication (we want the lifetime of the TGTs to be more)
So, is there a way where we can utilize an in-memory cache? I am aware of the MEMORY: ccache configuration in the krb.conf file, but again, how can that solve the issue of caching multiple principal TGTs? I haven't tried this solution, but as far as I understand, the successive kinit calls would overwrite the previous principal TGT.
Would having different krb.conf files for each AD domain help us? I am yet to explore the concept of keytab, would that of any help in addressing our issue?
Please Note: I am new to this space and yet in the phase of learning the concepts along with the implementation. A few of the above points might feel like a guess work and indeed they are.