Skip to content

Commit 402e7ae

Browse files
authored
fix: #2487 - SIWA and SIWG (Sign in with Apple-Google), moved to script-catalog (#2983)
1 parent 2f15cf8 commit 402e7ae

File tree

7 files changed

+139
-337
lines changed

7 files changed

+139
-337
lines changed

docs/admin/recipes/social-login-google.md

-109
This file was deleted.

docs/admin/recipes/social-login.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ tags:
44
- recipes
55
---
66

7-
## Implementing Social logins
7+
## Implementing Social logins
88
You can use a `PersonAuthenticationType` script to allow users to sign using credentials from popular **Social Identity providers** or **Inbound Identity Providers** like Facebook, Google and Apple. After users authenticate, we provision their Social Identity Provider credentials into the Jans-auth server. No additional username, password, credentials are needed for this user.
99
1. Facebook
10-
2. [Google](https://github.com/JanssenProject/jans/blob/main/docs/admin/recipes/social-login-google.md)
11-
3. [Apple](https://github.com/JanssenProject/jans/blob/main/docs/admin/recipes/social-login-apple.md)
10+
2. [Google](../../script-catalog/person-authentication/google-external-authenticator/README.md)
11+
3. [Apple](../../script-catalog/person-authentication/apple-external-authenticator/README.md)
1212

13-
Following is a high-level diagram depicting a typical flow - user authentication on a Social Identity Platform and subsequent user provisioning on Jans-Auth server.
13+
Following is a high-level diagram depicting a typical flow - user authentication on a Social Identity Platform and subsequent user provisioning on Jans-Auth server.
1414

1515
You can copy paste this sequence in [https://sequencediagram.org/](https://sequencediagram.org/)
1616
```
17-
title Social login
17+
title Social login
1818
Jans AS<-User agent: 1. Invoke /authorize endpoint
1919
Jans AS->User agent: 2. Discovery: Present list of remote IDPs (Google, Apple, FB...)
2020
User agent->Jans AS: 3. Select IDP (e.g. click on button)

docs/admin/recipes/social-login-apple.md docs/script-catalog/person_authentication/apple-external-authenticator/README.md

+9-14
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ tags:
44
- recipes
55
---
66

7-
## Social Login with Apple
7+
## Social Login with Apple
88

99
An out-of-the-box feature, the Sign-in with Apple Authentication script is a `PersonAuthenticationType` script which enables a user to sign-in using Apple credentials. After users authenticate using their Apple credentials, their Apple credentials are provisioned into the Jans-auth server.
1010

11-
## Prerequisites
11+
## Prerequisites
1212

13-
- A Jans-auth Server (installation instructions [here](https://github.com/JanssenProject/jans/tree/main/jans-linux-setup#readme))
14-
- The [Sign-in with Apple authentication script](https://github.com/JanssenProject/jans/tree/main/jans-linux-setup/jans_setup/static/extension/person_authentication/AppleExternalAuthenticator.py) (included in the default Jans-auth Server distribution);
13+
- A Jans-auth Server installation
14+
- The [Sign-in with Apple authentication script](./AppleExternalAuthenticator.py) (included in the default Jans-auth Server distribution);
1515
- An [Apple developer account](https://developer.apple.com/).
1616

1717
## Configurations at Apple Identity Provider:
18-
You will need to configure a service id, linked to your App identifier. For each website that uses Sign In with Apple, register a services identifier (Services ID) and configure your domain and return URL.
18+
You will need to configure a service id, linked to your App identifier. For each website that uses Sign In with Apple, register a services identifier (Services ID) and configure your domain and return URL.
1919
1. Under `Certificates, Identifiers and Profiles` --> `Identifiers` --> Click on the `+` button
2020
2. In the `Register a new identifier` select `Service ID`
2121
3. After filling out the description and identifier name, save the Service ID
2222
4. Now edit the saved Service ID and enable the `Sign in with Apple` checkbox and click `Configure` button
23-
5. Configure the Janssen's server's callback url `https://<your.janssen.server>/postlogin.htm` as a `Website URL`
23+
5. Configure the Janssen's server's callback url `https://<your.janssen.server>/postlogin.htm` as a `Website URL`
2424

2525
## Configure jans-auth server
2626

27-
Configure the custom script:
27+
Configure the custom script:
2828
### Properties
2929

3030
The custom script has the following properties:
@@ -34,7 +34,7 @@ The custom script has the following properties:
3434
|`apple_client_id` |Name of Service ID on developer.apple.com. | `com.company.name`|
3535
|`apple_jwks` | Apple’s public JWK to validate Apple Identity Token | `https://appleid.apple.com/auth/keys`|
3636

37-
To update this setting in Jans persistence, follow this [link](https://github.com/JanssenProject/jans-cli/blob/main/docs/cli/cli-custom-scripts.md#update-an-existing-custom-script)
37+
To update this setting in Jans persistence, follow this [link](https://github.com/JanssenProject/jans-cli/blob/main/docs/cli/cli-custom-scripts.md#update-an-existing-custom-script)
3838

3939
### Enable Sign-in with Apple Authentication script
4040
By default, users will get the default authentication mechanism as specified above. However, using the OpenID Connect acr_values parameter, web and mobile clients can request any enabled authentication mechanism.
@@ -67,7 +67,7 @@ Steps:
6767

6868
:memo: **NOTE**
6969

70-
To make sure `apple` has been enabled successfully as a default authentication method, you can check your Janssen Server's OpenID Connect configuration by navigating to the following URL: `https://<hostname>/.well-known/openid-configuration`. Find `"acr_values_supported":` and you should see `"apple"`.
70+
To make sure `apple` has been enabled successfully as a default authentication method, you can check your Janssen Server's OpenID Connect configuration by navigating to the following URL: `https://<hostname>/.well-known/openid-configuration`. Find `"acr_values_supported":` and you should see `"apple"`.
7171

7272
## Test the feature - Sign-in with Apple
7373
To test , enter the complete URL for authorization in a browser or create a simple webpage with a link that simulates the user sign-in attempt. If the server is configured properly, the first page for the selected authentication method will be displayed to the user.
@@ -76,8 +76,3 @@ An example of a complete URL looks like this -
7676
```
7777
https://<your.jans.server>/jans-auth/authorize.htm?response_type=code&redirect_uri=https://<your.jans.server>/admin&client_id=<replace_with_inum_client_id>&scope=openid+profile+email+user_name&state=faad2cdjfdddjfkdf&nonce=dajdffdfsdcfff
7878
```
79-
80-
81-
82-
83-

docs/script-catalog/person_authentication/fido2-external-authenticator/README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
FIDO2 is comprised of the [W3C’s Web Authentication specification (WebAuthn)](https://www.w3.org/TR/webauthn/) and FIDO’s corresponding [Client-to-Authenticator Protocol (CTAP)](https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html). WebAuthn defines a standard web API that can be built into browsers and related web platform infrastructure to enable online services to use FIDO Authentication. CTAP enables external devices such as mobile handsets or FIDO Security Keys to work with WebAuthn and serve as authenticators to desktop applications and web services.
77

88
This document explains how to use the Janssen Auth Server's built-in
9-
[FIDO2 interception script](https://github.com/JanssenProject/jans/blob/main/jans-linux-setup/jans_setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py)
10-
to implement a two-step, two-factor authentication (2FA) with username / password as the first step, and any FIDO2 device as the second step.
9+
[FIDO2 interception script](https://github.com/JanssenProject/jans/blob/main/jans-linux-setup/jans_setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py)
10+
to implement a two-step, two-factor authentication (2FA) with username / password as the first step, and any FIDO2 device as the second step.
1111

1212
## Prerequisites
1313
- A Janssen Server ([installation instructions](https://github.com/JanssenProject/jans#installation))
1414
- [FIDO2 interception script](https://github.com/JanssenProject/jans/blob/main/docs/script-catalog/person_authentication/fido2-external-authenticator/Fido2ExternalAuthenticator.py) (included in the default Janssen Server distribution);
15-
- At least one FIDO2 device for testing, like one of the devices [listed below](#fido2-devices).
15+
- At least one FIDO2 device for testing, like one of the devices [listed below](#fido2-devices).
1616

1717
### FIDO2 devices
1818
Some well known FIDO2 devices and manufacturers include:
@@ -24,7 +24,7 @@ Some well known FIDO2 devices and manufacturers include:
2424
- [AuthenTrend](https://authentrend.com/)
2525
- [Apple's built-in Touch ID](https://support.apple.com/en-in/guide/mac-help/mchl16fbf90a/mac)
2626

27-
[Purchase FIDO2 devices on Amazon](https://www.amazon.com/s/ref=nb_sb_noss/146-0120855-4781335?url=search-alias%3Daps&field-keywords=fido2). Or, check [FIDO's certified products](https://fidoalliance.org/certification/fido-certified-products/) for a comprehensive list of FIDO2 devices (sort by `Specification` == `FIDO2`).
27+
[Purchase FIDO2 devices on Amazon](https://www.amazon.com/s/ref=nb_sb_noss/146-0120855-4781335?url=search-alias%3Daps&field-keywords=fido2). Or, check [FIDO's certified products](https://fidoalliance.org/certification/fido-certified-products/) for a comprehensive list of FIDO2 devices (sort by `Specification` == `FIDO2`).
2828

2929
## Properties
3030
The script has the following properties
@@ -37,18 +37,18 @@ The script has the following properties
3737

3838
By default, users will get the default authentication mechanism as specified above. However, **using the OpenID Connect acr_values parameter, web and mobile clients can request any enabled authentication mechanism**.
3939

40-
1. Obtain the json contents of `fido2` custom script by using a jans-cli command like `get-config-scripts-by-type`, `get-config-scripts-by-inum` etc.
40+
1. Obtain the json contents of `fido2` custom script by using a jans-cli command like `get-config-scripts-by-type`, `get-config-scripts-by-inum` etc.
4141

4242
e.g : `/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:PERSON_AUTHENTICATION` , `/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-inum --url-suffix inum:6122281b-b55d-4dd0-8115-b098eeeee2b7`
4343

4444
2. [Update the custom script](https://github.com/JanssenProject/jans-cli/blob/main/docs/cli/cli-custom-scripts.md#update-an-existing-custom-script) and change the `enabled` attribute to `true`
4545

46-
Now FIDO2 is an available authentication mechanism for your Janssen Server. This means that, using OpenID Connect `acr_values`, applications can now request FIDO2 authentication for users.
46+
Now FIDO2 is an available authentication mechanism for your Janssen Server. This means that, using OpenID Connect `acr_values`, applications can now request FIDO2 authentication for users.
4747

48-
!!! Note
49-
To make sure FIDO2 has been enabled successfully, you can check your Janssen's Auth Server OpenID Connect
50-
configuration by navigating to the following URL: `https://<hostname>/.well-known/openid-configuration`.
51-
Find `"acr_values_supported":` and you should see `"fido2"`.
48+
!!! Note
49+
To make sure FIDO2 has been enabled successfully, you can check your Janssen's Auth Server OpenID Connect
50+
configuration by navigating to the following URL: `https://<hostname>/.well-known/openid-configuration`.
51+
Find `"acr_values_supported":` and you should see `"fido2"`.
5252

5353
## Enable FIDO2 Script as default authentication script:
5454
Use this [link](https://github.com/JanssenProject/jans-cli/blob/main/docs/cli/cli-default-authentication-method.md) as a reference.
@@ -73,24 +73,24 @@ Below is an illustration of the Janssen Server's default FIDO2 login page:
7373

7474
![fido2](https://github.com/JanssenProject/jans/raw/main/docs/assets/image_fido2.png)
7575

76-
The design is being rendered from the [FIDO2 xhtml page](https://github.com/JanssenProject/jans/blob/main/jans-auth-server/server/src/main/webapp/auth/fido2/login.xhtml). To customize the look and feel of this page, follow the [customization guide](https://jans.io/docs/admin/developer/customization/customize-web-pages/).
76+
The design is being rendered from the [FIDO2 xhtml page](https://github.com/JanssenProject/jans/blob/main/jans-auth-server/server/src/main/webapp/auth/fido2/login.xhtml). To customize the look and feel of this page, follow the [customization guide](https://jans.io/docs/admin/developer/customization/customize-web-pages/).
7777

78-
## Using FIDO2 tokens
78+
## Using FIDO2 tokens
7979

8080
### Credential enrollment
81-
FIDO2 device enrollment happens during the first authentication attempt.
81+
FIDO2 device enrollment happens during the first authentication attempt.
8282

8383
### Subsequent authentications
84-
All subsequent FIDO2 authentications for that user account will require the enrolled FIDO2 key.
84+
All subsequent FIDO2 authentications for that user account will require the enrolled FIDO2 key.
8585

8686
### FIDO2 credential management
87-
A user's FIDO2 devices can be removed by a Janssen administrator in LDAP under the user entry as shown in the below screenshot.
87+
A user's FIDO2 devices can be removed by a Janssen administrator in LDAP under the user entry as shown in the below screenshot.
8888

8989
![fido2](https://github.com/JanssenProject/jans/raw/main/docs/assets/image-fido2-ldap-structure.png)
9090
Diagram source in mermaid.live
9191
```
9292
graph TD
93-
93+
9494
A[ou=jans] --> K(ou=people)
9595
K --> K1[inum=....]
9696
K1 --> K11[ou=fido2_register]
@@ -124,7 +124,7 @@ graph TD
124124
K32 --> K321[jansId=....]
125125
K32 --> K322[jansId=....]
126126
K32 --> K323[jansId=....]
127-
127+
128128
```
129129

130130
### FIDO2 discovery endpoint

0 commit comments

Comments
 (0)