nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
108 stars 64 forks source link

Since Nextcloud 20.0.0 "User backend OC_User_IMAP not found" #157

Closed Aaron-Ritter closed 3 years ago

Aaron-Ritter commented 4 years ago

Steps to reproduce

  1. build custom docker build including imap-ssl and imap / configure OC_User_IMAP in config.php
  2. try to login with imap user (no success)
  3. with local user (success)
  4. check protocol (full of errors: User backend OC_User_IMAP not found.)

Affected Authentication backend

IMAP

Server configuration

docker build stable current: 20.0.0.9 (not working) previous: 19.0.3.1 (working)

version: '3.8'

services:
  db:
    image: mariadb:latest
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=****************
    env_file:
      - db.env

  redis:
    image: redis:5-alpine3.12
    restart: always

  app:
    build: ./app
#    image: nextcloud:fpm-alpine
    restart: always
    volumes:
      - nextcloudmain:/var/www/html
      - nextcloudconfig:/var/www/html/config
      - nextcloudcustom_apps:/var/www/html/custom_apps
      - nextclouddata:/var/www/html/data
      - nextcloudthemes:/var/www/html/themes
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST=redis
    env_file:
      - nextcloud.env
      - db.env
    depends_on:
      - db
      - redis

  web:
    build: ./web
    restart: always
    volumes:
      - nextcloudmain:/var/www/html
      - nextcloudconfig:/var/www/html/config
      - nextcloudcustom_apps:/var/www/html/custom_apps
      - nextclouddata:/var/www/html/data
      - nextcloudthemes:/var/www/html/themes
    environment:
      - VIRTUAL_HOST=****
      - LETSENCRYPT_HOST=****
      - LETSENCRYPT_EMAIL=****
    depends_on:
      - app
    networks:
      - proxy-tier
      - default

  cron:
    build: ./app
#    image: nextcloud:fpm-alpine
    restart: always
    volumes:
      - nextcloudmain:/var/www/html
      - nextcloudconfig:/var/www/html/config
      - nextcloudcustom_apps:/var/www/html/custom_apps
      - nextclouddata:/var/www/html/data
      - nextcloudthemes:/var/www/html/themes
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

  proxy:
    build: ./proxy
    restart: always
    ports:
      - 80:80
      - 443:443
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - certs:/etc/nginx/certs:ro
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
    networks:
      - proxy-tier

  letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    volumes:
      - certs:/etc/nginx/certs
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - proxy-tier
    depends_on:
      - proxy
# cat proxy/Dockerfile
FROM jwilder/nginx-proxy:alpine

COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

# cat web/Dockerfile
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf

# cat app/Dockerfile
FROM nextcloud:fpm-alpine

RUN set -xe && \
    apk add --update \
        imap-dev \
        openssl-dev && \
    apk add --no-cache --virtual .php-deps \
        make && \
    apk add --no-cache --virtual .build-deps \
        $PHPIZE_DEPS \
        krb5-dev && \
    docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
    docker-php-ext-install imap > /dev/null && \
    apk del .build-deps

RUN sed -i -e 's/pm = .+?/pm = dynamic/' \
 -e 's/pm\.max_children = \d/pm\.max_children = 120/' \
 -e 's/pm\.start_servers = \d/pm\.start_servers = 12/' \
 -e 's/pm\.min_spare_servers = \d/pm\.min_spare_servers = 8/' \
 -e 's/pm\.max_spare_servers = \d/pm\.max_spare_servers = 16/' \
 /usr/local/etc/php-fpm.d/www.conf
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed

No errors have been found.

log

image

Aaron-Ritter commented 4 years ago

i manualy changed the info.xml to max version 20 and enabled the untested app with the local user.

Aaron-Ritter commented 4 years ago

Related to https://github.com/nextcloud/user_external/pull/156

violoncelloCH commented 3 years ago

That's just because the app gets deactivated during the update; you can enable it again manually... But yes, we should get #156 in and release a new version...

Aaron-Ritter commented 3 years ago

@violoncelloCH understood, and we fixed it accordingly. But it would have been avoidable as there was a release ready for review and none of the installation would get disabled.

next time we do a check of all the addons and their compatibility before upgrading.

violoncelloCH commented 3 years ago

a new version, which is marked as compatible with Nextcloud 20 and therefore shouldn't get disabled during the update, is released...