]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
spec: Make example authentication transactions more realistic
authorSimon McVittie <smcv@collabora.com>
Tue, 12 Dec 2017 13:19:51 +0000 (13:19 +0000)
committerSimon McVittie <smcv@collabora.com>
Thu, 11 Jan 2018 18:25:42 +0000 (18:25 +0000)
We don't need to invent a MAGIC_COOKIE mechanism when we have a
perfectly good EXTERNAL.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224

doc/dbus-specification.xml

index 0de43f7a15bffdbfb7471745c8c4115fc88eba1f..f5669f078121c4667d249483bbb2400fec21563f 100644 (file)
 
       <para>
         <figure>
-          <title>Example of successful magic cookie authentication</title>
+          <title>Example of successful EXTERNAL authentication</title>
           <programlisting>
-            (MAGIC_COOKIE is a made up mechanism)
+            31303030 is ASCII decimal "1000" represented in hex, so
+            the client is authenticating as Unix uid 1000 in this example.
 
-            C: AUTH MAGIC_COOKIE 3138363935333137393635383634
+            C: AUTH EXTERNAL 31303030
             S: OK 1234deadbeef
             C: BEGIN
           </programlisting>
         <figure>
           <title>Example of client sends unknown command then falls back to regular auth</title>
           <programlisting>
+            532d312d352d3138 is the Windows SID "S-1-5-18" in hex,
+            so the client is authenticating as Windows SID S-1-5-18
+            in this example.
+
             C: FOOBAR
             S: ERROR
-            C: AUTH MAGIC_COOKIE 3736343435313230333039
+            C: AUTH EXTERNAL 532d312d352d3138
             S: OK 1234deadbeef
             C: BEGIN
           </programlisting>
         <figure>
           <title>Example of server doesn't support initial auth mechanism</title>
           <programlisting>
-            C: AUTH MAGIC_COOKIE 3736343435313230333039
+            C: AUTH EXTERNAL
             S: REJECTED KERBEROS_V4 SKEY
             C: AUTH SKEY 7ab83f32ee
             S: DATA 8799cabb2ea93e
         <figure>
           <title>Example of wrong password or the like followed by successful retry</title>
           <programlisting>
-            C: AUTH MAGIC_COOKIE 3736343435313230333039
+            C: AUTH EXTERNAL 736d6376
             S: REJECTED KERBEROS_V4 SKEY
             C: AUTH SKEY 7ab83f32ee
             S: DATA 8799cabb2ea93e
         <figure>
           <title>Example of skey cancelled and restarted</title>
           <programlisting>
-            C: AUTH MAGIC_COOKIE 3736343435313230333039
+            C: AUTH EXTERNAL 32303438
             S: REJECTED KERBEROS_V4 SKEY
             C: AUTH SKEY 7ab83f32ee
             S: DATA 8799cabb2ea93e
           </programlisting>
         </figure>
         <figure>
-          <title>Example of successful magic cookie authentication with successful negotiation of Unix FD passing</title>
+          <title>Example of successful EXTERNAL authentication with successful negotiation of Unix FD passing</title>
           <programlisting>
-            (MAGIC_COOKIE is a made up mechanism)
-
-            C: AUTH MAGIC_COOKIE 3138363935333137393635383634
+            C: AUTH EXTERNAL 31303030
             S: OK 1234deadbeef
             C: NEGOTIATE_UNIX_FD
             S: AGREE_UNIX_FD
           </programlisting>
         </figure>
         <figure>
-          <title>Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</title>
+          <title>Example of successful EXTERNAL authentication with unsuccessful negotiation of Unix FD passing</title>
           <programlisting>
-            (MAGIC_COOKIE is a made up mechanism)
-
-            C: AUTH MAGIC_COOKIE 3138363935333137393635383634
+            C: AUTH EXTERNAL 31303030
             S: OK 1234deadbeef
             C: NEGOTIATE_UNIX_FD
-            S: ERROR
+            S: ERROR Not supported on this OS
             C: BEGIN
           </programlisting>
         </figure>