Class RequestObjectJWETest
- 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
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.IssuedEncryptedJWTTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.RequestObjectJWETest
-
- All Implemented Interfaces:
Aware,ApplicationContextAware,org.testng.IHookable,org.testng.ITestNGListener
public class RequestObjectJWETest extends IssuedEncryptedJWTTest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
AbstractIssuedJWTSecurityTest.JWT_FETCHING_TYPE
-
-
Field Summary
Fields Modifier and Type Field Description (package private) StringdefaultClientIdEncryptionEnforced-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.IssuedEncryptedJWTTest
ENCRYPTION_METHODS, JWE_ALGORITHMS, JWS_ALGORITHMS, testSignedJwt
-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
defaultClientId, defaultClientSecret, defaultClientSecret64B, encryptionOptional, fetchingType
-
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 Constructor Description RequestObjectJWETest(boolean testSigned, boolean encryptionOptional)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 voidassertErrorRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, com.nimbusds.jose.JWEAlgorithm requestObjectEncAlg, com.nimbusds.jose.EncryptionMethod requestObjectEncMethod, String clientSecret, PublicKey publicKey)protected voidassertExcludedAlgorithm(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)protected voidassertNoPublicKeyResponse(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)protected voidassertNoSymmetricKeyResponse(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)protected voidassertPublicKeyBasedEncryption(PublicKey publicKey, PrivateKey privateKey, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)protected voidassertSecretBasedEncryption(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)protected voidassertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey, String clientSecret)protected voidassertSuccessRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, com.nimbusds.jose.JWEAlgorithm requestObjectEncAlg, com.nimbusds.jose.EncryptionMethod requestObjectEncMethod, String clientSecret, PublicKey publicKey)protected PublicKeygetProviderEncryptionKey(com.nimbusds.jose.JWEAlgorithm jweAlgorithm)protected PublicKeygetProviderEncryptionKeyViaKeyType(PublicKey publicKey)protected PublicKeygetRandomEncryptionKey(com.nimbusds.jose.JWEAlgorithm jweAlgorithm)protected com.nimbusds.jwt.JWTobtainRequestObject(String clientSecret, PublicKey publicKey, PrivateKey signingKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)protected com.nimbusds.jwt.JWTprocessJwsForRequestObject(com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, String payload, String clientSecret, PrivateKey signingKey)voidtestJwtEncryption_noSigAlgNorEncSpecified()voidtestJwtEncryption_noSigAlgNorEncSpecified_encryptedRequestObject()voidtestJwtEncryption_noSigAlgNorEncSpecified_noRequestObject()voidtestJwtEncryption_noSigAlgNorEncSpecified_signedRequestObject()voidtestRequestObjectEncryption_onlySigAlgNoEncSpecified()-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.IssuedEncryptedJWTTest
getSignatureVerificationKey, getSigningKey, testJwtEncryption_a128gcmkwWithEnabledMethods, testJwtEncryption_a128gcmkwWithExcludedMethod, testJwtEncryption_a128kwWithEnabledMethods, testJwtEncryption_a128kwWithExcludedMethod, testJwtEncryption_a192gcmkwWithEnabledMethods, testJwtEncryption_a192gcmkwWithExcludedMethod, testJwtEncryption_a192kwWithEnabledMethods, testJwtEncryption_a192kwWithExcludedMethod, testJwtEncryption_a256gcmkwWithEnabledMethods, testJwtEncryption_a256gcmkwWithExcludedMethod, testJwtEncryption_a256kwWithEnabledMethods, testJwtEncryption_a256kwWithExcludedMethod, testJwtEncryption_ecdh128kwWithEnabledMethods, testJwtEncryption_ecdh128kwWithExcludedMethod, testJwtEncryption_ecdh192kwWithEnabledMethods, testJwtEncryption_ecdh192kwWithExcludedMethod, testJwtEncryption_ecdh256kwWithEnabledMethods, testJwtEncryption_ecdh256kwWithExcludedMethod, testJwtEncryption_ecdhWithEnabledMethods, testJwtEncryption_ecdhWithExcludedMethod, testJwtEncryption_publicKeyEncryption_noKey, testJwtEncryption_rsa15WithEnabledMethods, testJwtEncryption_rsa15WithExcludedMethod, testJwtEncryption_rsaOaep256WithEnabledMethods, testJwtEncryption_rsaOaep256WithExcludedMethod, testJwtEncryption_rsaOaep384WithEnabledMethods, testJwtEncryption_rsaOaep384WithExcludedMethod, testJwtEncryption_rsaOaep512WithEnabledMethods, testJwtEncryption_rsaOaep512WithExcludedMethod, testJwtEncryption_rsaOaepWithEnabledMethods, testJwtEncryption_rsaOaepWithExcludedMethod, testJwtEncryption_symmetricKeyEncryption_noKey
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
assertAndDecryptJwt, assertEncryptedJwt, assertEncryptedSignedJwt, assertNoJwtResponse, assertNoJwtResponse, assertNoJwtResponse, assertSignedJwt, assertSignedJwt, obtainAccessTokenFromAuthorizeEndpoint, obtainIdTokenFromAuthorizeEndpoint, obtainIdTokenFromTokenEndpoint, obtainJwt, obtainJwt, obtainJwt, obtainJwt, obtainJwtAccessTokenFromTokenEndpoint, obtainUserInfoAsJwt, obtainUserInfoResponse, obtainUserInfoResponse, parseEncryptedOrSignedJWT
-
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
-
defaultClientIdEncryptionEnforced
String defaultClientIdEncryptionEnforced
-
-
Method Detail
-
testJwtEncryption_noSigAlgNorEncSpecified
public void testJwtEncryption_noSigAlgNorEncSpecified() throws Exception- Overrides:
testJwtEncryption_noSigAlgNorEncSpecifiedin classIssuedEncryptedJWTTest- Throws:
Exception
-
testJwtEncryption_noSigAlgNorEncSpecified_noRequestObject
public void testJwtEncryption_noSigAlgNorEncSpecified_noRequestObject() throws Exception- Throws:
Exception
-
testJwtEncryption_noSigAlgNorEncSpecified_signedRequestObject
public void testJwtEncryption_noSigAlgNorEncSpecified_signedRequestObject() throws Exception- Throws:
Exception
-
testJwtEncryption_noSigAlgNorEncSpecified_encryptedRequestObject
public void testJwtEncryption_noSigAlgNorEncSpecified_encryptedRequestObject() throws Exception- Throws:
Exception
-
testRequestObjectEncryption_onlySigAlgNoEncSpecified
public void testRequestObjectEncryption_onlySigAlgNoEncSpecified() throws Exception- Throws:
Exception
-
assertSecretBasedEncryption
protected void assertSecretBasedEncryption(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)- Overrides:
assertSecretBasedEncryptionin classIssuedEncryptedJWTTest
-
getProviderEncryptionKeyViaKeyType
protected PublicKey getProviderEncryptionKeyViaKeyType(PublicKey publicKey)
-
getRandomEncryptionKey
protected PublicKey getRandomEncryptionKey(com.nimbusds.jose.JWEAlgorithm jweAlgorithm)
-
getProviderEncryptionKey
protected PublicKey getProviderEncryptionKey(com.nimbusds.jose.JWEAlgorithm jweAlgorithm)
-
assertPublicKeyBasedEncryption
protected void assertPublicKeyBasedEncryption(PublicKey publicKey, PrivateKey privateKey, com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)
- Overrides:
assertPublicKeyBasedEncryptionin classIssuedEncryptedJWTTest
-
assertNoSymmetricKeyResponse
protected void assertNoSymmetricKeyResponse(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method) throws Exception- Overrides:
assertNoSymmetricKeyResponsein classIssuedEncryptedJWTTest- Throws:
Exception
-
assertExcludedAlgorithm
protected void assertExcludedAlgorithm(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)- Overrides:
assertExcludedAlgorithmin classIssuedEncryptedJWTTest
-
assertNoPublicKeyResponse
protected void assertNoPublicKeyResponse(com.nimbusds.jose.JWEAlgorithm jweAlgorithm, com.nimbusds.jose.EncryptionMethod method)- Overrides:
assertNoPublicKeyResponsein classIssuedEncryptedJWTTest
-
assertErrorRequestObjectResponse
protected void assertErrorRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, com.nimbusds.jose.JWEAlgorithm requestObjectEncAlg, com.nimbusds.jose.EncryptionMethod requestObjectEncMethod, String clientSecret, PublicKey publicKey)
-
assertSuccessRequestObjectResponse
protected void assertSuccessRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, com.nimbusds.jose.JWEAlgorithm requestObjectEncAlg, com.nimbusds.jose.EncryptionMethod requestObjectEncMethod, String clientSecret, PublicKey publicKey)
-
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)- Overrides:
assertEncryptedSignedJwtin classAbstractIssuedJWTSecurityTest
-
assertSignedJwt
protected void assertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey, String clientSecret)- Overrides:
assertSignedJwtin classAbstractIssuedJWTSecurityTest
-
obtainRequestObject
protected com.nimbusds.jwt.JWT obtainRequestObject(String clientSecret, PublicKey publicKey, PrivateKey signingKey, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, com.nimbusds.jose.JWEAlgorithm storedJweAlgorithm, com.nimbusds.jose.EncryptionMethod storedJweMethod)
-
processJwsForRequestObject
protected com.nimbusds.jwt.JWT processJwsForRequestObject(com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, String payload, String clientSecret, PrivateKey signingKey)
-
-