Added 3.x to 4.x migration documentation to README.md. Updated OIDC integration documentation to mention new callback url

This commit is contained in:
Glenn de Haan
2024-10-01 13:26:47 +02:00
parent 10f7f7284b
commit 4f501c09af
5 changed files with 28 additions and 5 deletions

View File

@@ -17,7 +17,7 @@
- **Authentication flow**: `default-authentication-flow`. - **Authentication flow**: `default-authentication-flow`.
- **Authorization flow**: `default-provider-authorization-implicit-consent`. - **Authorization flow**: `default-provider-authorization-implicit-consent`.
- **Client Type**: Select `confidential`, A client secret will be generated. - **Client Type**: Select `confidential`, A client secret will be generated.
5. Set the **Redirect URI** to match your UniFi Voucher Sites callback URL (e.g., `https://voucher.example.com/callback`). 5. Set the **Redirect URI** to match your UniFi Voucher Sites callback URL (e.g., `https://voucher.example.com/oidc/callback`).
6. Click **Submit**. 6. Click **Submit**.
![Create Provider 1](images/create_provider_1.png) ![Create Provider 1](images/create_provider_1.png)

View File

@@ -35,7 +35,7 @@ Youll see various tabs for configuring the client. Set the following fields:
1. Go to the **Settings** tab. 1. Go to the **Settings** tab.
2. Set **Access Type** to `confidential`. 2. Set **Access Type** to `confidential`.
3. Ensure **Standard Flow Enabled** is set to `ON`. 3. Ensure **Standard Flow Enabled** is set to `ON`.
4. Set **Valid Redirect URIs** to your UniFi voucher callback URL (e.g., `https://voucher.example.com/callback`). 4. Set **Valid Redirect URIs** to your UniFi voucher callback URL (e.g., `https://voucher.example.com/oidc/callback`).
5. Click **Save**. 5. Click **Save**.
6. After saving, go to the **Credentials** tab to get the **Client Secret**. This secret will be used by your UniFi Voucher Site when authenticating as a confidential client. 6. After saving, go to the **Credentials** tab to get the **Client Secret**. This secret will be used by your UniFi Voucher Site when authenticating as a confidential client.

View File

@@ -20,7 +20,7 @@
The required fields needed are `Initiate Sign-In URI` and `Sign-In Redirect URI`. The required fields needed are `Initiate Sign-In URI` and `Sign-In Redirect URI`.
Initiate Sign-In URI - (e.g., `https://voucher.example.com`) Initiate Sign-In URI - (e.g., `https://voucher.example.com`)
Sign-In Redirect URI - (e.g., `https://voucher.example.com/callback`) Sign-In Redirect URI - (e.g., `https://voucher.example.com/oidc/callback`)
7. Press Add. You will now be presented with your Tool Collection for the app. Copy your `Client ID`, `Client Secret` and the value form your `Well Known Config Endpoint`. 7. Press Add. You will now be presented with your Tool Collection for the app. Copy your `Client ID`, `Client Secret` and the value form your `Well Known Config Endpoint`.
8. Press Done. You can now assign users or groups to the application. The setup has been completed UID side. 8. Press Done. You can now assign users or groups to the application. The setup has been completed UID side.

View File

@@ -28,7 +28,7 @@ Now, create an application under the project you just created.
- **Type**: `Web`. - **Type**: `Web`.
4. Select **Code** and click **Continue**. 4. Select **Code** and click **Continue**.
5. Fill in the following fields and click **Continue**: 5. Fill in the following fields and click **Continue**:
- **Login Redirect URIs**: Enter the URL of your UniFi Voucher callback (e.g., `https://voucher.example.com/callback`). - **Login Redirect URIs**: Enter the URL of your UniFi Voucher callback (e.g., `https://voucher.example.com/oidc/callback`).
- **Logout Redirect URIs**: Enter the root URL of your UniFi Voucher instance (e.g., `https://voucher.example.com`). - **Logout Redirect URIs**: Enter the root URL of your UniFi Voucher instance (e.g., `https://voucher.example.com`).
6. Click **Create** to save the application. 6. Click **Create** to save the application.
7. Save the Client ID and Client Secret shown within the popup and click **Close** 7. Save the Client ID and Client Secret shown within the popup and click **Close**

View File

@@ -6,7 +6,7 @@ UniFi Voucher Site is a web-based platform for generating and managing UniFi net
![Vouchers Overview - Desktop](.docs/images/desktop_1.png) ![Vouchers Overview - Desktop](.docs/images/desktop_1.png)
> Upgrading from 2.x to 3.x? Please take a look at the [migration guide](#migration-from-2x-to-3x) > Upgrading from 3.x to 4.x? Please take a look at the [migration guide](#migration-from-3x-to-4x)
## Features ## Features
@@ -477,6 +477,29 @@ Detailed information on the changes in each release can be found on the [GitHub
## Migration Guide ## Migration Guide
### Migration from 3.x to 4.x
When upgrading from 3.x to 4.x, the following changes need to be made:
1. **OIDC Public Flow Removal**
- The OIDC public flow has been removed in v4. Only the **confidential flow** is now supported.
- Users must migrate to the confidential flow. Updated integration guides are available to help with this migration: [OIDC IdP Integration Guides](#oidc-idp-integration-guides).
2. **OIDC Endpoints Update**
- OIDC endpoints have been moved to dedicated paths.
- Update the IdP callback URL from **`/callback`** to **`/oidc/callback`** in your IdP configuration.
3. **Environment Variable Changes**
- **`AUTH_OIDC_CLIENT_TYPE`** has been **removed**. It is no longer required.
- **`AUTH_OIDC_ENABLED`** has been introduced. If you are using OIDC, you must set `AUTH_OIDC_ENABLED` to **`true`** in your environment configuration.
- **`AUTH_INTERNAL_ENABLED`** has been introduced.
- If you are using **internal authentication**, set `AUTH_INTERNAL_ENABLED` to **`true`**.
- If you are using OIDC **and want to disable internal authentication**, set `AUTH_INTERNAL_ENABLED` to **`false`**.
4. **Password Variable Rename**
- **`AUTH_PASSWORD`** has been renamed to **`AUTH_INTERNAL_PASSWORD`**.
- Update your environment variable to use `AUTH_INTERNAL_PASSWORD` if you rely on internal authentication.
### Migration from 2.x to 3.x ### Migration from 2.x to 3.x
When upgrading from 2.x to 3.x, the following changes need to be made: When upgrading from 2.x to 3.x, the following changes need to be made: