Skip to content

Commit

Permalink
Merge pull request #1093 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-29513
  • Loading branch information
lsivanand authored Sep 27, 2023
2 parents cb88eb7 + a0d7f13 commit 8cf98de
Show file tree
Hide file tree
Showing 5 changed files with 379 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,10 @@ else if (testCaseName.contains("_Invalid_JwkHeader_"))
jwkHeader = RSAKey.parse(getJWKKey(oidcJWK2)).toPublicJWK();
else if (testCaseName.contains("_Invalid_Aud_"))
tempUrl = "sdfaf";
else if (testCaseName.contains("_Empty_Aud_"))
tempUrl = "";
else if (testCaseName.contains("_SpaceVal_Aud_"))
tempUrl = " ";
else if (testCaseName.contains("_Invalid_Iss_"))
clientId = "sdfdsg";
else if (testCaseName.contains("_Invalid_Exp_"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,4 +591,103 @@ AuthenticateUserVCINegTC:
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_uin_Otp_NegAuthCodeScen5_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_uin_Otp_NegAuthCodeScen6_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_uin_Otp_NegAuthCodeScen7_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCINegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_Valid_Params_VCI_uin_Inv_Scen_smoke_Pos_UIN$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,70 @@ AuthorizationCodeVCINegTC:
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegCredScen9_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_uin_SpaceVal_Scope:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen5_Valid_Smoke_sid_transactionId$",
"permittedAuthorizeScopes": [{scope: " "}]
}'
output: '{
"errors": [
{
"errorCode": "invalid_permitted_scope"
}
]
}'

ESignet_AuthorizationCode_VCI_uin_Empty_Claim_Neg:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen6_Valid_Smoke_sid_transactionId$",
"acceptedClaims": [{claim: ""}]
}'
output: '{
"errors": [
{
"errorCode": "invalid_accepted_claim"
}
]
}'

ESignet_AuthorizationCode_VCI_uin_spaceVal_Claim_Neg:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_uin_NegAuthCodeScen7_Valid_Smoke_sid_transactionId$",
"acceptedClaims": [{claim: " "}]
}'
output: '{
"errors": [
{
"errorCode": "invalid_accepted_claim"
}
]
}'
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,48 @@ GetCredentialNegTC:
"error":"invalid_proof"
}'

ESignet_GetCredential_uin_IdpAccessToken_Empty_Aud_Neg:
endPoint: /v1/esignet/vci/credential
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/GetCredential/GetCredential
outputTemplate: esignet/error2
input: '{
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"idpAccessToken": "$ID:GenerateTokenVCI_uin_NegCredScen9_Smoke_sid_access_token$",
"format": "ldp_vc",
"type": [{types: "VerifiableCredential"}, {types: "MOSIPVerifiableCredential"}],
"@context": [{context: "$VCICONTEXTURL$"}],
"proof_type": "jwt",
"proof_jwt": "$PROOFJWT$"
}'
output: '{
"error":"invalid_proof"
}'

ESignet_GetCredential_uin_IdpAccessToken_SpaceVal_Aud_Neg:
endPoint: /v1/esignet/vci/credential
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCINegTC/GetCredential/GetCredential
outputTemplate: esignet/error2
input: '{
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"idpAccessToken": "$ID:GenerateTokenVCI_uin_NegCredScen9_Smoke_sid_access_token$",
"format": "ldp_vc",
"type": [{types: "VerifiableCredential"}, {types: "MOSIPVerifiableCredential"}],
"@context": [{context: "$VCICONTEXTURL$"}],
"proof_type": "jwt",
"proof_jwt": "$PROOFJWT$"
}'
output: '{
"error":"invalid_proof"
}'

ESignet_GetCredential_uin_IdpAccessToken_Invalid_Iss_Neg:
endPoint: /v1/esignet/vci/credential
role: resident
Expand Down
Loading

0 comments on commit 8cf98de

Please sign in to comment.