Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public static void main(String[] arg) {
// Thread trigger = new Thread(healthcheck);
// trigger.start();

AdminTestUtil.fetchAndStoreCsrfToken();

if (EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("mockauthenticationservice") == false
&& EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("sunbirdrcauthenticationservice") == false) {
Expand Down Expand Up @@ -141,8 +142,6 @@ public static void main(String[] arg) {
EsignetUtil.testCasesInRunScope = DependencyResolver.getDependencies(testCasesToExecuteString);
}

AdminTestUtil.fetchAndStoreCsrfToken();

startTestRunner();

// Used for generating the test case interdependency JSON file
Expand All @@ -166,8 +165,6 @@ public static void main(String[] arg) {
EsignetUtil.testCasesInRunScope = DependencyResolver.getDependencies(testCasesToExecuteString);
}

AdminTestUtil.fetchAndStoreCsrfToken();

startTestRunner();

// Used for generating the test case interdependency JSON file
Expand All @@ -189,8 +186,6 @@ public static void main(String[] arg) {
EsignetUtil.testCasesInRunScope = DependencyResolver.getDependencies(testCasesToExecuteString);
}

AdminTestUtil.fetchAndStoreCsrfToken();

startTestRunner();

// Used for generating the test case interdependency JSON file
Expand Down
3 changes: 2 additions & 1 deletion api-test/src/main/resources/config/pmsDataDeleteQueries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ delete from partner_policy_credential_type where cr_by='${currentModule}-111997'
delete from partner_policy WHERE policy_id IN (SELECT id FROM auth_policy WHERE cr_by = '${currentModule}-111997')
delete from auth_policy where cr_by='${currentModule}-111997'
delete from auth_policy WHERE policy_group_id IN (SELECT id FROM policy_group WHERE cr_by='${currentModule}-111997')
delete from policy_group WHERE cr_by='${currentModule}-111997'
delete from policy_group WHERE cr_by='${currentModule}-111997'
delete from partner WHERE cr_by='${currentModule}-111997'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AuthCodeConsentNoCapture:
ESignet_AuthorizationCode_ConsentNoCapture_Smoke_sid:
endPoint: /v1/esignet/authorization/auth-code
uniqueIdentifier: TC_ESignet_AuthorizationCodeVerifiedClaims_01
description: Authorization code request for end to end flow
description: Validate successful authorization code generation for Consent No Capture flow using verified claims in an end to end OAuth flow
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ AuthenticateConsentNoCapture:
ESignet_AuthenticateConsentNoCapture_AuthToken_Xsrf__Smoke:
endPoint: /v1/esignet/authorization/v3/authenticate
uniqueIdentifier: TC_ESignet_AuthenticateConsentNoCapture_01
description: Authenticate user using OTP for Consent No Capture flow and initiate OTP delivery across configured channels
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GenTokenConsentNoCapture:
ESignet_GenerateToken_ConsentNoCapture_Valid_Smoke_sid:
endPoint: $GETENDPOINTFROMWELLKNOWN$
uniqueIdentifier: TC_ESignet_GenTokenConsentNoCapture_01
description: Generate token with all valid details UIN for user info
description: Verify successful token generation for Consent No Capture flow using authorization code grant
role: resident
restMethod: post
validityCheckRequired: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"grant_type": "{{grant_type}}",
"code": "{{code}}",
"client_id": "{{client_id}}",
"client_assertion_type": "{{client_assertion_type}}",
"client_assertion": "{{client_assertion}}",
"redirect_uri": "{{redirect_uri}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
GenTokenConsentNoCaptureNegTC:
ESignet_GenerateToken_ConsentNoCapture_InvalidRedirectUri_Neg:
endPoint: $GETENDPOINTFROMWELLKNOWN$
uniqueIdentifier: TC_ESignet_GenTokenConsentNoCaptureNegTC_01
description: Verify successful token generation for Consent No Capture flow using in invalid redirect uri and expect invalid request error
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/GenTokenConsentNoCaptureNegTC/GenTokenConsentNoCaptureNegTC
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_ConsentNoCapture_Smoke_sid_code$",
"client_id": "$ID:OIDCClientV3_VerifiedClaims_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_USER10_JWK$",
"redirect_uri": "$IDPREDIRECTU$"
}'
output: '{
"error": "invalid_request"
}'
ESignet_GenerateToken_ConsentNoCapture_Empty_RedirectUri_Neg:
endPoint: $GETENDPOINTFROMWELLKNOWN$
uniqueIdentifier: TC_ESignet_GenTokenConsentNoCaptureNegTC_02
description: Verify successful token generation for Consent No Capture flow using empty invalid redirect uri and expect invalid request error
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/GenTokenConsentNoCaptureNegTC/GenTokenConsentNoCaptureNegTC
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_ConsentNoCapture_Smoke_sid_code$",
"client_id": "$ID:OIDCClientV3_VerifiedClaims_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_USER10_JWK$",
"redirect_uri": "$REMOVE$"
}'
output: '{
"error": "invalid_request"
}'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ OAuthConsentNoCapture:
ESignet_OAuthDetailsRequest_NoCapture_AuthToken_Xsrf_Smoke_sid:
endPoint: /v1/esignet/authorization/v3/oauth-details
uniqueIdentifier: TC_ESignet_OAuthDetailsRequestConsentNoCapture_01
description: Get OAuth details with same claims same Client ID
description: Verify OAuth details retrieval for Consent No Capture flow using the same claims and Client ID with valid auth token and XSRF token
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"idpAccessToken": "{{idpAccessToken}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
UserInfoConsentNoCapture:
ESignet_UserInfoConsentNoCapture_IdpAccessToken_StatusCode_for_Verified_Claims_Valid_Smoke:
endPoint: /v1/esignet/oidc/userinfo
uniqueIdentifier: TC_ESignet_UserInfoConsentNoCapture_01
description: Validate user info retrieval with verified claims for Consent No Capture flow
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture
outputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCaptureResult
input: '{
"idpAccessToken": "$ID:GenerateToken_ConsentNoCapture_Valid_Smoke_sid_access_token$"
}'
output: "200"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ UserInfoConsentNoCapture:
ESignet_UserInfoConsentNoCapture_IdpAccessToken_StatusCode_for_Verified_Claims_Valid_Smoke:
endPoint: /v1/esignet/oidc/userinfo
uniqueIdentifier: TC_ESignet_UserInfoConsentNoCapture_01
description: Get OIDC user info with Verified Claims
description: Validate user info retrieval with verified claims for Consent No Capture flow
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserinfoConsentNoCapture/UserInfoConsentNoCapture
outputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserinfoConsentNoCapture/UserInfoConsentNoCaptureResult
inputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture
outputTemplate: esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCaptureResult
input: '{
"idpAccessToken": "$ID:GenerateToken_ConsentNoCapture_Valid_Smoke_sid_access_token$"
}'
Expand Down
12 changes: 11 additions & 1 deletion api-test/testNgXmlFiles/esignetSuite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -983,14 +983,24 @@
name="io.mosip.testrig.apirig.esignet.testscripts.SimplePostForAutoGenIdForUrlEncoded" />
</classes>
</test>
<test name="GenerateTokenConsentNoCaptureNegTC">
<parameter name="ymlFile"
value="esignet/OTPAuthFactorFlow/ConsentNoCapture/GenTokenConsentNoCaptureNegTC/GenTokenConsentNoCaptureNegTC.yml" />
<parameter name="idKeyName" value="access_token" />
<classes>
<class
name="io.mosip.testrig.apirig.esignet.testscripts.SimplePostForAutoGenIdForUrlEncoded" />
</classes>
</test>
<test name="UserInfoConsentNoCapture">
<parameter name="ymlFile"
value="esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture.yml" />
<classes>
<class
name="io.mosip.testrig.apirig.esignet.testscripts.GetWithParam" />
</classes>
</test>
</test>

<!-- End of end to end v3 with mock flow test cases -->

</suite>
Loading