nextcloud / user_saml

:lock: App for authenticating Nextcloud users using SAML https://apps.nextcloud.com/apps/user_saml
https://portal.nextcloud.com/article/configuring-single-sign-on-10.html
GNU Affero General Public License v3.0
93 stars 73 forks source link

User account is not provisioned - Nextcloud 29 and authentik #860

Open bastiane273 opened 1 week ago

bastiane273 commented 1 week ago

Steps to reproduce

  1. Fresh Install of Nextcloud AIO v. 9.0.1 (Hub 8 - 29.0.2)
  2. Fresh install of Authentik 2024.6.0
  3. Using this instruction https://blog.cubieserver.de/2022/complete-guide-to-nextcloud-saml-authentication-with-authentik/ (which worked with earlier verison)

Expected behaviour

The Account unknows to nextclozud should be autimagically created :-)

Actual behaviour

Everything seems fine, but after all - Nextcloud will say an your account has not been provisioned.

Server configuration

Operating system: Debian 12 Web server: Apache Database: Postgresql PHP version:

Nextcloud version: (see Nextcloud admin page) Nextcloud AIO 9.0.1 - did made an update yesterday (Hub 8 - 29.0.2) Where did you install Nextcloud from: Docker compose - nextcloud/all-in-one:latest

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'appsallowlist' => false,
  'check_data_directory_permissions' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => '…',
    'port' => 6379,
  ),
  'overwritehost' => 'nc.imparadies.jetzt',
  'overwriteprotocol' => 'https',
  'passwordsalt' => '…',
  'secret' => '…',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'nc.imparadies.jetzt',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '29.0.2.2',
  'overwrite.cli.url' => 'https://nc.xxx.jetzt/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '…',
  'maintenance' => false,
  'updatedirectory' => '/nc-updater',
  'loglevel' => '2',
  'app_install_overwrite' =>
  array (
    0 => 'nextcloud-aio',
    1 => 'gestion',
    2 => 'issuetemplate',
  ),
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'enabledPreviewProviders' =>
  array (
    1 => 'OC\\Preview\\Image',
    2 => 'OC\\Preview\\MarkDown',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\TXT',
    5 => 'OC\\Preview\\OpenDocument',
    6 => 'OC\\Preview\\Movie',
    7 => 'OC\\Preview\\Krita',
    0 => 'OC\\Preview\\Imaginary',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
  'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
  'maintenance_window_start' => 100,
  'allow_local_remote_servers' => true,
  'davstorage.request_timeout' => 3600,
  'htaccess.RewriteBase' => '/',
  'dbpersistent' => false,
  'auth.bruteforce.protection.enabled' => true,

Client configuration

Browser: Any Browser

Operating system: Any OS / Windows 10-11 / Zorin OS / Ubuntu / Debian 12

Logs

Nextcloud log (data/owncloud.log)

Log of container bextcloud-aio-database hats some info:
5.152 UTC [11706] ERROR:  duplicate key value violates unique constraint "oc_user_saml_configurations_pkey"
2024-06-27 15:45:15.152 UTC [11706] DETAIL:  Key (id)=(1) already exists.
2024-06-27 15:45:15.152 UTC [11706] STATEMENT:  INSERT INTO "oc_user_saml_configurations" ("id", "configuration", "name") VALUES($1, $2, $3)
2024-06-27 15:45:25.823 UTC [11718] ERROR:  duplicate key value violates unique constraint "oc_user_saml_configurations_pkey"
2024-06-27 15:45:25.823 UTC [11718] DETAIL:  Key (id)=(1) already exists.
2024-06-27 15:45:25.823 UTC [11718] STATEMENT:  INSERT INTO "oc_user_saml_configurations" ("id", "configuration", "name") VALUES($1, $2, $3)
2024-06-27 15:46:29.420 UTC [11744] ERROR:  duplicate key value violates unique constraint "oc_user_saml_configurations_pkey"
2024-06-27 15:46:29.420 UTC [11744] DETAIL:  Key (id)=(1) already exists.
2024-06-27 15:46:29.420 UTC [11744] STATEMENT:  INSERT INTO "oc_user_saml_configurations" ("id", "configuration", "name") VALUES($1, $2, $3)

Maybe configuration of SSO_SAML-App has not written the configuration in full.

Greetings

blizzz commented 1 week ago

The errors on the database are strange, but do not have anything to do with users not being able to log in.

How many users do you have? Already 100?