Skip to content

Enable multiple strategies for UI login/passport auth #962

@jescalada

Description

@jescalada

Is your feature request related to a problem? Please describe.
Right now, each entry in the auth config has an enabled flag that activates a single auth strategy in the switch found in src/service/passport.

It would be great to allow multiple auth strategies to be loaded dynamically rather than only allowing the enabled auth method in proxy.config.json when starting the backend:

Describe the solution you'd like
Load ALL the strategies with valid configurations and add frontend support so users can choose an option.

Describe alternatives you've considered
In our recently added OIDC support (#906), we are hard-coding the OIDC option to the list of auth methods. This is a bit too rigid since users want to log in with any method their organization provides.

Additional context
This is how the passport is being configured right now src/service/passport:

const configure = async () => {
  const type = authenticationConfig.type.toLowerCase();

  switch (type) {
    case 'activedirectory':
      _passport = await activeDirectory.configure();
      break;
    case 'local':
      _passport = await local.configure();
      break;
    case 'openidconnect':
      _passport = await oidc.configure();
      break;
    default:
      throw Error(`uknown authentication type ${type}`);
  }
  _passport.type = authenticationConfig.type;
  return _passport;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions