11. Besoins:
- Connexion à nos outils en passant par le SSO d’un de nos gros clients
- Centralisation des comptes utilisateurs (internes / externes)
- Standardiser tout en sécurisant l’accès à nos divers Extranets / API
- Ne pas maintenir une solution d’authentification "ad hoc" par API
- Eviter la redondance de code dans les appli
- Alléger le code
12. - Étude de solutions payantes SAAS (Auth0, Okta, Azure, etc…)
- Bien trop chères pour nos finances
- SLA uniquement sur les offres Enterprise (plus onéreuses)
- Manque de fonctionnalités sur les offres entrée de gamme
- Étude de solutions on premise
- Mise en place d’un proto de Keycloak, prise en main du produit
Comment ?
- Pas de frais de licence != gratuit !
- Souplesse du produit (ajout de endpoints, modification du fonctionnement)
- Communauté
- Intégration 100% interne (en France)
- Maîtrise 100% interne
Pourquoi l’open-source ?
13. Keycloak
- Realms
- Clients (applications)
- Scopes
- Roles
- Identity providers
- User federation (LDAP)
- Groups
- Brute force detection
- Users
- User registration
- Verify email
- Edit username
- Remember me
- Internationalization
- Theme
- Password policy
- OTP
14. Côté infra ?
- Faciliter le déploiement (Ansible)
- Sécurisation de l’outil (ouvert sur L’internet)
- Redondance (double data center)
- Faciliter l’exploitation des logs (Graylog)
- Faciliter l’exploitation des métriques (Prometheus + Grafana)
- Développement de script de monitoring (Icinga2)
22. Côté appli ?
- H2H (Humain 2 Humain)
- Websocket
- Elixir
- Temps réel
- Client type confidential (client_id / client_secret)
- Utilisation de JWKS (mise en cache des clés publiques)
- Réception d’audio long / transcription / enrichissement / retourne le texte en json
- H2B (Humain to bot) ⇒ == MRCP
- Websocket
- Rust
- Temps réel
- Client type confidential (client_id / client_secret)
- Utilisation de JWKS (mise en cache des clés publiques)
- Réception d’audio très court / transcription / builtin / retourne le texte en json
23. Côté appli ?
- Extranets (front)
- Vue JS
- Client type public (username / password)
- Utilisation de JWKS (mise en cache des clés publiques)
- problèmes actuels
- Multi realm → demande de l’email dès le départ, afin de router la demande
d’authentification au bon ID provider
- Problème dans la lib JS de Keycloak avec la dernière version de Firefox
24. Côté appli ?
- API Back
- Python (django)
- Client type confidential (client_id / client_secret)
- Utilisation de JWKS (mise en cache des clés publiques)
- Echange d’informations avec le front (transcriptions, tags, audio, etc …)
25. Benchmark
- Outil dédié: https://github.com/keycloak/keycloak-benchmark
- Déjà beaucoup de scénarios de tests
exemples :
- keycloak.scenario.authentication.ClientSecret
- keycloak.scenario.authentication.LoginUserPassword
- keycloak.scenario.admin.CreateUsers
- keycloak.scenario.authentication.AuthorizationCode
26. Benchmark
- Résultats CLI avec 300 users simultanés et en moyenne 407 requêtes / s:
Simulation keycloak.scenario.authentication.ClientSecret completed in 36 seconds
Parsing log file(s)...
Parsing log file(s) done
Generating reports...
================================================================================
---- Global Information --------------------------------------------------------
> request count 15092 (OK=15092 KO=0 )
> min response time 67 (OK=67 KO=- )
> max response time 5902 (OK=5902 KO=- )
> mean response time 663 (OK=663 KO=- )
> std deviation 214 (OK=214 KO=- )
> response time 50th percentile 685 (OK=685 KO=- )
> response time 75th percentile 745 (OK=745 KO=- )
> response time 95th percentile 844 (OK=844 KO=- )
> response time 99th percentile 935 (OK=935 KO=- )
> mean requests/sec 407.892 (OK=407.892 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 13426 ( 89%)
> 800 ms < t < 1200 ms 1635 ( 11%)
> t > 1200 ms 31 ( 0%)
> failed 0 ( 0%)
================================================================================
Reports generated in 0s.
Please open the following file: /home/mhubert/…/keycloak-benchmark/keycloak-benchmark-0.8-SNAPSHOT/results/clientsecret-
20220916135435056/index.html
Global: percentage of failed events is less than or equal to 0.0 : true
Global: mean of response time is less than or equal to 300.0 : false
30. Au final
H2H H2B SFTP
VOIP
Ex|Intranets MRCP
L’internet
SIPREC
SSO possible LDAP ?
31. Ce qu’il reste à faire
A court terme:
- Mettre en prod
- Tester plus en profondeur la sécurité et la robustesse (par nous-même)
- https://research.securitum.com/jwt-json-web-token-security/
- 1 journée / mois bug bounty
A moyen terme:
- Intégrer LDAP
- Marque blanche / autonomie de nos clients (client_registration)
- Ex: s’inscrire et obtenir 1H de service gratuit (reco, enrich, etc …)
32. For more informations : uh.live
Thanks for watching
https://github.com/Mickaelh51
https://fr.linkedin.com/in/sipengineer
On recrute:
https://uh.live/fr/backend-job