Skip to content

Commit 9b85781

Browse files
committed
docs: add Keycloak demo user screenshots with standardized naming
- Added screenshots for demo user configuration in Keycloak: • General section • License details • Service details - Adopted consistent naming convention (lowercase, kebab-case): keycloak-demo-user-general.png keycloak-demo-user-license-details.png keycloak-demo-user-service-details.png - Updated KEYCLOAK_CONFIG.md to reference the new screenshots
1 parent b827aca commit 9b85781

5 files changed

Lines changed: 103 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ This project provides a **complete licensing framework** for applications, combi
7979

8080
---
8181

82+
## Keycloak Configuration
83+
84+
This project relies on **Keycloak** to store and manage license metadata.
85+
A full step-by-step guide is provided in [KEYCLOAK_CONFIG.md](docs/KEYCLOAK_CONFIG.md).
86+
87+
---
88+
8289
## Running the Licensing Service
8390

8491
```bash

docs/KEYCLOAK_CONFIG.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Keycloak Configuration for Licensing Project
2+
3+
This document describes the **Licensing Realm** configuration in Keycloak that powers the licensing framework. It covers the demo realm, users, attributes, and groups used to store license information. This setup is required to ensure that the **Licensing Service** can issue and validate tokens against user license metadata.
4+
5+
---
6+
7+
## Accessing Keycloak
8+
9+
* **URL**: [http://localhost:8180/](http://localhost:8180/)
10+
* **Admin credentials** (demo only):
11+
12+
* Username: `licensing-admin`
13+
* Password: `admin123`
14+
* **Realm**: `licensing-realm`
15+
16+
Once logged in, switch to `licensing-realm` via **Manage Realms**.
17+
18+
---
19+
20+
## Demo User
21+
22+
A sample user is pre-configured for testing:
23+
24+
* **Username**: `license-demo-user`
25+
* **Email**: `licensedemouser@example.com`
26+
* **User ID**: `3ddfdf87-ddb3-43b3-8926-35d114aef39b`
27+
* **License Tier**: `Professional`
28+
* **License Status**: `Active`
29+
* **License Expiration**: `2027-05-14T17:34:00`
30+
* **Max Count**: `20`
31+
* **Remaining Usage Count**: `19`
32+
* **Allowed Services**: `crm`, `billing`, `reporting`
33+
* **Allowed Service Versions**:
34+
35+
* crm ≤ 1.5.0
36+
* billing ≤ 2.0.0
37+
* reporting ≤ 1.0.3
38+
* **Checksums**:
39+
40+
* crm: `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8a5`
41+
* billing: `2c7700c37f1fca44b4494a82c4d422a2c40e0c3a7e3e8a5b27b43c4d9242c771`
42+
* reporting: `f42a77784d4cca7f3b0c848929b0febf2c2f4a82e1a13fda29b334af508e2c0f`
43+
* **Instance IDs**: `licensing-service~demo~00:11:22:33:44:55`
44+
45+
### Demo User in Keycloak (Screenshots)
46+
47+
Below screenshots illustrate how the demo user (`license-demo-user`) is configured in Keycloak.
48+
49+
**General Section**
50+
![Demo user general](images/keycloak-demo-user-general.png)
51+
52+
**License Details**
53+
![Demo user license details](images/keycloak-demo-user-license-details.png)
54+
55+
**Service Details**
56+
![Demo user service details](images/keycloak-demo-user-service-details.png)
57+
58+
---
59+
60+
## License Attributes
61+
62+
The following custom attributes are used to store license metadata in Keycloak.
63+
64+
| Attribute | Group | Type | Example Value(s) |
65+
| ------------------------ | --------------- | ------------ | ------------------------------------------------------------------ |
66+
| `licenseTier` | license-details | Enum | `Starter`, `Professional`, `Enterprise` |
67+
| `licenseStatus` | license-details | Enum | `Active`, `Inactive`, `Trial`, `Suspended`, `Expired` |
68+
| `licenseExpiration` | license-details | DateTime | `2027-05-14T17:34:00` |
69+
| `maxCount` | license-details | Integer | `20` |
70+
| `remainingUsageCount` | license-details | Integer | `19` |
71+
| `allowedServices` | service-details | Multi-Select | `crm`, `billing`, `reporting` |
72+
| `allowedServiceVersions` | service-details | JSON | `{ "serviceId": "crm", "licensedMaxVersion": "1.5.0" }` |
73+
| `checksumCrm` | service-details | String | `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8a5` |
74+
| `checksumBilling` | service-details | String | `2c7700c37f1fca44b4494a82c4d422a2c40e0c3a7e3e8a5b27b43c4d9242c771` |
75+
| `checksumReporting` | service-details | String | `f42a77784d4cca7f3b0c848929b0febf2c2f4a82e1a13fda29b334af508e2c0f` |
76+
| `instanceIds` | service-details | Multi-Value | `licensing-service~demo~00:11:22:33:44:55` |
77+
78+
---
79+
80+
## Attribute Groups
81+
82+
Attributes are organized into logical groups:
83+
84+
* **User Metadata**: Standard Keycloak user metadata (`firstName`, `lastName`, `email`, etc.)
85+
* **License Details**: License-related metadata such as tier, status, expiration, and usage counts.
86+
* **Service Details**: Service-level entitlements, allowed versions, checksums, and bound instance IDs.
87+
88+
---
89+
90+
## Usage in Licensing Service
91+
92+
* The **Licensing Service** queries Keycloak for user attributes when validating a license key.
93+
* Attributes like `licenseExpiration`, `licenseStatus`, and `allowedServices` are enforced during token issuance.
94+
* Checksums and instance IDs provide request-level integrity validation.
95+
96+
---
402 KB
Loading
357 KB
Loading
421 KB
Loading

0 commit comments

Comments
 (0)