diff --git a/assemblies/assembly-configuring-authorization-in-rhdh.adoc b/assemblies/assembly-configuring-authorization-in-rhdh.adoc index 8af7724d09..36e83d2916 100644 --- a/assemblies/assembly-configuring-authorization-in-rhdh.adoc +++ b/assemblies/assembly-configuring-authorization-in-rhdh.adoc @@ -37,6 +37,12 @@ include::modules/admin/proc-rbac-ui-edit-role.adoc[leveloffset=+2] include::modules/admin/proc-rbac-ui-delete-role.adoc[leveloffset=+2] +include::modules/admin/con-user-stats-rhdh.adoc[leveloffset=+1] + + +include::modules/admin/proc-download-user-stats-rhdh.adoc[leveloffset=+2] + + include::modules/admin/con-rbac-rest-api.adoc[leveloffset=+1] diff --git a/modules/admin/con-rbac-rest-api.adoc b/modules/admin/con-rbac-rest-api.adoc index f0ca435a4e..ea956895bc 100644 --- a/modules/admin/con-rbac-rest-api.adoc +++ b/modules/admin/con-rbac-rest-api.adoc @@ -39,6 +39,7 @@ Base URL:: -- The base URL for RBAC REST API requests is `pass:c[http://SERVER:PORT/api/permission/policies]`, such as `pass:c[http://localhost:7007/api/permission/policies]`. + -- Endpoints:: diff --git a/modules/admin/con-user-stats-rhdh.adoc b/modules/admin/con-user-stats-rhdh.adoc new file mode 100644 index 0000000000..68dbaca4ee --- /dev/null +++ b/modules/admin/con-user-stats-rhdh.adoc @@ -0,0 +1,8 @@ +[id='con-user-stats-rhdh_{context}'] += User statistics in {product} + +In {product}, the `licensed-users-info-backend` plugin provides statistical information about the logged-in users using the Web UI or REST API endpoints. + +The `licensed-users-info-backend` plugin enables administrators to monitor the number of active users on {product-short}. Using this feature, organizations can compare their actual usage with the number of licenses they have purchased. Additionally, you can share the user metrics with {company-name} for transparency and accurate licensing. + +The `licensed-users-info-backend` plugin is enabled by default. This plugin enables a *Download User List* link at the bottom of the *Administration -> RBAC* tab. \ No newline at end of file diff --git a/modules/admin/proc-download-user-stats-rhdh.adoc b/modules/admin/proc-download-user-stats-rhdh.adoc new file mode 100644 index 0000000000..79a783df7f --- /dev/null +++ b/modules/admin/proc-download-user-stats-rhdh.adoc @@ -0,0 +1,16 @@ +[id='proc-download-user-stats-rhdh_{context}'] += Downloading active users list in {product} + +You can download the list of users in CSV format using the {product-short} web interface. + +.Prerequisites + +* RBAC plugins (`@janus-idp/backstage-plugin-rbac` and `@janus-idp/backstage-plugin-rbac-backend`) must be enabled in {product}. +* An administrator role must be assigned. + +.Procedure + +. In {product}, navigate to *Administration* and select the *RBAC* tab. +. At the bottom of the *RBAC* page, click *Download User List*. +. Optional: Modify the file name in the *Save as* field and click *Save*. +. To access the downloaded users list, go to the *Downloads* folder on your local machine and open the CSV file. diff --git a/modules/admin/ref-rbac-rest-api-endpoints.adoc b/modules/admin/ref-rbac-rest-api-endpoints.adoc index 0bd42583ee..a688b600a4 100644 --- a/modules/admin/ref-rbac-rest-api-endpoints.adoc +++ b/modules/admin/ref-rbac-rest-api-endpoints.adoc @@ -975,3 +975,80 @@ Deletes a conditional policy for the specified ID. ---- -- +== User statistics + +The `licensed-users-info-backend` plugin exposes various REST API endpoints to retrieve data related to logged-in users. + +No additional configuration is required for the `licensed-users-info-backend` plugin. If the RBAC backend plugin is enabled, then an administrator role must be assigned to access the endpoints, as the endpoints are protected by the `policy.entity.read` permission. + +The base URL for user statistics endpoints is `pass:c[http://SERVER:PORT/api/licensed-users-info]`, such as `pass:c[http://localhost:7007/api/licensed-users-info]`. + +[GET] /users/quantity:: ++ +-- +Returns the total number of logged-in users. + +.Example request +[source,bash] +---- +curl -X GET "http://localhost:7007/api/licensed-users-info/users/quantity" \ +-H "Content-Type: application/json" \ +-H "Authorization: Bearer $token" +---- + +.Example response +[source,json] +---- +{ "quantity": "2" } +---- +-- + +[GET] /users:: ++ +-- +Returns a list of logged-in users with their details. + +.Example request +[source,bash] +---- +curl -X GET "http://localhost:7007/api/licensed-users-info/users" \ +-H "Content-Type: application/json" \ +-H "Authorization: Bearer $token" +---- + +.Example response +[source,json] +---- +[ + { + "userEntityRef": "user:default/dev", + "lastTimeLogin": "Thu, 22 Aug 2024 16:27:41 GMT", + "displayName": "John Leavy", + "email": "dev@redhat.com" + } +] +---- +-- + +[GET] /users:: ++ +-- +Returns a list of logged-in users in CSV format. + +.Example request +[source,bash] +---- +curl -X GET "http://localhost:7007/api/licensed-users-info/users" \ +-H "Content-Type: text/csv" \ +-H "Authorization: Bearer $token" +---- + +.Example response +[source,csv] +---- +userEntityRef,displayName,email,lastTimeLogin +user:default/dev,John Leavy,dev@redhat.com,"Thu, 22 Aug 2024 16:27:41 GMT" +---- +-- + + diff --git a/modules/getting-started/proc-add-source-control-rhdh-catalog.adoc b/modules/getting-started/proc-add-source-control-rhdh-catalog.adoc index f0775cf8b2..00edcffd86 100644 --- a/modules/getting-started/proc-add-source-control-rhdh-catalog.adoc +++ b/modules/getting-started/proc-add-source-control-rhdh-catalog.adoc @@ -1,7 +1,7 @@ [id='proc-add-source-control-rhdh-catalog_{context}'] = Adding source control for Catalog in {product} -To populate the Catalog in {product}, you need to add software templates, and to add the templates, you must enable a source control such as GitHub, GitLab, or BitBucket. +To populate the Catalog in {product}, you need to add software templates, and to add the templates, you must enable a supported source control such as GitHub. .Prerequisites diff --git a/titles/discover/docinfo.xml b/titles/discover/docinfo.xml new file mode 100644 index 0000000000..60f431eb6e --- /dev/null +++ b/titles/discover/docinfo.xml @@ -0,0 +1,11 @@ +About {product} +{product} +{product-version} +Introduction to {product} + + {product} is a developer platform designed to build developer portals. Use {product} to provide a streamlined development environment with a centralized software catalog to build high-quality software efficiently. + + + {company-name} Customer Content Services + + diff --git a/titles/discover/master.adoc b/titles/discover/master.adoc new file mode 100644 index 0000000000..c6f4db8de8 --- /dev/null +++ b/titles/discover/master.adoc @@ -0,0 +1,16 @@ +[id="title-about_red_hat_developer_hub"] +include::artifacts/attributes.adoc[] += About {product} +:doctype: book +:imagesdir: images +:title: About {product} +:subtitle: Introduction to {product} +:abstract: {product} is a developer platform designed to build developer portals. Use {product} to provide a streamlined development environment with a centralized software catalog to build high-quality software efficiently. + +//[id="{context}"] +//= {title} + +//{abstract} + + +//include::assemblies/assembly-about-rhdh.adoc[]