0

I have a system property which I use in my Intellij's VM arguments section as

-Djava.security.krb5.realm="EXAMPLE1.COM", I want to use another value for the realm name instead of EXAMPLE1.COM when I connect to another resource.

For example, my MongoDB sits in EXAMPLE2.COM and my Kafka sits in EXAMPLE1.COM and have same userAccount having access to both the different realms. How to connect to both of these by setting the same VM argument having 2 different values from my application code ??

Thanks in advance

Santosh Ravi Teja
  • 247
  • 1
  • 7
  • 18
  • 1
    Did you try calling method [setProperty](https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#setProperty-java.lang.String-java.lang.String-) ? – Abra Aug 19 '19 at 01:42
  • Isn’t this what a `krb5.conf` file is for? – Holger Aug 19 '19 at 12:21
  • Correct, but my krb5.conf already has the details for both the realm names. under `[realms]` but, my application only takes one vm argument for realm name & connects to one resource either mongo or kafka, unable to talk to both the realms. – Santosh Ravi Teja Aug 19 '19 at 12:41

0 Answers0