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
-
Location
- The default location for the AuthenticationService.
-
AuthenticationService()
- Create an AuthenticationService using the default network interface and service number.
-
AuthenticationService(ClientServerNI)
- Create an AuthenticationService using a specified network interface and the default service number.
-
AuthenticationService(ClientServerNI, int)
- Create an AuthenticationService using a specified network interface and service number.
-
()
-
-
getAddress()
- Get the address of this service.
-
main(String[])
- Launch an AuthenticationService at the default ServiceAddress.
-
serviceConnection(Connection)
-
Serve one client of this service.
Location
public static ServiceAddress Location
- The default location for the AuthenticationService.
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
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
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
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
getAddress
public ServiceAddress getAddress()
- Get the address of this service.
- Returns:
- the address of this service
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
static void ()
All Packages Class Hierarchy This Package Previous Next Index