diff options
author | M.Gergo | 2019-03-08 21:20:34 +0100 |
---|---|---|
committer | M.Gergo | 2019-03-08 21:20:34 +0100 |
commit | f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 (patch) | |
tree | e13e60e4b94a3b58f1e2bfbe271102c8f04b67bd /mayor-orig/mayor-base/install | |
parent | c76a004b0135786f2742283f8d5f917106f58bd8 (diff) | |
download | mayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.tar.gz mayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.zip |
további rendrakás
Diffstat (limited to 'mayor-orig/mayor-base/install')
14 files changed, 1023 insertions, 0 deletions
diff --git a/mayor-orig/mayor-base/install/base/apache2/mayor.conf b/mayor-orig/mayor-base/install/base/apache2/mayor.conf new file mode 100644 index 00000000..d50b25a5 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/apache2/mayor.conf @@ -0,0 +1,46 @@ +<VirtualHost *:443> + ServerName your.mayor.server.hu + + ServerAdmin webmaster@localhost + + SSLEngine On + SSLCertificateFile /etc/apache2/ssl/apache.pem +# # SSLCertificateFile /etc/apache2/ssl/crt/name-cert.pem +# # SSLCertificateKeyFile /etc/apache2/ssl/key/name-key.pem + + DocumentRoot /var/mayor/www/ + <Directory /> + Options FollowSymLinks + AllowOverride None + </Directory> + <Directory /var/mayor/www/> + Options -Indexes +FollowSymLinks +MultiViews + AllowOverride None + # Apache 2.2 # Order allow,deny + # Apache 2.2 # allow from all + # Apache 2.4 # Require all granted + <IfVersion >= 2.3> + Require all granted + </IfVersion> + <IfVersion < 2.3> + order allow,deny + allow from all + </IfVersion> + RewriteEngine on + RewriteBase / + RewriteCond %{SERVER_PORT} ^80$ + RewriteCond %{THE_REQUEST} .*(policy=private|page=auth|page=password).* + RewriteRule (.*)$ https://%{SERVER_NAME}/$1 [L] + + </Directory> + + ErrorLog /var/log/apache2/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog /var/log/apache2/access.log combined + ServerSignature On + +</VirtualHost> diff --git a/mayor-orig/mayor-base/install/base/ldap/access-control/mayor.acl b/mayor-orig/mayor-base/install/base/ldap/access-control/mayor.acl new file mode 100644 index 00000000..abc5b4d5 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/access-control/mayor.acl @@ -0,0 +1,97 @@ +# +# Jelszó változtatás +# + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=userPassword + by anonymous auth + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by * none + +access to attrs=userPassword + by anonymous auth + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by * none + + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=shadowLastChange,shadowExpire + by anonymous read + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by * read + +access to attrs=shadowLastChange,shadowExpire + by anonymous read + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by * read + +# +# Személyes adatok +# + +# A session nyitáshoz szükséges adatoknak publikusan olvashatónak kell lennie (shadow, studyId) + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=mail + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by * read + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=telephonenumber,mobile + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by users read + by * none + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=cn,studyId + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by * read + +access to dn.subtree="ou=diak,%BASEDN%" + attrs=l,street,postaladdress,postalcode + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by group/mayorGroup/member="cn=diakadmin,ou=Groups,%BASEDN%" write + by users read + by * none + +# ******************************************************************* # + +access to attrs=mail + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by * read + +access to attrs=telephonenumber,mobile + by self write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by users read + by * none + +access to attrs=cn,studyId + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by * read + +access to attrs=l,street,postaladdress,postalcode + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by users read + by * none + +# +# Alapértelmezett +# + +access to * + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by anonymous read + by * read diff --git a/mayor-orig/mayor-base/install/base/ldap/ldif/groups.ldif b/mayor-orig/mayor-base/install/base/ldap/ldif/groups.ldif new file mode 100644 index 00000000..8b029ef3 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/ldif/groups.ldif @@ -0,0 +1,59 @@ +# ------------------------------------------- +# MaYoR keretrendszer - alapvetÅ‘ csoportok +# ------------------------------------------- + +dn: cn=useradmin,ou=Groups,%BASEDN% +cn: useradmin +gidNumber: 6001 +description:: VXNlciBhZG1pbmlzenRyw6FjacOz +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=tanar,ou=Groups,ou=tanar,%BASEDN% +cn: tanar +gidNumber: 6002 +description:: QSB0YW7DoXJvaw== +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=titkarsag,ou=Groups,ou=titkarsag,%BASEDN% +cn: titkarsag +gidNumber: 6003 +description:: VGl0a8OhcnPDoWc= +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=gazdasagi,ou=Groups,ou=gazdasagi,%BASEDN% +cn: gazdasagi +gidNumber: 6004 +description:: R2F6ZGFzw6FnaQ== +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=egyeb,ou=Groups,ou=egyeb,%BASEDN% +cn: egyeb +gidNumber: 6005 +description: Egyeb +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=vezetoseg,ou=Groups,%BASEDN% +cn: vezetoseg +gidNumber: 6006 +description:: VmV6ZXTFkXPDqWc= +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup + +dn: cn=diakadmin,ou=Groups,%BASEDN% +cn: diakadmin +gidNumber: 6007 +description: Diak admin +member: uid=mayoradmin,ou=egyeb,%BASEDN% +memberUid: mayoradmin +objectClass: mayorGroup diff --git a/mayor-orig/mayor-base/install/base/ldap/ldif/o.ldif b/mayor-orig/mayor-base/install/base/ldap/ldif/o.ldif new file mode 100644 index 00000000..c13b12c5 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/ldif/o.ldif @@ -0,0 +1,9 @@ +# ------------------------------------------ +# MaYoR keretrendszer - organization object +# ------------------------------------------ +dn: %BASEDN% +o: %ORGANIZATION% +objectClass: organization +objectClass: mayorOrganization +nextuid: 3100 +nextgid: 6100 diff --git a/mayor-orig/mayor-base/install/base/ldap/ldif/ou.ldif b/mayor-orig/mayor-base/install/base/ldap/ldif/ou.ldif new file mode 100644 index 00000000..3c4609c3 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/ldif/ou.ldif @@ -0,0 +1,62 @@ +# ------------------------------------------------ +# MaYoR keretrendszer - organizational unit-ok +# ------------------------------------------------ + +dn: ou=Groups,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description: MaYoR csoportok + +# ------------------------------------------------ + +dn: ou=diak,%BASEDN% +ou: diak +objectClass: organizationalUnit +description:: RGnDoWtvaw== + +dn: ou=egyeb,%BASEDN% +ou: egyeb +objectClass: organizationalUnit +description:: RWd5w6liIGZlbGhhc3puw6Fsw7Nr + +dn: ou=gazdasagi,%BASEDN% +ou: gazdasagi +objectClass: organizationalUnit +description:: R2F6ZGFzw6FnaSBpcm9kYQ== + +dn: ou=tanar,%BASEDN% +ou: tanar +objectClass: organizationalUnit +description:: VGFuw6Fyb2s= + +dn: ou=titkarsag,%BASEDN% +ou: titkarsag +objectClass: organizationalUnit +description:: VGl0a8OhcnPDoWc= + +# ------------------------------------------------ + +dn: ou=Groups,ou=diak,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description:: RGnDoWsgY3NvcG9ydG9r + +dn: ou=Groups,ou=egyeb,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description:: RWd5w6liIGNzb3BvcnRvaw== + +dn: ou=Groups,ou=gazdasagi,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description:: R2F6ZGFzw6FnaSBpcm9kYSBjc29wb3J0amFp + +dn: ou=Groups,ou=tanar,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description:: VGFuw6FyIGNzb3BvcnRvaw== + +dn: ou=Groups,ou=titkarsag,%BASEDN% +ou: Groups +objectClass: organizationalUnit +description:: VGl0a8OhcnPDoWdpIGNzb3BvcnRvaw== diff --git a/mayor-orig/mayor-base/install/base/ldap/ldif/user.ldif b/mayor-orig/mayor-base/install/base/ldap/ldif/user.ldif new file mode 100644 index 00000000..b4c747c7 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/ldif/user.ldif @@ -0,0 +1,23 @@ +# ---------------------------------------- +# MaYoR keretrendszer - mayoradmin +# ---------------------------------------- + +dn: uid=mayoradmin,ou=egyeb,%BASEDN% +uid: mayoradmin +sn: MaYoR +givenName: Admin +cn: MaYoR Admin +gecos: MaYoR Admin +uidNumber: 3001 +gidNumber: 3001 +homeDirectory: /tmp +userPassword: MayorJelszo +objectClass: mayorPerson +objectClass: person + +dn: cn=mayoradmin,ou=Groups,ou=egyeb,%BASEDN% +cn: mayoradmin +gidNumber: 3001 +memberUid: mayoradmin +description:: QSBmZWxoYXN6bsOhbMOzIHNhasOhdCBjc29wb3J0amE= +objectClass: posixGroup diff --git a/mayor-orig/mayor-base/install/base/ldap/mayor-slapd.conf b/mayor-orig/mayor-base/install/base/ldap/mayor-slapd.conf new file mode 100644 index 00000000..d64f6623 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/mayor-slapd.conf @@ -0,0 +1,42 @@ +# +# Slapd Config File (example) +# Fontosabb beállÃtások +# + +# mayor objectum schemák +include "/etc/ldap/mayor/schema/mayor.schema" + +# Backend tÃpusa (alapértelmezett az ldbm) +database bdb + +# Az alap könyvtár (az iskola egyedi azonosÃtója) +suffix "%BASEDN%" + +# Az adatbázis file-ok fizikai helye +directory "/var/lib/ldap/%ORGANIZATION%" + +# Az eltárolt entry-k száma és az index-file-onkénti tár terület +# Olvasd el: http://k12linux.mesd.k12.or.us/ldap/performance.html +cachesize 10000 + +# dbcachesize <integer> +# Specify the size in bytes of the in-memory cache associated with +# each open index file. If not supported by the underlying +# database method, this option is ignored without comment. The +# default is 100000 bytes. +#dbcachesize 1048576 + +# Indexek +index objectClass,uid pres,eq +index cn pres,eq,sub +index uidNumber,gidNumber eq + +# Jogosultságok +include "/etc/ldap/mayor/access-control/mayor.acl" + +# Adminisztrátori jogok +access to * + by dn="uid=admin,%BASEDN%" write + by group/mayorGroup/member="cn=useradmin,ou=Groups,%BASEDN%" write + by * read +
\ No newline at end of file diff --git a/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema b/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema new file mode 100644 index 00000000..147187fe --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------- +# +# MaYoR keretrendszer LDAP backend schema definÃciói +# +# ------------------------------------------------------------------------- + +objectIdentifier mayorOID 1.3.6.1.4.1.13308 +objectIdentifier mayorAttributeType mayorOID:1 +objectIdentifier mayorObjectClass mayorOID:2 + +# ------------------------------------------------------------------------- +# Attribútumok +# ------------------------------------------------------------------------- + +attributeType ( mayorAttributeType:5 + NAME 'leader' + DESC 'A csoport fÅ‘nöke - pl. osztályfÅ‘nök' + SUP owner ) + +attributeType ( mayorAttributeType:6 + NAME 'nextUid' + DESC 'A következÅ‘ uidNumber' + SUP uidNumber ) + +attributeType ( mayorAttributeType:7 + NAME 'nextGid' + DESC 'A következÅ‘ gidNumber' + SUP gidNumber ) + +attributeType ( mayorAttributeType:8 + NAME 'freeUid' + DESC 'Szabad uidNumber' + SUP uidNumber ) + +attributeType ( mayorAttributeType:9 + NAME 'freeGid' + DESC 'Szabad gidNumber' + SUP gidNumber ) + +attributetype ( mayorAttributeType:31 + NAME 'studyId' + DESC 'Oktatási azonosÃtó' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 + EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch ) + +# ================================================================ +# Objektum osztályok +# ================================================================ + +objectClass ( mayorObjectClass:1 + NAME 'mayorOrganization' + DESC 'MaYoR Organizational Object' + SUP organization + MUST ( nextUid $ nextGid ) + MAY ( freeUid $ freeGid ) ) + +objectClass ( mayorObjectClass:2 + NAME 'mayorPerson' + DESC 'MaYoR Person' + SUP (posixAccount $ shadowAccount) AUXILIARY + MAY ( sn $ givenName $ l $ street $ mail $ postalAddress $ postalCode $ telephoneNumber $ + mobile $ roomNumber $ studyId ) ) +# SUP ( posixAccount $ shadowAccount ) + +objectClass ( mayorObjectClass:3 + NAME 'mayorGroup' + DESC 'MaYoR Group' + SUP ( posixGroup $ groupOfNames ) + MAY ( leader $ mail ) ) + +# ======================================================================================= +# +# objectclass ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' +# DESC 'Abstraction of an account with POSIX attributes' +# SUP top AUXILIARY +# MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) +# MAY ( userPassword $ loginShell $ gecos $ description ) ) +# +# objectclass ( 1.3.6.1.1.1.2.1 NAME 'shadowAccount' +# DESC 'Additional attributes for shadow passwords' +# SUP top AUXILIARY +# MUST uid +# MAY ( userPassword $ shadowLastChange $ shadowMin $ +# shadowMax $ shadowWarning $ shadowInactive $ +# shadowExpire $ shadowFlag $ description ) ) +# +# objectclass ( 1.3.6.1.1.1.2.2 NAME 'posixGroup' +# DESC 'Abstraction of a group of accounts' +# SUP top STRUCTURAL +# MUST ( cn $ gidNumber ) +# MAY ( userPassword $ memberUid $ description ) ) +# +# objectclass ( 2.5.6.6 NAME 'person' +# DESC 'RFC2256: a person' +# SUP top STRUCTURAL +# MUST ( sn $ cn ) +# MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) ) +# +# ======================================================================================= + diff --git a/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema.orig b/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema.orig new file mode 100644 index 00000000..0d1a6547 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/schema/mayor.schema.orig @@ -0,0 +1,307 @@ +# $OpenLDAP: pkg/ldap/servers/slapd/schema/openldap.schema,v 1.10.2.6 2000/10/11 02:36:50 kurt Exp $ +# +# OpenLDAP Project's directory schema items +# +# depends upon: +# core.schema +# cosine.schema +# inetorgperson.schema +# +# These are provided for informational purposes only. +# +# Prefix: iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) +# The IANA has assigned the following Private Enterprise Number 13308. +# 13308 Városmajori Gimnázium Bence Bärnkopf barnkopf@debyl.vmg.sulinet.hu +# +# ------------------------------------------------------------------------- +# +# MaYoR elektronikus napló schema definíciói +# 1.3.6.1.4.1.13308.1 - attributumok +# 1.3.6.1.4.1.13308.2 - objectumok +# +# ------------------------------------------------------------------------- + + +attributeType ( 1.3.6.1.4.1.13308.1.1 + NAME 'url' + DESC 'A csoport oldalához tartozó URL' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) + +attributeType ( 1.3.6.1.4.1.13308.1.2 + NAME 'homePage' + DESC 'A user vagy csoport honlapja' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) + +attributeType ( 1.3.6.1.4.1.13308.1.3 + NAME 'class' + DESC 'Az osztály betûjele (A-D)' + EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) + +attributeType ( 1.3.6.1.4.1.13308.1.4 + NAME 'year' + DESC 'Évfolyam 7-tõl 12-ig' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27{32768} ) + +attributeType ( 1.3.6.1.4.1.13308.1.5 + NAME 'leader' + DESC 'A csoport fõnöke - pl. osztályfõnök' + SUP owner ) + +attributeType ( 1.3.6.1.4.1.13308.1.6 + NAME 'nextUid' + DESC 'A következõ uidNumber' + SUP uidNumber ) + +attributeType ( 1.3.6.1.4.1.13308.1.7 + NAME 'nextGid' + DESC 'A következõ gidNumber' + SUP gidNumber ) + +attributeType ( 1.3.6.1.4.1.13308.1.8 + NAME 'freeUid' + DESC 'Szabad uidNumber' + SUP uidNumber ) + +attributeType ( 1.3.6.1.4.1.13308.1.9 + NAME 'freeGid' + DESC 'Szabad gidNumber' + SUP gidNumber ) + +attributeType ( 1.3.6.1.4.1.13308.1.10 + NAME 'subject' + DESC 'Tantárgy neve' + SUP name ) + +attributeType ( 1.3.6.1.4.1.13308.1.11 + NAME 'level' + DESC 'Tantárgy szintje (fakultáció,alap,tagozat)' + SUP name ) + +attributetype ( 1.3.6.1.4.1.13308.1.12 + NAME 'registerTimestamp' + EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + DESC 'Beiratkozás dátuma' ) + +attributetype ( 1.3.6.1.4.1.13308.1.13 + NAME 'classTimestamp' + EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + DESC 'Osztályba kerülés dátuma' ) + +attributetype ( 1.3.6.1.4.1.13308.1.14 + NAME 'studentCardTimestamp' + EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + DESC 'Diákigazolvány kiállításának dátuma' ) + +attributetype ( 1.3.6.1.4.1.13308.1.15 + NAME 'birthTimestamp' + EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + DESC 'Születési dátum' ) + +attributetype ( 1.3.6.1.4.1.13308.1.16 + NAME 'localityTimestamp' + EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + DESC 'Lakcím dátuma' ) + +attributetype ( 1.3.6.1.4.1.13308.1.17 + NAME 'guardianCn' + DESC 'Gondviselõ (apa) neve' + SUP cn )' + +attributetype ( 1.3.6.1.4.1.13308.1.18 + NAME 'motherCn' + DESC 'Anya neve' + SUP cn )' + +attributetype ( 1.3.6.1.4.1.13308.1.19 + NAME 'birthLocality' + DESC 'Születési hely' + SUP l )' + +## +# OM kód (8 db (?) szám) +## +attributetype ( 1.3.6.1.4.1.13308.1.20 + NAME 'primarySchoolOMCode' + DESC 'Általános iskola azonosítója' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 + EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch ) + +## +# 10 jegyû szám +## +attributetype ( 1.3.6.1.4.1.13308.1.21 + NAME 'studentCardNumber' + DESC 'Diákigazolvány száma' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 + EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch ) + +## +# 10 jegyû szám +## +attributetype ( 1.3.6.1.4.1.13308.1.22 + NAME 'taxId' + DESC 'Adóazonosító jel' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 + EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch ) + + + +## +# Anyakönyvbe vétel éve, osztály betûjele és anyakönyvi sorszám +## +attributetype ( 1.3.6.1.4.1.13308.1.23 + NAME 'registerNumber' + DESC 'Törzslapszám' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch ) + +## +# Napló azonosító és naplóbeli sorszám (lehet osztály betûjel benne) +## +attributetype ( 1.3.6.1.4.1.13308.1.24 + NAME 'diaryNumber' + DESC 'Napló sorszám' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch ) + +## +# fiú/lány +## +attributeType ( 1.3.6.1.4.1.13308.1.25 + NAME 'sex' + DESC 'Nem (fiú/lány)' + EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) + +## +# 9 jegyû szám +## +attributetype ( 1.3.6.1.4.1.13308.1.26 + NAME 'TAJNumber' + DESC 'Napló sorszám' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch ) + +## +# Szülõ/meghatalmazott jelszava +## +attributetype ( 1.3.6.1.4.1.13308.1.27 + NAME 'parentPassword' + DESC 'Szülõ/meghatalmazott jelszava' + SUP userPassword ) + +attributeType ( 1.3.6.1.4.1.13308.1.28 + NAME 'studentMember' + DESC 'Tanuló - órára jár és jegyet kap' + SUP member ) + +attributeType ( 1.3.6.1.4.1.13308.1.29 + NAME 'exemptMember' + DESC 'Felmentett tanuló - órára jár és nem kap jegyet' + SUP member ) + +attributeType ( 1.3.6.1.4.1.13308.1.30 + NAME 'examerMember' + DESC 'Vizsgázó tanuló - nem jár órára és jegyet kap' + SUP member ) + +attributetype ( 1.3.6.1.4.1.13308.1.31 + NAME 'studyId' + DESC 'Oktatási azonosító' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 + EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch ) +# SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 +# EQUALITY caseIgnoreIA5Match +# SUBSTR caseIgnoreIA5SubstringsMatch ) + +# ================================================================ +# ObjectClass-ok +# ================================================================ + +objectClass ( 1.3.6.1.4.1.13308.2.1 + NAME 'mayorOrganization' + DESC 'MaYoR Organizational Object' + SUP organization + MUST ( nextUid $ nextGid ) + MAY ( freeUid $ freeGid ) ) + +objectClass ( 1.3.6.1.4.1.13308.2.2 + NAME 'mayorPerson' + DESC 'MaYoR Person' + MUST ( uid $ cn $ uidNumber $ gidNumber $ homeDirectory ) + MAY ( sn $ givenName $ class $ year $ l $ street $ mail $ postalAddress $ postalCode $ telephoneNumber $ + mobile $ roomNumber $ homePage $ registerTimestamp $ primarySchoolOMCode $ + classTimestamp $ studentCardNumber $ studentCardTimestamp $ taxId $ birthTimestamp $ TAJNumber $ studyId $ + birthLocality $ registerNumber $ diaryNumber $ sex $ guardianCn $ motherCn $ localityTimestamp $ parentPassword ) ) +# SUP ( inetOrgPerson ) + +objectClass ( 1.3.6.1.4.1.13308.2.3 + NAME 'mayorGroup' + DESC 'MaYorR Group' + SUP ( posixGroup $ groupOfNames ) + MAY ( leader $ mail $ homePage $ url $ roomNumber $ studentMember ) ) + +objectClass ( 1.3.6.1.4.1.13308.2.4 + NAME 'mayorStudyGroup' + DESC 'MaYoR Study Group - Tankör' + SUP ( mayorGroup ) + MAY ( year $ class $ level $ subject $ + studentMember $ exemptMember $ examerMember ) ) + +objectClass ( 1.3.6.1.4.1.13308.2.5 + NAME 'mayorSubjectGroup' + DESC 'MaYoR Subject Group - Szakkör' + SUP ( mayorGroup ) + MAY ( year $ class $ level $ subject $ exemptMember ) ) + +objectClass ( 1.3.6.1.4.1.13308.2.6 + NAME 'mayorPrivateStudentsGroup' + DESC 'MaYoR Private Students Group - Magántanulók' + SUP ( mayorGroup ) + MAY ( year $ class $ level $ subject $ examerMember ) ) + +# ======================================================================================= +# +# Érdemes a felhasználókat/csoportokat az alábbi objectClass-okba is besorolni, hogy +# rendes unix felhasználóként/csoportként is funkcionáljanak +# +# ------------------------------------------------------------------------ +# +# objectclass ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' SUP top AUXILIARY +# DESC 'Abstraction of an account with POSIX attributes' +# MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) +# MAY ( userPassword $ loginShell $ gecos $ description ) ) +# +# objectclass ( 1.3.6.1.1.1.2.1 NAME 'shadowAccount' SUP top AUXILIARY +# DESC 'Additional attributes for shadow passwords' +# MUST uid +# MAY ( userPassword $ shadowLastChange $ shadowMin $ +# shadowMax $ shadowWarning $ shadowInactive $ +# shadowExpire $ shadowFlag $ description ) ) +# ======================================================================================= + diff --git a/mayor-orig/mayor-base/install/base/ldap/slapd.inc b/mayor-orig/mayor-base/install/base/ldap/slapd.inc new file mode 100644 index 00000000..7ede3e38 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/ldap/slapd.inc @@ -0,0 +1,7 @@ + +# ----------------------------------------------- +# MaYoR elektronikus napló +# ----------------------------------------------- + +include %LDAP_CONF_DIR%/mayor/mayor-slapd.conf + diff --git a/mayor-orig/mayor-base/install/base/mysql/mayor-auth.sql b/mayor-orig/mayor-base/install/base/mysql/mayor-auth.sql new file mode 100644 index 00000000..7e0b1731 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/mysql/mayor-auth.sql @@ -0,0 +1,54 @@ + +DROP DATABASE IF EXISTS %MYSQL_AUTH_DB%; +CREATE DATABASE %MYSQL_AUTH_DB% CHARACTER SET utf8 DEFAULT COLLATE utf8_hungarian_ci; + +GRANT ALL ON %MYSQL_AUTH_DB%.* TO '%MYSQL_AUTH_USER%'@'localhost' IDENTIFIED BY '%MYSQL_AUTH_PW%'; + +USE %MYSQL_AUTH_DB%; + +CREATE TABLE `mayorUpdateLog` ( + `scriptFile` varchar(255) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '', + `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`scriptFile`,`dt`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE accounts ( + uid INT UNSIGNED PRIMARY KEY AUTO_INCREMENT NOT NULL, + policy ENUM('private','parent','public') NOT NULL, + userAccount VARCHAR(32) NOT NULL, + userCn VARCHAR(64), + userPassword VARBINARY(40) DEFAULT NULL, + studyId VARCHAR(12), + mail VARCHAR(64), + telephoneNumber VARCHAR(16), + shadowLastChange INT UNSIGNED, + shadowMin TINYINT UNSIGNED, + shadowMax TINYINT UNSIGNED, + shadowWarning TINYINT UNSIGNED, + shadowInactive TINYINT UNSIGNED, + shadowExpire INT UNSIGNED, + UNIQUE KEY (userAccount,policy) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +CREATE TABLE groups ( + gid INT UNSIGNED PRIMARY KEY AUTO_INCREMENT NOT NULL, + groupCn VARCHAR(32), + groupDesc VARCHAR(64), + policy VARCHAR(10) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +CREATE TABLE members ( + uid INT UNSIGNED NOT NULL, + gid INT UNSIGNED NOT NULL, + INDEX members_uid(uid), + INDEX members_gid(gid), + FOREIGN KEY(uid) + REFERENCES accounts(uid) + ON DELETE CASCADE + ON UPDATE CASCADE, + FOREIGN KEY(gid) + REFERENCES groups(gid) + ON DELETE CASCADE + ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/mayor-orig/mayor-base/install/base/mysql/mayor-login.sql b/mayor-orig/mayor-base/install/base/mysql/mayor-login.sql new file mode 100644 index 00000000..d61e3404 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/mysql/mayor-login.sql @@ -0,0 +1,199 @@ + +DROP DATABASE IF EXISTS %MYSQL_LOGIN_DB%; +CREATE DATABASE %MYSQL_LOGIN_DB% CHARACTER SET utf8 DEFAULT COLLATE utf8_hungarian_ci; +GRANT ALL ON %MYSQL_LOGIN_DB%.* TO '%MYSQL_LOGIN_USER%'@'localhost' IDENTIFIED BY '%MYSQL_LOGIN_PW%'; +USE %MYSQL_LOGIN_DB%; + +-- +-- Table structure for table 'login_log' +-- + +CREATE TABLE `mayorUpdateLog` ( + `scriptFile` varchar(255) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '', + `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`scriptFile`,`dt`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE loginLog ( + logId int(10) unsigned NOT NULL auto_increment, + policy varchar(10) NOT NULL default 'private', + userAccount varchar(50) default NULL, + ip varchar(15) default NULL, + dt datetime default NULL, + flag tinyint(3) unsigned default NULL, + PRIMARY KEY (logId) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +-- +-- Table structure for table 'session' +-- + +CREATE TABLE session ( + sessionID char(40) COLLATE utf8_hungarian_ci NOT NULL, + userPassword varchar(32) character set latin1 default NULL, + userAccount varchar(50) default NULL, + userCn varchar(50) default NULL, + studyId BIGINT UNSIGNED NULL, + dt datetime default NULL, + policy varchar(10) COLLATE utf8_hungarian_ci NOT NULL default 'private', + skin varchar(16) default NULL, + lang varchar(5) default NULL, + jsLevel tinyint(3) unsigned default 2, + activity datetime default NULL, + sessionCookie char(40) NOT NULL, + PRIMARY KEY (sessionID,policy) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +-- +-- Table structure for table 'settings' +-- + +CREATE TABLE settings ( + userAccount varchar(50) NOT NULL, + policy varchar(10) NOT NULL default 'private', + skin varchar(20) default 'default', + lang varchar(5) default 'hu_HU', + jsLevel tinyint(3) unsigned default 2, + lastlogin datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (userAccount,policy) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +-- +-- Table structure for table 'start' +-- + +CREATE TABLE start ( + userAccount varchar(50) NOT NULL, + type varchar(10) NOT NULL default 'column', + name varchar(20) default NULL, + idx tinyint unsigned default 0, + PRIMARY KEY (userAccount,type,name), + KEY (userAccount) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +-- +-- Table structure for table 'stat' +-- + +CREATE TABLE stat ( + dt datetime default NULL, + policy varchar(20) default NULL, + page varchar(20) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +CREATE TABLE `cache` ( + `sessionID` char(40), + `policy` varchar(10), + `kulcs` varchar(32) NOT NULL, + `ertek` varchar(100), dt DATETIME, + PRIMARY KEY (sessionID,policy,kulcs) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +CREATE TABLE `mayorSsl` ( + `sslId` tinyint(1) unsigned NOT NULL AUTO_INCREMENT, + `nodeId` mediumint(8) unsigned zerofill NOT NULL DEFAULT '00000000', + `privateKey` text COLLATE utf8_hungarian_ci NOT NULL, + `publicKey` text COLLATE utf8_hungarian_ci NOT NULL, + `secret` varchar(40) COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`sslId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE `mayorKeychain` ( + `nodeId` mediumint(8) unsigned zerofill NOT NULL DEFAULT '00000000', + `nodeTipus` enum('intézmény','fenntartó','backup','fejlesztÅ‘i','controller') COLLATE utf8_hungarian_ci DEFAULT 'intézmény', + `dt` date DEFAULT NULL, + `OMKod` mediumint(8) unsigned zerofill NOT NULL DEFAULT '00000000', + `publicKey` text COLLATE utf8_hungarian_ci NOT NULL, + `valid` tinyint(1) unsigned NOT NULL DEFAULT '1', + `url` varchar(255) COLLATE utf8_hungarian_ci NOT NULL, + `nev` varchar(128) COLLATE utf8_hungarian_ci DEFAULT NULL, + `rovidNev` varchar(16) COLLATE utf8_hungarian_ci DEFAULT NULL, + `cimHelyseg` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `cimIrsz` varchar(8) COLLATE utf8_hungarian_ci DEFAULT NULL, + `cimKozteruletNev` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `cimKozteruletJelleg` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `cimHazszam` varchar(20) COLLATE utf8_hungarian_ci DEFAULT NULL, + `telefon` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `fax` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `email` varchar(96) COLLATE utf8_hungarian_ci DEFAULT NULL, + `honlap` varchar(96) COLLATE utf8_hungarian_ci DEFAULT NULL, + `kapcsolatNev` varchar(128) COLLATE utf8_hungarian_ci DEFAULT NULL, + `kapcsolatEmail` varchar(96) COLLATE utf8_hungarian_ci DEFAULT NULL, + `kapcsolatTelefon` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`nodeId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +INSERT IGNORE INTO mayorKeychain (dt,nodeId,nodeTipus,publicKey,url,valid) +VALUES (CURDATE(), '09862967','controller','-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbMFUWy0Juy/7uHROaLOMPSHMI +Vw/jSmEAKW6lCeIOH2oUVsAQkgsZCFiKqQhH3WbtLrAzSmOA7+rEU3RtgXtPZpHN +2UUPQqoHWoMOkumfIS5oM0sQgSQ738TC0X9yxZlNqZtdpdCa0zjVnGLxqVVhS3KD ++O8uuA7jQwczlSqWJwIDAQAB +-----END PUBLIC KEY-----','https://www.mayor.hu',1); + +CREATE TABLE `accountRecovery` ( + `recoveryId` int(11) unsigned NOT NULL AUTO_INCREMENT, + `policy` enum('private','parent','public') COLLATE utf8_hungarian_ci NOT NULL, + `userAccount` varchar(32) COLLATE utf8_hungarian_ci NOT NULL, + `selector` char(16) COLLATE utf8_hungarian_ci DEFAULT NULL, + `token` char(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `expires` datetime DEFAULT NULL, + PRIMARY KEY (`recoveryId`), + KEY `selector` (`selector`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE `facebookConnect` ( + `fbUserId` bigint(20) NOT NULL, + `userAccount` varchar(64) COLLATE utf8_hungarian_ci NOT NULL, + `policy` enum('public','parent','private') COLLATE utf8_hungarian_ci DEFAULT NULL, + `fbUserCn` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `fbUserEmail` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `studyId` varchar(11) COLLATE utf8_hungarian_ci DEFAULT NULL, + UNIQUE KEY `fbUserId` (`fbUserId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE `googleConnect` ( + `googleSub` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `userAccount` varchar(64) COLLATE utf8_hungarian_ci NOT NULL, + `policy` enum('public','parent','private') COLLATE utf8_hungarian_ci DEFAULT NULL, + `googleUserCn` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `googleUserEmail` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `studyId` varchar(12) COLLATE utf8_hungarian_ci DEFAULT NULL, + UNIQUE KEY `googleSub` (`googleSub`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE loginLog_a ( + logId int(10) unsigned NOT NULL, + policy varchar(10) NOT NULL default 'private', + userAccount varchar(50) default NULL, + ip varchar(15) default NULL, + dt datetime default NULL, + flag tinyint(3) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_hungarian_ci; + +CREATE TABLE `eduroam` ( + `userAccount` varchar(64) COLLATE utf8_hungarian_ci NOT NULL, + `policy` enum('public','parent','private') COLLATE utf8_hungarian_ci DEFAULT NULL, + `eduroamUID` varchar(32) COLLATE utf8_hungarian_ci NOT NULL, + `eduroamPASSWORD` varchar(128) COLLATE utf8_hungarian_ci NOT NULL, + `eduroamAFFILIATION` ENUM ('staff','faculty','student','') DEFAULT '', + `eduroamDOMAIN` varchar(128) COLLATE utf8_hungarian_ci NOT NULL, + `modositasDt` datetime DEFAULT NULL, + UNIQUE KEY `eduroamUID` (`eduroamUID`), + UNIQUE KEY `userAccount` (`userAccount`,`policy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE `authToken` ( + `tokenId` int(11) unsigned NOT NULL AUTO_INCREMENT, + `policy` enum('private','parent','public') COLLATE utf8_hungarian_ci NOT NULL, + `userAccount` varchar(32) COLLATE utf8_hungarian_ci NOT NULL, + `userCn` varchar(64) COLLATE utf8_hungarian_ci NOT NULL, + `studyId` bigint(20) unsigned DEFAULT NULL, + `selector` char(16) COLLATE utf8_hungarian_ci DEFAULT NULL, + `token` char(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `expires` datetime DEFAULT NULL, + `ipAddress` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `activity` datetime DEFAULT NULL, + PRIMARY KEY (`tokenId`), + UNIQUE KEY `selector` (`selector`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; diff --git a/mayor-orig/mayor-base/install/base/mysql/private-users.sql b/mayor-orig/mayor-base/install/base/mysql/private-users.sql new file mode 100644 index 00000000..101188f5 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/mysql/private-users.sql @@ -0,0 +1,12 @@ +USE %MYSQL_PRIVATE_DB%; + +INSERT INTO accounts + (policy, userAccount, userCn, userPassword, shadowLastChange, shadowMin, shadowMax, shadowWarning, shadowInactive, shadowExpire) + VALUES ('private','mayoradmin','MaYoR Adminisztrátor',SHA('jelszo'),(TO_DAYS(now())-TO_DAYS("1970-01-01"))-80,2,80,10,0,NULL); +SET @uid = (SELECT uid FROM accounts WHERE userAccount='mayoradmin'); +INSERT INTO groups (groupCn,groupDesc,policy) VALUES ('useradmin','Adminisztrátor','private'),('tanar','Tanárok','private'), + ('diak','Diákok','private'),('titkarsag','Titkárság','private'),('egyeb','Egyéb','private'); +SET @gid = (SELECT gid FROM groups WHERE groupCn='useradmin'); +INSERT INTO members (uid,gid) VALUES (@uid,@gid); +SET @gid = (SELECT gid FROM groups WHERE groupCn='egyeb'); +INSERT INTO members (uid,gid) VALUES (@uid,@gid); diff --git a/mayor-orig/mayor-base/install/base/mysql/utf8.cnf b/mayor-orig/mayor-base/install/base/mysql/utf8.cnf new file mode 100644 index 00000000..e5927257 --- /dev/null +++ b/mayor-orig/mayor-base/install/base/mysql/utf8.cnf @@ -0,0 +1,5 @@ + +[mysqld] + character-set-server = utf8 + collation-server = utf8_hungarian_ci + skip-character-set-client-handshake |