Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-34432 negative testcase #790

Merged
merged 26 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
50daf9d
negative testcase
Jul 29, 2024
7189684
negative testcases
Jul 30, 2024
8223e00
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 5, 2024
f1d2470
Negative Testcases
Aug 5, 2024
845c42f
Merge branch 'develop-pmp-revamp' of https://github.com/likhitharl/pa…
Aug 5, 2024
fc2fd02
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 6, 2024
406291f
Merge branch 'develop-pmp-revamp' of https://github.com/likhitharl/pa…
Aug 6, 2024
aa250f2
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 20, 2024
ec6cbde
Merge branch 'develop-pmp-revamp' of https://github.com/likhitharl/pa…
Aug 20, 2024
a9b3eed
negative testcases
Aug 20, 2024
6ad174e
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 26, 2024
7f1e6b0
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 27, 2024
a7959c8
negative testcase
Aug 27, 2024
e1ea6e4
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 28, 2024
f62cc8a
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 29, 2024
740d0a6
MOSIP-34432
Aug 29, 2024
a9ef876
MOSIP-34432
Aug 29, 2024
d1fc4e6
MOSIP-34432
Aug 29, 2024
1eb5b5f
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Aug 30, 2024
b56e957
Merge branch 'develop-pmp-revamp' of https://github.com/likhitharl/pa…
Aug 30, 2024
2c17e35
MOSIP-34432 negative testcase
Aug 30, 2024
0d78987
MOSIP-34432 negative testcases
Sep 2, 2024
fa1e038
MOSIP-34432 negative testcases
Sep 2, 2024
fe017fe
Merge branch 'mosip:develop-pmp-revamp' into develop-pmp-revamp
likhitharl Sep 5, 2024
1d5fcdb
MOSIP-34432-resolve conflicts
Sep 23, 2024
c693a7e
Merge remote-tracking branch 'upstream/develop-pmp-revamp' into devel…
Sep 23, 2024
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
56 changes: 28 additions & 28 deletions apitest/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,17 @@ AuthClientID = mosip-resident-client

#---------------------------------- Client Secret Keys -----------------------#
#-- When test rig ran in docker, these values dervied from the environment ---#
mosip_partner_client_secret =
mosip_pms_client_secret =
mosip_resident_client_secret =
mosip_idrepo_client_secret =
mosip_reg_client_secret =
mosip_admin_client_secret =
mosip_hotlist_client_secret =
mosip_regproc_client_secret =
mpartner_default_mobile_secret =
mosip_testrig_client_secret =
AuthClientSecret =
mosip_partner_client_secret = vXS7WUyPDpfWYuoz
mosip_pms_client_secret = qG3eE2aRzbIwLX01
mosip_resident_client_secret = N4xRICdDT4HYvo21
mosip_idrepo_client_secret = oQXHRL4UsgKxlVaU
mosip_reg_client_secret = bCR3Xviw9EPPlpUv
mosip_admin_client_secret = uuQoXFn2FT5OKMOr
mosip_hotlist_client_secret = Gh0VQLBVAagN1qrD
mosip_regproc_client_secret = rOE0Tx44C4HJ05qi
mpartner_default_mobile_secret = WqzUI7CYDXw6DVTV
mosip_testrig_client_secret = XfrFYmV9ENVXGDUq
AuthClientSecret = N4xRICdDT4HYvo21



Expand All @@ -158,7 +158,7 @@ s3-account = automation
s3-region = null
reportExpirationInDays = 3
s3-account-for-persona-data = personaData
push-reports-to-s3 = yes
push-reports-to-s3 = no


#-------------------- Keycloak User Creation proprties ----------------------#
Expand All @@ -168,17 +168,17 @@ new_Resident_Password = mosip123
new_Resident_Role = default-roles-mosip,PARTNER_ADMIN
roles.111995 = PARTNER_ADMIN,default-roles-mosip
keycloak_UserName = admin
keycloak_Password =
keycloak-external-url = https://iam.qa-platform1.mosip.net
keycloak_Password = 3Bj8VPUruV
keycloak-external-url = https://iam.dev1.mosip.net
keycloak-realm-id = mosip
iam-users-to-create = 111997,111998,220005,111992,globaladmin,111887,111999
iam-users-password = mosip123,mosip123,mosip123,mosip123,mosip123,mosip123,mosip123
roles.220005 = GLOBAL_ADMIN,ID_AUTHENTICATION,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN
roles.111997 = AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_SUPERVISOR
roles.111887 = AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,REGISTRATION_SUPERVISOR
roles.111998 = POLICYMANAGER
roles.111992 = GLOBAL_ADMIN
iam-users-to-create=111997,111998,220005,111992,globaladmin,111999,111887
iam-users-password=mosip123,mosip123,mosip123,mosip123,mosip123,mosip123,mosip123
roles.220005=GLOBAL_ADMIN,ID_AUTHENTICATION,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN
roles.111997=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_SUPERVISOR
roles.111999=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_SUPERVISOR
roles.111887=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,REGISTRATION_SUPERVISOR
roles.111998=POLICYMANAGER
roles.111992=GLOBAL_ADMIN
roles.globaladmin = GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip


Expand All @@ -189,27 +189,27 @@ pool_size=1
dialect=org.hibernate.dialect.PostgreSQLDialect
show_sql=true
current_session_context_class=thread
audit_url=jdbc:postgresql://qa-platform1.mosip.net:5432/mosip_audit
audit_url=jdbc:postgresql://dev1.mosip.net:5432/mosip_audit
audit_username=postgres
audit_password=
audit_password=aRWP1G52uu
audit_default_schema=audit
DB_PORT=
installation-domain=
partner_url=jdbc:postgresql://qa-platform1.mosip.net:5432/mosip_ida
partner_url=jdbc:postgresql://dev1.mosip.net:5432/mosip_ida
partner_username=postgres
partner_password=
partner_password=aRWP1G52uu
partner_default_schema=partner
reportLogPath=automationLogAndReport
postgresqlUser=postgresql
db-port=5432
db-server=qa-platform1.mosip.net
db-server=dev1.mosip.net
hibernate.connection.driver_class=org.postgresql.Driver
hibernate.connection.pool_size=1
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.current_session_context_class=thread
db-su-user=postgres
postgres-password=
postgres-password=aRWP1G52uu
pms_db_schema=pms
km_db_schema=keymgr
master_db_schema=master
Expand All @@ -226,7 +226,7 @@ mountPath=/home/mosip/mountvolume
# supported values "S-scnearioNumber" for server side and "A-scnearioNumber" for automation
scenariosToSkip=
# Add scenarios to include in the the execution list
# if we want to execute all the scenarios---
# Empty if we want to execute all the scenarios---
scenariosToExecute=
# supported values yes or no
useExternalScenarioSheet=yes
Expand Down
189 changes: 189 additions & 0 deletions apitest/src/main/resources/pms/OIDCClient/OIDCClient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,193 @@ CreateOIDCClient:
output: '{
"clientId": "$IGNORE$",
"status": "ACTIVE"
}'
Pms_CreateOIDCClient_invalid_policyID:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89767",
"policyId": "fgdggh",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_PRT_073"
}'
Pms_CreateOIDCClient_invalid_logoUri:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_COR_001"
}'
Pms_CreateOIDCClient_invalid_RedirectUri:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$abcdefg",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "invalid_redirect_uri"
}'
Pms_CreateOIDCClient_without_token:
endPoint: /v1/partnermanager/oauth/client
role:
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "KER-ATH-401"
}'
Pms_CreateOIDCClient_without_publickey:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$REMOVE$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_COR_00"
}'
Pms_CreateOIDCClient_invalid_granttypes:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "hghghgg",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "invalid_grant_type"
}'
Pms_CreateOIDCClient_without_granttypes:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "$REMOVE$",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_COR_001"
}'
Pms_CreateOIDCClient_without_name:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "$REMOVE$",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "$JWKKEY$",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_COR_001"
}'
Pms_CreateOIDCClient_invalid_publickey:
endPoint: /v1/partnermanager/oauth/client
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/OIDCClient/oIDCClient
outputTemplate: pms/error
input: '{
"requestTime": "$TIMESTAMP$",
"name": "OIDC TEST CLIENT 89766",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_pms_sid_id$",
"publicKey": "dhghfgfyt",
"authPartnerId": "111999",
"logoUri": "https://health-services.com/logo.png",
"redirectUris": "$IDPREDIRECTURI$",
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errorCode": "PMS_COR_001"
}'
Loading