Zum Hauptinhalt springen

4. Beispiele

Der Benutzer "joe" möchte sich möglicherweise als Benutzer "pete" auf der Maschine "foo" anmelden. Hat "pete" auf "foo" die Einrichtungen vorgenommen, die "joe" den Zugriff auf sein Konto erlauben, würde der Client IAC SB AUTHENTICATION NAME "pete" IAC SE IAC SB AUTHENTICATION IS SPX AUTH <joe's spx authentication token> IAC SE senden. Der Server würde den Benutzer dann anhand der Token-Informationen als "joe" authentifizieren, und der Server würde entweder ACCEPT oder REJECT zurücksenden. Wird gegenseitige Authentifizierung verwendet, würde der Server in die ACCEPT-Nachricht eine gegenseitige Antwort (mutual response) aufnehmen. Die Berechtigungsprüfung, ob "pete" "joe" die Nutzung seines Kontos gestattet, erfolgt erst, nachdem der Authentifizierungsaustausch abgeschlossen ist. Daher ist es möglich, dass der Client eine ACCEPT-Antwort erhält (basierend auf dem Authentifizierungstoken), "joe" jedoch der Zugriff zur Anmeldung bei petes Konto verweigert wird.

       Client                           Server
IAC DO AUTHENTICATION
IAC WILL AUTHENTICATION
[ The server is now free to request authentication information.
]
IAC SB AUTHENTICATION SEND SPX
CLIENT|MUTUAL SPX CLIENT|ONE_WAY
IAC SE
[ The server has requested mutual SPX authentication. If mutual
authentication is not supported, then the server is willing to
do one-way SPX authentication. ]
[ The client will now respond with the name of the user that it
wants to log in as, and the SPX authentication token. ]
IAC SB AUTHENTICATION NAME
"pete" IAC SE
IAC SB AUTHENTICATION IS SPX
CLIENT|MUTUAL AUTH <spx
authentication token
information> IAC SE
[ The server responds with an ACCEPT command to state that the
authentication was successful. ]
[ If AUTH_HOW_MUTUAL, the server responds with the mutual
response so the client can verify that it is really talking to
the right server. ]
[ If AUTH_HOW_ONE_WAY, the server responds with a NULL mutual
response, since the client is willing to trust the server
already. ]
IAC SB AUTHENTICATION REPLY SPX
CLIENT|MUTUAL ACCEPT <mutual
response> IAC SE