Skynet: LDAP                                      
                                                                                                    
                                         The past haunts us                                         
                                                                                                    
                                                                                                    
                                             2023-10-22                                             
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                              Brendan                                               
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                   LDAP - Overview                                   
                                                                                                    
                                                                                                    
                                                                                                    
        Lightweight Directory Access Protocol                                                       
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             2 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                                   LDAP - Overview                                   
                                                                                                    
                                                                                                    
                                                                                                    
        Lightweight Directory Access Protocol                                                       
                                                                                                    
        Basically the digital version of a phonebook                                                
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             3 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                                   LDAP - Overview                                   
                                                                                                    
                                                                                                    
                                                                                                    
        Lightweight Directory Access Protocol                                                       
                                                                                                    
        Basically the digital version of a phonebook                                                
                                                                                                    
        A type of database                                                                          
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             4 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                                   LDAP - Overview                                   
                                                                                                    
                                                                                                    
                                                                                                    
        Lightweight Directory Access Protocol                                                       
                                                                                                    
        Basically the digital version of a phonebook                                                
                                                                                                    
        A type of database                                                                          
                                                                                                    
        Stores the basic account information.                                                       
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             5 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             6 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             7 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             8 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                             9 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            10 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
           •  Student ID (if available)                                                             
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            11 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
           •  Student ID (if available)                                                             
           •  Groups they are a member of (member, skynet, committee)                               
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            12 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
           •  Student ID (if available)                                                             
           •  Groups they are a member of (member, skynet, committee)                               
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            13 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
           •  Student ID (if available)                                                             
           •  Groups they are a member of (member, skynet, committee)                               
                                                                                                    
        A source of truth.                                                                          
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            14 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                              LDAP - Why we use it                              
                                                                                                    
                                                                                                    
                                                                                                    
        Stores data that is useful for differences services:                                        
                                                                                                    
           •  Username                                                                              
           •  Password hash                                                                         
           •  SSH keys                                                                              
           •  Recovery email                                                                        
           •  Student ID (if available)                                                             
           •  Groups they are a member of (member, skynet, committee)                               
                                                                                                    
        A source of truth.                                                                          
                                                                                                    
        Technically the Skynet account.                                                             
        Every other service pulls from it to populate their own databases.                          
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            15 / 16 
                                                                                                    
                                                                                                    
                                                                                                    
                                    LDAP - Example                                    
                                                                                                    
                                                                                                    
                                                                                                    
        While it is possible to                                                                     
        use terminal commands                                                                       
                                                                                                    
        Using a dedicated tool                                                                      
        is far more                                                                                 
        intuitive/better.                                                                           
                                                                                                    
        I recommend this, works                                                                     
        on windows/linux.                                                                           
        https://directory.apache                                                                    
        .org/studio/                                                                                
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                            16 / 16