From 3cba572b67a83fd809910e8b8e726e4b71980dea Mon Sep 17 00:00:00 2001 From: "Mahesh.Binayak" Date: Fri, 17 Jan 2025 15:19:04 +0530 Subject: [PATCH] [MOSIP-38435]Added support for authentication (keycloak) in mock-plugin. Signed-off-by: Mahesh.Binayak --- default.sh | 2 ++ onboarding.postman_collection.json | 46 ++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/default.sh b/default.sh index f47a757..58ec30b 100644 --- a/default.sh +++ b/default.sh @@ -308,6 +308,7 @@ onboard_mock_relying_party_with_mock_rp_oidc_client(){ --folder partner_request_mapping_to_policyname \ --folder approve-partner-mapping-to-policy \ --folder get-jwks \ + --folder keycloak-authentication-for-mock-plugin \ --folder create-oidc-client \ --folder create-oidc-client-through-esignet \ --folder delete-user \ @@ -520,6 +521,7 @@ onboard_esignet_signup_oidc_partner(){ --env-var oidc-clientid="$OIDC_CLIENTID" \ --folder 'create_keycloak_user' \ --folder authenticate-to-upload-certs \ + --folder keycloak-authentication-for-mock-plugin \ --folder create-oidc-client-through-esignet-signup \ --folder delete-user \ $ADD_SSL_NEWMAN \ diff --git a/onboarding.postman_collection.json b/onboarding.postman_collection.json index dad716d..a7af507 100644 --- a/onboarding.postman_collection.json +++ b/onboarding.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "db876b6f-3b70-4a09-abf8-e4a42dd64e17", + "_postman_id": "40683dc0-a030-404d-9a8d-e3e78ffd120b", "name": "onboarding Copy", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "12620596" @@ -2705,6 +2705,48 @@ }, "response": [] }, + { + "name": "keycloak-authentication-for-mock-plugin", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "client_id", + "value": "mosip-pms-client", + "type": "text" + }, + { + "key": "client_secret", + "value": "{{module-secretkey}}", + "type": "text" + }, + { + "key": "grant_type", + "value": "client_credentials", + "type": "text" + } + ] + }, + "url": { + "raw": "{{keycloak-url}}/auth/realms/mosip/protocol/openid-connect/token", + "host": [ + "{{keycloak-url}}" + ], + "path": [ + "auth", + "realms", + "mosip", + "protocol", + "openid-connect", + "token" + ] + } + }, + "response": [] + }, { "name": "create-oidc-client", "event": [ @@ -3328,4 +3370,4 @@ } } ] -} +} \ No newline at end of file