SlideShare a Scribd company logo
1 of 22
Download to read offline
LDAP em VDM++

     Pedro Pereira             Ulisses Costa

 M´todos Formais em Engenharia de Software
  e


          12 de Fevereiro de 2009




Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
LDAP




       LDAP vs DAP - Lightweight porque opera em TCP/IP
       LDAP ´ pelo menos uma DIT
            e
       Uma directoria ´ uma maneira de organizar informa¸˜o
                      e                                 ca
       complexa, tornando f´cil a sua pesquisa.
                           a




                 Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Estrutura da DIT




  Fun¸˜o da DIT
     ca
  Guardar a hierarquia

      Composta por entradas
      Entradas s˜o instˆncias de ObjectClass
                a      a
      ObjectClass’s podem ter atributos
      Atributos relacionam a informa¸˜o
                                    ca




                 Pedro Pereira, Ulisses Costa   LDAP em VDM++
Estrutura das entradas




      Contˆm uma instˆncia de ObjectClass
          e          a
      Atributos obrigat´rios da ObjectClass
                       o
      Um DN (Distinguished Name))
          ´
          Unico em toda a ´rvore
                          a
      Um RDN (Relative Distinguished Name)
          ´
          Unico entre irm˜os
                         a




                Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Propriedades do LDAP




     Floresta de DIT’s
     DN’s s˜o unicos na DIT
           a´
     Um DN ´: O DN do antecessor e o seu RDN
           e
     Cada atributo tem pares de (identificador,valor)




               Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
DIT - Tree?




     Grafo ac´
             ıclico e ligado (uma ra´
                                    ız)
     The root of the DIT is a DSA-specific Entry (DSE) and not
     part of any naming context


               Pedro Pereira, Ulisses Costa   LDAP em VDM++
DIT - Forest




      Grafo ac´
              ıclico e n˜o ligado (m´ltiplas ra´
                        a           u          ızes)




                Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Servidor Estrutura



  class Server

  types
      public String = seq of char ;

      public OName = String ;
      public AName = String ;
      public Value = String ;

      public ObjClass :: must : set of AName
                         may : set of AName ;

  instance variables
                                                             --   entradas existentes
      private entries      :   map   nat1 to Entry ;
                                                             --   hierarquia das entradas
      private dit          :   map   nat1 to set of nat1 ;
                                                             --   objectos definidos
      private def_objs     :   map   OName to ObjClass ;
                                                             --   atributos definidos
      private def_attrs    :   set   of AName ;

      inv ServerINV () ;




                      Pedro Pereira, Ulisses Costa   LDAP em VDM++
Servidor Invariantes

      The root of the DIT is a DSA-specific Entry (DSE) and not part of any naming
      context;
      Entries have names: one or more attribute values from the entry form its relative
      distinguished name (RDN), which MUST be unique among all its siblings;
      The concatenation of the relative distinguished names of the sequence of entries
      from a particular entry to an immediate subordinate of the root of the tree
      forms that entry’s Distinguished Name (DN), which is unique in the tree;
      Each entry MUST have an objectClass attribute which specifies the object
      classes of that entry ;
      Servers MUST NOT permit clients to add attributes to an entry unless those
      attributes are permitted by the object class definitions, the schema controlling
      that entry ;
      Entries consist of a set of attributes;
      An attribute is a type with one or more associated values and is identified by a
      short descriptive name (...);
      Schema is the collection of attribute type definitions, object class definitions and
      other information (...);




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Servidor Invariantes
     public ServerINV : () == > bool
     ServerINV () ==
     (
         return (

         -- dit aciclica
         ( not exists e in set dom dit & e in set Tra nsi tive Clo sur e ( e ) ) and

         -- todos os elementos que existem estao na dit
         ( forall e in set ( dom dit union rng dit ) & e in set dom entries ) and

         -- objectos apenas contem atributos definidos
         ( forall o in set rng def_objs & ( forall a in set ( o . must union o . may
              ) & a in set def_attrs ) ) and

         -- dn unico entre todos os elementos da floresta
         ( forall e1 , e2 in set rng entries & e1 . GetDN () <> e2 . GetDN () ) and

         -- dn do pai contido no do filho
         ( forall p in set dom dit & ( forall c in set Tr ans itiv eCl osu re ( p ) & (
              elems entries ( c ) . GetDN () ) subset ( elems entries ( p ) . GetDN () ) ) )
              and

         -- rdn unico entre irmaos
         ( forall p in set dom dit & ( forall c1 , c2 in set dit ( p ) & entries ( c1 ) .
              GetRDN () <> entries ( c2 ) . GetRDN () ) ) and

         -- rdn faz parte do dn
         ( forall e in set rng entries & e . GetRDN () in set elems e . GetDN () ) and

         -- rdn composto por um atributo
         ( forall e in set rng entries & e . GetRDN () in set dom e . GetAttrs () ) ) ) ;

                     Pedro Pereira, Ulisses Costa   LDAP em VDM++
Sum´rio
   a



 1   LDAP
       O que ´ o LDAP e a DIT
              e
       Estrutura do LDAP
       Propriedades do LDAP



 2   VDM
      DIT - Tree? & Forest
      Servidor



 3   Opera¸˜es do Servidor
          co




                    Pedro Pereira, Ulisses Costa   LDAP em VDM++
Servidor Opera¸oes
              c˜



  CRUD
  Create Read Update Delete

      Add Entry
      Del Entry
      Modify DN
      Search Entry
      Search Attributes




                  Pedro Pereira, Ulisses Costa   LDAP em VDM++
Modify DN

  public ModDN : seq of AName * AName == > ()
  ModDN ( old_dn , new_rdn ) ==
  (
     dcl new_dn : seq of AName := [];
     dcl pos : nat1 := len old_dn - 1;
     dcl e : nat1 := GetID ( old_dn ) ;

     for i = 1 to pos do
        new_dn := new_dn ^ [ old_dn ( i ) ];

     new_dn := new_dn ^ [ new_rdn ];
     entries ( e ) . SetDN ( new_dn ) ;

     for all c in set Tra nsi tiv eCl osur e ( e ) do
     (
        new_dn := [];

        for i = 1 to ( len entries ( c ) . GetDN () ) do
                 if i = pos
                 then new_dn := new_dn ^ [ new_rdn ]
                 else new_dn := new_dn ^ entries ( c ) . GetDN () ( i ) ;

         entries ( c ) . SetDN ( new_dn ) ;
     );
  )
  pre ( exists i in set dom entries & entries ( i ) . GetDN () = old_dn )
  post ( exists i in set dom entries & forall c in set Tran sit ive Clo sure ( i ) &
        new_rdn in set elems entries ( i ) . GetDN () and new_rdn in set elems entries ( c )
        . GetDN () ) ;




                       Pedro Pereira, Ulisses Costa   LDAP em VDM++
GetID




  public GetID : seq of AName == > nat
  GetID ( dn ) ==
  (
     for all i in set dom entries do
          if entries ( i ) . GetDN () = dn
          then return i ;

     return 0;
  )
  post ( not exists i in set dom entries & entries ( i ) . GetDN () = dn = > RESULT = 0 )
        or
       ( exists i in set dom entries & entries ( i ) . GetDN () = dn = > RESULT = i ) ;




                       Pedro Pereira, Ulisses Costa   LDAP em VDM++
Transitive Closure


  public T r ans iti veCl osu re : nat1 == > set of nat1
  T r a n s i t i v eCl osu re ( origem ) ==
  (
        dcl res : set of nat1 := {};
        dcl childs : set of nat1 := dit ( origem ) ;

     while childs   <> {} do
     (
        for all c   in set childs do
        (
           childs   := childs union dit ( c ) ;
           res :=   res union { c };
        );

          childs := childs  res ;
     );

     return res ;
  )
  pre origem in set dom entries
  post forall e in set RESULT & ( elems entries ( origem ) . GetDN () ) subset ( elems
       entries ( e ) . GetDN () ) ;




                       Pedro Pereira, Ulisses Costa   LDAP em VDM++

More Related Content

What's hot

Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Lucidworks (Archived)
 
VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4sriprasoon
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: RenormalizeAriel Weil
 
From DNA Sequence Variation to .NET Bits and Bobs
From DNA Sequence Variation to .NET Bits and BobsFrom DNA Sequence Variation to .NET Bits and Bobs
From DNA Sequence Variation to .NET Bits and BobsSource Conference
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolS. Hasnain Raza
 
Object-Oriented Programming with Perl and Moose
Object-Oriented Programming with Perl and MooseObject-Oriented Programming with Perl and Moose
Object-Oriented Programming with Perl and MooseDave Cross
 

What's hot (8)

Plc (1)
Plc (1)Plc (1)
Plc (1)
 
Plc (1)
Plc (1)Plc (1)
Plc (1)
 
Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues
 
VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: Renormalize
 
From DNA Sequence Variation to .NET Bits and Bobs
From DNA Sequence Variation to .NET Bits and BobsFrom DNA Sequence Variation to .NET Bits and Bobs
From DNA Sequence Variation to .NET Bits and Bobs
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access Protocol
 
Object-Oriented Programming with Perl and Moose
Object-Oriented Programming with Perl and MooseObject-Oriented Programming with Perl and Moose
Object-Oriented Programming with Perl and Moose
 

Viewers also liked

Expenses and revenues of MIT
Expenses and revenues of MITExpenses and revenues of MIT
Expenses and revenues of MITDenny Wong
 
1918 Vasario 16 Oji
1918 Vasario 16 Oji1918 Vasario 16 Oji
1918 Vasario 16 Ojiguestf83eae
 
Centre for Traditional Governance, Proposal
Centre for Traditional Governance, ProposalCentre for Traditional Governance, Proposal
Centre for Traditional Governance, Proposalmrtomn
 
Esoko
Esoko Esoko
Esoko mrtomn
 
Què és un blog?
Què és un blog?Què és un blog?
Què és un blog?neusymarta
 
Pasakumi Jurmala 2008 (Tava Infodienai)
Pasakumi Jurmala 2008 (Tava Infodienai)Pasakumi Jurmala 2008 (Tava Infodienai)
Pasakumi Jurmala 2008 (Tava Infodienai)DatorPaps DatorPaps
 
Tubefin2
Tubefin2Tubefin2
Tubefin2mrtomn
 
Simple tech-talk
Simple tech-talkSimple tech-talk
Simple tech-talkliltos
 
The Passage Samui Resort - by Hotel Kungfu Digital Marketing
The Passage Samui Resort - by Hotel Kungfu Digital MarketingThe Passage Samui Resort - by Hotel Kungfu Digital Marketing
The Passage Samui Resort - by Hotel Kungfu Digital MarketingDom Scaife
 
Hotel Kungfu: Digital Marketing for Hotels
Hotel Kungfu: Digital Marketing for HotelsHotel Kungfu: Digital Marketing for Hotels
Hotel Kungfu: Digital Marketing for HotelsDom Scaife
 

Viewers also liked (17)

Expenses and revenues of MIT
Expenses and revenues of MITExpenses and revenues of MIT
Expenses and revenues of MIT
 
DatorPaps biedribam
DatorPaps biedribamDatorPaps biedribam
DatorPaps biedribam
 
1918 Vasario 16 Oji
1918 Vasario 16 Oji1918 Vasario 16 Oji
1918 Vasario 16 Oji
 
Centre for Traditional Governance, Proposal
Centre for Traditional Governance, ProposalCentre for Traditional Governance, Proposal
Centre for Traditional Governance, Proposal
 
Esoko
Esoko Esoko
Esoko
 
Inovacijos 2009
Inovacijos   2009Inovacijos   2009
Inovacijos 2009
 
Ejercicio 5
Ejercicio 5Ejercicio 5
Ejercicio 5
 
Què és un blog?
Què és un blog?Què és un blog?
Què és un blog?
 
Pasakumi Jurmala 2008 (Tava Infodienai)
Pasakumi Jurmala 2008 (Tava Infodienai)Pasakumi Jurmala 2008 (Tava Infodienai)
Pasakumi Jurmala 2008 (Tava Infodienai)
 
Tubefin2
Tubefin2Tubefin2
Tubefin2
 
Simple tech-talk
Simple tech-talkSimple tech-talk
Simple tech-talk
 
Relationsverkstan
RelationsverkstanRelationsverkstan
Relationsverkstan
 
The Passage Samui Resort - by Hotel Kungfu Digital Marketing
The Passage Samui Resort - by Hotel Kungfu Digital MarketingThe Passage Samui Resort - by Hotel Kungfu Digital Marketing
The Passage Samui Resort - by Hotel Kungfu Digital Marketing
 
Hotel Kungfu: Digital Marketing for Hotels
Hotel Kungfu: Digital Marketing for HotelsHotel Kungfu: Digital Marketing for Hotels
Hotel Kungfu: Digital Marketing for Hotels
 
Login 2009 1
Login 2009 1Login 2009 1
Login 2009 1
 
Login 2009 1
Login 2009 1Login 2009 1
Login 2009 1
 
iPhone + Psykologi
iPhone + PsykologiiPhone + Psykologi
iPhone + Psykologi
 

Similar to LDAP em VDM++

Configuring Domino To Be An Ldap Directory And To Use An Ldap Directory
Configuring Domino To Be An Ldap Directory And To Use An Ldap DirectoryConfiguring Domino To Be An Ldap Directory And To Use An Ldap Directory
Configuring Domino To Be An Ldap Directory And To Use An Ldap DirectoryEdson Oliveira
 
DBIx::Class vs. DBix::DataModel
DBIx::Class vs. DBix::DataModelDBIx::Class vs. DBix::DataModel
DBIx::Class vs. DBix::DataModelLaurent Dami
 
UnderstandingLDAP.ppt
UnderstandingLDAP.pptUnderstandingLDAP.ppt
UnderstandingLDAP.pptEfrizal Zaida
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap ProtocolGlen Plantz
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...CloudxLab
 
Practical-LDAP-and-Linux
Practical-LDAP-and-LinuxPractical-LDAP-and-Linux
Practical-LDAP-and-LinuxBalaji Ravi
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in PerlLaurent Dami
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...Databricks
 
User administration without you - integrating LDAP
User administration without you - integrating LDAPUser administration without you - integrating LDAP
User administration without you - integrating LDAPMongoDB
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Ralph Schindler
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionChema Alonso
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Keshav Murthy
 
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And Profit
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And ProfitJDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And Profit
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And ProfitPROIDEA
 

Similar to LDAP em VDM++ (20)

Class Diagram Uml
Class Diagram UmlClass Diagram Uml
Class Diagram Uml
 
Configuring Domino To Be An Ldap Directory And To Use An Ldap Directory
Configuring Domino To Be An Ldap Directory And To Use An Ldap DirectoryConfiguring Domino To Be An Ldap Directory And To Use An Ldap Directory
Configuring Domino To Be An Ldap Directory And To Use An Ldap Directory
 
DBIx::Class vs. DBix::DataModel
DBIx::Class vs. DBix::DataModelDBIx::Class vs. DBix::DataModel
DBIx::Class vs. DBix::DataModel
 
Using OpenLDAP
Using OpenLDAPUsing OpenLDAP
Using OpenLDAP
 
UnderstandingLDAP.ppt
UnderstandingLDAP.pptUnderstandingLDAP.ppt
UnderstandingLDAP.ppt
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
 
Practical-LDAP-and-Linux
Practical-LDAP-and-LinuxPractical-LDAP-and-Linux
Practical-LDAP-and-Linux
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in Perl
 
Ldap
LdapLdap
Ldap
 
LDAP
LDAPLDAP
LDAP
 
LDAP
LDAPLDAP
LDAP
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
 
User administration without you - integrating LDAP
User administration without you - integrating LDAPUser administration without you - integrating LDAP
User administration without you - integrating LDAP
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP Injection
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.
 
SQL introduction
SQL introductionSQL introduction
SQL introduction
 
ivanova-samba_backend.pdf
ivanova-samba_backend.pdfivanova-samba_backend.pdf
ivanova-samba_backend.pdf
 
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And Profit
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And ProfitJDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And Profit
JDD 2016 - Pawel Szulc - Writing Your Wwn RDD For Fun And Profit
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

LDAP em VDM++

  • 1. LDAP em VDM++ Pedro Pereira Ulisses Costa M´todos Formais em Engenharia de Software e 12 de Fevereiro de 2009 Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 2. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 3. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 4. LDAP LDAP vs DAP - Lightweight porque opera em TCP/IP LDAP ´ pelo menos uma DIT e Uma directoria ´ uma maneira de organizar informa¸˜o e ca complexa, tornando f´cil a sua pesquisa. a Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 5. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 6. Estrutura da DIT Fun¸˜o da DIT ca Guardar a hierarquia Composta por entradas Entradas s˜o instˆncias de ObjectClass a a ObjectClass’s podem ter atributos Atributos relacionam a informa¸˜o ca Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 7. Estrutura das entradas Contˆm uma instˆncia de ObjectClass e a Atributos obrigat´rios da ObjectClass o Um DN (Distinguished Name)) ´ Unico em toda a ´rvore a Um RDN (Relative Distinguished Name) ´ Unico entre irm˜os a Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 8. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 9. Propriedades do LDAP Floresta de DIT’s DN’s s˜o unicos na DIT a´ Um DN ´: O DN do antecessor e o seu RDN e Cada atributo tem pares de (identificador,valor) Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 10. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 11. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 12. DIT - Tree? Grafo ac´ ıclico e ligado (uma ra´ ız) The root of the DIT is a DSA-specific Entry (DSE) and not part of any naming context Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 13. DIT - Forest Grafo ac´ ıclico e n˜o ligado (m´ltiplas ra´ a u ızes) Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 14. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 15. Servidor Estrutura class Server types public String = seq of char ; public OName = String ; public AName = String ; public Value = String ; public ObjClass :: must : set of AName may : set of AName ; instance variables -- entradas existentes private entries : map nat1 to Entry ; -- hierarquia das entradas private dit : map nat1 to set of nat1 ; -- objectos definidos private def_objs : map OName to ObjClass ; -- atributos definidos private def_attrs : set of AName ; inv ServerINV () ; Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 16. Servidor Invariantes The root of the DIT is a DSA-specific Entry (DSE) and not part of any naming context; Entries have names: one or more attribute values from the entry form its relative distinguished name (RDN), which MUST be unique among all its siblings; The concatenation of the relative distinguished names of the sequence of entries from a particular entry to an immediate subordinate of the root of the tree forms that entry’s Distinguished Name (DN), which is unique in the tree; Each entry MUST have an objectClass attribute which specifies the object classes of that entry ; Servers MUST NOT permit clients to add attributes to an entry unless those attributes are permitted by the object class definitions, the schema controlling that entry ; Entries consist of a set of attributes; An attribute is a type with one or more associated values and is identified by a short descriptive name (...); Schema is the collection of attribute type definitions, object class definitions and other information (...); Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 17. Servidor Invariantes public ServerINV : () == > bool ServerINV () == ( return ( -- dit aciclica ( not exists e in set dom dit & e in set Tra nsi tive Clo sur e ( e ) ) and -- todos os elementos que existem estao na dit ( forall e in set ( dom dit union rng dit ) & e in set dom entries ) and -- objectos apenas contem atributos definidos ( forall o in set rng def_objs & ( forall a in set ( o . must union o . may ) & a in set def_attrs ) ) and -- dn unico entre todos os elementos da floresta ( forall e1 , e2 in set rng entries & e1 . GetDN () <> e2 . GetDN () ) and -- dn do pai contido no do filho ( forall p in set dom dit & ( forall c in set Tr ans itiv eCl osu re ( p ) & ( elems entries ( c ) . GetDN () ) subset ( elems entries ( p ) . GetDN () ) ) ) and -- rdn unico entre irmaos ( forall p in set dom dit & ( forall c1 , c2 in set dit ( p ) & entries ( c1 ) . GetRDN () <> entries ( c2 ) . GetRDN () ) ) and -- rdn faz parte do dn ( forall e in set rng entries & e . GetRDN () in set elems e . GetDN () ) and -- rdn composto por um atributo ( forall e in set rng entries & e . GetRDN () in set dom e . GetAttrs () ) ) ) ; Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 18. Sum´rio a 1 LDAP O que ´ o LDAP e a DIT e Estrutura do LDAP Propriedades do LDAP 2 VDM DIT - Tree? & Forest Servidor 3 Opera¸˜es do Servidor co Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 19. Servidor Opera¸oes c˜ CRUD Create Read Update Delete Add Entry Del Entry Modify DN Search Entry Search Attributes Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 20. Modify DN public ModDN : seq of AName * AName == > () ModDN ( old_dn , new_rdn ) == ( dcl new_dn : seq of AName := []; dcl pos : nat1 := len old_dn - 1; dcl e : nat1 := GetID ( old_dn ) ; for i = 1 to pos do new_dn := new_dn ^ [ old_dn ( i ) ]; new_dn := new_dn ^ [ new_rdn ]; entries ( e ) . SetDN ( new_dn ) ; for all c in set Tra nsi tiv eCl osur e ( e ) do ( new_dn := []; for i = 1 to ( len entries ( c ) . GetDN () ) do if i = pos then new_dn := new_dn ^ [ new_rdn ] else new_dn := new_dn ^ entries ( c ) . GetDN () ( i ) ; entries ( c ) . SetDN ( new_dn ) ; ); ) pre ( exists i in set dom entries & entries ( i ) . GetDN () = old_dn ) post ( exists i in set dom entries & forall c in set Tran sit ive Clo sure ( i ) & new_rdn in set elems entries ( i ) . GetDN () and new_rdn in set elems entries ( c ) . GetDN () ) ; Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 21. GetID public GetID : seq of AName == > nat GetID ( dn ) == ( for all i in set dom entries do if entries ( i ) . GetDN () = dn then return i ; return 0; ) post ( not exists i in set dom entries & entries ( i ) . GetDN () = dn = > RESULT = 0 ) or ( exists i in set dom entries & entries ( i ) . GetDN () = dn = > RESULT = i ) ; Pedro Pereira, Ulisses Costa LDAP em VDM++
  • 22. Transitive Closure public T r ans iti veCl osu re : nat1 == > set of nat1 T r a n s i t i v eCl osu re ( origem ) == ( dcl res : set of nat1 := {}; dcl childs : set of nat1 := dit ( origem ) ; while childs <> {} do ( for all c in set childs do ( childs := childs union dit ( c ) ; res := res union { c }; ); childs := childs res ; ); return res ; ) pre origem in set dom entries post forall e in set RESULT & ( elems entries ( origem ) . GetDN () ) subset ( elems entries ( e ) . GetDN () ) ; Pedro Pereira, Ulisses Costa LDAP em VDM++