• Stars
    star
    101
  • Rank 326,229 (Top 7 %)
  • Language
    PHP
  • Created over 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

👥 External user authentication methods like IMAP, SMB and FTP

External user authentication

⚠⚠ Warning: As of Version 3.0 this app uses namespace \OCA\UserExternal now. You MUST change your config to adopt to this change. See examples below. ⚠⚠

Authenticate user login against IMAP, SMB, FTP, WebDAV, HTTP BasicAuth, SSH and XMPP

Passwords are not stored locally; authentication always happens against the remote server.

It stores users and their display name in its own database table users_external. When modifying the user_backends configuration, you need to update the database table's backend field, or your users will lose their configured display name.

If something does not work, check the log file at nextcloud/data/nextcloud.log.

⚠⚠ Warning: If you are using more than one backend or especially one backend more often than once, make sure that you still have resp. get unique uids in the database. ⚠⚠

FTP

Authenticate Nextcloud users against a FTP server.

Configuration

You only need to supply the FTP host name or IP.

The second - optional - parameter determines if SSL should be used or not.

Add the following to config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\FTP',
        'arguments' => array('127.0.0.1'),
    ),
),

To enable SSL connections via ftps, append a second parameter true:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\FTP',
        'arguments' => array('127.0.0.1', true),
    ),
),

Dependencies

PHP automatically contains basic FTP support.

For SSL-secured FTP connections via ftps, the PHP openssl extension needs to be activated.

IMAP

Authenticate Nextcloud users against an IMAP server. IMAP user and password need to be given for the Nextcloud login.

Configuration

The parameters are host, port, sslmode, domain. Possible values for sslmode are ssl or tls. Add the following to your config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\IMAP',
        'arguments' => array(
            '127.0.0.1', 993, 'ssl', 'example.com', true, false
        ),
    ),
),

This connects to the IMAP server on IP 127.0.0.1. The default port is 143. However, note that parameter order matters and if you want to restrict the domain (4th parameter), you need to also specify the port (2nd parameter) and sslmode (3rd parameter; set to null for insecure connection). If a domain name (e.g. example.com) is specified, then this makes sure that only users from this domain will be allowed to login. If the fifth parameter is set to true, after successfull login the domain part will be striped and the rest used as username in Nextcloud. e.g. '[email protected]' will be 'username' in Nextcloud. The sixth parameter toggles whether on creation of the user, it is added to a group corresponding to the name of the domain part of the address.

⚠⚠ Warning: If you are upgrading from versions <0.6.0, beside adapting your config.php you also have to change the backend column in the users_external table of the database. In your pre 0.6.0 database it may look like {127.0.0.1:993/imap/ssl/readonly}INBOX or similar, but now it has to be just 127.0.0.1 for everything to work flawless again. ⚠⚠

Samba

Utilizes the smbclient executable to authenticate against a windows network machine via SMB.

Configuration

The only supported parameter is the hostname of the remote machine.

Add the following to your config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\SMB',
        'arguments' => array('127.0.0.1'),
    ),
),

Dependencies

The smbclient executable needs to be installed and accessible within $PATH.

WebDAV

Authenticate users by a WebDAV call. You can use any WebDAV server, Nextcloud server or other web server to authenticate. It should return http 200 for right credentials and http 401 for wrong ones.

Attention: This app is not compatible with the LDAP user and group backend. This app is not the WebDAV interface of Nextcloud, if you don't understand what it does then do not enable it.

Configuration

The only supported parameter is the URL of the web server.

Add the following to your config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\WebDAVAuth',
        'arguments' => array('https://example.com/webdav'),
    ),
),

BasicAuth

Authenticate users by an HTTP Basic access authentication call. HTTP server of your choice to authenticate. It should return HTTP 2xx for correct credentials and an appropriate other error code for wrong ones or refused access. The HTTP server must respond to any requests to the target URL with the "www-authenticate" header set. Otherwise BasicAuth considers itself to be misconfigured or the HTTP server unfit for authentication.

Configuration

The only supported parameter is the URL of the web server where the authentication happens.

⚠⚠ Warning: make sure to use the URL of a correctly configured HTTP Basic authenticating server. If the server always responds with a HTTP 2xx response without validating the users, this would allow anyone to log in to your Nextcloud instance with any username / password combination. ⚠⚠

Add the following to your config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\BasicAuth',
        'arguments' => array('https://example.com/basic_auth'),
    ),
),

SSH

Authenticates users via SSH. You can use any SSH2 server, but it must accept password authentication.

Configuration

The supported parameters are the hostname and the port (default 22) of the remote machine.

Add the following to your config.php:

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\SSH',
        'arguments' => array('127.0.0.1', '22'),
    ),
),

Dependencies

Requires the php-ssh2 PECL module installed.

XMPP (Prosody)

Authenticate Nextcloud users against a Prosody XMPP MySQL database. Prosody user and password need to be given for the Nextcloud login.

Configuration

Add the following to your config.php:

'user_backends' => array (
    0 => array (
        'class' => '\OCA\UserExternal\XMPP',
            'arguments' => array (
                0 => 'dbhost',
                1 => 'prosodydb',
                2 => 'dbuser',
                3 => 'dbuserpassword',
                4 => 'xmppdomain',
                5 => true,
            ),
        ),
),

0 - Database Host 1 - Prosody Database Name 2 - Database User 3 - Database User Password 4 - XMPP Domain 5 - Hashed Passwords in Database (true) / Plaintext Passwords in Database (false)

⚠⚠ Warning: If you need to set 5 (Hashed Password in Database) to false, your Prosody Instance is storing passwords in plaintext. This is insecure and not recommended. We highly recommend that you change your Prosody configuration to protect the passwords of your Prosody users. ⚠⚠

Alternatives

Other extensions allow connecting to external user databases directly via SQL, which may be faster:

More Repositories

1

server

☁️ Nextcloud server, a safe home for all your data
PHP
23,691
star
2

docker

⛴ Docker image of Nextcloud
Shell
5,429
star
3

all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
PHP
3,965
star
4

android

📱 Nextcloud Android app
Java
3,848
star
5

desktop

💻 Desktop sync client for Nextcloud
C++
2,770
star
6

nextcloudpi

📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, curl installer...
Shell
2,380
star
7

ios

📱 Nextcloud iOS App
Swift
1,800
star
8

spreed

🗨️ Nextcloud Talk – chat, video & audio calls for Nextcloud
JavaScript
1,441
star
9

vm

💻☁📦 The Nextcloud VM (virtual machine appliance), Home/SME Server and scripts for RPi (4). Community developed and maintained.
Shell
1,252
star
10

deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
JavaScript
1,136
star
11

bookmarks

🔖 Bookmark app for Nextcloud
JavaScript
956
star
12

notes-android

✎ Android client for Nextcloud Notes app.
Java
896
star
13

calendar

📆 Calendar app for Nextcloud
JavaScript
887
star
14

mail

💌 Mail app for Nextcloud
JavaScript
788
star
15

news

📰 RSS/Atom feed reader
PHP
786
star
16

passman

🔐 Open source password manager with Nextcloud integration
JavaScript
769
star
17

news-android

📱🗞️ Android client for the Nextcloud news/feed reader app
Java
663
star
18

notes

✎ Distraction-free notes and writing
JavaScript
580
star
19

contacts

📇 Contacts app for Nextcloud
JavaScript
541
star
20

tasks

✅ Tasks app for Nextcloud
JavaScript
536
star
21

text

📑 Collaborative document editing using Markdown
JavaScript
500
star
22

cookbook

🍲 A library for all your recipes
HTML
492
star
23

photos

📸 Your memories under your control
JavaScript
481
star
24

maps

🌍🌏🌎 The whole world fits inside your cloud!
JavaScript
474
star
25

recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
PHP
470
star
26

social

🎉 Social can be used for work, or to connect to the fediverse!
PHP
464
star
27

documentation

📘 Nextcloud documentation
JavaScript
464
star
28

talk-android

📱😀 Video & audio calls through Nextcloud on Android
Kotlin
461
star
29

previewgenerator

Nextcloud app to do preview generation in the background.
PHP
440
star
30

richdocuments

📑 Collabora Online for Nextcloud
JavaScript
336
star
31

forms

📝 Simple form & survey app for Nextcloud
JavaScript
301
star
32

twofactor_totp

🔑 Second factor TOTP (RFC 6238) provider for Nextcloud
JavaScript
265
star
33

helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
Smarty
263
star
34

groupfolders

📁👩‍👩‍👧‍👦 Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
PHP
262
star
35

appstore

🏪 App Store for Nextcloud
Python
262
star
36

end_to_end_encryption

🔐 Server API to support End-to-End Encryption
PHP
253
star
37

polls

🗳️ Polls app for Nextcloud
JavaScript
249
star
38

providers

community-maintained list of Nextcloud providers
213
star
39

nextcloud.com

🌏 Our website
PHP
207
star
40

notify_push

Update notifications for nextcloud clients
Rust
202
star
41

backup

Backup now. Restore later.
PHP
202
star
42

nextcloud-vue

🍱 Vue.js components for Nextcloud app development ✌ https://npmjs.org/@nextcloud/vue
Vue
198
star
43

client_theming

💻 Nextcloud themed desktop client - Moved over to https://github.com/nextcloud/desktop
Shell
197
star
44

fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
PHP
197
star
45

ocsms

📱 Nextcloud/ownCloud PhoneSync server application
JavaScript
190
star
46

circles

👪 Create groups with other users on a Nextcloud instance and share with them
PHP
139
star
47

registration

User registration app for Nextcloud
JavaScript
134
star
48

ansible-collection-nextcloud-admin

The ansible galaxy for your nextcloud administrative needs.
Jinja
130
star
49

cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
PHP
127
star
50

talk-ios

📱😀 Video & audio calls through Nextcloud on iOS
Objective-C
123
star
51

documentserver_community

Document server for onlyoffice
PHP
122
star
52

tables

🍱 Nextcloud tables app
JavaScript
114
star
53

twofactor_u2f

🔑 U2F second factor provider for Nextcloud
JavaScript
113
star
54

passman-webextension

Webextension for the Passman Nextcloud app. Also offers browser extension & Android app.
JavaScript
111
star
55

talk-desktop

💬💻 Nextcloud Talk Desktop Client Preview
JavaScript
110
star
56

gallery

DEPRECATED Gallery app was replaced by Photos
JavaScript
110
star
57

twofactor_gateway

🔑 Second factor provider using an external messaging gateway (SMS, Telegram, Signal)
PHP
109
star
58

activity

⚡ Activity app for Nextcloud
JavaScript
108
star
59

external

🌐 Embed external sites in your Nextcloud
JavaScript
104
star
60

notifications

🔔 Notifications app for Nextcloud
PHP
102
star
61

news-updater

📰 Fast, parallel feed updater for the News app; written in Python
Python
100
star
62

neon

A framework for building convergent cross-platform Nextcloud clients using Flutter.
Dart
100
star
63

integration_google

🇬 Google integration into Nextcloud
JavaScript
98
star
64

nextcloud-filelink

✉️ 📤 "Nextcloud for Filelink" is a Thunderbird extension which makes it easy to send large attachments with Thunderbird by uploading them first to a Nextcloud server and by then inserting the link into the body of your email.
JavaScript
96
star
65

user_saml

🔒 App for authenticating Nextcloud users using SAML https://apps.nextcloud.com/apps/user_saml
PHP
93
star
66

files_videoplayer

📼 Old video viewer for Nextcloud
JavaScript
91
star
67

health

Nextcloud health app
JavaScript
89
star
68

passman-android

🔑 Android app for Passman.
C++
89
star
69

android-library

☎️ Nextcloud Android library
Java
85
star
70

serverinfo

📊 A monitoring app which creates a server info dashboard for admins
JavaScript
85
star
71

viewer

🖼 Simple file viewer with slideshow for media
JavaScript
83
star
72

unsplash

📸🔀☁️ Random Nextcloud log in background from Unsplash
JavaScript
82
star
73

files_pdfviewer

📖 A PDF viewer for Nextcloud
JavaScript
81
star
74

suspicious_login

Detect and warn about suspicious IPs logging into Nextcloud
PHP
80
star
75

fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
PHP
77
star
76

files_antivirus

👾 Antivirus app for Nextcloud Files
JavaScript
74
star
77

collectives

Collectives is a Nextcloud App for activist and community projects to organize together.
JavaScript
73
star
78

Android-SingleSignOn

Single sign-on for Nextcloud (Android Library Project)
Java
70
star
79

files_texteditor

📄 Text editor for plaintext files
JavaScript
69
star
80

user_oidc

OIDC connect user backend for Nextcloud
PHP
66
star
81

workflow_script

Rule based processing of files through specified external scripts
PHP
65
star
82

user_sql

🔒 App for authenticating Nextcloud users using SQL
PHP
65
star
83

files_rightclick

👉 Right click menu for Nextcloud
JavaScript
64
star
84

ransomware_protection

An app that prevents uploading files that have names that are linked to known ransomware
PHP
62
star
85

windows-universal

📱 Nextcloud Windows Mobile app
C#
58
star
86

dashboard

ARCHIVED, new Dashboard is in the server
PHP
58
star
87

security-advisories

👮 Security advisories of Nextcloud
PHP
55
star
88

integration_whiteboard

✏ A whiteboard for Nextcloud, using Spacedeck
PHP
53
star
89

files_automatedtagging

🔖 An app for Nextcloud that assigns tags to newly uploaded files based on some conditions
JavaScript
53
star
90

logreader

📜 Log reader for Nextcloud
JavaScript
52
star
91

calendar_resource_management

Resources back-end for the Nextcloud CalDAV server
PHP
52
star
92

impersonate

👻 Allow administrators to become a different user
JavaScript
52
star
93

cdav-library

📅 📇 CalDAV and CardDAV client library for JavaScript
JavaScript
51
star
94

integration_openproject

Integration of OpenProject project manager in Nextcloud
PHP
51
star
95

3rdparty

🔋 3rd party libraries that are needed to run Nextcloud
PHP
51
star
96

files_fulltextsearch

🔍 Index the content of your files
PHP
50
star
97

files_accesscontrol

🚫 App to manage access control for files
PHP
49
star
98

integration_github

🐙 GitHub integration into Nextcloud
JavaScript
49
star
99

strengthify

🔒🔍 Combine jQuery and zxcvbn to create a password strength meter
JavaScript
49
star
100

bruteforcesettings

🕵 Allow admins to configure the brute force settings
JavaScript
48
star