SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Virtual LDAP
      kako natjerati strgane
    aplikacije da koriste LDAP


            Dobrica Pavlinušić
HULK, Knjižnica Filozofskog fakulteta u Zagrebu
       HULK, Zagreb, 25. veljače 2010.
Zašto?

 Prijava u knjižnični sustav
  (Koha) s LDAP računima,
 kopiranje s RFID karticama

Aplikacije imaju podršku za LDAP pa
      nema problema, zar ne?
Lightweight?
Lightweight Directory Access Protocol

●   Fiksna shema
    –   AAI@EduHr
●   Stablasta struktura
    –   HrEduPerson 
         ● passwords 

           – authby bind
           – compare (prava na LDAP serveru)
    –   Grupe
         ● group

         ● groupOfNames

         ● groupOfUniqueNames
Povezati sustave 
●   OpenLDAP              ●   Koha
    –   ldap.ffzg.hr          –   Import korisnika
    –   AAI@EduHr             –   Logiranje sa LDAP
        shema                     lozinkom
                              –   Grupe korisnika

●   Referada              ●   SAFEQ
    –   CSV datoteka sa       –   Import korisnika
        adresama              –   Grupe korisnika iz
                                  Kohe
AAI@EduHr LDAP shema
                  http://www.aaiedu.hr/

dn:uid=kohatest,dc=ffzg,dc=hr
                           uid:   kohatest
      hrEduPersonUniqueNumber:    LOCAL_NO: 1234kohatest
                    givenName:    Koha
                          mail:   knjiznica@ffzg.hr
hrEduPersonPrimaryAffiliation:    student
        hrEduPersonExpireDate:    20101031
                             o:   Filozofski fakultet u Zagrebu
                             l:   Zagreb
                postalAddress:    Filozofski fakultet u Zagrebu, Ivana
Lucica 3, HR-10000 Zagreb
           hrEduPersonHomeOrg:    ffzg.hr
       hrEduPersonAffiliation:    student
          hrEduPersonUniqueID:    kohatest@ffzg.hr
                  objectClass:    hrEduPerson
                                  sambaSamAccount
                     sambaSID:    kohatest
                 userPassword:    {SHA}
              sambaLMPassword:    HASH
              sambaNTPassword:    HASH
                           cn:    Koha Testičić Probišić Đž
                           sn:    Testičić Probišić Đž
LDAP konfiguracija aplikacija
●   Koha
     – sprintf format za bind (%s)
    –   Auth by bind
    –   Mapiranje LDAP atributa u polja u bazi
         ● Sva ponavljanja atributa se dobiju kao


           jedan string
●   SAFEQ
    –   pager LDAP atribut za RFID SID
Naša knjižnica
                                  bind %s
                              HrEduPersonUniqueID
                            uid=login,dc=ffzg,dc=hr
login@ffzg.hr
                                                    Adrese
                                                  privatnost?
                              RFID SID?
                                                      studenti.csv

                rfid2koha




                                                       LDAP HTTP
                                                       MySQL files
                                                        RFID SID
Virtualno vješenje?



Kada bi smo barem mogli nekako utjecati na
 to kako ti sustavi pričaju LDAP-om jedan s
                   drugim!
Virtual LDAP

                            ldap-rewrite
login@ffzg.hr
                              dn.yaml



                           cvs2yaml      studenti.csv

                rfid2koha


                             ldap-koha

                                            LDAP HTTP
                                            MySQL files
                                             RFID SID
ldap-rewrite
●   Prepiši bind login (isti kao na web-u)
     – HrEduPersonUniqueID: dpavlin@ffzg.hr
     – bind DN: uid=dpavlin,dc=ffzg,dc=hr
●   Dodaj search rezultatima LDAP servera podatke
    iz yaml datoteke korisnika
     – uid=login,dc=ffzg,dc=hr.yaml
●   Dodatna polja za HrEduPersonUniqueNumber
    –   HrEduPersonUniqueNumber      JMBG:1234567890
    –   HrEduPersonUniqueNumber_JMBG 1234567890
●   SSL enkripcija do LDAP servera
studenti.csv
UTF-16 Windows CSV file

dn;jmbg;jmbag;prezime;ime;spol;datum_rodjenj
a;mjesto_i_drzava_rodjenja;prebivaliste_drza
va;prebivaliste_mjesto;prebivaliste_postansk
i_broj;prebivaliste_zupanija;ml_telefoni;ml_
email_adrese;ml_postanska_adresa
uid=kohatest,dc=ffzg,dc=hr;3112999000000;012
3456789;Koha;Test;Ž;1998-21-31;Zagreb #
Hrvatska;HR;zagreb;10000;ZG;091/500-0000 #
01/5000001;kohatext@example.com;Ulica 42#
Zagreb
csv2yaml
●   Ponavljajuće vrijednosti odvojene sa #
●   Odrola ponavljanja u nove elemente:
     – address       [ street, city ]
     – address_0     street
     – address_1     city
●   spol u M/F
●   Kategorizira telefone u:
    –   tel_fixed
    –   tel_mobile
uid=kohatest,dc=ffzg,dc=hr.yaml
---                                     dn:uid=kohatest,dc=ffzg,dc=hr

datum_rodjenja: 1998-21-31                                           uid:   kohatest
dn: 'uid=kohatest,dc=ffzg,dc=hr'                 hrEduPersonUniqueNumber:   LOCAL_NO: 1234kohatest
                                                               givenName:   Koha
ime: Test                                                           mail:   knjiznica@ffzg.hr
jmbag: 0123456789                          hrEduPersonPrimaryAffiliation:   student
                                                   hrEduPersonExpireDate:   20101031
jmbg: 3112999000000                                                    o:   Filozofski fakultet u Zagrebu
                                                                       l:   Zagreb
mjesto_i_drzava_rodjenja:                                  postalAddress:   Filozofski fakultet u Zagrebu, Ivana Lucica 3, HR-10000
  - Zagreb                              Zagreb
                                                      hrEduPersonHomeOrg:   ffzg.hr
  - Hrvatska                                      hrEduPersonAffiliation:   student
mjesto_i_drzava_rodjenja_0: Zagreb                   hrEduPersonUniqueID:   kohatest@ffzg.hr
                                                             objectClass:   hrEduPerson
mjesto_i_drzava_rodjenja_1: Hrvatska                                        sambaSamAccount
ml_email_adrese: kohatext@example.com                           sambaSID:   kohatest
                                                            userPassword:   {SHA}0qTS06yhQv2Dqwuk0CaGsKWxqwo=
ml_postanska_adresa:                                     sambaLMPassword:   942FC74155F6172A613E9293942509F0
                                                         sambaNTPassword:   0C967E5AA27696638F85FBF1BA8F73A1
  - Ulica 42                                                          cn:   Koha Testičić Probišić Đž
  - Zagreb                                                            sn:   Testičić Probišić Đž
                                        hrEduPersonUniqueNumber_LOCAL_NO:   1234kohatest
ml_postanska_adresa_0: Ulica 42         ffzg-prebivaliste_postanski_broj:   10000
ml_postanska_adresa_1: Zagreb                 ffzg-ml_postanska_adresa_1:   Zagreb
                                              ffzg-ml_postanska_adresa_0:   Ulica 42
ml_telefoni:                             ffzg-mjesto_i_drzava_rodjenja_0:   Zagreb
  - 091/500-0000                                  ffzg-ml_telefoni_fixed:
                                                        ffzg-ml_telefoni:
                                                                            01/5000001
                                                                            091/500-0000
  - 01/5000001                                                              01/5000001
                                                     ffzg-datum_rodjenja:   1998-21-31
ml_telefoni_0: 091/500-0000                                 ffzg-prezime:   Koha
ml_telefoni_1: 01/5000001                     ffzg-prebivaliste_zupanija:   ZG
                                                               ffzg-spol:   F
ml_telefoni_fixed: 01/5000001                    ffzg-ml_telefoni_mobile:   091/500-0000
ml_telefoni_mobile: 091/500-0000                               ffzg-jmbg:   3112999000000
                                                                ffzg-ime:   Test
prebivaliste_drzava: HR                  ffzg-mjesto_i_drzava_rodjenja_1:   Hrvatska
prebivaliste_mjesto: zagreb                     ffzg-prebivaliste_drzava:
                                           ffzg-mjesto_i_drzava_rodjenja:
                                                                            HR
                                                                            Zagreb
prebivaliste_postanski_broj: 10000                                          Hrvatska
                                                      ffzg-ml_telefoni_0:   091/500-0000
prebivaliste_zupanija: ZG                       ffzg-ml_postanska_adresa:   Ulica 42
prezime: Koha                                                               Zagreb
                                                      ffzg-ml_telefoni_1:   01/5000001
spol: F                                             ffzg-ml_email_adrese:   kohatext@example.com
                                                              ffzg-jmbag:   0123456789
                                                ffzg-prebivaliste_mjesto:   zagreb
                                                                 ffzg-dn:   uid=kohatest,dc=ffzg,dc=hr
Uf, a kopirke?
ldap-koha
●   LDAP server koji koristi Koha MySQL bazu
●   RFID SID kao LDAP filter 
     – pager=E00401001F77E218
●   SQL datoteka za objectClass 
     – sql/hreduperson.sql
     – sql/organizationalunit.sql
     – sql/group.sql
●   pretvara LDAP filter u SQL where 
●   Grupe korisnika iz Kohe 
    –   Različita prava korištenja kopirki
Zašto testirati?
●   bind & search testovi
     –   BUG: ldap-rewrite konekcije na LDAP
         server (nakon godinu dana u produkciji)
●   Integracija sa Kohom
     –   Obriši testnog korisnika
     –   Ulogiraj korisnika
     –   BUG: Koha ne radi u kombinaciji auth by
         bind i replikacije (bugs.koha.org#4256)
    dpavlin@koha:/srv/virtual-ldap$ wc -c t/*.t t/koha/*.t
    1216 t/ldap-koha.t
    1055 t/ldap-rewrite.t
     737 t/koha/01-remove-test-user.t
     769 t/koha/02-create-test-user.t
    3777 total
Više informacija
●   Virtual LDAP project
    –   https://www.ohloh.net/p/virtual-ldap

●   Source code
    –   http://svn.rot13.org/index.cgi/virtual-ldap/

●   Blog 
    –   http://blog.rot13.org/
    –   Tagovi: Virtual-LDAP, ldap
Pitanja?
   42

Weitere ähnliche Inhalte

Andere mochten auch

Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...Dr Stylianos Mystakidis
 
The Constellation Query Language
The Constellation Query LanguageThe Constellation Query Language
The Constellation Query LanguageClifford Heath
 
IAZ2013 - Gopress voor openbare bibliotheken
IAZ2013 - Gopress voor openbare bibliothekenIAZ2013 - Gopress voor openbare bibliotheken
IAZ2013 - Gopress voor openbare bibliothekenJohan Mijs
 
Creating And Customizing Your Blackboard Class
Creating And Customizing Your Blackboard ClassCreating And Customizing Your Blackboard Class
Creating And Customizing Your Blackboard Class1LifelongLearner
 
Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0stefan.geens
 
One Climate Initiative Sep 2007
One Climate Initiative Sep 2007One Climate Initiative Sep 2007
One Climate Initiative Sep 2007OneWorld UK
 
Poaching LG15: ARG-style
Poaching LG15: ARG-stylePoaching LG15: ARG-style
Poaching LG15: ARG-stylePaleFire
 
Wiki: Open Collaborative Learning Environment
Wiki: Open Collaborative Learning EnvironmentWiki: Open Collaborative Learning Environment
Wiki: Open Collaborative Learning EnvironmentDr Stylianos Mystakidis
 
Spectacular Subcultures: From luz to hacktivism
Spectacular Subcultures: From luz to hacktivismSpectacular Subcultures: From luz to hacktivism
Spectacular Subcultures: From luz to hacktivismPaleFire
 
The Great Highland Bagpipe
The  Great  Highland  BagpipeThe  Great  Highland  Bagpipe
The Great Highland Bagpipe1LifelongLearner
 
Social Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsSocial Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsDr Stylianos Mystakidis
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Dobrica Pavlinušić
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?Dobrica Pavlinušić
 

Andere mochten auch (20)

Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
 
Ppt Demo Slideshare
Ppt Demo SlidesharePpt Demo Slideshare
Ppt Demo Slideshare
 
The Constellation Query Language
The Constellation Query LanguageThe Constellation Query Language
The Constellation Query Language
 
IAZ2013 - Gopress voor openbare bibliotheken
IAZ2013 - Gopress voor openbare bibliothekenIAZ2013 - Gopress voor openbare bibliotheken
IAZ2013 - Gopress voor openbare bibliotheken
 
Open Education in Virtual Worlds
Open Education in Virtual WorldsOpen Education in Virtual Worlds
Open Education in Virtual Worlds
 
Creating And Customizing Your Blackboard Class
Creating And Customizing Your Blackboard ClassCreating And Customizing Your Blackboard Class
Creating And Customizing Your Blackboard Class
 
Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0
 
One Climate Initiative Sep 2007
One Climate Initiative Sep 2007One Climate Initiative Sep 2007
One Climate Initiative Sep 2007
 
Poaching LG15: ARG-style
Poaching LG15: ARG-stylePoaching LG15: ARG-style
Poaching LG15: ARG-style
 
Wiki: Open Collaborative Learning Environment
Wiki: Open Collaborative Learning EnvironmentWiki: Open Collaborative Learning Environment
Wiki: Open Collaborative Learning Environment
 
Spectacular Subcultures: From luz to hacktivism
Spectacular Subcultures: From luz to hacktivismSpectacular Subcultures: From luz to hacktivism
Spectacular Subcultures: From luz to hacktivism
 
Test
TestTest
Test
 
The Great Highland Bagpipe
The  Great  Highland  BagpipeThe  Great  Highland  Bagpipe
The Great Highland Bagpipe
 
Morocco
MoroccoMorocco
Morocco
 
What Is Powerpoint
What Is PowerpointWhat Is Powerpoint
What Is Powerpoint
 
Social Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsSocial Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for Choirs
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?
 
Cow2
Cow2Cow2
Cow2
 
Intro to Haml
Intro to HamlIntro to Haml
Intro to Haml
 

Mehr von Dobrica Pavlinušić

Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsDobrica Pavlinušić
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Dobrica Pavlinušić
 
Let's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionLet's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionDobrica Pavlinušić
 
Raspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsRaspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsDobrica Pavlinušić
 
Cheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerCheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerDobrica Pavlinušić
 
FSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGFSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGDobrica Pavlinušić
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software peopleDobrica Pavlinušić
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloudDobrica Pavlinušić
 
KohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemKohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemDobrica Pavlinušić
 
Free Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryFree Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryDobrica Pavlinušić
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Dobrica Pavlinušić
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Dobrica Pavlinušić
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Dobrica Pavlinušić
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Dobrica Pavlinušić
 

Mehr von Dobrica Pavlinušić (20)

Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
bro - what is in my network?
bro - what is in my network?bro - what is in my network?
bro - what is in my network?
 
Let's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionLet's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 edition
 
Raspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsRaspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needs
 
Cheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerCheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component tester
 
Ganeti - build your own cloud
Ganeti - build your own cloudGaneti - build your own cloud
Ganeti - build your own cloud
 
FSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGFSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAG
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
 
SysAdmin cookbook
SysAdmin cookbookSysAdmin cookbook
SysAdmin cookbook
 
Printing on Linux, simple right?
Printing on Linux, simple right?Printing on Linux, simple right?
Printing on Linux, simple right?
 
KohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemKohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID system
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
 
Free Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryFree Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG library
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 

Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP

  • 1. Virtual LDAP kako natjerati strgane aplikacije da koriste LDAP Dobrica Pavlinušić HULK, Knjižnica Filozofskog fakulteta u Zagrebu HULK, Zagreb, 25. veljače 2010.
  • 2. Zašto? Prijava u knjižnični sustav (Koha) s LDAP računima, kopiranje s RFID karticama Aplikacije imaju podršku za LDAP pa nema problema, zar ne?
  • 4. Lightweight Directory Access Protocol ● Fiksna shema – AAI@EduHr ● Stablasta struktura – HrEduPerson  ● passwords  – authby bind – compare (prava na LDAP serveru) – Grupe ● group ● groupOfNames ● groupOfUniqueNames
  • 5. Povezati sustave  ● OpenLDAP ● Koha – ldap.ffzg.hr – Import korisnika – AAI@EduHr – Logiranje sa LDAP shema lozinkom – Grupe korisnika ● Referada ● SAFEQ – CSV datoteka sa – Import korisnika adresama – Grupe korisnika iz Kohe
  • 6. AAI@EduHr LDAP shema http://www.aaiedu.hr/ dn:uid=kohatest,dc=ffzg,dc=hr uid: kohatest hrEduPersonUniqueNumber: LOCAL_NO: 1234kohatest givenName: Koha mail: knjiznica@ffzg.hr hrEduPersonPrimaryAffiliation: student hrEduPersonExpireDate: 20101031 o: Filozofski fakultet u Zagrebu l: Zagreb postalAddress: Filozofski fakultet u Zagrebu, Ivana Lucica 3, HR-10000 Zagreb hrEduPersonHomeOrg: ffzg.hr hrEduPersonAffiliation: student hrEduPersonUniqueID: kohatest@ffzg.hr objectClass: hrEduPerson sambaSamAccount sambaSID: kohatest userPassword: {SHA} sambaLMPassword: HASH sambaNTPassword: HASH cn: Koha Testičić Probišić Đž sn: Testičić Probišić Đž
  • 7. LDAP konfiguracija aplikacija ● Koha – sprintf format za bind (%s) – Auth by bind – Mapiranje LDAP atributa u polja u bazi ● Sva ponavljanja atributa se dobiju kao jedan string ● SAFEQ – pager LDAP atribut za RFID SID
  • 8. Naša knjižnica bind %s HrEduPersonUniqueID uid=login,dc=ffzg,dc=hr login@ffzg.hr Adrese privatnost?  RFID SID? studenti.csv rfid2koha LDAP HTTP MySQL files RFID SID
  • 9. Virtualno vješenje? Kada bi smo barem mogli nekako utjecati na to kako ti sustavi pričaju LDAP-om jedan s drugim!
  • 10. Virtual LDAP ldap-rewrite login@ffzg.hr dn.yaml  cvs2yaml studenti.csv rfid2koha ldap-koha LDAP HTTP MySQL files RFID SID
  • 11. ldap-rewrite ● Prepiši bind login (isti kao na web-u) – HrEduPersonUniqueID: dpavlin@ffzg.hr – bind DN: uid=dpavlin,dc=ffzg,dc=hr ● Dodaj search rezultatima LDAP servera podatke iz yaml datoteke korisnika – uid=login,dc=ffzg,dc=hr.yaml ● Dodatna polja za HrEduPersonUniqueNumber – HrEduPersonUniqueNumber JMBG:1234567890 – HrEduPersonUniqueNumber_JMBG 1234567890 ● SSL enkripcija do LDAP servera
  • 12. studenti.csv UTF-16 Windows CSV file dn;jmbg;jmbag;prezime;ime;spol;datum_rodjenj a;mjesto_i_drzava_rodjenja;prebivaliste_drza va;prebivaliste_mjesto;prebivaliste_postansk i_broj;prebivaliste_zupanija;ml_telefoni;ml_ email_adrese;ml_postanska_adresa uid=kohatest,dc=ffzg,dc=hr;3112999000000;012 3456789;Koha;Test;Ž;1998-21-31;Zagreb # Hrvatska;HR;zagreb;10000;ZG;091/500-0000 # 01/5000001;kohatext@example.com;Ulica 42# Zagreb
  • 13. csv2yaml ● Ponavljajuće vrijednosti odvojene sa # ● Odrola ponavljanja u nove elemente: – address [ street, city ] – address_0 street – address_1 city ● spol u M/F ● Kategorizira telefone u: – tel_fixed – tel_mobile
  • 14. uid=kohatest,dc=ffzg,dc=hr.yaml --- dn:uid=kohatest,dc=ffzg,dc=hr datum_rodjenja: 1998-21-31 uid: kohatest dn: 'uid=kohatest,dc=ffzg,dc=hr' hrEduPersonUniqueNumber: LOCAL_NO: 1234kohatest givenName: Koha ime: Test mail: knjiznica@ffzg.hr jmbag: 0123456789 hrEduPersonPrimaryAffiliation: student hrEduPersonExpireDate: 20101031 jmbg: 3112999000000 o: Filozofski fakultet u Zagrebu l: Zagreb mjesto_i_drzava_rodjenja: postalAddress: Filozofski fakultet u Zagrebu, Ivana Lucica 3, HR-10000 - Zagreb Zagreb hrEduPersonHomeOrg: ffzg.hr - Hrvatska hrEduPersonAffiliation: student mjesto_i_drzava_rodjenja_0: Zagreb hrEduPersonUniqueID: kohatest@ffzg.hr objectClass: hrEduPerson mjesto_i_drzava_rodjenja_1: Hrvatska sambaSamAccount ml_email_adrese: kohatext@example.com sambaSID: kohatest userPassword: {SHA}0qTS06yhQv2Dqwuk0CaGsKWxqwo= ml_postanska_adresa: sambaLMPassword: 942FC74155F6172A613E9293942509F0 sambaNTPassword: 0C967E5AA27696638F85FBF1BA8F73A1 - Ulica 42 cn: Koha Testičić Probišić Đž - Zagreb sn: Testičić Probišić Đž hrEduPersonUniqueNumber_LOCAL_NO: 1234kohatest ml_postanska_adresa_0: Ulica 42 ffzg-prebivaliste_postanski_broj: 10000 ml_postanska_adresa_1: Zagreb ffzg-ml_postanska_adresa_1: Zagreb ffzg-ml_postanska_adresa_0: Ulica 42 ml_telefoni: ffzg-mjesto_i_drzava_rodjenja_0: Zagreb - 091/500-0000 ffzg-ml_telefoni_fixed: ffzg-ml_telefoni: 01/5000001 091/500-0000 - 01/5000001 01/5000001 ffzg-datum_rodjenja: 1998-21-31 ml_telefoni_0: 091/500-0000 ffzg-prezime: Koha ml_telefoni_1: 01/5000001 ffzg-prebivaliste_zupanija: ZG ffzg-spol: F ml_telefoni_fixed: 01/5000001 ffzg-ml_telefoni_mobile: 091/500-0000 ml_telefoni_mobile: 091/500-0000 ffzg-jmbg: 3112999000000 ffzg-ime: Test prebivaliste_drzava: HR ffzg-mjesto_i_drzava_rodjenja_1: Hrvatska prebivaliste_mjesto: zagreb ffzg-prebivaliste_drzava: ffzg-mjesto_i_drzava_rodjenja: HR Zagreb prebivaliste_postanski_broj: 10000 Hrvatska ffzg-ml_telefoni_0: 091/500-0000 prebivaliste_zupanija: ZG ffzg-ml_postanska_adresa: Ulica 42 prezime: Koha Zagreb ffzg-ml_telefoni_1: 01/5000001 spol: F ffzg-ml_email_adrese: kohatext@example.com ffzg-jmbag: 0123456789 ffzg-prebivaliste_mjesto: zagreb ffzg-dn: uid=kohatest,dc=ffzg,dc=hr
  • 16. ldap-koha ● LDAP server koji koristi Koha MySQL bazu ● RFID SID kao LDAP filter  – pager=E00401001F77E218 ● SQL datoteka za objectClass  – sql/hreduperson.sql – sql/organizationalunit.sql – sql/group.sql ● pretvara LDAP filter u SQL where  ● Grupe korisnika iz Kohe  – Različita prava korištenja kopirki
  • 17. Zašto testirati? ● bind & search testovi – BUG: ldap-rewrite konekcije na LDAP server (nakon godinu dana u produkciji) ● Integracija sa Kohom – Obriši testnog korisnika – Ulogiraj korisnika – BUG: Koha ne radi u kombinaciji auth by bind i replikacije (bugs.koha.org#4256) dpavlin@koha:/srv/virtual-ldap$ wc -c t/*.t t/koha/*.t 1216 t/ldap-koha.t 1055 t/ldap-rewrite.t 737 t/koha/01-remove-test-user.t 769 t/koha/02-create-test-user.t 3777 total
  • 18. Više informacija ● Virtual LDAP project – https://www.ohloh.net/p/virtual-ldap ● Source code – http://svn.rot13.org/index.cgi/virtual-ldap/ ● Blog  – http://blog.rot13.org/ – Tagovi: Virtual-LDAP, ldap
  • 19. Pitanja? 42