From 2c4cbb5da0ba2a093a582b1d83f84d3859245b42 Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Tue, 28 Jan 2020 18:48:22 +0000 Subject: [PATCH 1/6] Add keycloak referering to PR #6376 in parse-server --- _includes/parse-server/third-party-auth.md | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index cbfcd6d5f..d890bf990 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -10,6 +10,7 @@ Parse Server supports 3rd party authentication with * Instagram * Janrain Capture * Janrain Engage +* Keycloak * LDAP * LinkedIn * Meetup @@ -189,6 +190,37 @@ Google oauth supports validation of id_token's and access_token's. } ``` +### Keycloak `authData` + +```js +{ + "keycloak": { + "access_token": "access token you got from keycloak JS client authentication", + "id": "the id retrieved from client authentication in Keycloak", + "roles": ["the roles retrieved from client authentication in Keycloak"], + "groups": ["the groups retrieved from client authentication in Keycloak"] + } +} +``` + +The authentication module will test if the authData is the same as the +userinfo oauth call, comparing the attributes + +Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) +and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server. + +The options passed to Parse server: + +```js +{ + auth: { + keycloak: { + config: require(`./auth/keycloak.json`) // Required + } + } +} +``` + ### Configuring Parse Server for LDAP The [LDAP](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol) module can check if a From 3ec97a80977d799d07bc092ffd0f2f44d0617c3f Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:45:56 +0000 Subject: [PATCH 2/6] Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <13188249+TomWFox@users.noreply.github.com> --- _includes/parse-server/third-party-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index d890bf990..0a5a422bb 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -209,7 +209,7 @@ userinfo oauth call, comparing the attributes Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server. -The options passed to Parse server: +The options passed to Parse Server: ```js { From b062820f7493bbd909f21b8e2b7fe7eb40a6d60e Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:46:22 +0000 Subject: [PATCH 3/6] Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <13188249+TomWFox@users.noreply.github.com> --- _includes/parse-server/third-party-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index 0a5a422bb..a0639a1de 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -195,7 +195,7 @@ Google oauth supports validation of id_token's and access_token's. ```js { "keycloak": { - "access_token": "access token you got from keycloak JS client authentication", + "access_token": "access token from keycloak JS client authentication", "id": "the id retrieved from client authentication in Keycloak", "roles": ["the roles retrieved from client authentication in Keycloak"], "groups": ["the groups retrieved from client authentication in Keycloak"] From a90356efc75b0de964777b277bdb31e4b31929ec Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:46:39 +0000 Subject: [PATCH 4/6] Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <13188249+TomWFox@users.noreply.github.com> --- _includes/parse-server/third-party-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index a0639a1de..dfb3d0d89 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -203,7 +203,7 @@ Google oauth supports validation of id_token's and access_token's. } ``` -The authentication module will test if the authData is the same as the +The authentication module will test if the authData is the same as the userinfo oauth call, by comparing the attributes. userinfo oauth call, comparing the attributes Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) From a933c527a1e6fd2ba2567dbbedfdca73bb966eb4 Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:46:46 +0000 Subject: [PATCH 5/6] Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <13188249+TomWFox@users.noreply.github.com> --- _includes/parse-server/third-party-auth.md | 1 - 1 file changed, 1 deletion(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index dfb3d0d89..d711176b4 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -204,7 +204,6 @@ Google oauth supports validation of id_token's and access_token's. ``` The authentication module will test if the authData is the same as the userinfo oauth call, by comparing the attributes. -userinfo oauth call, comparing the attributes Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server. From 0cca2c3ebae7877ff9405a86ad739c80c6903dbf Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Mon, 17 Feb 2020 13:08:19 +0100 Subject: [PATCH 6/6] Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <13188249+TomWFox@users.noreply.github.com> --- _includes/parse-server/third-party-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/parse-server/third-party-auth.md b/_includes/parse-server/third-party-auth.md index d711176b4..2f34e2a99 100644 --- a/_includes/parse-server/third-party-auth.md +++ b/_includes/parse-server/third-party-auth.md @@ -205,7 +205,7 @@ Google oauth supports validation of id_token's and access_token's. The authentication module will test if the authData is the same as the userinfo oauth call, by comparing the attributes. -Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) +Copy the JSON config file generated on Keycloak ([tutorial](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)) and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server. The options passed to Parse Server: