@Override public GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, LogonException { String securityDomain = getSecurityDomain(vdbName, vdbVersion, null); if (securityDomain == null ) { throw new LogonException(RuntimePlugin.Event.TEIID40059, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40059)); } return this.securityHelper.negotiateGssLogin(securityDomain, serviceTicket); }
throw new LogonException(JDBCPlugin.Event.TEIID20005, errors.toString()); result = Subject.doAs(sub, action); } catch (Exception e) { throw new LogonException(JDBCPlugin.Event.TEIID20005, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005)); throw (CommunicationException)result; } else if (result instanceof Exception) { throw new LogonException(JDBCPlugin.Event.TEIID20005, (Exception)result, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005));
throw new LogonException(JDBCPlugin.Event.TEIID20005, errors.toString()); result = Subject.doAs(sub, action); } catch (Exception e) { throw new LogonException(JDBCPlugin.Event.TEIID20005, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005)); throw (CommunicationException)result; } else if (result instanceof Exception) { throw new LogonException(JDBCPlugin.Event.TEIID20005, (Exception)result, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005));
public GSSResult neogitiateGssLogin(byte[] serviceTicket, String vdbName, String vdbVersion, String user) throws LogonException { GSSResult result; try { result = service.neogitiateGssLogin(user, vdbName, vdbVersion, serviceTicket); } catch (LoginException e) { throw new LogonException(RuntimePlugin.Event.TEIID40014, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40014)); } if (result == null) { throw new LogonException(RuntimePlugin.Event.TEIID40014, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40014)); } if (result.isAuthenticated()) { LogManager.logDetail(LogConstants.CTX_SECURITY, "Kerberos context established"); //$NON-NLS-1$ this.gssServiceTickets.put(Base64.encodeBytes(MD5(result.getServiceToken())), result.getSecurityContext()); } return result; }
throw new LogonException(e); } catch (SessionServiceException e) { throw new LogonException(e);
vdb = getActiveVDB(vdbName, version); } catch (SessionServiceException e) { throw new LogonException(e);
Object securityContext = this.gssServiceTickets.remove(Base64.encodeBytes(MD5(krb5Token))); if (securityContext == null) { throw new LogonException(RuntimePlugin.Event.TEIID40054, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40054)); throw new LogonException(RuntimePlugin.Event.TEIID40149, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40149)); throw new LogonException(RuntimePlugin.Event.TEIID40055, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40055, authType));
throw new LogonException(RuntimePlugin.Event.TEIID40055, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40055, "Kerberos")); //$NON-NLS-1$
private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true); LogonResult newResult = null; // - if gss if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { //server has issued an additional challenge if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; }
private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; // - if gss if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { //server has issued an additional challenge if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; }
} catch (LogonException e) { if (!passthrough) { throw new LogonException(RuntimePlugin.Event.TEIID40150, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40150)); throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type));