• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    PHP
  • Created almost 6 years ago
  • Updated 12 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
26,522
star
2

docker

⛴ Docker image of Nextcloud
Shell
5,826
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
5,228
star
4

android

📱 Nextcloud Android app
Java
4,144
star
5

desktop

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

nextcloudpi

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

ios

📱 Nextcloud iOS App
Swift
1,936
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,306
star
10

deck

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

bookmarks

🔖 Bookmark app for Nextcloud
JavaScript
1,006
star
12

notes-android

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

calendar

📆 Calendar app for Nextcloud
JavaScript
887
star
14

news

📰 RSS/Atom feed reader
JavaScript
852
star
15

mail

💌 Mail app for Nextcloud
JavaScript
830
star
16

passman

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

news-android

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

notes

✎ Distraction-free notes and writing
JavaScript
604
star
19

photos

📸 Your memories under your control
JavaScript
574
star
20

contacts

📇 Contacts app for Nextcloud
JavaScript
565
star
21

tasks

✅ Tasks app for Nextcloud
JavaScript
563
star
22

text

📑 Collaborative document editing using Markdown
JavaScript
546
star
23

cookbook

🍲 A library for all your recipes
HTML
532
star
24

recognize

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

maps

🌍🌏🌎 The whole world fits inside your cloud!
JavaScript
490
star
26

documentation

📘 Nextcloud documentation
HTML
490
star
27

social

🎉 Social can be used for work, or to connect to the fediverse!
PHP
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
456
star
30

richdocuments

📑 Collabora Online for Nextcloud
PHP
353
star
31

forms

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

helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
Smarty
315
star
33

twofactor_totp

🔑 Second factor TOTP (RFC 6238) provider for Nextcloud
JavaScript
286
star
34

groupfolders

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

end_to_end_encryption

🔐 Server API to support End-to-End Encryption
PHP
275
star
36

appstore

🏪 App Store for Nextcloud
Python
262
star
37

polls

🗳️ Polls app for Nextcloud
JavaScript
255
star
38

providers

community-maintained list of Nextcloud providers
234
star
39

nextcloud.com

🌏 Our website
PHP
208
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
189
star
46

tables

🍱 Nextcloud tables app
JavaScript
144
star
47

circles

👪 Create groups with other users on a Nextcloud instance and share with them
PHP
143
star
48

ansible-collection-nextcloud-admin

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

registration

User registration app for Nextcloud
JavaScript
136
star
50

documentserver_community

Document server for onlyoffice
PHP
128
star
51

cms_pico

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

talk-ios

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

neon

A framework for building convergent cross-platform Nextcloud clients using Flutter.
Dart
122
star
54

passman-webextension

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

activity

⚡ Activity app for Nextcloud
JavaScript
115
star
56

twofactor_u2f

🔑 U2F second factor provider for Nextcloud
JavaScript
112
star
57

talk-desktop

💬💻 Nextcloud Talk Desktop Client Preview
JavaScript
110
star
58

gallery

DEPRECATED Gallery app was replaced by Photos
JavaScript
110
star
59

twofactor_gateway

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

external

🌐 Embed external sites in your Nextcloud
JavaScript
104
star
61

notifications

🔔 Notifications app for Nextcloud
PHP
102
star
62

news-updater

📰 Fast, parallel feed updater for the News app; written in Python
Python
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

serverinfo

📊 A monitoring app which creates a server info dashboard for admins
JavaScript
94
star
66

user_saml

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

collectives

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

health

Nextcloud health app
JavaScript
92
star
69

passman-android

🔑 Android app for Passman.
C++
92
star
70

files_videoplayer

📼 Old video viewer for Nextcloud
JavaScript
91
star
71

android-library

☎️ Nextcloud Android library
Java
85
star
72

files_pdfviewer

📖 A PDF viewer for Nextcloud
JavaScript
85
star
73

suspicious_login

Detect and warn about suspicious IPs logging into Nextcloud
PHP
84
star
74

viewer

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

unsplash

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

fulltextsearch_elasticsearch

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

user_oidc

OIDC connect user backend for Nextcloud
PHP
76
star
78

files_antivirus

👾 Antivirus app for Nextcloud Files
JavaScript
74
star
79

files_texteditor

📄 Text editor for plaintext files
JavaScript
71
star
80

Android-SingleSignOn

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

user_sql

🔒 App for authenticating Nextcloud users using SQL
PHP
66
star
82

workflow_script

Rule based processing of files through specified external scripts
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#
59
star
86

security-advisories

👮 Security advisories of Nextcloud
PHP
59
star
87

dashboard

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

integration_openproject

Integration of OpenProject project manager in Nextcloud
PHP
56
star
89

integration_whiteboard

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

encryption-recovery-tools

This project contains tools to recover files that have been encrypted with the Nextcloud End-to-End Encryption or Nextcloud Server-Side Encryption.
PHP
53
star
91

files_automatedtagging

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

logreader

📜 Log reader for Nextcloud
JavaScript
52
star
93

calendar_resource_management

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

impersonate

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

cdav-library

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

3rdparty

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

files_fulltextsearch

🔍 Index the content of your files
PHP
50
star
98

files_accesscontrol

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

bruteforcesettings

🕵 Allow admins to configure the brute force settings
JavaScript
49
star
100

twofactor_webauthn

WebAuthn Two-Factor Provider for Nextcloud
PHP
49
star