Outils pour utilisateurs

Outils du site


Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
320kerberos:50_apache [le 15/02/2010 à 11:18] prof320kerberos:50_apache [le 30/06/2018 à 15:58] (Version actuelle) prof
Ligne 1: Ligne 1:
 ====== Configuration d'apache-krb ====== ====== Configuration d'apache-krb ======
 Le serveur ''apache-krb.maison.mrs'' va fournir un service http nécessitant une authentification kerberos. Nous allons donc installer ce qui est nécessaire : Le serveur ''apache-krb.maison.mrs'' va fournir un service http nécessitant une authentification kerberos. Nous allons donc installer ce qui est nécessaire :
-  * un système de synchronisation de l'horloge (NTP). Nous ne verrons ici comment faire, ce n'est pas le sujet principal ;+  * un système de synchronisation de l'horloge (NTP) ;
   * un serveur apache classique ;   * un serveur apache classique ;
   * les composants kerberos nécessaires.   * les composants kerberos nécessaires.
 +
 ===== Installation d'apache ===== ===== Installation d'apache =====
 Nous installons un Apache « prefork » classique : Nous installons un Apache « prefork » classique :
Ligne 108: Ligne 109:
 kerberos:~# rm krb5-http.keytab  kerberos:~# rm krb5-http.keytab 
 </code> </code>
 +Nous aurions également pu utiliser la commande ''kadmin'' directement sur ''apache-krb.maison.mrs'' pour obtenir le keytab sur place.
  
 === sur apache-krb === === sur apache-krb ===
Ligne 299: Ligne 301:
             Encryption type: des-cbc-md4 (2)             Encryption type: des-cbc-md4 (2)
 </pre></html> </pre></html>
 +Le serveur ''kerberos'' va répondre dans la trame 21 :
 +<html><pre class="code">
 +Frame 21 (744 bytes on wire, 744 bytes captured)
 +...
 +Kerberos TGS-REP
 +    Pvno: 5
 +    MSG Type: TGS-REP (13)
 +    Client Realm: MAISON.MRS
 +    Client Name (Principal): chris
 +        Name-type: Principal (1)
 +        Name: chris
 +    Ticket
 +        Tkt-vno: 5
 +        Realm: MAISON.MRS
 +        Server Name (Service and Host): HTTP/apache-krb.maison.mrs
 +            Name-type: Service and Host (3)
 +            Name: HTTP
 +            Name: apache-krb.maison.mrs
 +        enc-part aes256-cts-hmac-sha1-96
 +            Encryption type: aes256-cts-hmac-sha1-96 (18)
 +            Kvno: 3
 +            enc-part: 726E9E662C728E522451A0E630596656899C08CFF04F6F04...
 +    enc-part aes256-cts-hmac-sha1-96
 +        Encryption type: aes256-cts-hmac-sha1-96 (18)
 +        enc-part: 7FEDC49B008108F3E775207CB937C1DE83828023F9FCFE54...
 +</pre></html>
 +Et notre renard va re-formuler sa requête avec cette fois-ci ce qu'il faut dedans pour satisfaire l'indien dans la trame 22 :
 +<html><pre class="code">
 +Frame 22 (1504 bytes on wire, 1504 bytes captured)
 +...
 +Hypertext Transfer Protocol
 +    GET / HTTP/1.1\r\n
 +        [Expert Info (Chat/Sequence): GET / HTTP/1.1\r\n]
 +            [Message: GET / HTTP/1.1\r\n]
 +            [Severity level: Chat]
 +            [Group: Sequence]
 +        Request Method: GET
 +        Request URI: /
 +        Request Version: HTTP/1.1
 +    Host: apache-krb.maison.mrs\r\n
 +    User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7\r\n
 +    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
 +    Accept-Language: fr-fr,fr;q=0.8,en;q=0.5,en-us;q=0.3\r\n
 +    Accept-Encoding: gzip,deflate\r\n
 +    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
 +    Keep-Alive: 300\r\n
 +    Connection: keep-alive\r\n
 +    If-Modified-Since: Mon, 15 Feb 2010 08:38:55 GMT\r\n
 +    If-None-Match: "45d72-b1-47f9f8c2b05c0"\r\n
 +    [truncated] Authorization: Negotiate YIICqAYGKwYBBQUCoIICnDCCApigHzAdBgkqhkiG9xIBAgIGBSsFAQUCBgkqhkiC9xIBAgKiggJzBIICb2CCAmsGCSqGSIb3EgECAgEAboICWjCCAlagAwIBBaEDAgEOogcDBQAAAAAAo4IBb2GCAWswggFnoAMCAQWhDBsKTUFJU09OLk1SU6IoMCagAwIBA6EfMB0bBE
 +        GSS-API Generic Security Service Application Program Interface
 +            OID: 1.3.6.1.5.5.2 (SPNEGO - Simple Protected Negotiation)
 +            SPNEGO
 +                negTokenInit
 +                    mechTypes: 3 items
 +                        MechType: 1.2.840.113554.1.2.2 (KRB5 - Kerberos 5)
 +                        MechType: 1.3.5.1.5.2 (SNMPv2-SMI::org.5.1.5.2)
 +                        MechType: 1.2.840.48018.1.2.2 (MS KRB5 - Microsoft Kerberos 5)
 +                    mechToken: 6082026B06092A864886F71201020201006E82025A308202...
 +                    krb5_blob: 6082026B06092A864886F71201020201006E82025A308202...
 +                        KRB5 OID: 1.2.840.113554.1.2.2 (KRB5 - Kerberos 5)
 +                        krb5_tok_id: KRB5_AP_REQ (0x0001)
 +                        Kerberos AP-REQ
 +                            Pvno: 5
 +                            MSG Type: AP-REQ (14)
 +                            Padding: 0
 +                            APOptions: 00000000
 +                                .0.. .... .... .... .... .... .... .... = Use Session Key: Do NOT use the session key to encrypt the ticket
 +                                ..0. .... .... .... .... .... .... .... = Mutual required: Mutual authentication is NOT required
 +                            Ticket
 +                                Tkt-vno: 5
 +                                Realm: MAISON.MRS
 +                                Server Name (Service and Host): HTTP/apache-krb.maison.mrs
 +                                    Name-type: Service and Host (3)
 +                                    Name: HTTP
 +                                    Name: apache-krb.maison.mrs
 +                                enc-part aes256-cts-hmac-sha1-96
 +                                    Encryption type: aes256-cts-hmac-sha1-96 (18)
 +                                    Kvno: 3
 +                                    enc-part: 726E9E662C728E522451A0E630596656899C08CFF04F6F04...
 +                            Authenticator aes256-cts-hmac-sha1-96
 +                                Encryption type: aes256-cts-hmac-sha1-96 (18)
 +                                Authenticator data: FAC8A2377494B396884927BE3726631FA66EFD41C98DC227...
 +    \r\n
 +</pre></html>
 +Voilà, c'est aussi compliqué que ça, mais ça fonctionne quand même.
 +
Configuration d'apache-krb: Dernière modification le: 15/02/2010 à 11:18 par prof