Skip to content

[Feat]: Datasources are tied to a specific authentication configuration #1397

Open
@nangelov-eti

Description

@nangelov-eti

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There is a bug where datasources are being authenticated against a specific authentication provider configuration, instead of automatically inheriting the authentication context from the user's login session.

Expected Behavior

Datasources should automatically inherit authentication from the user's login session and should not be tied to a specific authentication configuration.

Steps to reproduce

  1. Log in as admin and create two generic OAuth providers (in our case, Keycloak), each representing a different realm.
  2. Log out and log in using one of the two generic providers.
  3. Create a datasource and set Authentication Type to OAuth2.0 (Inherit from login) and User Authentication Source to GENERIC.
    Screenshot 2024-12-18 142521
  4. Now log out and log in with the other generic provider.
  5. Observe that the datasource is linked to a specific authentication provider configuration, instead of inheriting the authentication from the login session.
    Screenshot 2024-12-18 144040
  6. If this datasource is used by an application, it triggers the following error because it is linked to the first generic OAuth provider, rather than the one we are currently authenticated with.
    Screenshot 2024-12-18 143815

Environment

Lowcoder version 2.4.10 is affected, but it's likely that the issue also impacts the latest version.
mode: ENTERPRISE

Additional Information

We use Keycloak as the OAuth provider to authenticate across multiple Keycloak realms. However, since Lowcoder doesn’t support multiple Keycloak providers, we had to configure separate generic OAuth providers, each representing a different Keycloak realm.

Metadata

Metadata

Labels

API-ServiceBackend Java Spring for the Lowcoder APIJavascript FrontendPull requests that update Javascript code

Type

No type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions