Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • lemonldap-ng lemonldap-ng
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 321
    • Issues 321
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Issues
  • #2675
Closed
Open
Created Dec 17, 2021 by Maxime Besson@maxbes🔧Maintainer

Auth::Custom calls module init twice

Concerned version

Version: 2.0.13

Summary

  • Set authentication to Custom
  • Set customAuth to "::Auth::OpenIDConnect"

Logs

[info] Loading configuration 29 for process 91818
[warn] Route "flogout" redefined
[warn] Route "flogout" redefined
[warn] Route "blogout" redefined
[warn] Route "blogout" redefined
[warn] Route "flogout" redefined
[warn] Route "flogout" redefined
[warn] Route "blogout" redefined
[warn] Route "blogout" redefined
[info] No cookie found

Reason is:

  • loadModule(Auth::Custom) calls Auth::Custom->new during portal init
    • Auth::Custom->new calls loadModule(Auth::OpenIDConnect)
      • loadModule(Auth::OpenIDConnect) calls Auth::OpenIDConnect->new
        • Auth::OpenIDConnect->new returns Auth::OpenIDConnect instance
      • loadModule(Auth::OpenIDConnect) calls init on Auth::OpenIDConnect instance
    • Auth::Custom->new returns a new Auth::OpenIDConnect instance
  • loadModule(Auth::Custom) calls init on the received Auth::OpenIDConnect instance
    • At this step, Auth::OpenIDConnect->init is called for the second time.

Possible fixes

Perhaps Auth::Custom should not call loadModule? but manually load the perl module and instanciate it?

I'm not sure what are the implications, any ideas @guimard ?

Assignee
Assign to
Time tracking