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

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

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