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

Fast Resilient Jumbo Frames in Wireless LANs
Fast Resilient Jumbo Frames in Wireless LANsFast Resilient Jumbo Frames in Wireless LANs
Fast Resilient Jumbo Frames in Wireless LANsanandpiyer
 
Rac Seminar Presentation 30.04.08
Rac Seminar Presentation 30.04.08Rac Seminar Presentation 30.04.08
Rac Seminar Presentation 30.04.08RememberACharity
 
frizzled blush
 frizzled blush frizzled blush
frizzled blushsfalan
 
Captura de Informação em Rede
Captura de Informação em RedeCaptura de Informação em Rede
Captura de Informação em RedeUlisses Costa
 
The Cryptol Epilogue: Swift and Bulletproof VHDL
The Cryptol Epilogue: Swift and Bulletproof VHDLThe Cryptol Epilogue: Swift and Bulletproof VHDL
The Cryptol Epilogue: Swift and Bulletproof VHDLUlisses Costa
 
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Know
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Knowadtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Know
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To KnowAkihiko Tokuhisa
 
Uso de Honeypots com Honeyd
Uso de Honeypots com HoneydUso de Honeypots com Honeyd
Uso de Honeypots com HoneydUlisses Costa
 

Viewers also liked (9)

Apresentacao JML
Apresentacao JMLApresentacao JML
Apresentacao JML
 
Cryptol experience
Cryptol experienceCryptol experience
Cryptol experience
 
Fast Resilient Jumbo Frames in Wireless LANs
Fast Resilient Jumbo Frames in Wireless LANsFast Resilient Jumbo Frames in Wireless LANs
Fast Resilient Jumbo Frames in Wireless LANs
 
Rac Seminar Presentation 30.04.08
Rac Seminar Presentation 30.04.08Rac Seminar Presentation 30.04.08
Rac Seminar Presentation 30.04.08
 
frizzled blush
 frizzled blush frizzled blush
frizzled blush
 
Captura de Informação em Rede
Captura de Informação em RedeCaptura de Informação em Rede
Captura de Informação em Rede
 
The Cryptol Epilogue: Swift and Bulletproof VHDL
The Cryptol Epilogue: Swift and Bulletproof VHDLThe Cryptol Epilogue: Swift and Bulletproof VHDL
The Cryptol Epilogue: Swift and Bulletproof VHDL
 
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Know
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Knowadtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Know
adtechtokyo2010 Augmented Reality - A Showcase What The Marketers Need To Know
 
Uso de Honeypots com Honeyd
Uso de Honeypots com HoneydUso de Honeypots com Honeyd
Uso de Honeypots com Honeyd
 

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
 

More from Ulisses Costa

Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for SpaceUlisses Costa
 
Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for SpaceUlisses Costa
 
Static Code Analyzer - Part IV
Static Code Analyzer - Part IVStatic Code Analyzer - Part IV
Static Code Analyzer - Part IVUlisses Costa
 
Specifying and Implementing SNOW3G with Cryptol
Specifying and Implementing SNOW3G with CryptolSpecifying and Implementing SNOW3G with Cryptol
Specifying and Implementing SNOW3G with CryptolUlisses Costa
 
Static Code Analyzer - Part III
Static Code Analyzer - Part IIIStatic Code Analyzer - Part III
Static Code Analyzer - Part IIIUlisses Costa
 
Static Code Analyzer - Part II
Static Code Analyzer - Part IIStatic Code Analyzer - Part II
Static Code Analyzer - Part IIUlisses Costa
 
Static Code Analyzer - Part I
Static Code Analyzer - Part IStatic Code Analyzer - Part I
Static Code Analyzer - Part IUlisses Costa
 
GD::Graph - Graph Plotting Module
GD::Graph - Graph Plotting ModuleGD::Graph - Graph Plotting Module
GD::Graph - Graph Plotting ModuleUlisses Costa
 
Correct sorting with Frama-C
Correct sorting with Frama-CCorrect sorting with Frama-C
Correct sorting with Frama-CUlisses Costa
 
Splint the C code static checker
Splint the C code static checkerSplint the C code static checker
Splint the C code static checkerUlisses Costa
 
Exploring the Cryptol Toolset
Exploring the Cryptol ToolsetExploring the Cryptol Toolset
Exploring the Cryptol ToolsetUlisses Costa
 
Specification of SNOW 3G in Cryptol
Specification of SNOW 3G in CryptolSpecification of SNOW 3G in Cryptol
Specification of SNOW 3G in CryptolUlisses Costa
 
Snort - capturar e dissecar o tráfego da rede
Snort - capturar e dissecar o tráfego da redeSnort - capturar e dissecar o tráfego da rede
Snort - capturar e dissecar o tráfego da redeUlisses Costa
 
Linux Instalation Party
Linux Instalation PartyLinux Instalation Party
Linux Instalation PartyUlisses Costa
 
Calculador Pointfree
Calculador PointfreeCalculador Pointfree
Calculador PointfreeUlisses Costa
 

More from Ulisses Costa (18)

Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for Space
 
Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for Space
 
Static Code Analyzer - Part IV
Static Code Analyzer - Part IVStatic Code Analyzer - Part IV
Static Code Analyzer - Part IV
 
Specifying and Implementing SNOW3G with Cryptol
Specifying and Implementing SNOW3G with CryptolSpecifying and Implementing SNOW3G with Cryptol
Specifying and Implementing SNOW3G with Cryptol
 
Static Code Analyzer - Part III
Static Code Analyzer - Part IIIStatic Code Analyzer - Part III
Static Code Analyzer - Part III
 
Static Code Analyzer - Part II
Static Code Analyzer - Part IIStatic Code Analyzer - Part II
Static Code Analyzer - Part II
 
Static Code Analyzer - Part I
Static Code Analyzer - Part IStatic Code Analyzer - Part I
Static Code Analyzer - Part I
 
logCesium01
logCesium01logCesium01
logCesium01
 
Cesium Log ed2
Cesium Log ed2Cesium Log ed2
Cesium Log ed2
 
GD::Graph - Graph Plotting Module
GD::Graph - Graph Plotting ModuleGD::Graph - Graph Plotting Module
GD::Graph - Graph Plotting Module
 
Correct sorting with Frama-C
Correct sorting with Frama-CCorrect sorting with Frama-C
Correct sorting with Frama-C
 
Splint the C code static checker
Splint the C code static checkerSplint the C code static checker
Splint the C code static checker
 
Exploring the Cryptol Toolset
Exploring the Cryptol ToolsetExploring the Cryptol Toolset
Exploring the Cryptol Toolset
 
Specification of SNOW 3G in Cryptol
Specification of SNOW 3G in CryptolSpecification of SNOW 3G in Cryptol
Specification of SNOW 3G in Cryptol
 
Snort - capturar e dissecar o tráfego da rede
Snort - capturar e dissecar o tráfego da redeSnort - capturar e dissecar o tráfego da rede
Snort - capturar e dissecar o tráfego da rede
 
Linux Instalation Party
Linux Instalation PartyLinux Instalation Party
Linux Instalation Party
 
Workshop LaTeX
Workshop LaTeXWorkshop LaTeX
Workshop LaTeX
 
Calculador Pointfree
Calculador PointfreeCalculador Pointfree
Calculador Pointfree
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

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++