Class AbstractIssuedJWTSecurityTest
- java.lang.Object
-
- org.springframework.test.context.testng.AbstractTestNGSpringContextTests
-
- net.shibboleth.idp.test.flows.AbstractFlowTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
-
- All Implemented Interfaces:
Aware,ApplicationContextAware,org.testng.IHookable,org.testng.ITestNGListener
- Direct Known Subclasses:
IssuedEncryptedJWTTest,IssuedSignedJWTTest
public abstract class AbstractIssuedJWTSecurityTest extends AbstractOidcFlowTest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE
-
Field Summary
Fields Modifier and Type Field Description (package private) StringdefaultClientId(package private) StringdefaultClientIdEncryptionEnforced(package private) StringdefaultClientSecret(package private) StringdefaultClientSecret64Bprotected booleanencryptionOptionalprotected AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPEfetchingType-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
ecKey, END_STATE_ID, endStateId, flowId, rsaPrivateKey, rsaPublicKey, storageService
-
Fields inherited from class net.shibboleth.idp.test.flows.AbstractFlowTest
builderFactory, certFactoryBean, directoryServer, END_STATE_OUTPUT_ATTR_EXPR, END_STATE_OUTPUT_ATTR_NAME, externalContext, flowExecutor, idGenerator, IDP_ENTITY_ID, idpCredential, IP_ADDRESS_AUTHN_FLOW_ID, IP_ADDRESS_AUTHN_MAP_BEAN_NAME, KEYSTORE_FILE, LDIF_FILE, marshallerFactory, parserPool, request, response, SAML1_TRANSFORM_C14N_BEAN_NAME, SAML2_TRANSFORM_C14N_BEAN_NAME, SP_ACS_URL, SP_ENTITY_ID, SP_RELAY_STATE, spCredential, unmarshallerFactory
-
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIssuedJWTSecurityTest(AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE type, String flowId)protectedAbstractIssuedJWTSecurityTest(AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE type, String flowId, boolean optionalEncryption)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static com.nimbusds.jwt.EncryptedJWTassertAndDecryptJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey)protected static voidassertEncryptedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey)protected voidassertEncryptedSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm jwsAlg, com.nimbusds.jose.JWEAlgorithm jweAlg, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey, PublicKey publicKey, PublicKey jwsValidationKey)protected voidassertEncryptedSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm jwsAlg, com.nimbusds.jose.JWEAlgorithm jweAlg, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PublicKey jwsValidationKey)protected voidassertNoJwtResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)protected voidassertNoJwtResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)protected voidassertNoJwtResponse(String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)protected voidassertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, String clientSecret)protected voidassertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey)protected voidassertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey, String clientSecret)protected com.nimbusds.jwt.JWTobtainAccessTokenFromAuthorizeEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)protected com.nimbusds.jwt.JWTobtainIdTokenFromAuthorizeEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)protected com.nimbusds.jwt.JWTobtainIdTokenFromTokenEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)protected com.nimbusds.jwt.JWTobtainJwt(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)protected com.nimbusds.jwt.JWTobtainJwt(String clientSecret, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)protected com.nimbusds.jwt.JWTobtainJwt(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)protected com.nimbusds.jwt.JWTobtainJwt(String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)protected com.nimbusds.jwt.JWTobtainJwtAccessTokenFromTokenEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)com.nimbusds.jwt.JWTobtainUserInfoAsJwt(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)com.nimbusds.openid.connect.sdk.UserInfoSuccessResponseobtainUserInfoResponse(String clientId, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)com.nimbusds.openid.connect.sdk.UserInfoSuccessResponseobtainUserInfoResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)protected com.nimbusds.jwt.JWTparseEncryptedOrSignedJWT(String input)-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
assertErrorCode, assertErrorDescriptionContains, buildJsonForLegacyToken, buildJWKSet, buildMetadataSkeleton, buildToken, buildToken, buildToken, createEncryptedJWT, createEncryptedJWT, createEncryptedJWT, createPrivateKeyJWT, createPrivateKeyJWT, createPrivateKeyJWT, createSecretJWT, createSecretJWT, generateNewKeyPair, generateNewKeyPair, getDataSealer, initializeECKey, initializeMocks, initializeThreadLocals, initKeys, loadCredential, loadEncryptionCredential, loadES384SigningCredential, loadES512SigningCredential, loadESSigningCredential, loadRSSigningCredential, parseErrorResponse, parseResponse, parseSuccessResponse, removeMetadata, setBasicAuth, setHttpFormRequest, setHttpFormRequest, setJsonRequest, setRequest, setRequest, storeConsent, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadataObject
-
Methods inherited from class net.shibboleth.idp.test.flows.AbstractFlowTest
assertFlowExecutionOutcome, assertFlowExecutionOutcome, assertFlowExecutionResult, assertProfileRequestContext, buildSOAP11Envelope, clearThreadLocals, getFlow, initializeFlowExecutor, initializeXMLObjectSupport, overrideEndStateOutput, overrideEndStateOutput, registerFlowsInParentRegistry, retrieveProfileRequestContext, setupDirectoryServer, teardownDirectoryServer
-
Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
-
-
-
-
Field Detail
-
defaultClientId
String defaultClientId
-
defaultClientIdEncryptionEnforced
String defaultClientIdEncryptionEnforced
-
defaultClientSecret
String defaultClientSecret
-
defaultClientSecret64B
String defaultClientSecret64B
-
fetchingType
protected final AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType
-
encryptionOptional
protected final boolean encryptionOptional
-
-
Constructor Detail
-
AbstractIssuedJWTSecurityTest
protected AbstractIssuedJWTSecurityTest(AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE type, String flowId)
-
AbstractIssuedJWTSecurityTest
protected AbstractIssuedJWTSecurityTest(AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE type, String flowId, boolean optionalEncryption)
-
-
Method Detail
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(String clientSecret, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)
-
assertSignedJwt
protected void assertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, String clientSecret)
-
assertSignedJwt
protected void assertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey)
-
assertSignedJwt
protected void assertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey, String clientSecret)
-
assertEncryptedJwt
protected static void assertEncryptedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey)
-
assertAndDecryptJwt
protected static com.nimbusds.jwt.EncryptedJWT assertAndDecryptJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey)
-
assertEncryptedSignedJwt
protected void assertEncryptedSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm jwsAlg, com.nimbusds.jose.JWEAlgorithm jweAlg, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PublicKey jwsValidationKey)
-
assertEncryptedSignedJwt
protected void assertEncryptedSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm jwsAlg, com.nimbusds.jose.JWEAlgorithm jweAlg, com.nimbusds.jose.EncryptionMethod method, String clientSecret, PrivateKey privateKey, PublicKey publicKey, PublicKey jwsValidationKey)
-
assertNoJwtResponse
protected void assertNoJwtResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)
-
assertNoJwtResponse
protected void assertNoJwtResponse(String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)
-
assertNoJwtResponse
protected void assertNoJwtResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method, AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE fetchingType)
-
obtainUserInfoResponse
public com.nimbusds.openid.connect.sdk.UserInfoSuccessResponse obtainUserInfoResponse(String clientId, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
-
obtainUserInfoResponse
public com.nimbusds.openid.connect.sdk.UserInfoSuccessResponse obtainUserInfoResponse(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)
-
obtainUserInfoAsJwt
public com.nimbusds.jwt.JWT obtainUserInfoAsJwt(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod encryptionMethod)
-
obtainIdTokenFromTokenEndpoint
protected com.nimbusds.jwt.JWT obtainIdTokenFromTokenEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)
-
obtainJwtAccessTokenFromTokenEndpoint
protected com.nimbusds.jwt.JWT obtainJwtAccessTokenFromTokenEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)
-
obtainIdTokenFromAuthorizeEndpoint
protected com.nimbusds.jwt.JWT obtainIdTokenFromAuthorizeEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)
-
obtainAccessTokenFromAuthorizeEndpoint
protected com.nimbusds.jwt.JWT obtainAccessTokenFromAuthorizeEndpoint(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)
-
parseEncryptedOrSignedJWT
protected com.nimbusds.jwt.JWT parseEncryptedOrSignedJWT(String input)
-
-