Skip to content
Permalink
Browse files

[debops.slapd] Add 'nextcloud' LDAP schema

  • Loading branch information...
drybjed committed Oct 6, 2019
1 parent 34b2e0e commit 3fa8e4b40f35bb267fdd25c59926ec8b3d42e6d0
@@ -106,6 +106,9 @@ LDAP
operation of a given LDAP object, which can be used to, for example, check
the date of the last successful login of a given user account.

- Add support for :ref:`nextcloud LDAP schema <slapd__ref_nextcloud>` which
provides attributes needed to define disk quotas for Nextcloud user accounts.

:ref:`debops.unbound` role
''''''''''''''''''''''''''

@@ -65,6 +65,9 @@ slapd__default_schemas:
# Support for 'eduPerson' and 'eduOrg' schema, included in DebOps
- '{{ slapd__debops_schema_path + "/eduperson.schema" }}'

# Support for 'nextcloud' schema, included in DebOps
- '{{ slapd__debops_schema_path + "/nextcloud.schema" }}'

# ]]]
# .. envvar:: slapd__schemas [[[
#
@@ -0,0 +1,77 @@
# nextcloud.schema - Nextcloud schema definition

# Copyright (C) 2019 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2019 DebOps project https://debops.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Based on: https://docs.nextcloud.com/server/stable/admin_manual/configuration_user/user_auth_ldap.html


# Object namespace definitions
# ----------------------------

# The Private Enterprise Number of the Nextcloud project registered at IANA
# https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
objectIdentifier Nextcloud 1.3.6.1.4.1.49213

# The Nextcloud LDAP namespace
objectIdentifier NextcloudLDAP Nextcloud:1

# The Nextcloud LDAP attribute namespace
objectIdentifier NextcloudLDAPAttribute NextcloudLDAP:1

# The Nextcloud LDAP object namespace
objectIdentifier NextcloudLDAPObject NextcloudLDAP:2


# Nextcloud attribute definitions
# -------------------------------

attributeType ( NextcloudLDAPAttribute:1
NAME 'nextcloudQuota'
DESC 'Nextcloud disk quota (e.g. 15 GB)'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE )

attributeType ( NextcloudLDAPAttribute:2
NAME 'nextcloudEnabled'
DESC 'Whether user or group should be available in Nextcloud'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE )


# Nextcloud object definitions
# ----------------------------

objectClass ( NextcloudLDAPObject:1
NAME 'nextcloudAccount'
DESC 'Object with attributes used by Nextcloud user accounts'
AUXILIARY
MUST ( cn $ uid )
MAY ( nextcloudQuota $ nextcloudEnabled ) )

objectClass ( NextcloudLDAPObject:2
NAME 'nextcloudGroup'
DESC 'Object with attributes used by Nextcloud groups'
AUXILIARY
MUST ( cn )
MAY ( nextcloudEnabled ) )
@@ -261,3 +261,16 @@ The schema is available in Debian in the
slightly outdated and does not include object and attribute descriptions.
Because of that, DebOps contains its own copy of the schema, cleaned up and
updated, which will be imported by default to OpenLDAP directory server.


.. _slapd__ref_nextcloud:

The ``nextcloud`` schema
------------------------

The ``nextcloud`` schema provides a set of LDAP objectClasses and attributes
that can be used to control LDAP integration with :ref:`Nextcloud
<debops.owncloud>` application. Using these attributes, administrators can
define disk quotas for Nextcloud users stored in the LDAP directory, as well as
define which user groups present in LDAP are available in the Nextcloud user
interface.

0 comments on commit 3fa8e4b

Please sign in to comment.
You can’t perform that action at this time.