Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
lemonldap-ng
lemonldap-ng
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 244
    • Issues 244
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • LemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Issues
  • #2359

Closed
Open
Opened Oct 29, 2020 by Maxime Besson@maxbes🔧Maintainer

plugin engine for issuers

Summary

Some of our users have extremely specific needs for their SAML/OIDC/CAS flows.

A few examples off the top of my head:

  • Fine-grained control on the audience field of OIDC tokens
  • Triggering reauthentication on every login for SAML service provider that does NOT set forceAuthn=true
  • Fixing encoding of SAML attributes for one provider, but not the others

Usually we implement this by adding config options, but we cannot add a new option for every corner case that only one user in the entire world needs!

I think we could benefit from a plugin system in the issuers. Each issuer would call hooks at various points of processing, for example:

  • When receiving the SAML Auth request, call a hook that lets the user modify the incoming Auth request
  • When about to send the SAML login response, call a hook that lets the user modify the outgoing Auth response
  • In /oauth2/userinfo route, call a hook that lets a user modify the userinfo response

etc.

Design proposition

The portal currently has one array for each entry point, that contains subroutines that call the appropriate function in each plugin that hooks this entrypoint. When loadPlugin is called, findEP dispatches the plugin's entrypoints in the right array.

I'm not sure how to extend this to issuers. Should issuer plugins be treated like normal plugins (in which case findEP has to be modified)? Or a special type of plugin that gets loaded by each issuer module?

@guimard I could use your advice with this

Assignee
Assign to
2.0.10
Milestone
2.0.10 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: lemonldap-ng/lemonldap-ng#2359