Let's first understand how the login process
works? You walk up to a workstation and
you login. And how do you login? Well
you login using your username and password and
this login process is special that runs on
the virtue workstation. It, communicates with the login
server that is inside the vice by presenting
the username and password in a secure fashion.
We'll see how that is done in a bit. So it presents the username and password
securely over the insecure links. To the login server, and the login
server, once it authenticates who you are, using the username and
password, it is going to send you a pair of tokens, and remember all of this is
happening on behalf of the user by This
merge in the virtual workstation. The user has
to do nothing special. All that the user
is doing is logging in using a user
name and password. Under the covers these things are
happening. First, the log in process communicates securely
with the log in server presenting the user
name and password. And the login server then
returns two tokens. One is called a secret token.
The other is called a clear token. The clear
token, is a data structure. Once again I have
to mention that both the secret and clear tokens
are communicated back To the log in process, by
the log in server, in a secure manner over
the insecure link. We'll see how that is done
in a minute. So once, the log in process
gets these two tokens, decrypts them and gets these two
tokens, the log in process decrypts the
message that contains these two tokens. And
extracts the clear token and the secret token. The clear token is really a data
structure which is known to the login
process. And the data structure in particular
contains a handshake key. We'll call it
HKC. So from this clear token data structure,
the login process can extract this handshake key
And the secret token is just a bit
string. So far as the login process is
concerned. The weight is generated by the login server,
is to encrypt this clear token. With a key known only to vice. It's not the
same as HKC. It is a key that is known only to vice, to encrypt the clear token.
And we will see how this key is going to be used, later on. So to recap,
virtue sends securely the username and password to the login server. Login
server securely sends secret token and clear
token back to this login process. From
the clear token The login process extracts
the handshake key. And the secret token is
basically a bitstream, which is an encryption
of the contents of this cleared token,
encrypted with a key that is known only to Vice. In other words, the secrettoken
is unique for this login session, and It is a bit string, which means
nothing to anybody that sees it on the wire. And therefore we can use this bit
string that secrettoken represents as ephemeral
client-id for this login session. Recall I said. We don't
want to expose the user name and password Too often on the wire.
This is Andrew's answer to dealing with a problem, by
providing an ephemeral client ID for this login session. Once
I use it as logged in, they get an ephemeral client ID, which is the secret
token. And this can be used in the future communication between
virtual And vice as the client ID. Now, how
will vice know who is communicating with it when it sees this
bit pattern? Remember that this bit pattern secret token is an an
encryption of the clear token. And the key for decrypting it is know only to
vice. So when the secret token comes as the client ID, vice can decrypt it
and find out from that, what is
the clear token associated with that particular bit
stream which is representing the secret token. And
once it knows that, it can also extract
the handshake key that it gave to particular client, and that's how the
identity of the client that is communicating with the vice in the future,
presenting this secret token as the ephemeral client ID can
be recognized by vice. So now, after the login is
done, for all the future communication between Venus and
Vice, HKC can be used as a private key for establishing a new RPC session. This
pair of tokens, the secret token and clear
token, is stored on the Virtue workstation by
Venus. On behalf of this user for the entire login session. At the end of this
login session, these two tokens will be thrown
away by Venus. But during the login session,
these two tokens are representing this particular
that has logged in. And, so for the
duration of this login session. Venus will use
the secret token, which is a bit string
that represents this particular user for this log
in session, as the client ID to send
information over to the vice. And, any information
that Venus sends to vice to establish an
RPC session is going to be. Encoded, with the
private key that it had been handed now through the clear token data structure.
That is the handshake key that had been given as part of
this log in exchange, through the clear token data structure. At the
core of the entire secure RPC system of. The
Andrew file system is the bind mechanism, for setting up a client
server connection securely, and that's what we're going to look at next.