From ef9e4352d33bd6180691bbf56152844469a1dd19 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 28 Nov 2019 22:40:51 +0100 Subject: [PATCH] slapd: add openssh public key schema --- roles/slapd/files/schema/openssh-lpk.schema | 20 ++++++++++++++++++++ roles/slapd/tasks/main.yml | 3 ++- roles/slapd/templates/slapd.conf.j2 | 5 +++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 roles/slapd/files/schema/openssh-lpk.schema diff --git a/roles/slapd/files/schema/openssh-lpk.schema b/roles/slapd/files/schema/openssh-lpk.schema new file mode 100644 index 0000000..c4cae65 --- /dev/null +++ b/roles/slapd/files/schema/openssh-lpk.schema @@ -0,0 +1,20 @@ +# +# LDAP Public Key Patch schema for use with openssh-ldappubkey +# Author: Eric AUGE +# +# Based on the proposal of : Mark Ruijter +# + + +# octetString SYNTAX +attributetype ( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey' + DESC 'OpenSSH Public key' + EQUALITY octetStringMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) + +# printableString SYNTAX yes|no +objectclass ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SUP top AUXILIARY + DESC 'OpenSSH LPK objectclass' + MUST uid + MAY sshPublicKey + ) diff --git a/roles/slapd/tasks/main.yml b/roles/slapd/tasks/main.yml index d8e3562..8a63c9d 100644 --- a/roles/slapd/tasks/main.yml +++ b/roles/slapd/tasks/main.yml @@ -14,9 +14,10 @@ - name: Copy schema definitons copy: src={{ item }} dest=/etc/ldap/{{ item }} with_items: + - schema/kitchen.schema + - schema/openssh-lpk.schema - schema/radius.schema - schema/samba.schema - - schema/kitchen.schema notify: Restart slapd - name: Configure slapd (init script) diff --git a/roles/slapd/templates/slapd.conf.j2 b/roles/slapd/templates/slapd.conf.j2 index e36b28b..7ddb2d1 100644 --- a/roles/slapd/templates/slapd.conf.j2 +++ b/roles/slapd/templates/slapd.conf.j2 @@ -11,10 +11,11 @@ include /etc/ldap/schema/core.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/kitchen.schema -include /etc/ldap/schema/nis.schema include /etc/ldap/schema/misc.schema -include /etc/ldap/schema/samba.schema +include /etc/ldap/schema/nis.schema +include /etc/ldap/schema/openssh-lpk.schema include /etc/ldap/schema/radius.schema +include /etc/ldap/schema/samba.schema #######################################################################