142 lines
3.8 KiB
Markdown
142 lines
3.8 KiB
Markdown
# lions-user-manager-client-quarkus-primefaces-freya
|
|
|
|
> Interface web d'administration — Quarkus + JSF + PrimeFaces Freya
|
|
|
|
## Dépôt Git
|
|
|
|
`https://git.lions.dev/lionsdev/lions-user-manager-client-quarkus-primefaces-freya`
|
|
|
|
---
|
|
|
|
## Responsabilités
|
|
|
|
- Interface d'administration des utilisateurs et rôles Keycloak
|
|
- Authentification SSO via OIDC (Keycloak)
|
|
- Communication avec le backend via MicroProfile REST Client
|
|
- Dashboard, gestion CRUD, audit, synchronisation, assignation de realms
|
|
|
|
---
|
|
|
|
## Pages
|
|
|
|
| Page | Bean | Description |
|
|
|------|------|-------------|
|
|
| `/dashboard.xhtml` | `DashboardBean` | Vue d'ensemble et statistiques |
|
|
| `/users/list.xhtml` | `UserListBean` | Liste paginée avec filtres et export CSV |
|
|
| `/users/creation.xhtml` | `UserCreationBean` | Formulaire de création |
|
|
| `/users/profil.xhtml` | `UserProfilBean` | Édition profil utilisateur |
|
|
| `/roles/gestion.xhtml` | `RoleGestionBean` | Gestion des rôles par realm |
|
|
| `/audit/consultation.xhtml` | `AuditConsultationBean` | Consultation des logs d'audit |
|
|
| `/sync/dashboard.xhtml` | `SyncDashboardBean` | État et pilotage des synchronisations |
|
|
| `/realms/assignment.xhtml` | `RealmAssignmentBean` | Assignation utilisateurs/realms |
|
|
|
|
---
|
|
|
|
## Stack
|
|
|
|
| Composant | Technologie |
|
|
|-----------|-------------|
|
|
| Framework | Quarkus 3.17.8 + Undertow (Servlet) |
|
|
| UI | PrimeFaces 14.0.5 (Jakarta) |
|
|
| Thème | Freya Enterprise |
|
|
| Auth | `quarkus-oidc` (Keycloak) + PKCE |
|
|
| REST Client | MicroProfile REST Client (`quarkus-rest-client-jackson`) |
|
|
| Token Propagation | `quarkus-rest-client-oidc-token-propagation` |
|
|
|
|
---
|
|
|
|
## Développement local
|
|
|
|
### Prérequis
|
|
|
|
- Java 17+, Maven 3.9+
|
|
- Keycloak sur `localhost:8180` (realm `lions-user-manager` configuré)
|
|
- Backend `server-impl` démarré sur `localhost:8081`
|
|
|
|
### Démarrage
|
|
|
|
```bash
|
|
mvn quarkus:dev
|
|
```
|
|
|
|
Application disponible sur : `http://localhost:8082`
|
|
|
|
### Configuration dev
|
|
|
|
Fichier : `src/main/resources/application-dev.properties`
|
|
|
|
```properties
|
|
quarkus.http.port=8082
|
|
quarkus.oidc.auth-server-url=http://localhost:8180/realms/lions-user-manager
|
|
lions.user.manager.backend.url=http://localhost:8081
|
|
```
|
|
|
|
---
|
|
|
|
## Configuration production
|
|
|
|
Fichier : `src/main/resources/application-prod.properties`
|
|
|
|
| Variable | Description |
|
|
|----------|-------------|
|
|
| `KEYCLOAK_AUTH_SERVER_URL` | URL du realm Keycloak |
|
|
| `KEYCLOAK_CLIENT_ID` | Client OIDC (défaut : `lions-user-manager-client`) |
|
|
| `OIDC_ENCRYPTION_SECRET` | Secret de chiffrement des tokens (32 caractères min) |
|
|
| `LIONS_USER_MANAGER_BACKEND_URL` | URL de l'API backend |
|
|
|
|
---
|
|
|
|
## Build
|
|
|
|
```bash
|
|
# Build standard (développement)
|
|
mvn clean package -DskipTests
|
|
|
|
# Build production
|
|
mvn clean package -P prod -DskipTests
|
|
```
|
|
|
|
---
|
|
|
|
## Déploiement (lionsctl)
|
|
|
|
```bash
|
|
lionsctl pipeline \
|
|
-u https://git.lions.dev/lionsdev/lions-user-manager-client-quarkus-primefaces-freya \
|
|
-b main -j 17 -e production -c k1 -p prod
|
|
```
|
|
|
|
**Pipeline** : clone → `mvn package -P prod` → `docker build -f Dockerfile.prod` → push `registry.lions.dev` → `kubectl apply` → health check
|
|
|
|
**URL prod** : `https://users.lions.dev`
|
|
|
|
---
|
|
|
|
## Structure
|
|
|
|
```
|
|
src/main/
|
|
├── java/dev/lions/user/manager/client/
|
|
│ ├── bean/ # Beans JSF (@Named, @ViewScoped / @SessionScoped)
|
|
│ └── client/ # REST Clients (UserRestClient, RoleRestClient, ...)
|
|
└── resources/
|
|
├── META-INF/resources/
|
|
│ ├── templates/
|
|
│ │ └── components/ # Composants PrimeFaces réutilisables
|
|
│ ├── dashboard.xhtml
|
|
│ ├── users/
|
|
│ ├── roles/
|
|
│ ├── audit/
|
|
│ ├── sync/
|
|
│ └── realms/
|
|
├── application.properties
|
|
├── application-dev.properties
|
|
└── application-prod.properties
|
|
```
|
|
|
|
---
|
|
|
|
## Licence
|
|
|
|
Propriétaire — Lions Dev © 2025
|