Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into release-1.2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohandey committed Oct 17, 2023
2 parents d91c82c + 1e85c37 commit 1282f73
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ delete from pms.partner where id in ('Tech-123','MOVP','DPP','MISP','MISP2','FTP
delete from auth_policy where cr_by='partner-111997'
delete from pms.auth_policy where name in('mosip policy','mosip policy2','mosip policy3','mosip data share policy','mosip data share policy2')
delete from policy_group where cr_by='partner-111997'
delete from pms.policy_group where name in ('mosip policy group','mosip policy role testing groupp','mosip policy group2','update_policy_group','mosip policy status testing groupp with policy','mosip policy group for req key For_Req_Key_deactivaed_Policy','mosip policy group for req key For Update')
delete from pms.policy_group where name in ('mosip policy group','mosip policy role testing groupp','mosip policy group2','update_policy_group','mosip policy status testing groupp with policy')
delete from pms.misp_license where cr_by='pm_testuser'
delete from pms.misp_license where misp_id in ('MISP','MISP2')
delete from pms.ftp_chip_detail where foundational_trust_provider_id='FTP'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,64 @@ GenerateTokenVCIVidNegTC:
}'
output: '{
"error": "pkce_failed"
}'

ESignet_GenerateTokenVCI_Vid_NegCredScen1_Smoke_sid:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCIResult
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegCredScen1_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "$CODEVERIFIER$"
}'
output: '{
"token_type": "Bearer"
}'

ESignet_GenerateTokenVCI_Vid_NegCredScen2_Smoke_sid:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCIResult
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegCredScen2_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "$CODEVERIFIER$"
}'
output: '{
"token_type": "Bearer"
}'

ESignet_GenerateTokenVCI_Vid_NegCredScen3_Smoke_sid:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCIResult
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegCredScen3_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "$CODEVERIFIER$"
}'
output: '{
"token_type": "Bearer"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
GetCredentialVidNegTC:
ESignet_GetCredential_Vid_IdpAccessToken_NegCredScen1_Invalid_Format_Neg:
endPoint: /v1/esignet/vci/credential
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GetCredential/GetCredential
outputTemplate: esignet/error2
input: '{
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"idpAccessToken": "$ID:GenerateTokenVCI_Vid_NegCredScen1_Smoke_sid_access_token$",
"format": "dfsfd",
"type": [{types: "VerifiableCredential"}, {types: "MOSIPVerifiableCredential"}],
"@context": [{context: "$VCICONTEXTURL$"}],
"proof_type": "jwt",
"proof_jwt": "$PROOFJWT$"
}'
output: '{
"error":"unsupported_credential_format"
}'

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

ESignet_GetCredential_Vid_IdpAccessToken_Missing_Format_Neg:
endPoint: /v1/esignet/vci/credential
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GetCredential/GetCredential
outputTemplate: esignet/error2
input: '{
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"idpAccessToken": "$ID:GenerateTokenVCI_Vid_NegCredScen3_Smoke_sid_access_token$",
"format": "$REMOVE$",
"type": [{types: "VerifiableCredential"}, {types: "MOSIPVerifiableCredential"}],
"@context": [{context: "$VCICONTEXTURL$"}],
"proof_type": "jwt",
"proof_jwt": "$PROOFJWT$"
}'
output: '{
"error": "invalid_vc_format"
}'
Original file line number Diff line number Diff line change
Expand Up @@ -50,56 +50,168 @@ definePolicy:
"desc": "desc mosip policy",
"is_Active": false
}'
Partner_DefinePolicy_RandomTokenType_All_Valid_Smoke_sid:

Partner_DefinePolicy_All_Valid_For_Test_AuthTypeToken_Null_Neg:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/policy/DefinePolicy/definePolicyResult
outputTemplate: partner/error
input: '{
"desc": "desc mosip policy2",
"name": "mosip policy2",
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy AuthTypeToken",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": false,
"mandatory": true,
"attributeName": "string",
"authTokenType": "random",
"policyGroupName": "mosip policy group",
"authTokenType": "null",
"policyGroupName": "mosip policy group for AuthTypeToken",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"policyGroupName": "mosip policy group",
"name": "mosip policy2",
"desc": "desc mosip policy2",
"is_Active": false
"errors": [
{
"errorCode": "PMS_PV_005"
}
]
}'
Partner_DefinePolicy_PolicyTokenType_All_Valid_Smoke_sid:

Partner_DefinePolicy_All_Valid_For_Test_AuthTypeToken_Policy:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/policy/DefinePolicy/definePolicyResult
outputTemplate: partner/error
input: '{
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy AuthTypeToken",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": true,
"attributeName": "string",
"authTokenType": "Policy",
"policyGroupName": "mosip policy group for AuthTypeToken",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"errors": [
{
"errorCode": "PMS_PV_005"
}
]
}'

Partner_DefinePolicy_All_Valid_For_Test_AuthTypeToken_Invalid_Neg:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/error
input: '{
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy AuthTypeToken",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": true,
"attributeName": "string",
"authTokenType": "kjh54",
"policyGroupName": "mosip policy group for AuthTypeToken",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"errors": [
{
"errorCode": "PMS_PV_005"
}
]
}'

Partner_DefinePolicy_All_Valid_For_Test_AuthTypeToken_Blank:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/error
input: '{
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy AuthTypeToken",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": true,
"attributeName": "string",
"authTokenType": "",
"policyGroupName": "mosip policy group for AuthTypeToken",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"errors": [
{
"errorCode": "PMS_PV_005"
}
]
}'

Partner_DefinePolicy_All_Valid_For_Test_AuthTypeToken_Space:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/error
input: '{
"desc": "desc mosip policy3",
"name": "mosip policy3",
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy AuthTypeToken",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": true,
"attributeName": "string",
"authTokenType": "policy",
"authTokenType": " ",
"policyGroupName": "mosip policy group for AuthTypeToken",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"errors": [
{
"errorCode": "PMS_PV_005"
}
]
}'

Partner_DefinePolicy_RandomTokenType_All_Valid_Smoke_sid:
endPoint: /v1/policymanager/policies
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicy/definePolicy
outputTemplate: partner/policy/DefinePolicy/definePolicyResult
input: '{
"desc": "desc mosip policy2",
"name": "mosip policy2",
"authSubType": "FINGER",
"authType": "bio",
"mandatory": false,
"attributeName": "string",
"authTokenType": "random",
"policyGroupName": "mosip policy group",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"policyGroupName": "mosip policy group",
"name": "mosip policy3",
"desc": "desc mosip policy3",
"name": "mosip policy2",
"desc": "desc mosip policy2",
"is_Active": false
}'

Partner_DefinePolicy_demo_All_Valid_Smoke_sid:
endPoint: /v1/policymanager/policies
role: partner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ definePolicyGroup:
"name": "mosip policy group for req key For_Req_Key_deactivaed_Policy",
"desc": "desc mosip policy group for req key For_Req_Key_deactivaed_Policy",
"is_Active": true
}'

Partner_DefinePolicyGroup_All_Valid_Smoke_For_Test_AuthTypeToken_sid:
endPoint: /v1/policymanager/policies/group/new
role: partner
restMethod: post
inputTemplate: partner/policy/DefinePolicyGroup/definePolicyGroup
outputTemplate: partner/policy/DefinePolicyGroup/definePolicyGroupResult
input: '{
"desc": "desc mosip policy group AuthTypeToken",
"name": "mosip policy group for AuthTypeToken",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"name": "mosip policy group for AuthTypeToken",
"desc": "desc mosip policy group AuthTypeToken",
"is_Active": true
}'

Partner_DefinePolicyGroup_All_Valid_Smoke_For_updatePolicy_sid:
Expand Down
14 changes: 7 additions & 7 deletions automationtests/testNgXmlFiles/esignetSuite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,13 @@
<class name="io.mosip.testrig.apirig.testscripts.SimplePostForAutoGenIdForUrlEncoded" />
</classes>
</test>
<test name="GetCredentialVidNegTC">
<parameter name="ymlFile"
value="esignet/VCIVidNegTC/GetCredential/GetCredential.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.SimplePost" />
</classes>
</test>
<test name="WellKnownVCI">
<parameter name="ymlFile"
value="esignet/VCI/WellKnownVCI/WellKnownVCI.yml" />
Expand Down Expand Up @@ -611,13 +618,6 @@
<class name="io.mosip.testrig.apirig.testscripts.KycAuth" />
</classes>
</test>
<test name="GetCredentialVidNegTC">
<parameter name="ymlFile"
value="esignet/VCIVidNegTC/GetCredential/GetCredential.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.SimplePost" />
</classes>
</test>
<test name="LinkedSendOtp">
<parameter name="ymlFile"
value="esignet/LinkedSendOtp/LinkedSendOtp.yml" />
Expand Down

0 comments on commit 1282f73

Please sign in to comment.