Cannot specify non-default KDC port using system property krb5.kdc
843810Apr 8 2009 — edited Jun 3 2010For testing / debug it's very useful to be able to run the KDC on a non-default port. This can be specified in Kerberos config file by appending the port number to the KDC host name, delimited with a colon.
The java.security.krb5.kdc property can be used to locate the KDC - Unfortunately in Config.java in the sun.security.krb5 package, when parsing the property the colon is used as a delimiter for multiple KDCs. The config object String.replace()s the colons with space chars. Then the KrbKdcReq.java module, when testing for a non-default port in the KDC string from the config object, looks for the colon delimiter - but this has been zapped. So it seems that it's not possible to specify the non-default port via the property.
The workaround is to use the config file approach instead, but this is inconvenient and limits programmability (especially when using configuration reload) - Is there a prospect that the config parser might be adjusted backwards compatible (say, to recognise a double colon or an escape char) to fix this?
regards
Ted Hayes