Welcome to the Development/Dev_NDNdataWeb web
Available Information
The NDN Gateway
The contents below is a brief description of the functionality of the
NDN
Gateway. Any example mentioned will be based around the ABS Address
Coder.
This description of the NDN Gateway consists of two main features:
Preparation for the NDN Gateway (
org.ndn.web.services.axis.gateway.request.RequestNDNGatewayHandler);
and
Activity at the NDN Gateway (
org.ndn.web.services.axis.gateway.NDNGateway)
Preparation for the NDN Gateway
Movement into the gateway is taken care of by a handler, the
RequestNDNGatewayHandler . Here, information is extracted to be placed
into
the message header later on. The GUID is the first to be extracted,
and is
set as the SERVICE_GUID property in the
MessageContext object. The
username is then extracted from the
MessageContext and checked whether
it
is null or an empty String. Should the username be null or an empty
String, both the username and password are replaced by the String
"anonymous". Otherwise, no action is taken. The message is now ready
to
be moved through the NDN Gateway.
NDN Gateway
Three main functions occur at the Gateway:
Authentication - is the user who they claim to be and a registered
user?
Authorization - does the user possess the required access
permissions to
access this particular function/resource?
Re-routing - re-direction to the requested end-point once
authentication
and authorization have occured and are satisfied.
Movement within the NDN Gateway:
The NDN Gateway executes a chain of commands in order to fulfill the
three
main functions of the gateway (as stated above). Movement within the
NDN
Gateway occurs as illustrated below:
(Embedded image moved to file: pic11966.jpg)
Fig 1.1: Movement through the NDN Gateway.
Authentication:
Authentication, in the NDN Gateway code, is done by checking that the
Member is valid (i.e. the profile exists in the system). In the case
of
the Address Coder, the member is required to have logged into the NDN
Rich
Client before being able to access the Address Coder. As a post-login
procedure, the Member's user details including their username and
password
are recorded as a part of a "dummy Member". These details are then
extracted and fed to the method, checkMemberIsValid(String, String),
which
makes a call to the
NodeActivationFacadeRemote class. Here, a simple
login
is executed with the username and password as provided. Successful
login
here indicates that the provided details is valid. A Member object for
the
valid member is then returned.
Authorization:
Immediately after the member is validated, a check for the appropriate
access permissions is carried out. A call to check for valid
permissions
is executed with the username and GUID (representing the requested
resource
or service) previously extracted. Here, a series of calls are made
resulting a test for whether the logged in user has access permissions
to
resource specified (specified through use of the GUID). The Web
Service
object (also known as the resource) is only retrieved if the user
passes
this test. Should the object be "not null", the new URI will be
extracted
and returned as a string.
Re-directing:
The user is re-directed through the callWebService(String, Message)
method.
Here, a SOAP connection is established and a call to the endpoint
(using
the new URI) is made. This call returns a Message object which goes
through a final check for any faults before it is set as the response
message.
NDN Gateway - Integration
Movement in and out of the NDN Gateway occurs with the assistance of
request and response handlers. These handlers are configured in a
.wsdd
file as shown below:
(Embedded image moved to file: pic02658.jpg)
Fig 1.2: .wsdd file specifying request handler for NDN Gateway.
As illustrated in the code above, request handlers are specified within
the
tags using the
tag. The handler
specified here is the RequestNDNGatewayHandler (as mentioned above).
Similarly, the response handler is specified within
tags. Where response handlers exist, the
.wsdd file will generally have the following format:
- ...
- ...
Development/Dev_NDNdataWeb Web Utilities