Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions admin-ui/app/utils/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ export function formatDate(date) {
if (date.length > 10) {
return date.substring(0, 10)
}
if(date.length == 10) {
return date
}
return '-'
}
4 changes: 2 additions & 2 deletions docs/admin/admin-ui/auth-server-interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ When accessing the Gluu Flex Admin UI through a web browser, the following steps

1. The user accesses the Gluu Flex Admin UI frontend through a web browser.
2. The frontend requests the Admin UI backend to retrieve Admin UI configuration from Janssen persistence. The [Admin UI configuration](./configuration.md) includes OIDC client details for accessing the Auth Server, OIDC client details for accessing the Token Server, OIDC client details for accessing the License APIs, and license metadata. It's important to note that **the Admin UI backend is implemented as a Jans Config API plugin**.
3. The frontend calls the Admin UI backend API (`/isConfigValid`) to validate the license configuration in persistence, essentially verifying the validity of the OIDC client used to access the License APIs. If it is not valid, the same API tries to register a new OIDC client using the SSA uploaded during installation. In case the SSA is invalid, the Admin UI shows a page to upload a new valid SSA.
4. After ensuring the validity of the OIDC client, the Admin UI calls the Admin UI backend API (/isActive) to check if a valid license is present in the license configuration. The Admin UI backend then calls the SCAN API (/scan/license/isActive) to verify the validity of the license.
3. The frontend calls the Admin UI backend API (`/isConfigValid`) to validate the license configuration in persistence, essentially verifying the validity of the OIDC client used to access the License APIs. If it is not valid, the same API tries to register a new OIDC client using the SSA uploaded during installation. In case the SSA is invalid, the Admin UI shows a page to upload a new valid SSA. To minimize network calls to account.gluu.org, `/isConfigValid` verifies the OIDC client validity only at a set interval (default: 30 days). Otherwise, `/isConfigValid` checks if the required OIDC client for License APIs exists in the Admin UI configuration (persistence).
4. After validating the OIDC client, the Admin UI calls the backend API (/isActive) to check if a valid license is present in the license configuration. It verifies whether the license key and its details are valid and not expired. At regular intervals (default is 30 days), the Admin UI backend calls the SCAN API (/scan/license/isActive) to verify license validity and sync its details into the license configuration (persistence).
5. If a valid license is not present, the frontend calls the backend API (/retrieve) to retrieve the license for the user via the SCAN API (/scan/license/retrieve). The license can only be retrieved from SCAN if the user has subscribed to the Admin UI license in Agama Lab.
6. If the user has not already subscribed to a valid license in Agama Lab, the Admin UI displays a page to generate a 30-day trial license. The user cannot generate another trial license after expiry of a generated trial license and will need to subscribe to the Admin UI license in Agama Lab to access the user interface.
7. After verification of valid license the frontend initiates the Authorization Code Flow by redirecting the user to the login page.
Expand Down
13 changes: 7 additions & 6 deletions docs/admin/admin-ui/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ License metadata includes relevant information about the Gluu Flex Admin UI's li

The information is stored in json format with following attributes.

|Attribute Name|Description|
|--------------|-----------|
|licenseConfig|Object with License configuration details|
|ssa|SSA used to register OIDC client to access license APIs|
|scanLicenseApiHostname| SCAN License server hostname|
|licenseHardwareKey|Hardware key (org_id) to access license APIs|
|Attribute Name| Description|
|--------------|------------|
|licenseConfig| Object with License configuration details |
|ssa| SSA used to register OIDC client to access license APIs |
|scanLicenseApiHostname| SCAN License server hostname |
|licenseHardwareKey| Hardware key (org_id) to access license APIs |
|intervalForSyncLicenseDetailsInDays| The Admin UI backend syncs license details into the configuration (persistence) after the set interval (default: 30 days). |

**Sample configuration stored in persistence**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"ssa": "%(ssa)s",
"scanLicenseApiHostname": "%(scan_license_api_hostname)s",
"licenseHardwareKey": "%(license_hardware_key)s",
"intervalForSyncLicenseDetailsInDays": 30,
"oidcClient": {
"opHost": "%(op_host)s",
"clientId": "%(oidc_client_id)s",
Expand Down
Loading