cse298 cse300 ov-1.1 cse333 development of an rbac framework for distributed xml-data presentation...
TRANSCRIPT
CSE298
CSE300
OV-1.1
CSE333
Development of an Development of an RBAC Framework for RBAC Framework for Distributed XML-DataDistributed XML-Data
Presentation of Semester Project inPresentation of Semester Project inCSE333: Distributed Component SystemsCSE333: Distributed Component Systems
Instructor: Dr. S. DemurjianInstructor: Dr. S. Demurjian
by Yiqing Ju, Jan Boysen & Christian Slamkaby Yiqing Ju, Jan Boysen & Christian SlamkaApril 26April 26thth, 20044, 20044
CSE298
CSE300
OV-1.2
CSE333
OverviewOverview
ChrisChris Last semester’s work Use cases Model
YiqingYiqing Technologies
SOAP SAAJ/JAX-RPC
JanJan Components Sequence Diagrams
CSE298
CSE300
OV-1.3
CSE333
Scenario of last semester’s workScenario of last semester’s work
Suppose you have data in XML-format, e.g. data Suppose you have data in XML-format, e.g. data about patients in a hospitalabout patients in a hospital
Users (e.g. nurses) want to have access to this Users (e.g. nurses) want to have access to this datadata
Problem: Not every user should be able to access Problem: Not every user should be able to access all elements in the XML-file, only distinct onesall elements in the XML-file, only distinct ones
Solution: Role Based Access ControlSolution: Role Based Access Control Approach: assigning each element in the XML-Approach: assigning each element in the XML-
file a security level, e.g. “1 - Top secret”, file a security level, e.g. “1 - Top secret”, “4 – unclassified”“4 – unclassified”
CSE298
CSE300
OV-1.4
CSE333
Security filesSecurity files
Results in three kinds of security files (in XML-Results in three kinds of security files (in XML-format):format):
1. Application-security: definition of security-level of each element, eventually time-constraints
2. Role-security: definition of roles, their security-levels and time-constraints
3. User-security: definition of users, their security-levels and role assignments
CSE298
CSE300
OV-1.5
CSE333
Example: Role-Security XML-fileExample: Role-Security XML-file
<?xml version="1.0" encoding="UTF-8"?>
<security_role application="patient">
<role name="doctor_D4_S2" level=“1">
<description>”In charge of patients in department 4, section 2”
</description>
<role_date>unlimited</role_date>
</role>
<role name=“nurse_D3_S7" level=“3">
<description>”In charge of patients in department 3, section 7”
</description>
<role_date>11/23/1999 to 12/31/2004</role_date>
</role>
</security_role>
CSE298
CSE300
OV-1.6
CSE333
Developed applicationsDeveloped applications
Using single data-/security-repository (in this Using single data-/security-repository (in this case a directory-/file structure)case a directory-/file structure)
Prototype of two applications:Prototype of two applications:1. Administration application (Chris)
For security-file-administration (e.g. adding users, assigning security-levels to each element)
2. Viewer application (Charles) Filters the application data according to which
user logs on with which role; also checks eventual time-constraints
CSE298
CSE300
OV-1.7
CSE333
Use Case of current projectUse Case of current project
CSE298
CSE300
OV-1.8
CSE333
Model chosenModel chosen
CSE298
CSE300
OV-1.9
CSE333
22ndnd possible model possible model
CSE298
CSE300
OV-1.10
CSE333
Explanation of modelExplanation of model
The application data as well as the security data The application data as well as the security data (all in XML-format) are distributed over the (all in XML-format) are distributed over the domains in the system.domains in the system.
Every domain has a role for communication with Every domain has a role for communication with other domainsother domains
There are two stages of RBAC-control:There are two stages of RBAC-control:1. User-stage: the user has a certain role and tries
to retrieve the desired data2. Domain-stage: the domain itself has a role
which it has gotten from another domain to access its data on behalf of user
CSE298
CSE300
OV-1.11
CSE333
Explanation of modelExplanation of model
Access to another domain’s data only can be Access to another domain’s data only can be achieved by using the user’s “own” domainachieved by using the user’s “own” domain
user has to be assigned to a user has to be assigned to a ““home”-domainhome”-domain
The elements a user can access from another The elements a user can access from another domain are determined by the intersection of:domain are determined by the intersection of:
1. the elements the domain can access in the other domain
2. the elements the user can access within his domain.
CSE298
CSE300
OV-1.12
CSE333
Technologies - SOAPTechnologies - SOAP
Simple Object Access Protocol.Simple Object Access Protocol.
SOAP is the technology we use for our application’s SOAP is the technology we use for our application’s inter-domain communication.inter-domain communication.
The reasons for choosing SOAP are as follows:The reasons for choosing SOAP are as follows:
A)A) In our application, the application data and In our application, the application data and the the security-constraint files are all stored in XML security-constraint files are all stored in XML
format. SOAP provides a simple and format. SOAP provides a simple and lightweight lightweight mechanism for exchanging XML data mechanism for exchanging XML data over the over the Internet. Internet.
B)B) SOAP is both language and platform SOAP is both language and platform independent because it is in XML syntax.independent because it is in XML syntax.
CSE298
CSE300
OV-1.13
CSE333
SOAP StructuresSOAP Structures
The The EnvelopeEnvelope must be must be the first element in the first element in any SOAP message.any SOAP message.
After the Envelope, a After the Envelope, a SOAP message can SOAP message can contain an contain an Optional Optional HeaderHeader element. element.
The The BodyBody element is the element is the area of a SOAP message area of a SOAP message where the application-where the application-specific data is placed. specific data is placed. (*(*The Body element The Body element must be in XML formatmust be in XML format))
CSE298
CSE300
OV-1.14
CSE333
SOAP MessageSOAP Message
<SOAP:Envelope <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/' envelope/' SOAP:encodingStyle='http://schemas.xmlsoap.org/soSOAP:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/''ap/encoding/''
<SOAP:Body><SOAP:Body><GetData><GetData>
<informationID>123456</informationID><informationID>123456</informationID><appName>hospital</appName><appName>hospital</appName><domainRole>1</domainRole><domainRole>1</domainRole><domain>192.168.0.101</domain><domain>192.168.0.101</domain>
</GetData></GetData></SOAP:Body></SOAP:Body>
</SOAP:Envelope></SOAP:Envelope>
CSE298
CSE300
OV-1.15
CSE333
SOAP TransportSOAP Transport
SOAP messages do not dictate either a transport or a SOAP messages do not dictate either a transport or a convention. convention.
However the majority of the SOAP messages are sent However the majority of the SOAP messages are sent over HTTP.over HTTP.
The HTTP request-response model matches up with The HTTP request-response model matches up with SOAP. SOAP.
SOAP requests are transported in the body of a POST or SOAP requests are transported in the body of a POST or M-POST, and the SOAP response is returned in the M-POST, and the SOAP response is returned in the HTTP responseHTTP response
In request, the Content-Type header must indicate that In request, the Content-Type header must indicate that the body is "text/xml" for a SOAP message. . the body is "text/xml" for a SOAP message. .
CSE298
CSE300
OV-1.16
CSE333
SOAP RequestSOAP Request
POST /sample/services/data/data.asp HTTP/1.1POST /sample/services/data/data.asp HTTP/1.1Host: 192.168.0.101Host: 192.168.0.101Content-Type: text/xmlContent-Type: text/xmlContent-Length: nnnContent-Length: nnnSOAPAction: "http://192.168.0.101/GetData"SOAPAction: "http://192.168.0.101/GetData"
<?xml version="1.0"?><?xml version="1.0"?><S:Envelope = xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' <S:Envelope = xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> <S:Body><S:Body> <GetData><GetData> <informationID>123456</informationID><informationID>123456</informationID> <appName>hospital</appName><appName>hospital</appName> <domainRole>1</domainRole><domainRole>1</domainRole> <domain>192.168.0.101</domain><domain>192.168.0.101</domain> </GetData></GetData> </S:Body></S:Body></S:Envelope></S:Envelope>
CSE298
CSE300
OV-1.17
CSE333
SOAP ResponseSOAP Response
HTTP/1.1 200 OKHTTP/1.1 200 OKServer: Microsoft-IIS/5.0Server: Microsoft-IIS/5.0Date: Wed, 31 Jan 2001 07:21:19 GMTDate: Wed, 31 Jan 2001 07:21:19 GMTMessageType: CallResponseMessageType: CallResponseContent-Length: nnnContent-Length: nnnContent-Type: text/xmlContent-Type: text/xmlExpires: Wed, 31 Jan 2001 07:21:20 GMTExpires: Wed, 31 Jan 2001 07:21:20 GMTCache-control: privateCache-control: private
<?xml version="1.0"?><?xml version="1.0"?><Env:Envelope xmlns:Env="http://schemas.xmlsoap.org/soap/envelope/" <Env:Envelope xmlns:Env="http://schemas.xmlsoap.org/soap/envelope/" Env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">Env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Env:Body><Env:Body> <GetDataResponse><GetDataResponse> <information>Nothing Serious</information><information>Nothing Serious</information> </GetDataResponse></GetDataResponse> </Env:Body></Env:Body></Env:Envelope></Env:Envelope>
CSE298
CSE300
OV-1.18
CSE333
SAAJSAAJ
SOAP with Attachments API for JavaSOAP with Attachments API for Java
A powerful API for JAVA developers writing A powerful API for JAVA developers writing SOAP messaging applications.SOAP messaging applications.
Based on the SOAP 1.1 and SOAP with Based on the SOAP 1.1 and SOAP with Attachments specifications.Attachments specifications.
Provides a standard way to send XML Provides a standard way to send XML documents over the Internet from the documents over the Internet from the Java platform.Java platform.
CSE298
CSE300
OV-1.19
CSE333
A Sample SAAJ CodeA Sample SAAJ Code
MessageFactory factory = MessageFactory.newInstance();MessageFactory factory = MessageFactory.newInstance();SOAPMessage message = factory.createMessage(); SOAPMessage message = factory.createMessage();
The message created in the preceding line of code,The message created in the preceding line of code,will automatically have the following: will automatically have the following:
<SOAP-ENV:Envelope <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/enxmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">velope/">
<SOAP-ENV:Header> <SOAP-ENV:Header> </SOAP-ENV:Header> </SOAP-ENV:Header>
<SOAP-ENV:Body> <SOAP-ENV:Body> </SOAP-ENV:Body> </SOAP-ENV:Body>
</SOAP-ENV:Envelope> </SOAP-ENV:Envelope>
CSE298
CSE300
OV-1.20
CSE333
JAX-RPCJAX-RPC
Java API for XML-based RPCJava API for XML-based RPC
A JAVA API for building web services and clients that A JAVA API for building web services and clients that use remote procedure calls (RPC) and XML.use remote procedure calls (RPC) and XML.
In JAX-RPC, a remote procedure call is represented by In JAX-RPC, a remote procedure call is represented by an XML-based protocol such as SOAP. an XML-based protocol such as SOAP.
JAX-RPC does a lot of behind-the-scene jobs that SAAJ JAX-RPC does a lot of behind-the-scene jobs that SAAJ users must do by themselvesusers must do by themselves
Compared with SAAJ, JAX-RPC is easier to be Compared with SAAJ, JAX-RPC is easier to be implemented while SAAJ still requires a lot more work implemented while SAAJ still requires a lot more work on coding and more understanding of XML structures.on coding and more understanding of XML structures.
However SAAJ gives the users more control on However SAAJ gives the users more control on manipulating the SOAP messages elementsmanipulating the SOAP messages elements
CSE298
CSE300
OV-1.21
CSE333
JAX-RPC Endpoint InterfaceJAX-RPC Endpoint Interface
In JAX-RPC, a server side web service is created by In JAX-RPC, a server side web service is created by simply building a service endpoint interface and its simply building a service endpoint interface and its implementation class. A simple service endpoint implementation class. A simple service endpoint interface can be as simple as the following:interface can be as simple as the following:
import java.rmi.Remote;import java.rmi.Remote; import java.rmi.RemoteException;import java.rmi.RemoteException; public interface MySample extends Remote {public interface MySample extends Remote { public String GetData(String informationID,public String GetData(String informationID, String appName,String appName, String domainRole,String domainRole, String domain) String domain) throws RemoteException;throws RemoteException; } }
CSE298
CSE300
OV-1.22
CSE333
JAX-RPC Endpoint Implementation ClassJAX-RPC Endpoint Implementation Class
A simple service endpoint implementation class A simple service endpoint implementation class can be as simple as the following:can be as simple as the following:
public class MyImplementation implements public class MyImplementation implements MySample {MySample {
public String GetData(String informationID,public String GetData(String informationID, String appName,String appName, String domainRole, String domainRole,
String domain) String domain)
System.out.print(informationID);System.out.print(informationID);}}
CSE298
CSE300
OV-1.23
CSE333
EngEngiineering Partneering Part
What functionallity is needed to build such a What functionallity is needed to build such a systemsystem?? Component Diagram
How do theses components interact which each How do theses components interact which each otherother?? Sequence Diagram
Intra-domain Request Outgoing inter-domain Request Incoming inter-domain Request
CSE298
CSE300
OV-1.24
CSE333
ComponentsComponents
Data-StorageData-Storage Application Data RBAC Data
Network ComponentsNetwork Components User Interface SOAP Server SOAP Client Inter-Domain Authentication
Core/XML FilterCore/XML Filter
CSE298
CSE300
OV-1.25
CSE333
Data-StorageData-Storage
Application DataApplication Data All data belong to an appliation
RBAC DataRBAC Data User-Information
userID, name, passwd, security-level, time-constrains
Role-Information Role-name, security-level, time-constraints
Security Constrains application data, security constraints, user-role
mapping All data All data areare stored in stored in the the XMLXML-format-format
CSE298
CSE300
OV-1.26
CSE333
Network ComponentsNetwork Components
User Interface.User Interface. Server which listens to incoming requests from
users of this domain.E.g. Webserver, Java-Application, etc.
Communication Interface between the user and the main application.
Provides a set of functions the user can call/invoke.getPatientData(), updatePatientData(), etc.
SOAP Server.SOAP Server. Listens to incoming inter-domain requests of
other domains. Provides a set of function similar to the ones in
the user-interface.
CSE298
CSE300
OV-1.27
CSE333
Network ComponentsNetwork Components
SOAP ClientSOAP Client Sends user requests to other domains
Calls a function provided by a SOAP Server of another domain
Uses the domain role NOT the user role Interdomain AuthenticationInterdomain Authentication
Digital Signatures for Domain Authentication Every incoming SOAP request is verified Every outgoing SOAP request is signed
CSE298
CSE300
OV-1.28
CSE333
Core/XML Data FilterCore/XML Data Filter
Core/XML Data FilterCore/XML Data Filter Heart of the system Controls the communication between the
components Filters the Application Data in respect to the
users role
CSE298
CSE300
OV-1.29
CSE333
Component DiagramComponent Diagram
CSE298
CSE300
OV-1.30
CSE333
Intra-Domain RequestIntra-Domain Request
User
1.Data-Request
2.Data-Request
3.Get Security Data
4. Get Application Data
5. Filtered Data
6.Filtered data
CSE298
CSE300
OV-1.31
CSE333
Inter-Domain Request [outgoing]Inter-Domain Request [outgoing]
User
1.Data-Request
9. Filtered data
2.Data-Request
8. Filtered Data
3. Get Security Data
4.Data-Request
7. Application Data
5. Sign
6. SendInter-domainRequest
CSE298
CSE300
OV-1.32
CSE333
Inter-Domain Request [incoming]Inter-Domain Request [incoming]
2. Verify Request
4.Get Security Data
3.Data-Request
6. Filtered Data
7. Send filtered Data
1.Data-Request
5. Get Application Data