Plugin : authentification via Authelia (SSO) #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objectif
Créer un plugin
authelia-ssopermettant de déléguer l'authentification à Authelia, en test du système de plugins.Comportement attendu
on_user_authPOST /api/firstfactorsur l'instance Authelia configuréeChangements backend nécessaires
on_user_authdansAVAILABLE_HOOKSPOST /api/auth/loginpour appeler le hook avantverify_password{"success": True}→ auth acceptée sans vérification du hash{"success": False}→ auth refusée immédiatementNoneou exception → fallback sur l'auth locale normaleStructure du plugin
Permissions requises :
network.outbound:<authelia-host>Configuration (via
ctx.store_set) :authelia_url: URL de base Authelia (ex:https://auth.example.com)auto_provision:"true"pour créer automatiquement les comptesNotes
Implémenté dans le commit
1b96151.Backend :
on_user_authajouté aux hooks disponiblesHookResult.return_value: les handlers peuvent maintenant retourner une valeurloginappelle le hook avantverify_password— court-circuit ou fallback selon le retour du pluginPlugin
authelia-sso:POST /api/firstfactorsur l'instance Authelia configurée viactx.store_set('authelia_url', '...')plugins/authelia-sso/dans le repoEn attente de test avec une vraie instance Authelia.