ldap: schéma LDAP pour FranceConnect

This commit is contained in:
Benjamin Dauvergne 2018-04-26 08:41:27 +02:00
commit 7395a0bbde
4 changed files with 173 additions and 0 deletions

5
README Normal file
View File

@ -0,0 +1,5 @@
Ressources pour le support de FranceConnect
===========================================
Le répertoire ldap/ contient un schéma pour OpenLDAP supportant les attributs
nécessaires à FranceConnect.

16
ldap/convert-schema-to-ldif.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
SLAPD_CONF=`mktemp --suffix=fca`
SLAPD_DIR=`mktemp -d --suffix=fca`
trap "rm -rf $SLAPD_DIR $SLAPD_CONF" EXIT
cat >$SLAPD_CONF <<EOF
include /etc/ldap/schema/core.schema
include `pwd`/schema/franceconnect.schema
EOF
/usr/sbin/slaptest -f $SLAPD_CONF -F $SLAPD_DIR
cp $SLAPD_DIR/cn\=config/cn\=schema/cn\=\{1\}franceconnect.ldif schema/franceconnect.ldif

View File

@ -0,0 +1,52 @@
dn: cn=franceconnect,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: franceconnect
olcObjectIdentifier: {0}EORoot 1.3.6.1.4.1.36560
olcObjectIdentifier: {1}EOClients EORoot:3
olcObjectIdentifier: {2}FranceConnect EOClients:4
olcObjectIdentifier: {3}FranceConnectOC FranceConnect:1
olcObjectIdentifier: {4}FranceConnectAT FranceConnect:2
olcAttributeTypes: {0}( FranceConnectAT:1 NAME 'fcGender' DESC 'Gender of a
person: must be male or female' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreS
ubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8} SINGLE-VALUE )
olcAttributeTypes: {1}( FranceConnectAT:2 NAME 'fcBirthdate' DESC 'ISO 3601
birthdate of the user, format YYYYMMDD' SYNTAX 1.3.6.1.4.1.1466.115.121.1.3
6 SINGLE-VALUE )
olcAttributeTypes: {2}( FranceConnectAT:3 NAME 'fcBirthCountry' DESC 'INSEE
code of the birth country' SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALU
E )
olcAttributeTypes: {3}( FranceConnectAT:4 NAME 'fcBirthPlace' DESC 'INSEE co
de of the birth place' SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
olcAttributeTypes: {4}( FranceConnectAT:5 NAME 'fcUsualName' DESC 'usual nam
e of the person' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: {5}( FranceConnectAT:6 NAME 'fcBelongingPopulation' DESC
'ex.: agent, prestataire, partenaire' EQUALITY caseIgnoreMatch SUBSTR caseI
gnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: {6}( FranceConnectAT:7 NAME 'fcSiren' DESC 'agent enterpr
ise number' SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
olcAttributeTypes: {7}( FranceConnectAT:8 NAME 'fcSiret' DESC 'agent enterpr
ise etablissement number' SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE
)
olcAttributeTypes: {8}( FranceConnectAT:9 NAME 'fcPosition' DESC 'position i
n the organization' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMat
ch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: {9}( FranceConnectAT:10 NAME 'fcJob' DESC 'function in th
e organization' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch S
YNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: {10}( FranceConnectAT:11 NAME 'fcPhone' DESC 'function in
the organization' SUP telephoneNumber )
olcAttributeTypes: {11}( FranceConnectAT:12 NAME 'fcAddress' DESC 'function
in the organization' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcObjectClasses: {0}( FranceConnectOC:1 NAME 'FCPerson' DESC 'Person desrip
tion for FranceConnect' SUP top STRUCTURAL MUST ( uid $ givenName $ sn ) MA
Y userPassword )
olcObjectClasses: {1}( FranceConnectOC:2 NAME 'FCUsager' DESC 'Person descri
ption for FranceConnect usager' SUP FCPerson STRUCTURAL MUST ( fcGender $ f
cBirthDate $ fcBirthCountry $ fcBirthPlace ) MAY mail )
olcObjectClasses: {2}( FranceConnectOC:3 NAME 'FCAgent' DESC 'Person descrip
tion for FranceConnect agent' SUP FCPerson STRUCTURAL MUST ( mail $ fcSiren
) MAY ( fcGender $ fcUsualName $ fcBirthDate $ fcBirthCountry $ fcBirthPla
ce $ fcBelongingPopulation $ fcSiret $ fcPosition $ fcJob $ fcPhone $ fcAdd
ress ) )
structuralObjectClass: olcSchemaConfig

View File

@ -0,0 +1,100 @@
# $OpenLDAP$
#
# OIDs
#
objectIdentifier EORoot 1.3.6.1.4.1.36560
objectIdentifier EOClients EORoot:3
objectIdentifier FranceConnect EOClients:4
objectIdentifier FranceConnectOC FranceConnect:1
objectIdentifier FranceConnectAT FranceConnect:2
#
# Attributs
#
attributetype ( FranceConnectAT:1 NAME 'fcGender'
DESC 'Gender of a person: must be male or female'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8} SINGLE-VALUE )
attributetype ( FranceConnectAT:2 NAME 'fcBirthdate'
DESC 'ISO 3601 birthdate of the user, format YYYYMMDD'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( FranceConnectAT:3 NAME 'fcBirthCountry'
DESC 'INSEE code of the birth country'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( FranceConnectAT:4 NAME 'fcBirthPlace'
DESC 'INSEE code of the birth place'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( FranceConnectAT:5 NAME 'fcUsualName'
DESC 'usual name of the person'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( FranceConnectAT:6 NAME 'fcBelongingPopulation'
DESC 'ex.: agent, prestataire, partenaire'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( FranceConnectAT:7 NAME 'fcSiren'
DESC 'agent enterprise number'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( FranceConnectAT:8 NAME 'fcSiret'
DESC 'agent enterprise etablissement number'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( FranceConnectAT:9 NAME 'fcPosition'
DESC 'position in the organization'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( FranceConnectAT:10 NAME 'fcJob'
DESC 'function in the organization'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( FranceConnectAT:11 NAME 'fcPhone'
DESC 'function in the organization'
SUP telephoneNumber )
attributetype ( FranceConnectAT:12 NAME 'fcAddress'
DESC 'function in the organization'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
#
#
# Classes
#
objectClass ( FranceConnectOC:1
NAME 'FCPerson'
DESC 'Person desription for FranceConnect'
SUP top STRUCTURAL
MUST ( uid $ givenName $ sn )
MAY ( userPassword ) )
objectClass ( FranceConnectOC:2
NAME 'FCUsager'
DESC 'Person description for FranceConnect usager'
SUP FCPerson
MUST ( fcGender $ fcBirthDate $ fcBirthCountry $ fcBirthPlace )
MAY ( mail ) )
objectClass ( FranceConnectOC:3
NAME 'FCAgent'
DESC 'Person description for FranceConnect agent'
SUP FCPerson
MUST ( mail $ fcSiren )
MAY ( fcGender $ fcUsualName $ fcBirthDate $ fcBirthCountry $ fcBirthPlace $ fcBelongingPopulation $ fcSiret $ fcPosition $ fcJob $ fcPhone $ fcAddress ) )