docs: Ajout documentation et scripts de démarrage
- Documentation configuration OIDC, démarrage, diagnostic - Scripts batch pour démarrage backend et client - Script shell pour configuration Keycloak frontend
This commit is contained in:
127
BACKEND_DEMARRAGE_SUCCESS.md
Normal file
127
BACKEND_DEMARRAGE_SUCCESS.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# Backend Démarré avec Succès
|
||||
|
||||
## Résumé
|
||||
|
||||
Le backend **Lions User Manager** démarre maintenant correctement sur le **port 8081**.
|
||||
|
||||
## Problèmes Résolus
|
||||
|
||||
### 1. Conflit RESTEasy / Keycloak Admin Client
|
||||
**Problème**: Utilisation de `keycloak-admin-client` (version standalone) avec `quarkus-rest` (RESTEasy Reactive) créait un conflit.
|
||||
|
||||
**Solution**: Remplacement par `quarkus-keycloak-admin-rest-client` dans le `pom.xml`:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-keycloak-admin-rest-client</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 2. Annotations de Validation sur Méthodes Privées
|
||||
**Problème**: Les méthodes privées dans `RoleServiceImpl` avaient des annotations `@NotBlank`, `@NotNull` ce qui est interdit par Quarkus.
|
||||
|
||||
**Erreur**:
|
||||
```
|
||||
@io.quarkus.hibernate.validator.runtime.interceptor.MethodValidated will have no effect on method
|
||||
dev.lions.user.manager.service.impl.RoleServiceImpl.assignClientRolesToUser()
|
||||
because the method is private
|
||||
```
|
||||
|
||||
**Solution**: Suppression des annotations de validation sur toutes les méthodes privées :
|
||||
- `assignClientRolesToUser()`
|
||||
- `assignRealmRolesToUser()`
|
||||
- `revokeClientRolesFromUser()`
|
||||
- `revokeRealmRolesFromUser()`
|
||||
- `getRealmRoleById()`
|
||||
- `getRealmRoleByName()`
|
||||
- `getClientRoleByName()`
|
||||
- `userHasRealmRole()`
|
||||
- `userHasClientRole()`
|
||||
|
||||
### 3. Continuous Testing Bloquant le Démarrage
|
||||
**Problème**: Le backend restait bloqué sur "Tests paused" et ne démarrait pas complètement.
|
||||
|
||||
**Solution**: Ajout dans `application-dev.properties`:
|
||||
```properties
|
||||
quarkus.test.continuous-testing=disabled
|
||||
```
|
||||
|
||||
### 4. Port de Debug Occupé
|
||||
**Problème**: Le port 5005 (debug) était déjà utilisé par un processus zombie.
|
||||
|
||||
**Solution**: Tuer le processus occupant le port 5005.
|
||||
|
||||
## État Actuel
|
||||
|
||||
### Backend (Port 8081)
|
||||
✅ **DÉMARRÉ** - Le backend fonctionne correctement sur http://localhost:8081
|
||||
|
||||
**Endpoints disponibles**:
|
||||
- **Swagger UI**: http://localhost:8081/q/swagger-ui
|
||||
- **Dev UI**: http://localhost:8081/q/dev-ui
|
||||
- **Health Check**: http://localhost:8081/q/health
|
||||
- **OpenAPI**: http://localhost:8081/q/openapi
|
||||
- **Metrics**: http://localhost:8081/metrics
|
||||
|
||||
**API Endpoints**:
|
||||
- Users: `GET/POST/PUT/DELETE /api/users`
|
||||
- Roles: `GET/POST/PUT/DELETE /api/roles/*`
|
||||
- Health: `GET /api/health/keycloak`, `GET /api/health/status`
|
||||
- Audit: `/api/audit/*`
|
||||
- Sync: `/api/sync/*`
|
||||
|
||||
### Keycloak (Port 8180)
|
||||
✅ **EN MARCHE** - Keycloak fonctionne sur http://localhost:8180
|
||||
|
||||
**Configuration**:
|
||||
- Realm: `lions-user-manager`
|
||||
- Client: `lions-user-manager-client`
|
||||
- Client Secret: `client-secret-lions-2025`
|
||||
- Test User: `testuser` / `test123`
|
||||
- Admin: `admin` / `admin`
|
||||
|
||||
### Frontend (Port 8080)
|
||||
⚠️ **À DÉMARRER** - Le frontend n'est pas encore lancé
|
||||
|
||||
## Problème Restant
|
||||
|
||||
### Connexion Keycloak
|
||||
Le backend ne parvient pas à se connecter à Keycloak :
|
||||
```json
|
||||
{"connected":false,"status":"DOWN"}
|
||||
```
|
||||
|
||||
**Cause probable**: Configuration dans `application-dev.properties` utilise des credentials ou URL incorrects.
|
||||
|
||||
**Vérification nécessaire**:
|
||||
```properties
|
||||
lions.keycloak.server-url=http://localhost:8180
|
||||
lions.keycloak.admin-realm=master
|
||||
lions.keycloak.admin-client-id=admin-cli
|
||||
lions.keycloak.admin-username=admin
|
||||
lions.keycloak.admin-password=admin
|
||||
```
|
||||
|
||||
## Prochaines Étapes
|
||||
|
||||
1. ✅ Backend démarré sur port 8081
|
||||
2. ⚠️ Corriger la connexion Keycloak du backend
|
||||
3. ⏳ Démarrer le frontend sur port 8080
|
||||
4. ⏳ Tester l'authentification complète
|
||||
5. ⏳ Tester les endpoints API
|
||||
|
||||
## Commande de Démarrage
|
||||
|
||||
```bash
|
||||
cd C:\Users\dadyo\PersonalProjects\lions-workspace\lions-user-manager\lions-user-manager-server-impl-quarkus
|
||||
mvn quarkus:dev -Ddebug=false
|
||||
```
|
||||
|
||||
## Warnings à Ignorer
|
||||
|
||||
Ces warnings sont normaux et n'empêchent pas le fonctionnement :
|
||||
- `Hibernate ORM is disabled because no JPA entities were found` - Normal, pas de DB configurée
|
||||
- `Unable to properly register the hierarchy...for reflection` - Les DTOs fonctionnent malgré tout
|
||||
- `Unrecognized configuration key "quarkus.smallrye-fault-tolerance.enabled"` - Propriété obsolète mais sans impact
|
||||
- `Unrecognized configuration key "quarkus.oidc.dev-ui.enabled"` - Propriété obsolète mais sans impact
|
||||
- `Unrecognized configuration key "quarkus.security.auth.proactive"` - Propriété obsolète mais sans impact
|
||||
Reference in New Issue
Block a user