Class RequestObjectJWSTest
- 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.IssuedSignedJWTTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.RequestObjectJWSTest
-
- All Implemented Interfaces:
Aware,ApplicationContextAware,org.testng.IHookable,org.testng.ITestNGListener
public class RequestObjectJWSTest extends IssuedSignedJWTTest
-
-
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) StringdefaultClientIdSigningEnforcedprivate booleansigningOptional-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
defaultClientId, defaultClientIdEncryptionEnforced, 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 RequestObjectJWSTest(boolean optionalSigning)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertErrorRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, String clientSecret, PublicKey publicKey)protected voidassertExcludedAlgorithm(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)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 voidassertSignedJwt(com.nimbusds.jwt.JWT jwt, com.nimbusds.jose.JWSAlgorithm algorithm, PublicKey publicKey, String clientSecret)protected voidassertSuccessRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, String clientSecret, PublicKey publicKey)protected static PrivateKeygetSigningKey(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)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.JWTobtainRequestObject(String clientSecret, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm)protected static com.nimbusds.jwt.JWTprocessJwsForRequestObject(com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, String payload, String clientSecret, PrivateKey signingKey)voidtestJwtSecurity_jwtSigAlgAndEncNotSpecified()-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.IssuedSignedJWTTest
testJwtSecurity_jwtES256SigAlgAndEncNotSpecified, testJwtSecurity_jwtES384SigAlgAndEncNotSpecified, testJwtSecurity_jwtES512SigAlgAndEncNotSpecified, testJwtSecurity_jwtHS256SigAlgAndEncNotSpecified_32BKey, testJwtSecurity_jwtHS256SigAlgAndEncNotSpecified_64BKey, testJwtSecurity_jwtHS256SigAlgAndEncNotSpecified_NoKey, testJwtSecurity_jwtHS384SigAlgAndEncNotSpecified_32BKey, testJwtSecurity_jwtHS384SigAlgAndEncNotSpecified_64BKey, testJwtSecurity_jwtHS384SigAlgAndEncNotSpecified_NoKey, testJwtSecurity_jwtHS512SigAlgAndEncNotSpecified_32BKey, testJwtSecurity_jwtHS512SigAlgAndEncNotSpecified_64BKey, testJwtSecurity_jwtHS512SigAlgAndEncNotSpecified_NoKey, testJwtSecurity_jwtPS256SigAlgAndEncNotSpecified, testJwtSecurity_jwtPS384SigAlgAndEncNotSpecified, testJwtSecurity_jwtPS512SigAlgAndEncNotSpecified, testJwtSecurity_jwtRS256SigAlgAndEncNotSpecified, testJwtSecurity_jwtRS384SigAlgAndEncNotSpecified, testJwtSecurity_jwtRS512SigAlgAndEncNotSpecified
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractIssuedJWTSecurityTest
assertAndDecryptJwt, assertEncryptedJwt, assertEncryptedSignedJwt, assertEncryptedSignedJwt, assertNoJwtResponse, assertNoJwtResponse, assertSignedJwt, assertSignedJwt, obtainAccessTokenFromAuthorizeEndpoint, obtainIdTokenFromAuthorizeEndpoint, obtainIdTokenFromTokenEndpoint, 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
-
defaultClientIdSigningEnforced
String defaultClientIdSigningEnforced
-
signingOptional
private final boolean signingOptional
-
-
Method Detail
-
testJwtSecurity_jwtSigAlgAndEncNotSpecified
public void testJwtSecurity_jwtSigAlgAndEncNotSpecified() throws Exception- Overrides:
testJwtSecurity_jwtSigAlgAndEncNotSpecifiedin classIssuedSignedJWTTest- Throws:
Exception
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
- Overrides:
obtainJwtin classAbstractIssuedJWTSecurityTest
-
obtainJwt
protected com.nimbusds.jwt.JWT obtainJwt(String clientSecret, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
- Overrides:
obtainJwtin classAbstractIssuedJWTSecurityTest
-
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)
- Overrides:
assertNoJwtResponsein classAbstractIssuedJWTSecurityTest
-
assertExcludedAlgorithm
protected void assertExcludedAlgorithm(String clientId, String clientSecret, PublicKey publicKey, com.nimbusds.jose.JWSAlgorithm jwsAlgorithm) throws ParseException, DataSealerException, IOException
- Overrides:
assertExcludedAlgorithmin classIssuedSignedJWTTest- Throws:
ParseExceptionDataSealerExceptionIOException
-
assertErrorRequestObjectResponse
protected void assertErrorRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, String clientSecret, PublicKey publicKey)
-
assertSuccessRequestObjectResponse
protected void assertSuccessRequestObjectResponse(String requestObject, com.nimbusds.jose.JWSAlgorithm requestObjectSigAlg, String clientSecret, PublicKey publicKey)
-
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, com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm)
-
getSigningKey
protected static PrivateKey getSigningKey(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
-
processJwsForRequestObject
protected static com.nimbusds.jwt.JWT processJwsForRequestObject(com.nimbusds.jose.JWSAlgorithm storedJwsAlgorithm, String payload, String clientSecret, PrivateKey signingKey)
-
-