Skip to content

Server is no trusted during federation #14231

Description

@christianlupus

Steps to reproduce

Assume you have 2 instances of NC, both up to date. Call them A and B. I want to enable federation sharing between those two.

  1. Enable global address book on both A + B to simplify federation sharing.
  2. Insert the Server A as a trusted server in B and vice versa.
  3. Share a file on A with a user on B.
  4. Accept the file on B.

Expected behaviour

  • The servers synchronize the address books and are marked as trusted.
  • The file gets shared.

Actual behaviour

  • The file gets shared.
  • The servers find each other but have a yellow button instead of a green one.
  • No address book synchronization happens (at least I do not get any hint in this direction)
  • According to the logs on both A+B, some error happens after the acceptance of the file on B.

Server configuration

Operating system: A is Archlinux, B is docker container on Debian Stretch

Web server: A is Apache 2.4.38-1, B is nextcloud:latest plus Apache 2.4.25-3+deb9u6 as a reverse proxy

Database: A is mariadb 10.3.12-5, B is from nexcloud:latest

PHP version: A is php 7.3.2-1, B is from nextcloud:latest

Nextcloud version: (see Nextcloud admin page) Both A+B are 15.0.4

Updated from an older Nextcloud/ownCloud or fresh install: A was updated from old installation, B fresh installed (docker)

Where did you install Nextcloud from: A from tarball/live update, B from hub.docker.com

Signing status:

Signing status Both report:
No errors have been found.

List of activated apps:

App list

On A:

Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - apporder: 0.6.0
  - bookmarks: 0.16.2
  - bruteforcesettings: 1.3.0
  - calendar: 1.6.4
  - checksum: 0.4.2
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - contacts: 3.0.3
  - dashboard: 6.0.0
  - dav: 1.8.1
  - deck: 0.5.2
  - federatedfilesharing: 1.5.0
  - federation: 1.5.0
  - files: 1.10.0
  - files_external: 1.6.0
  - files_frommail: 0.2.0
  - files_markdown: 2.0.5
  - files_pdfviewer: 1.4.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_versions: 1.8.0
  - files_videoplayer: 1.4.0
  - firstrunwizard: 2.4.0
  - flowupload: 0.0.9
  - gallery: 18.2.0
  - groupfolders: 2.0.2
  - impersonate: 1.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - metadata: 0.9.0
  - nextcloud_announcements: 1.4.0
  - notes: 2.5.1
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - ocsms: 2.1.1
  - password_policy: 1.5.0
  - passwords: 2019.2.2
  - phonetrack: 0.4.3
  - previewgenerator: 2.0.0
  - provisioning_api: 1.5.0
  - quota_warning: 1.4.0
  - richdocuments: 3.2.1
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - spreed: 5.0.2
  - support: 1.0.0
  - survey_client: 1.3.0
  - systemtags: 1.5.0
  - tasks: 0.9.8
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - twofactor_totp: 2.1.1
  - updatenotification: 1.5.0
  - user_usage_report: 1.1.1
  - workflowengine: 1.5.0
Disabled:
  - admin_audit
  - encryption
  - files_reader
  - issuetemplate
  - socialsharing_email
  - socialsharing_facebook
  - user_ldap

On B:

Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - dav: 1.8.1
  - federatedfilesharing: 1.5.0
  - federation: 1.5.0
  - files: 1.10.0
  - files_pdfviewer: 1.4.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_versions: 1.8.0
  - files_videoplayer: 1.4.0
  - firstrunwizard: 2.4.0
  - gallery: 18.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - password_policy: 1.5.0
  - provisioning_api: 1.5.0
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - spreed: 5.0.2
  - support: 1.0.0
  - survey_client: 1.3.0
  - systemtags: 1.5.0
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - updatenotification: 1.5.0
  - workflowengine: 1.5.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

Config report

On A:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "www2.wolf-stuttgart.net",
            "nextcloud.christian-wolf.click"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/www2.wolf-stuttgart.net\/nextcloud",
        "dbtype": "mysql",
        "version": "15.0.4.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "updater.release.channel": "stable",
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

On B:

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "127.0.0.1:8080",
            "vps1.wolf-stuttgart.net"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "15.0.4.0",
        "overwrite.cli.url": "https:\/\/vps1.wolf-stuttgart.net\/nextcloud",
        "overwritehost": "vps1.wolf-stuttgart.net",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls"
    }
}

Are you using external storage, if yes which one: A uses local, B nothing

Are you using encryption: Both no

Are you using an external user-backend, if yes which one: Both no

Client configuration

Browser: Firefox 65.0

Operating system: Ubuntu Linux 18.04 LTS

Logs

Web server error log

The weblog is quite full (productive server). Everything I see are normal accesses from regular users. Nothing reminding of an error.If needed I can put everything into a gist and send this.

Nextcloud log (data/nextcloud.log)

Nextcloud log

On A:

{"reqId":"8wxdrZz6ol8G8aWlDbjE","level":3,"time":"2019-02-15T14:59:44+00:00","remoteAddr":"185.101.94.135","user":"--","app":"index","method":"POST","url":"/nextcloud//index.php/ocm/notifications","message":{"Exception":"Exception","Message":"The requested uri(/nextcloud/index.php/ocm/notifications) cannot be processed by the script '/nextcloud//index.php')","Code":0,"Trace":[{"file":"/srv/http/nextcloud/nextcloud/lib/base.php","line":930,"function":"getRawPathInfo","class":"OC\\AppFramework\\Http\\Request","type":"->","args":[]},{"file":"/srv/http/nextcloud/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/http/nextcloud/nextcloud/lib/private/AppFramework/Http/Request.php","Line":784,"CustomMessage":"--"},"userAgent":"GuzzleHttp/6.3.3 curl/7.52.1 PHP/7.2.15","version":"15.0.4.0","id":"5c66d5ad6c142"}

On B:

{"reqId":"zdmafFnjLN8YWjKpo2fQ","level":4,"time":"2019-02-15T15:00:13+00:00","remoteAddr":"172.20.0.1","user":"--","app":"federation","method":"POST","url":"/nextcloud/ocs/v2.php/cloud/shared-secret","message":"remote server not trusted (https://www2.wolf-stuttgart.net/nextcloud) while requesting shared secret","userAgent":"GuzzleHttp/6.3.3 curl/7.64.0 PHP/7.3.2","version":"15.0.4.0","id":"5c66d4e340f72"}
{"reqId":"NlJJNG3SjGAnooZzHrE4","level":3,"time":"2019-02-15T15:09:45+00:00","remoteAddr":"172.20.0.1","user":"christian-tmp","app":"no app in context","method":"POST","url":"/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/5","message":"error while sending notification for federated share: Server error: `POST https://nextcloud.christian-wolf.click/nextcloud//index.php/ocm/notifications` resulted in a `500 Internal Server Error` response:\n<!DOCTYPE html>\n<html class=\"ng-csp\" data-placeholder-focus=\"false\" lang=\"en\" data-locale=\"en\" >\n\t<head data-requesttoke (truncated...)\n","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0","version":"15.0.4.0","id":"5c66d639d421e"}

Browser log

Not applicable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions