chore(quarkus-327): bump to Quarkus 3.27.3 LTS, rename deprecated config keys
This commit is contained in:
150
CONFIGURATION.md
150
CONFIGURATION.md
@@ -1,75 +1,75 @@
|
||||
# Configuration BTP Xpress Client - PrimeFaces Freya
|
||||
|
||||
## ✅ Vérifications effectuées
|
||||
|
||||
### 1. Structure du projet
|
||||
- ✅ Fichiers XHTML dans `src/main/resources/META-INF/resources/`
|
||||
- ✅ Configuration dans `src/main/resources/META-INF/web.xml`
|
||||
- ✅ Beans CDI dans `src/main/java/dev/lions/btpxpress/`
|
||||
|
||||
### 2. Configuration OIDC / Keycloak
|
||||
- ✅ **Serveur Keycloak** : `https://security.lions.dev/realms/btpxpress`
|
||||
- ✅ **Client ID** : `btpxpress-frontend`
|
||||
- ✅ **Type d'application** : `web-app`
|
||||
- ✅ **Redirection** : `/` (restauration du chemin après authentification)
|
||||
- ✅ **Cookies** : Configurés pour la session
|
||||
- ✅ **TLS** : `required` (production)
|
||||
|
||||
### 3. Communication avec le backend
|
||||
- ✅ **URL Backend** : `http://localhost:8080`
|
||||
- ✅ **Endpoints API** : `/api/v1/*`
|
||||
- ✅ **REST Client** : `BtpXpressApiClient` configuré
|
||||
- ✅ **Service** : `ChantierService` créé pour encapsuler les appels API
|
||||
- ✅ **CORS Backend** : `http://localhost:8081` ajouté aux origines autorisées
|
||||
|
||||
### 4. Configuration serveur backend
|
||||
- ✅ **Port** : `8080`
|
||||
- ✅ **CORS Origins** : `http://localhost:3000,http://localhost:5173,http://localhost:8081`
|
||||
- ✅ **JWT Validation** : `https://security.lions.dev/realms/btpxpress/protocol/openid-connect/certs`
|
||||
- ✅ **Issuer** : `https://security.lions.dev/realms/btpxpress`
|
||||
|
||||
## 📋 Mapping Client ↔ Serveur
|
||||
|
||||
| Client (PrimeFaces) | Serveur (Quarkus) | Description |
|
||||
|---------------------|-------------------|-------------|
|
||||
| `http://localhost:8081` | `http://localhost:8080` | Communication HTTP |
|
||||
| `BtpXpressApiClient` | `@Path("/api/v1/*")` | Interface REST Client |
|
||||
| OIDC Client `btpxpress-frontend` | JWT Validation | Authentification |
|
||||
| `ChantierService` | `ChantierResource` | Service métier chantiers |
|
||||
|
||||
## 🔐 Authentification
|
||||
|
||||
1. **Client accède à une page protégée** → Redirection vers Keycloak
|
||||
2. **Keycloak (security.lions.dev)** → Authentification utilisateur
|
||||
3. **Keycloak retourne le token** → Stocké dans la session du client
|
||||
4. **Client fait appel API** → Token JWT envoyé dans header `Authorization`
|
||||
5. **Backend valide le token** → Via les certificats Keycloak publics
|
||||
|
||||
## 🚀 Démarrage
|
||||
|
||||
1. **Backend** :
|
||||
```bash
|
||||
cd btpxpress-server
|
||||
mvn quarkus:dev
|
||||
```
|
||||
→ Accessible sur http://localhost:8080
|
||||
|
||||
2. **Client** :
|
||||
```bash
|
||||
cd btpxpress-client
|
||||
mvn quarkus:dev
|
||||
```
|
||||
→ Accessible sur http://localhost:8081
|
||||
|
||||
3. **Accès** :
|
||||
- Page d'accueil : http://localhost:8081/
|
||||
- Dashboard : http://localhost:8081/dashboard.xhtml
|
||||
- Login : http://localhost:8081/login.xhtml
|
||||
|
||||
## ⚠️ Points d'attention
|
||||
|
||||
- Le client doit être configuré avec le **même realm Keycloak** que le serveur (`btpxpress`)
|
||||
- Le client ID `btpxpress-frontend` doit exister dans Keycloak
|
||||
- Les tokens JWT doivent être envoyés automatiquement via le REST Client
|
||||
- Le backend doit accepter les requêtes CORS depuis `http://localhost:8081`
|
||||
|
||||
# Configuration BTP Xpress Client - PrimeFaces Freya
|
||||
|
||||
## ✅ Vérifications effectuées
|
||||
|
||||
### 1. Structure du projet
|
||||
- ✅ Fichiers XHTML dans `src/main/resources/META-INF/resources/`
|
||||
- ✅ Configuration dans `src/main/resources/META-INF/web.xml`
|
||||
- ✅ Beans CDI dans `src/main/java/dev/lions/btpxpress/`
|
||||
|
||||
### 2. Configuration OIDC / Keycloak
|
||||
- ✅ **Serveur Keycloak** : `https://security.lions.dev/realms/btpxpress`
|
||||
- ✅ **Client ID** : `btpxpress-frontend`
|
||||
- ✅ **Type d'application** : `web-app`
|
||||
- ✅ **Redirection** : `/` (restauration du chemin après authentification)
|
||||
- ✅ **Cookies** : Configurés pour la session
|
||||
- ✅ **TLS** : `required` (production)
|
||||
|
||||
### 3. Communication avec le backend
|
||||
- ✅ **URL Backend** : `http://localhost:8080`
|
||||
- ✅ **Endpoints API** : `/api/v1/*`
|
||||
- ✅ **REST Client** : `BtpXpressApiClient` configuré
|
||||
- ✅ **Service** : `ChantierService` créé pour encapsuler les appels API
|
||||
- ✅ **CORS Backend** : `http://localhost:8081` ajouté aux origines autorisées
|
||||
|
||||
### 4. Configuration serveur backend
|
||||
- ✅ **Port** : `8080`
|
||||
- ✅ **CORS Origins** : `http://localhost:3000,http://localhost:5173,http://localhost:8081`
|
||||
- ✅ **JWT Validation** : `https://security.lions.dev/realms/btpxpress/protocol/openid-connect/certs`
|
||||
- ✅ **Issuer** : `https://security.lions.dev/realms/btpxpress`
|
||||
|
||||
## 📋 Mapping Client ↔ Serveur
|
||||
|
||||
| Client (PrimeFaces) | Serveur (Quarkus) | Description |
|
||||
|---------------------|-------------------|-------------|
|
||||
| `http://localhost:8081` | `http://localhost:8080` | Communication HTTP |
|
||||
| `BtpXpressApiClient` | `@Path("/api/v1/*")` | Interface REST Client |
|
||||
| OIDC Client `btpxpress-frontend` | JWT Validation | Authentification |
|
||||
| `ChantierService` | `ChantierResource` | Service métier chantiers |
|
||||
|
||||
## 🔐 Authentification
|
||||
|
||||
1. **Client accède à une page protégée** → Redirection vers Keycloak
|
||||
2. **Keycloak (security.lions.dev)** → Authentification utilisateur
|
||||
3. **Keycloak retourne le token** → Stocké dans la session du client
|
||||
4. **Client fait appel API** → Token JWT envoyé dans header `Authorization`
|
||||
5. **Backend valide le token** → Via les certificats Keycloak publics
|
||||
|
||||
## 🚀 Démarrage
|
||||
|
||||
1. **Backend** :
|
||||
```bash
|
||||
cd btpxpress-server
|
||||
mvn quarkus:dev
|
||||
```
|
||||
→ Accessible sur http://localhost:8080
|
||||
|
||||
2. **Client** :
|
||||
```bash
|
||||
cd btpxpress-client
|
||||
mvn quarkus:dev
|
||||
```
|
||||
→ Accessible sur http://localhost:8081
|
||||
|
||||
3. **Accès** :
|
||||
- Page d'accueil : http://localhost:8081/
|
||||
- Dashboard : http://localhost:8081/dashboard.xhtml
|
||||
- Login : http://localhost:8081/login.xhtml
|
||||
|
||||
## ⚠️ Points d'attention
|
||||
|
||||
- Le client doit être configuré avec le **même realm Keycloak** que le serveur (`btpxpress`)
|
||||
- Le client ID `btpxpress-frontend` doit exister dans Keycloak
|
||||
- Les tokens JWT doivent être envoyés automatiquement via le REST Client
|
||||
- Le backend doit accepter les requêtes CORS depuis `http://localhost:8081`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user