Class ClientCertAuthenticationBase
- java.lang.Object
-
- org.wildfly.elytron.web.undertow.common.AbstractHttpServerMechanismTest
-
- org.wildfly.elytron.web.undertow.common.ClientCertAuthenticationBase
-
public abstract class ClientCertAuthenticationBase extends AbstractHttpServerMechanismTest
Test case for CLIENT_CERT authentication.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description UndertowServerserverAUndertowServerserverB
-
Constructor Summary
Constructors Modifier Constructor Description protectedClientCertAuthenticationBase()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static voidafterClass()static voidbeforeClass()protected abstract UndertowServercreateUndertowServerA()protected abstract UndertowServercreateUndertowServerB()protected org.wildfly.security.auth.server.SecurityDomaindoCreateSecurityDomain()protected X509TrustManagergetCATrustManager()Get the trust manager that trusts all certificates signed by the certificate authority.protected X509ExtendedKeyManagergetKeyManager(String keystorePath)Get the key manager backed by the specified key store.protected StringgetMechanismName()protected SSLContextgetSSLContext(boolean authenticate)voidtestClientCertAfterSession()voidtestFailedAuthentication()voidtestSSLSessionIdentityCacheHit()voidtestSuccessfulAuthentication()-
Methods inherited from class org.wildfly.elytron.web.undertow.common.AbstractHttpServerMechanismTest
assertLoginPage, assertSuccessfulResponse, assertSuccessfulUnconstraintResponse, getHttpServerAuthenticationMechanismFactory, getSecurityDomain, installProvider, removeProvider
-
-
-
-
Field Detail
-
serverA
public UndertowServer serverA
-
serverB
public UndertowServer serverB
-
-
Method Detail
-
afterClass
public static void afterClass() throws IOException- Throws:
IOException
-
testSuccessfulAuthentication
public void testSuccessfulAuthentication() throws Exception- Throws:
Exception
-
testClientCertAfterSession
public void testClientCertAfterSession() throws Exception- Throws:
Exception
-
testSSLSessionIdentityCacheHit
public void testSSLSessionIdentityCacheHit() throws Exception- Throws:
Exception
-
getMechanismName
protected String getMechanismName()
- Specified by:
getMechanismNamein classAbstractHttpServerMechanismTest
-
doCreateSecurityDomain
protected org.wildfly.security.auth.server.SecurityDomain doCreateSecurityDomain() throws Exception- Specified by:
doCreateSecurityDomainin classAbstractHttpServerMechanismTest- Throws:
Exception
-
getKeyManager
protected X509ExtendedKeyManager getKeyManager(String keystorePath) throws Exception
Get the key manager backed by the specified key store.- Parameters:
keystorePath- the path to the key store to load.- Returns:
- the initialised key manager.
- Throws:
Exception
-
getCATrustManager
protected X509TrustManager getCATrustManager() throws Exception
Get the trust manager that trusts all certificates signed by the certificate authority.- Returns:
- the trust manager that trusts all certificates signed by the certificate authority.
- Throws:
KeyStoreExceptionException
-
getSSLContext
protected SSLContext getSSLContext(boolean authenticate) throws GeneralSecurityException, Exception
- Throws:
GeneralSecurityExceptionException
-
createUndertowServerA
protected abstract UndertowServer createUndertowServerA() throws Exception
- Throws:
Exception
-
createUndertowServerB
protected abstract UndertowServer createUndertowServerB() throws Exception
- Throws:
Exception
-
-