Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/teiid/teiid
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Oct 21, 2014
2 parents 2764ef0 + 0b85328 commit 1b170d6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions client/src/main/java/org/teiid/gss/MakeGSS.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,21 @@ public static LogonResult authenticate(ILogon logon, Properties props)
String jaasApplicationName = props.getProperty(TeiidURL.CONNECTION.JAAS_NAME);
String nl = System.getProperty("line.separator");//$NON-NLS-1$
if (jaasApplicationName == null) {
errors.append(JDBCPlugin.Util.getString("client_prop_missing", TeiidURL.CONNECTION.JAAS_NAME)); //$NON-NLS-1$
errors.append(nl);
jaasApplicationName = "Teiid"; //$NON-NLS-1$
}

String kerberosPrincipalName = props.getProperty(TeiidURL.CONNECTION.KERBEROS_SERVICE_PRINCIPLE_NAME);
if (kerberosPrincipalName == null) {
//errors.append(JDBCPlugin.Util.getString("client_prop_missing", TeiidURL.CONNECTION.KERBEROS_SERVICE_PRINCIPLE_NAME)); //$NON-NLS-1$
//errors.append(nl);
kerberosPrincipalName="demo/host.example.com@EXAMPLE.COM"; //$NON-NLS-1$
try {
TeiidURL url = new TeiidURL(props.getProperty(TeiidURL.CONNECTION.SERVER_URL));
kerberosPrincipalName="TEIID/" + url.getHostInfo().get(0).getHostName(); //$NON-NLS-1$
} catch (Exception e) {
// Ignore exception
}
if (kerberosPrincipalName == null) {
errors.append(JDBCPlugin.Util.getString("client_prop_missing", TeiidURL.CONNECTION.KERBEROS_SERVICE_PRINCIPLE_NAME)); //$NON-NLS-1$
errors.append(nl);
}
}

String krb5 = System.getProperty("java.security.krb5.conf"); //$NON-NLS-1$
Expand Down

0 comments on commit 1b170d6

Please sign in to comment.