Revert "idp/proxy: Match users by ID instead of name by default"

This reverts commit 52951b42b0.

The change broke authentication for at least the desktop client when
using the builtin idp. There seem to be issues in the IDP (lico) which
result in the implicit scoped not being added correctly in some case.
When that scope is missing the `lg.uuid` claim will not be present in
the userinfo and we can correctly match users by id.

This reverts back to the old behaviour of matching users by name. Which
also brings some aspects of https://github.com/owncloud/ocis/issues/904

Fixes #6415
This commit is contained in:
Ralf Haferkamp
2023-06-01 08:23:48 +02:00
committed by Ralf Haferkamp
parent 067bc9618c
commit 7a4bc71e65
5 changed files with 8 additions and 20 deletions

View File

@@ -344,10 +344,8 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config,
if cfg.EnableBasicAuth {
logger.Warn().Msg("basic auth enabled, use only for testing or development")
authenticators = append(authenticators, middleware.BasicAuthenticator{
Logger: logger,
UserProvider: userProvider,
UserCS3Claim: cfg.UserCS3Claim,
UserOIDCClaim: cfg.UserOIDCClaim,
Logger: logger,
UserProvider: userProvider,
})
}