public EAPTTLSAuthenticator() { setEAPType(EAP_TTLS); }
public AccessRequest createRadiusRequest(RadiusAuthenticator radiusAuthenticator) { AccessRequest request = new AccessRequest(); request.addAttributes(m_outerAttributes); if (radiusAuthenticator instanceof EAPTTLSAuthenticator){ ((EAPTTLSAuthenticator) radiusAuthenticator).setTunneledAttributes(m_innerAttributes); ((EAPTTLSAuthenticator) radiusAuthenticator).setInnerProtocol(m_innerAuthType); ((EAPTTLSAuthenticator) radiusAuthenticator).setTrustAll(m_trustAll); } return request; }
public void init() throws RadiusException { super.init(); tunnelAuth = RadiusClient.getAuthProtocol(getInnerProtocol()); if (tunnelAuth == null || tunnelAuth instanceof MSCHAPv2Authenticator || tunnelAuth instanceof MSCHAPv1Authenticator || tunnelAuth instanceof CHAPAuthenticator) { throw new RadiusException("You can not currently use " + tunnelAuth.getAuthName() +" within a TLS Tunnel because of limitations in Java 1.5."); } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
tlsAuth = new EAPTTLSAuthenticator(); final EAPTTLSAuthenticator ttlsAuth = (EAPTTLSAuthenticator) tlsAuth; if (innerProtocol != DEFAULT_TTLS_INNER_AUTH_TYPE){ return PollStatus.unavailable(reason); } else { ttlsAuth.setInnerProtocol(innerProtocol); ttlsAuth.setTunneledAttributes(attrs); } else if (authType.equalsIgnoreCase("peap")){ String reason = "Support for eap peap is not ready yet";
public RadiusAuthenticator getAuthenticator() { final RadiusAuthenticator auth; final String authType = getAuthType(); if (authType.equalsIgnoreCase("chap")) { auth = new CHAPAuthenticator(); } else if (authType.equalsIgnoreCase("pap")) { auth = new PAPAuthenticator(); } else if (authType.equalsIgnoreCase("mschapv1")) { auth = new MSCHAPv1Authenticator(); } else if (authType.equalsIgnoreCase("mschapv2")) { auth = new MSCHAPv2Authenticator(); } else if (authType.equalsIgnoreCase("eapmd5") || authType.equalsIgnoreCase("eap-md5")) { auth = new EAPMD5Authenticator(); } else if (authType.equalsIgnoreCase("eapmschapv2") || authType.equalsIgnoreCase("eap-mschapv2")) { auth = new EAPMSCHAPv2Authenticator(); } else if (RadiusUtils.isEAPTTLS(authType)) { auth = new EAPTTLSAuthenticator(); } else { auth = null; } return auth; }
public void init() throws RadiusException { super.init(); tunnelAuth = RadiusClient.getAuthProtocol(getInnerProtocol()); if (tunnelAuth == null || tunnelAuth instanceof MSCHAPv2Authenticator || tunnelAuth instanceof MSCHAPv1Authenticator || tunnelAuth instanceof CHAPAuthenticator) { throw new RadiusException("You can not currently use " + tunnelAuth.getAuthName() +" within a TLS Tunnel because of limitations in Java 1.5."); } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
public void init() throws RadiusException { super.init(); tunnelAuth = RadiusClient.getAuthProtocol(getInnerProtocol()); if (tunnelAuth == null || tunnelAuth instanceof MSCHAPv2Authenticator || tunnelAuth instanceof MSCHAPv1Authenticator || tunnelAuth instanceof CHAPAuthenticator) { throw new RadiusException("You can not currently use " + tunnelAuth.getAuthName() +" within a TLS Tunnel because of limitations in Java 1.5."); } }
public EAPTTLSAuthenticator() { setEAPType(EAP_TTLS); }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
public EAPTTLSAuthenticator() { setEAPType(EAP_TTLS); }