All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class AcmeNet.Assn3.AuthenticationService

AcmeNet.Assn2.Service
   |
   +----AcmeNet.Assn3.PrivateService
           |
           +----AcmeNet.Assn3.AuthenticationService

public class AuthenticationService
extends PrivateService
A service that acts as a trusted third party for the AcmeNet authentication protocol. The AuthenticationService knows the private keys of all users. Processes that want to set up secure (authenticated) connections contact this service as part of the protocol for setting up a secure connection.

Note that this service talks to its clients using private, but not authenticated, connections. We can't use authenticated connections, because authentication relies on being able to talk to this service, so you couldn't authenticate a connection to this service without first having an authenticated connection to this service, which is a Catch-22. We get around this by using a private but unauthenticated connection. It turns out that the authentication protocol is robust against impostor AuthenticationService processes, and it doesn't allow an impostor client to achieve anything useful.

See Also:
SecureConnection

Variable Index

 o Location
The default location for the AuthenticationService.

Constructor Index

 o AuthenticationService()
Create an AuthenticationService using the default network interface and service number.
 o AuthenticationService(ClientServerNI)
Create an AuthenticationService using a specified network interface and the default service number.
 o AuthenticationService(ClientServerNI, int)
Create an AuthenticationService using a specified network interface and service number.

Method Index

 o ()
 o getAddress()
Get the address of this service.
 o main(String[])
Launch an AuthenticationService at the default ServiceAddress.
 o serviceConnection(Connection)
Serve one client of this service.

Variables

 o Location
 public static ServiceAddress Location
The default location for the AuthenticationService.

Constructors

 o AuthenticationService
 AuthenticationService(ClientServerNI ni,
                       int serviceNum) throws AlreadyBoundException
Create an AuthenticationService using a specified network interface and service number.

Parameters:
ni - the network interface the new service should use
serviceNum - the service number to bind the service to
Throws: AlreadyBoundException
there was already a service bound at the requested service number
 o AuthenticationService
 public AuthenticationService(ClientServerNI ni) throws AlreadyBoundException
Create an AuthenticationService using a specified network interface and the default service number.

Parameters:
ni - the network interface the new service should use
Throws: AlreadyBoundException
there was already a service bound at the requested service number
 o AuthenticationService
 public AuthenticationService() throws AlreadyBoundException, AddressUnavailableException
Create an AuthenticationService using the default network interface and service number.

Throws: AlreadyBoundException
there was already a service bound at the requested service number
Throws: AddressUnavailableException
unable to create a ClientServerNI at the requested address

Methods

 o main
 public static void main(String argv[]) throws AddressUnavailableException, AlreadyBoundException
Launch an AuthenticationService at the default ServiceAddress.

Throws: AddressUnavailableException
couldn't launch the service at the default NetAddress
Throws: AlreadyBoundException
there was already a service bound at the default service number
 o getAddress
 public ServiceAddress getAddress()
Get the address of this service.

Returns:
the address of this service
 o serviceConnection
 public void serviceConnection(Connection conn)
Serve one client of this service. The client will send a single request, this service will send a response, then the connection will be closed.

Parameters:
conn - the PrivateConnection to the client
Overrides:
serviceConnection in class Service
 o
 static void ()

All Packages  Class Hierarchy  This Package  Previous  Next  Index