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

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

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