SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
SSO
                           Single Sign-On




  TEQneers GmbH & Co. KG                    Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Definition

                • Property of access control of multiple,
                       related, but independent software
                       systems
                • One time authorization process for
                       multiple applications, websites, ...


  TEQneers GmbH & Co. KG                                      Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Benefits
           • Reducing countless logins and passwords
           • Reducing time effort to re-login
           • Reducing IT cost/help desk
           • Same level of password security everywhere
           • Centralized reporting
           • Usually much better passwords
  TEQneers GmbH & Co. KG                        Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Criticism
                • Stolen credential opens all dungeons
                • Infrastructure
                • Might be combined with strong
                       authentications (e.g. SmartCards)
                • Many solutions need very expensive
                       software or hardware solutions

  TEQneers GmbH & Co. KG                                   Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Issues

                • Different apps uses different SSO
                       processes
                • Impossible to find ONE SSO for all (?)
                • Most solution unable to jump over
                       intranet barrier


  TEQneers GmbH & Co. KG                              Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Solutions
             • Kerberos [1983]
             • LDAP (slapd, Active Directory, …) [1993]
             • NTLM (NT Lan Manager) [2000]
             • CAS (Central Authentication Service) [2001]
             • PKI (Public Key Infrastructure) [1969]
             • SAML [2002]
             • ...
  TEQneers GmbH & Co. KG                          Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Kerberos
                • No easy setup
                • Not easy for developers to setup same
                       environment
                • Intranet barrier
                • External service provider unable to use
                       SSO

  TEQneers GmbH & Co. KG                             Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
LDAP / AD
                • SAME sign-on
                • Intranet barrier (too much information)
                • External service provider unable to use
                       SSO
                • Easy to implement
                • Nice to sync user data
  TEQneers GmbH & Co. KG                             Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
// using ldap bind
                $ldaprdn = 'uname'; // ldap rdn or dn
                $ldappass = 'password'; // associated password

                // connect to ldap server
                $ldapconn = ldap_connect("ldap.example.com")
                  or die("Could not connect to LDAP server.");

                if ($ldapconn) {
                    // binding to ldap server
                    $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);

                    // verify binding
                    if ($ldapbind) {
                       echo "LOGIN successful...";
                    } else {
                       echo "LOGIN failed...";
                    }
                }


  TEQneers GmbH & Co. KG                                                     Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
NTLM
                • Intranet barrier
                • External service provider unable to use
                       SSO
                • Based on Windows logon and Kerberos
                • Compatibility issues (more or less
                       Microsoft territory Windows, IIS, IE)
                • Easy to implement for developers
  TEQneers GmbH & Co. KG                                   Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
function get_msg_str($msg, $start, $unicode = true) {
                           $len = (ord($msg[$start+1]) * 256) + ord($msg[$start]);
                           $off = (ord($msg[$start+5]) * 256) + ord($msg[$start+4]);
                           if ($unicode)
                               return str_replace("0", '', substr($msg, $off, $len));
                           else
                               return substr($msg, $off, $len);
                   }
                   $msg = base64_decode(substr($auth, 5));
                   $user = get_msg_str($msg, 36);
                   $domain = get_msg_str($msg, 28);
                   $workstation = get_msg_str($msg, 44);


                   print "You are $user from $domain/$workstation";


  TEQneers GmbH & Co. KG                                                         Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Central Authentication
                  Service (CAS)
                • Token/ticket based authentication
                • Developed by Yale University
                • phpCAS open source implementation
                • Made for web only
                • Common in education environment
  TEQneers GmbH & Co. KG                        Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
include_once('CAS.php');

                // initialize phpCAS
                phpCAS::client(CAS_VERSION_2_0,'sso-cas.home.com',443,'');

                // no SSL validation for the CAS server
                phpCAS::setNoCasServerValidation();

                // force CAS authentication
                phpCAS::forceAuthentication();

                // at this step, the user has been authenticated by the CAS server
                // and the user's login name can be read with phpCAS::getUser().

                // logout if desired
                if (isset($_REQUEST['logout'])) {
                       phpCAS::logout();
                }

                echo "LOGIN successful...";


  TEQneers GmbH & Co. KG                                                             Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Public Key
                           Infrastructure (PKI)
       • X.509 certification based authentication
       • Its about what-you-have (client certificate) and
              not what-you-know (password)
       • Often used with smart cards (e.g. employee ID)
       • Made for Web, SSH, OS login, ...
       • Common in enterprise and government solutions
  TEQneers GmbH & Co. KG                        Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
### PHP

       $cert = openssl_x509_parse($_SERVER[‘SSL_CLIENT_CERT’]));

       // verify login
                                                                     array(12) {
       if ( in_array( $cert[‘subject’][‘cn’], $allowedLogins ) ) {    ["name"]=> string(75) "/C=DE/O=TEQneers/
          echo "LOGIN successful...";                                OU=Dev/CN=Oliver/
       } else {                                                      emailAddress=oliver@php.net"
          echo "LOGIN failed...";                                     ["subject"]=> array(6) {
       }                                                                ["C"]=> string(2) "DE"
                                                                        ["O"]=> string(10) "TEQneers"
                                                                        ["OU"]=> string(10) "Dev"
                                                                        ["CN"]=> string(8) "Oliver"
                                                                        ["emailAddress"]=> string(10) "foo@bar.de"
      ### Apache configuration or .htaccess                           }
                                                                      ["hash"]=> string(8) "123abc45"
      SSLVerifyClient required                                        ["issuer"]=> array(7) {
                                                                        ...
      SSLRequireSSL
                                                                      }
      SSLVerifyDepth 1                                                ["version"]=> int(2)
                                                                      ["serialNumber"]=> string(1) "987"
                                                                      ["validFrom"]=> string(13)
                                                                     "110131143055Z"
                                                                      ["validTo"]=> string(13) "130130142954Z"
                                                                      ...




  TEQneers GmbH & Co. KG                                                                  Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
SAML
                • Security Assertion Markup Language
                • Defined by OASIS
                • Made for internet and extranet sites
                • Credentials/Information can be
                       configured
                • Open (based on XML, SOAP, HTTP, ...)
  TEQneers GmbH & Co. KG                            Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
SAML Parties

                • Client (browser)
                • Web application
                • Service Provider (SAML client)
                • Identity Provider (enterprise federation
                       server)


  TEQneers GmbH & Co. KG                             Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Service Provider
                • selfmade
                • simpleSAMLphp (open source PHP
                       solution)
                • PingConnect (PHP, Perl, Java, …)
                • ...
  TEQneers GmbH & Co. KG                             Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
TEQneers GmbH & Co. KG   Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
• user enters URL https://app.com/saml.php
     • user without valid SAML assertion will be forwarded to service provider
       • browser asks service provider to give him a XML assertion
       • XML assertion request form is send back to the browser
       • browser forwards assertion request form to identity provider
       • IF NOT LOGGED IN YET
           • identity provider ask the user to log into the enterprise network
           • user enters his login/password and sends it back to identity provider
       • client receives a XML assertion and cookie signed by the identity provider
       • XML assertion is send to service provider, who validates assertion
     • if assertion is valid, user will be pushed back to his initial url
     • assertion will be checked and user is going to be looked up in your app
     • if user exists, app start page appears, otherwise app might show standard login
           page


  TEQneers GmbH & Co. KG                                            Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
// Load simpleSAMLphp configuration and session.
            $config = SimpleSAML_Configuration::getInstance();
            $session = SimpleSAML_Session::getInstance();

            // Check if valid local session exists.
            if (!$session->isValid('saml2') ) {
              // Redirect to the IdP for authentication.
              SimpleSAML_Utilities::redirect(
               '/' . $config->getBaseURL() . 'saml2/sp/initSSO.php',
               array('RelayState' => SimpleSAML_Utilities::selfURL())
               );
            }

            // successful authorization
            $attributes = $session->getAttributes();
            print_r($attributes); // might print out email or login

  TEQneers GmbH & Co. KG                                                Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
<saml:Assertion AssertionID="123" IssueInstant="2008-10-08T20:16:12.377Z"
         Issuer="TransactionMinderSAMLIssuer" MajorVersion="1" MinorVersion="0"
         xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
         <saml:Conditions NotBefore="2008-10-08T20:16:12.307Z
         NotOnOrAfter="2008-1008T22:16:12.307Z"/>
         <saml:AuthenticationStatement AuthenticationInstant="2008-10-08T20:16:12.307Z"
         AuthenticationMethod="urn:oasis:names:tc:SAML">
           <saml:Subject>
          <saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.0"
         NameQualifier="Domain Name">Claire Wasser</saml:NameIdentifier>
            <saml:SubjectConfirmation>
             <saml:ConfirmationMethod>http://www/>
             <saml:SubjectConfirmationData>R1VD8fkkvlrhp</saml:SubjectConfirmationData>
            </saml:SubjectConfirmation>
           </saml:Subject>
          </saml:AuthenticationStatement>
         </saml:Assertion>

  TEQneers GmbH & Co. KG                                                 Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Identity Server
                • Shibboleth IdP (open source)
                • PingIdentity
                • Oracle Identity Server
                • SAP NetWeaver
                • Sun OpenSSO ForgeRock OpenAM
                • IBM
                • Microsoft Geneva
  TEQneers GmbH & Co. KG                         Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
One size does fit it all

                • Most federation solution support many
                       different SSO technologies
                • Most are based on any kind of LDAP
                       backend



  TEQneers GmbH & Co. KG                            Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011
Thanks for listening
                           contact me if you have any questions

                                  email: oliver@php.net
                                email: oliver@teqneers.de
                              phone: +49 (711) 46 97 28-82


                                   Have Fun!
  TEQneers GmbH & Co. KG                                     Dipl. Betriebswirt (BA) Oliver Müller

Samstag, 5. März 2011

Contenu connexe

Tendances

What is SSO? An introduction to Single Sign On
What is SSO? An introduction to Single Sign OnWhat is SSO? An introduction to Single Sign On
What is SSO? An introduction to Single Sign OnRiddhi Sood
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - IntroductionKnoldus Inc.
 
Single Sign On - Case Study
Single Sign On - Case StudySingle Sign On - Case Study
Single Sign On - Case StudyEbizon
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_securityMarco Morana
 
Azure active directory
Azure active directoryAzure active directory
Azure active directoryRaju Kumar
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect Nat Sakimura
 
Introduction to SAML 2.0
Introduction to SAML 2.0Introduction to SAML 2.0
Introduction to SAML 2.0Mika Koivisto
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2Aaron Parecki
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - IntroductionPranav Ainavolu
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityAbdul Wahid
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CJoonas Westlin
 
Integrating your on-premises Active Directory with Azure and Office 365
Integrating your on-premises Active Directory with Azure and Office 365Integrating your on-premises Active Directory with Azure and Office 365
Integrating your on-premises Active Directory with Azure and Office 365nelmedia
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectVinay Manglani
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Niels de Bruijn
 

Tendances (20)

What is SSO? An introduction to Single Sign On
What is SSO? An introduction to Single Sign OnWhat is SSO? An introduction to Single Sign On
What is SSO? An introduction to Single Sign On
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Single Sign On - Case Study
Single Sign On - Case StudySingle Sign On - Case Study
Single Sign On - Case Study
 
Single sign on using SAML
Single sign on using SAML Single sign on using SAML
Single sign on using SAML
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_security
 
OAuth 2
OAuth 2OAuth 2
OAuth 2
 
Azure active directory
Azure active directoryAzure active directory
Azure active directory
 
IdP, SAML, OAuth
IdP, SAML, OAuthIdP, SAML, OAuth
IdP, SAML, OAuth
 
OAuth
OAuthOAuth
OAuth
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect
 
Introduction to SAML 2.0
Introduction to SAML 2.0Introduction to SAML 2.0
Introduction to SAML 2.0
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - Introduction
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2C
 
Integrating your on-premises Active Directory with Azure and Office 365
Integrating your on-premises Active Directory with Azure and Office 365Integrating your on-premises Active Directory with Azure and Office 365
Integrating your on-premises Active Directory with Azure and Office 365
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
 
Single Sign-On Best Practices
Single Sign-On Best PracticesSingle Sign-On Best Practices
Single Sign-On Best Practices
 

Similaire à Enterprise Single Sign-On - SSO

Secure coding - Balgan - Tiago Henriques
Secure coding - Balgan - Tiago HenriquesSecure coding - Balgan - Tiago Henriques
Secure coding - Balgan - Tiago HenriquesTiago Henriques
 
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012Nick Galbreath
 
High Availability Asterisk and FreePBX on Microsoft Azure
High Availability Asterisk and FreePBX on Microsoft AzureHigh Availability Asterisk and FreePBX on Microsoft Azure
High Availability Asterisk and FreePBX on Microsoft AzureSanjay Willie
 
O365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudO365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudNCCOMMS
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
Can you keep a secret? (XP Days 2017)
Can you keep a secret? (XP Days 2017)Can you keep a secret? (XP Days 2017)
Can you keep a secret? (XP Days 2017)Valerii Moisieienko
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server Antonios Chatzipavlis
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development ChallengesNick Pruehs
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementLaurent Leturgez
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureMongoDB
 
Yapc10 Cdt World Domination
Yapc10   Cdt World DominationYapc10   Cdt World Domination
Yapc10 Cdt World DominationcPanel
 
Hack your db before the hackers do
Hack your db before the hackers doHack your db before the hackers do
Hack your db before the hackers dofangjiafu
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsVlad Fedosov
 
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
 THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONSMarkus Eisele
 

Similaire à Enterprise Single Sign-On - SSO (20)

Secure coding - Balgan - Tiago Henriques
Secure coding - Balgan - Tiago HenriquesSecure coding - Balgan - Tiago Henriques
Secure coding - Balgan - Tiago Henriques
 
Clonetab flyer
Clonetab flyerClonetab flyer
Clonetab flyer
 
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
 
High Availability Asterisk and FreePBX on Microsoft Azure
High Availability Asterisk and FreePBX on Microsoft AzureHigh Availability Asterisk and FreePBX on Microsoft Azure
High Availability Asterisk and FreePBX on Microsoft Azure
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
O365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudO365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloud
 
Integration & DSL
Integration & DSLIntegration & DSL
Integration & DSL
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
Can you keep a secret? (XP Days 2017)
Can you keep a secret? (XP Days 2017)Can you keep a secret? (XP Days 2017)
Can you keep a secret? (XP Days 2017)
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data management
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
 
Yapc10 Cdt World Domination
Yapc10   Cdt World DominationYapc10   Cdt World Domination
Yapc10 Cdt World Domination
 
Hack your db before the hackers do
Hack your db before the hackers doHack your db before the hackers do
Hack your db before the hackers do
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applications
 
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
 THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
 
Stackato
StackatoStackato
Stackato
 

Enterprise Single Sign-On - SSO

  • 1. SSO Single Sign-On TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 2. Definition • Property of access control of multiple, related, but independent software systems • One time authorization process for multiple applications, websites, ... TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 3. Benefits • Reducing countless logins and passwords • Reducing time effort to re-login • Reducing IT cost/help desk • Same level of password security everywhere • Centralized reporting • Usually much better passwords TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 4. Criticism • Stolen credential opens all dungeons • Infrastructure • Might be combined with strong authentications (e.g. SmartCards) • Many solutions need very expensive software or hardware solutions TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 5. Issues • Different apps uses different SSO processes • Impossible to find ONE SSO for all (?) • Most solution unable to jump over intranet barrier TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 6. Solutions • Kerberos [1983] • LDAP (slapd, Active Directory, …) [1993] • NTLM (NT Lan Manager) [2000] • CAS (Central Authentication Service) [2001] • PKI (Public Key Infrastructure) [1969] • SAML [2002] • ... TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 7. Kerberos • No easy setup • Not easy for developers to setup same environment • Intranet barrier • External service provider unable to use SSO TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 8. LDAP / AD • SAME sign-on • Intranet barrier (too much information) • External service provider unable to use SSO • Easy to implement • Nice to sync user data TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 9. // using ldap bind $ldaprdn = 'uname'; // ldap rdn or dn $ldappass = 'password'; // associated password // connect to ldap server $ldapconn = ldap_connect("ldap.example.com") or die("Could not connect to LDAP server."); if ($ldapconn) { // binding to ldap server $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // verify binding if ($ldapbind) { echo "LOGIN successful..."; } else { echo "LOGIN failed..."; } } TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 10. NTLM • Intranet barrier • External service provider unable to use SSO • Based on Windows logon and Kerberos • Compatibility issues (more or less Microsoft territory Windows, IIS, IE) • Easy to implement for developers TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 11. function get_msg_str($msg, $start, $unicode = true) { $len = (ord($msg[$start+1]) * 256) + ord($msg[$start]); $off = (ord($msg[$start+5]) * 256) + ord($msg[$start+4]); if ($unicode) return str_replace("0", '', substr($msg, $off, $len)); else return substr($msg, $off, $len); } $msg = base64_decode(substr($auth, 5)); $user = get_msg_str($msg, 36); $domain = get_msg_str($msg, 28); $workstation = get_msg_str($msg, 44); print "You are $user from $domain/$workstation"; TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 12. Central Authentication Service (CAS) • Token/ticket based authentication • Developed by Yale University • phpCAS open source implementation • Made for web only • Common in education environment TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 13. include_once('CAS.php'); // initialize phpCAS phpCAS::client(CAS_VERSION_2_0,'sso-cas.home.com',443,''); // no SSL validation for the CAS server phpCAS::setNoCasServerValidation(); // force CAS authentication phpCAS::forceAuthentication(); // at this step, the user has been authenticated by the CAS server // and the user's login name can be read with phpCAS::getUser(). // logout if desired if (isset($_REQUEST['logout'])) { phpCAS::logout(); } echo "LOGIN successful..."; TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 14. Public Key Infrastructure (PKI) • X.509 certification based authentication • Its about what-you-have (client certificate) and not what-you-know (password) • Often used with smart cards (e.g. employee ID) • Made for Web, SSH, OS login, ... • Common in enterprise and government solutions TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 15. ### PHP $cert = openssl_x509_parse($_SERVER[‘SSL_CLIENT_CERT’])); // verify login array(12) { if ( in_array( $cert[‘subject’][‘cn’], $allowedLogins ) ) { ["name"]=> string(75) "/C=DE/O=TEQneers/ echo "LOGIN successful..."; OU=Dev/CN=Oliver/ } else { emailAddress=oliver@php.net" echo "LOGIN failed..."; ["subject"]=> array(6) { } ["C"]=> string(2) "DE" ["O"]=> string(10) "TEQneers" ["OU"]=> string(10) "Dev" ["CN"]=> string(8) "Oliver" ["emailAddress"]=> string(10) "foo@bar.de" ### Apache configuration or .htaccess } ["hash"]=> string(8) "123abc45" SSLVerifyClient required ["issuer"]=> array(7) { ... SSLRequireSSL } SSLVerifyDepth 1 ["version"]=> int(2) ["serialNumber"]=> string(1) "987" ["validFrom"]=> string(13) "110131143055Z" ["validTo"]=> string(13) "130130142954Z" ... TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 16. SAML • Security Assertion Markup Language • Defined by OASIS • Made for internet and extranet sites • Credentials/Information can be configured • Open (based on XML, SOAP, HTTP, ...) TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 17. SAML Parties • Client (browser) • Web application • Service Provider (SAML client) • Identity Provider (enterprise federation server) TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 18. Service Provider • selfmade • simpleSAMLphp (open source PHP solution) • PingConnect (PHP, Perl, Java, …) • ... TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 19. TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 20. • user enters URL https://app.com/saml.php • user without valid SAML assertion will be forwarded to service provider • browser asks service provider to give him a XML assertion • XML assertion request form is send back to the browser • browser forwards assertion request form to identity provider • IF NOT LOGGED IN YET • identity provider ask the user to log into the enterprise network • user enters his login/password and sends it back to identity provider • client receives a XML assertion and cookie signed by the identity provider • XML assertion is send to service provider, who validates assertion • if assertion is valid, user will be pushed back to his initial url • assertion will be checked and user is going to be looked up in your app • if user exists, app start page appears, otherwise app might show standard login page TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 21. // Load simpleSAMLphp configuration and session. $config = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getInstance(); // Check if valid local session exists. if (!$session->isValid('saml2') ) { // Redirect to the IdP for authentication. SimpleSAML_Utilities::redirect( '/' . $config->getBaseURL() . 'saml2/sp/initSSO.php', array('RelayState' => SimpleSAML_Utilities::selfURL()) ); } // successful authorization $attributes = $session->getAttributes(); print_r($attributes); // might print out email or login TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 22. <saml:Assertion AssertionID="123" IssueInstant="2008-10-08T20:16:12.377Z" Issuer="TransactionMinderSAMLIssuer" MajorVersion="1" MinorVersion="0" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"> <saml:Conditions NotBefore="2008-10-08T20:16:12.307Z NotOnOrAfter="2008-1008T22:16:12.307Z"/> <saml:AuthenticationStatement AuthenticationInstant="2008-10-08T20:16:12.307Z" AuthenticationMethod="urn:oasis:names:tc:SAML"> <saml:Subject> <saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.0" NameQualifier="Domain Name">Claire Wasser</saml:NameIdentifier> <saml:SubjectConfirmation> <saml:ConfirmationMethod>http://www/> <saml:SubjectConfirmationData>R1VD8fkkvlrhp</saml:SubjectConfirmationData> </saml:SubjectConfirmation> </saml:Subject> </saml:AuthenticationStatement> </saml:Assertion> TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 23. Identity Server • Shibboleth IdP (open source) • PingIdentity • Oracle Identity Server • SAP NetWeaver • Sun OpenSSO ForgeRock OpenAM • IBM • Microsoft Geneva TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 24. One size does fit it all • Most federation solution support many different SSO technologies • Most are based on any kind of LDAP backend TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011
  • 25. Thanks for listening contact me if you have any questions email: oliver@php.net email: oliver@teqneers.de phone: +49 (711) 46 97 28-82 Have Fun! TEQneers GmbH & Co. KG Dipl. Betriebswirt (BA) Oliver Müller Samstag, 5. März 2011