Research of Fine Grit Access Control Based On Time in Cloud Computing 1
Research of Fine Grit Access Control Based On Time in Cloud Computing 1
On
RESEARCH OF FINE GRIT ACCESS CONTROL
BASED ON TIME IN CLOUD COMPUTNG
Submitted by
S.PALLAVI (169L1A0574)
R.APARNALAKSHMI (179L5A0501)
S.GAMYA (169L1A0580)
M.KINNERA (169L1A0545)
CERTIFICATE
S.PALLAVI (169L1A0574)
R.APARNA LAKSHMI (179L1A0501)
S.GAMYA (169L1A0580)
M.KINNERA (169L1A0545)
Viva-Voice held on
All endeavors over a long period can be successful only with the advice and support of
many well-wishers. I take this opportunity to express my gratitude and appreciation to all of
them.
Academy Group of Institutions, Tirupati, for his valuable guidance, suggestions and constant
encouragement and keen interest enriched throughout the course of project work.
We extend sincere thanks to the HOD, Mr.N.ANAND REDDY for his kind co-
operation in completing and making this project a success.
We extend sincere thanks to the Principal, Prof. K. RAJASEKHAR for his kind co-
operation in completing and making this project a success.
We would like to thank the Management for their kind co-operation and for providing
infrastructure facilities.
We extend thanks to all the Teaching staff of the Department of CSE for their support
and encouragement during the course of my project work. I also thank the Non- Teaching staff
of CSE department for being helpful in many ways in successful completion of my work.
Finally I thank all those who helped me directly or indirectly in successful completion
of this project work.
S.PALLAVI (169L1A0574)
R.APARNA LAKSHMI (179L1A0501)
S.GAMYA (169L1A0580)
M.KINNERA (169L1A0545)
SIDDARTHA EDUCATIONAL ACADEMY GROUP OF INSTITUTIONS
C.GOLLAPALLI, TIRUPATI – 517505 (A.P), INDIA
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DECLARATION
I hereby declare that the project work entitled “RESEARCH OF FINE
GRIT ACCESS CONTROL BASED ON TIME IN CLOUD COMPUTING”
is entirely my original work carried out under the guidance of Mr.G.BALA
GANGADHAR, Asst.Professor, Department of Computer Science and
Engineering, Siddartha Educational Academy Group of Institutions, C.Gollapalli,
Tirupati, JNTU Anantapur, Anantapuramu,A.P,India for the award of the degree
of BACHELOR OF TECHNOLOGY with the specialization in COMPUTER
SCIENCE AND ENGINEERING. The results carried out in this project report
have not been submitted in a part or full for the award of any degree or diploma
of this or any other university or institute.
S.PALLAVI (169L1A0574)
R.APARNA LAKSHMI (179L5A0501)
S.GAMYA (169L1A0580)
M.KINNERA (169L1A0545)
ABSTRACT
As the wildly application and rapidly development of cloud computing, the security of cloud technology
has been raising more and more attention. The technology of access control in cloud plays the key role
in the whole application system. This paper introduces the traditional theory and models of access
control. Then, the unique challenges in cloud access control and the corresponding solutions are
analyzed. On the basis of these researches, the Time-restrained Fine-grit Access Control Model in Cloud
is proposed. The features of this model are analyzed in the following. In the final of this paper is the
summary of the whole research and the expectation in future research direction.
CONTENTS
1. INTRODUCTION 1–2
2. LITERATURE SURVEY 3–4
3. SYSTEM STUDY 5–6
Feasibility Study
Economical Feasibility
Technical Feasibility
Social Feasibility
4. SYSTEM ANALYSIS 7–8
Existing System
Disadvantages of Existing System
Proposed System
Advantages of Proposed System
5. SYSTEM SPECIFICATION 9
Hardware Requirements
Software Requirements
6. SOFTWARE ENVIRONMENT 10 – 30
Introduction to Java
ODBC
JDBC
7. SYSTEM DESIGN 31 – 39
System Architecture
Data Flow Diagram
Usecase Diagram
Class Diagram
Sequence Diagram
Activity Diagram
8. IMPLEMENTATION 40 – 41
9. SAMPLE CODE 42 – 50
10. SCREENSHOTS 51 – 63
11. SYSTEM TESTING 64 – 66
Unit Testing
Integration Testing
Functional Testing
12. CONCLUSION 67
13. BIBLIOGRAPHY 68 – 69
List of Figures
1. 6.1.1. Java Virtual Machine 11
2. 6.1.2. Java Program 11
3. 6.1.3. Java API 12
4. 6.1.4. Java2 SDK 14
5. 6.3.1. Work of Interpreter and Compiler 19
6. 6.3.2. TCP/IP Stack with OSI 20
7. 6.3.3. The 32-bit address is usually written as 4 21
integers separated by dots
8. 6.3.4. Web Application directory structure 28
9. 7.1. System Architecture 31
10. 7.2. Data Flow Diagram 32
11. 7.3. Usecase Diagram 34
12. 7.4. Class Diagram 35
13. 7.5. Sequence Diagram 36
14. 7.6. Activity Diagram 37
Research of Fine Grit Access Control Based on Time in Cloud Computing
1. INTRODUCTION
Introduction
Cloud technology is one of the hot issues in computing and application pattern, which provides
all kinds of information resources and services based on the fundamental network
infrastructure. The cloud computing has some distinguishing features like flexible, easier to
expand, lower cost, high computing efficiency and so on. However, the security and privacy
problem is becoming the core restriction in the development of the cloud computing. There is
a growing trend of secure accidents in the cloud computing industry. For example, a mass of
Google users’ documents had been leaked in 2009. The Amazon Data Centre had crashed down
several times in 2012. The Microsoft Cloud provided error services in 2013. The back door
event in Apple Cloud was exposed in 2014. So many security incidents exposed frequently in
recent years makes researchers, industries and users have a crisis of cloud computing. The
Cloud Security Alliance is the most concerned organization focusing on the research of cloud
security, which released a report named The Treacherous 12-Top Threat to Cloud Computing
+ Industry Insights in 2016[1]. In this report, 12 key threats in cloud computing field is
summarized, which includes the Data Breaches, the Insufficient Identity, Credential and Access
Management, the System Vulnerabilities, the Account Hijacking, the Malicious Insider, the
Data Loss, the Abuse and Nefarious Use of Cloud Services and so on. According to the
Microsoft Analyzing Model STRIDE, all the threats are evaluated from six aspects including
Spoofing Identity, Tampering with Data, Repudiation, Information Disclosure, Denial of
Service and Elevation of Privilege. It is observed that the core method to deal with the cloud
security problem is to protect the confidentiality, the integrity and the availability of data
resource in cloud environment. And focuses on the technology of access control in cloud
computing. The access control was proposed to solve the data sharing problem of managing the
access authorization in mainframe systems. The main solution is to authorize the users
according to the settled strategy. However, the patterns of data computing, storing and applying
in cloud have make a big difference which the traditional access control methods are invalid to
protect the data resources anymore, which have to be improved and optimized on the basis of
the characteristics of cloud computing[2]. The traditional technology and models of access
control is introduced in section2. In section 3, we analyze the challenges in cloud access control
and summarize the research achievement in academic community.
Based on that, the core content of this is that Time-restrained Fine-grit Access Control
Model in Cloud, is introduced with detail in section4. 978-1-5386-6243-4/19/$31.00 ©2019
IEEE 2019 IEEE 3rd Information Technology,Networking,Electronic and Automation Control
Conference (ITNEC 2019) 1897 Finally, in the final section of this summary of this research as
well as the sketch of the future work.
2. LITERATURE SURVEY
The benefits that Internet-based applications and services have given to the end user with
today’s cloud computing technology are very remarkable. The distributed services instantly
scaled over the Internet provided by cloud computing can be achieved by using some
mechanisms in the background. It is a critical task for end users to control access to resources
because lack of control often leads to security risks. In addition, this may cause systems to fail.
This paper describes seven different access control mechanisms used in cloud computing
platforms for different purposes. Besides, the advantages and disadvantages of various models
developed from previous service-based architectures and used for cloud computing are detailed
and classified. During the assessments, NIST’s metrics were taken as a reference, and in the
study, 109 articles from the past decade were examined. We also compared our research with
the existing survey papers.
security processing needs of industry and civilian government. This paper argues that reliance
on DAC as the principal method of access control is unfounded and inappropriate for many
commercial and civilian government organizations. The paper describes a type of non-
discretionary access control - role-based access control (RBAC) - that is more central to the
secure processing needs of non-military systems than DAC.
3. SYSTEM STUDY
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on the
available technical resources. This will lead to high demands on the available technical
resources. This will lead to high demands being placed on the client. The developed system
must have a modest requirement, as only minimal or null changes are required for implementing
this system.
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system and
to make him familiar with it. His level of confidence must be raised so that he is also able to
make some constructive criticism, which is welcomed, as he is the final user of the system.
4. SYSTEM ANALYSIS
Because of the application of virtualization technology, the access control in cloud computing
expand the range of subject from the user to the virtual resources and cloud storage data. Thus
the concepts of subject and object in cloud access control have to be redefined. In cloud
computing environment, the owner, the manager and the requester of the resources can be in
different security management domains, which demands for mechanism supports for crossing-
security-domain authorization and access control. In cloud computing, the authorization
management for cloud tenants is changing along with the dynamic resource and network
environment. The situation of various roles, complex hierarchy and changes to the permission
allocation pattern in cloud ask for the dynamic and secure access control methods.
The virtual resource is completely isolated from the underlying hardware equipment in
cloud, which increase the difficulty in discovering the hidden channels between virtual
machines.
The trust and privacy problem needs to be solve in cloud access control.
In cloud computing, users request resources from cloud service provider on demand,
which make the relationship between subject and object being changeable.
The strategy execution module receives the access request from the subject and
transforms the request into the attributes set defined by the model. According to the
settled access control rules, the final judgment is selected and return to the execution
module
5. SYSTEM SPECIFICATION
6. SOFTWARE ENVIRONMENT
The Java programming language is a high-level language that can be characterized by all
of the following buzzwords:
Simple
Architecture neutral
Object oriented
Portable
Distributed
High performance
Interpreted
Multithreaded
Robust
Dynamic
Secure
With most programming languages, you either compile or interpret a program so that
you can run it on your computer. The Java programming language is unusual in that a program
is both compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes —the platform-independent codes interpreted by
the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time the
program is executed. The following figure illustrates how this works.
You can think of Java byte codes as the machine code instructions for the Java Virtual
Machine (Java VM). Every Java interpreter, whether it’s a development tool or a Web browser
that can run applets, is an implementation of the Java VM. Java byte codes help make “write
once, run anywhere” possible. You can compile your program into byte codes on any platform
that has a Java compiler. The byte codes can then be run on any implementation of the Java
VM. That means that as long as a computer has a Java VM, the same program written in the
Java programming language can run on Windows 2000, a Solaris workstation, or on an iMac.
You’ve already been introduced to the Java VM. It’s the base for the Java platform and is ported
onto various hardware-based platforms.
The Java API is a large collection of ready-made software components that provide many useful
capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into
libraries of related classes and interfaces; these libraries are known as packages.
The next section, What Can Java Technology Do? Highlights what functionality some of the
packages in the Java API provide.
The following figure depicts a program that’s running on the Java platform. As the figure
shows, the Java API and the virtual machine insulate the program from the hardware.
applets. An applet is a program that adheres to certain conventions that allow it to run within a
Java-enabled browser. However, the Java programming language is not just for writing cute,
entertaining applets for the Web. The general-purpose, high-level Java programming language
is also a powerful software platform. Using the generous API, you can write many types of
programs.
An application is a standalone program that runs directly on the Java platform. A special
kind of application known as a server serves and supports clients on a network. Examples of
servers are Web servers, proxy servers, mail servers, and print servers. Another specialized
program is a servlet. A servlet can almost be thought of as an applet that runs on the server side.
Java Servlets are a popular choice for building interactive web applications, replacing the use
of CGI scripts. Servlets are similar to applets in that they are runtime extensions of
applications. Instead of working in browsers, though, servlets run within Java Web servers,
configuring or tailoring the server.
How does the API support all these kinds of programs? It does so with packages of
software components that provides a wide range of functionality. Every full implementation of
the Java platform gives you the following features:
The essentials: Objects, strings, threads, numbers, input and output, data structures,
system properties, date and time, and so on.
Applets: The set of conventions used by applets.
Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram
Protocol) sockets, and IP (Internet Protocol) addresses.
Internationalization: Help for writing programs that can be localized for users
worldwide. Programs can automatically adapt to specific locales and be displayed in the
appropriate language.
Security: Both low level and high level, including electronic signatures, public and
private key management, access control, and certificates.
Software components: Known as JavaBeans, can plug into existing component
architectures.
Object serialization: Allows lightweight persistence and communication via Remote
Method Invocation (RMI).
The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts what is
included in the Java 2 SDK.
Get started quickly: Although the Java programming language is a powerful object-
oriented language, it’s easy to learn, especially for programmers already familiar with
C or C++.
Write less code: Comparisons of program metrics (class counts, method counts, and so
on) suggest that a program written in the Java programming language can be four times
smaller than the same program in C++.
Write better code: The Java programming language encourages good coding practices,
and its garbage collection helps you avoid memory leaks. Its object orientation, its
JavaBeans component architecture, and its wide-ranging, easily extendible API let you
reuse other people’s tested code and introduce fewer bugs.
Develop programs more quickly: Your development time may be as much as twice as
fast versus writing the same program in C++. Why? You write fewer lines of code and
it is a simpler programming language than C++.
Avoid platform dependencies with 100% Pure Java: You can keep your program
portable by avoiding the use of libraries written in other languages. The 100%
PureJava Product Certification Program has a repository of historical process manuals, white
papers, brochures, and similar materials online.
Write once, run anywhere: Because 100% Pure Java programs are compiled into
machine-independent byte codes, they run consistently on any Java platform.
Distribute software more easily: You can upgrade applets easily from a central server.
Applets take advantage of the feature of allowing new classes to be loaded “on the fly,”
without recompiling the entire program.
6.2 ODBC:
Through the ODBC Administrator in Control Panel, you can specify the particular
database that is associated with a data source that an ODBC application program is written to
use. Think of an ODBC data source as a door with a name on it. Each door will lead you to a
particular database. For example, the data source named Sales Figures might be a SQL Server
database, whereas the Accounts Payable data source could refer to an Access database. The
physical database referred to by a data source can reside anywhere on the LAN.
The ODBC system files are not installed on your system by Windows 95. Rather, they
are installed when you setup a separate database application, such as SQL Server Client or
Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a file called
ODBCINST.DLL. It is also possible to administer your ODBC data sources through a stand-
alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit version of this program
Dept. of CSE, SEAGI, TIRUPATI Page 15
Research of Fine Grit Access Control Based on Time in Cloud Computing
and each maintains a separate list of ODBC data sources. From a programming perspective, the
beauty of ODBC is that the application can be written to use the same set of function calls to
interface with any data source, regardless of the database vendor. The source code of the
application doesn’t change whether it talks to Oracle or SQL Server. We only mention these
two as an example. There are ODBC drivers available for several dozen popular database
systems. Even Excel spreadsheets and plain text files can be turned into data sources. The
operating system uses the Registry information written by ODBC Administrator to determine
which low-level ODBC drivers are needed to talk to the data source (such as the interface to
Oracle or SQL Server). The loading of the ODBC drivers is transparent to the ODBC
application program. In a client/server environment, the ODBC API even handles many of the
network issues for the application programmer.
The advantages of this scheme are so numerous that you are probably thinking there must
be some catch. The only disadvantage of ODBC is that it isn’t as efficient as talking directly to
the native database interface. ODBC has had many detractors make the charge that it is too slow.
Microsoft has always claimed that the critical factor in performance is the quality of the driver
software that is used. In our humble opinion, this is true. The availability of good ODBC drivers
has improved a great deal recently. And anyway, the criticism about performance is somewhat
analogous to those who said that compilers would never match the speed of pure assembly
language. Maybe not, but the compiler (or ODBC) gives you the opportunity to write cleaner
programs, which means you finish sooner. Meanwhile, computers get faster every year.
6.3 JDBC:
In an effort to set an independent database standard API for Java; Sun Microsystems developed
Java Database Connectivity, or JDBC. JDBC offers a generic SQL database access mechanism
that provides a consistent interface to a variety of RDBMSs. This consistent interface is
achieved through the use of “plug-in” database connectivity modules, or drivers. If a database
vendor wishes to have JDBC support, he or she must provide the driver for each platform that
the database and Java run on.
To gain a wider acceptance of JDBC, Sun based JDBC’s framework on ODBC. As you
discovered earlier in this chapter, ODBC has widespread support on a variety of platforms.
Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market much faster than
Dept. of CSE, SEAGI, TIRUPATI Page 16
Research of Fine Grit Access Control Based on Time in Cloud Computing
developing a completely new connectivity solution. JDBC was announced in March of 1996. It
was released for a 90 day public review that ended June 8, 1996. Because of user input, the final
JDBC v1.0 specification was released soon after.
The remainder of this section will cover enough information about JDBC for you to know
what it is about and how to use it effectively. This is by no means a complete overview of
JDBC. That would fill an entire book.
JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that, because of its
many goals, drove the development of the API. These goals, in conjunction with early reviewer
feedback, have finalized the JDBC class library into a solid framework for building database
applications in Java.
The goals that were set for JDBC are important. They will give you some insight as to why
certain classes and functionalities behave the way they do. The eight design goals for JDBC are
as follows:
The designers felt that their main goal was to define a SQL interface for Java. Although
not the lowest database interface level possible, it is at a low enough level for higher-level tools
and APIs to be created. Conversely, it is at a high enough level for application programmers to
use it confidently. Attaining this goal allows for future tool vendors to “generate” JDBC code
and to hide many of JDBC’s complexities from the end user.
2. SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an effort to
support a wide variety of vendors, JDBC will allow any query statement to be passed through
it to the underlying database driver. This allows the connectivity module to handle non-
standard functionality in a manner that is suitable for its users.
The JDBC SQL API must “sit” on top of other common SQL level APIs. This goal allows
JDBC to use existing ODBC level drivers by the use of a software interface. This interface
would translate JDBC calls to ODBC and vice versa.
4. Provide a Java interface that is consistent with the rest of the Java system
Because of Java’s acceptance in the user community thus far, the designers feel that
they should not stray from the current design of the core Java system.
5. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no exception. Sun
felt that the design of JDBC should be very simple, allowing for only one method of completing
a task per mechanism. Allowing duplicate functionality only serves to confuse the users of the
API.
Strong typing allows for more error checking to be done at compile time; also, less error
appear at runtime.
Java has two things: a programming language and a platform. Java is a high-level
programming language that is all of the following
Simple Architecture-neutral
Object-oriented Portable
Distributed High-performance
Interpreted Multithreaded
Robust Dynamic
Secure
Java is also unusual in that each Java program is both compiled and interpreted. With a
compile you translate a Java program into an intermediate language called Java byte codes
the platform-independent code instruction is passed and run on the computer.
Compilation happens just once; interpretation occurs each time the program is executed.
The figure illustrates how this works.
Compilers My Program
Java byte codes help make “write once, run anywhere” possible. You can compile your
Java program into byte codes on my platform that has a Java compiler. The byte codes can then
be run any implementation of the Java VM. For example, the same Java program can run in
Windows NT, Solaris, and Macintosh.
Networking
TCP/IP stack:
The TCP/IP stack is shorter than the OSI one:
IP datagram’s:
The IP layer provides a connectionless and unreliable delivery system. It considers each
datagram independently of the others. Any association between datagram must be supplied by
the higher layers. The IP layer supplies a checksum that includes its own header. The header
includes the source and destination addresses. The IP layer handles routing through an Internet.
It is also responsible for breaking up large datagram into smaller ones for transmission and
reassembling them at the other end.
UDP:
UDP is also connectionless and unreliable. What it adds to IP is a checksum for the contents
of the datagram and port numbers. These are used to give a client/server model.
TCP:
TCP supplies logic to give a reliable connection-oriented protocol above IP. It provides a
virtual circuit that two processes can use to communicate.
Internet addresses:
In order to use a service, you must be able to find it. The Internet uses an address scheme
for machines so that they can be located. The address is a 32 bit integer which gives the IP
address. This encodes a network ID and more addressing. The network ID falls into various
classes according to the size of the network address.
Network address:
Class A uses 8 bits for the network address with 24 bits left over for other addressing.
Class B uses 16 bit network addressing. Class C uses 24 bit network addressing and class D
uses all 32.
Subnet address:
Internally, the UNIX network is divided into sub networks. Building 11 is currently on one sub
network and uses 10-bit addressing, allowing 1024 different hosts.
Host address:
8 bits are finally used for host addresses within our subnet. This places a limit of 256
machines that can be on the subnet.
Total address:
Port addresses:
A service exists on a host, and is identified by its port. This is a 16 bit number. To send a
message to a server, you send it to the port for that service of the host that it is running on. This
is not location transparency! Certain of these ports are "well known".
Sockets:
A socket is a data structure maintained by the system to handle network connections. A
socket is created using the call socket. It returns an integer that is like a file descriptor. In fact,
under Windows, this handle can be used with Read File and Write File functions.
#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);
Here "family" will be AF_INET for IP communications, protocol will be zero, and type will
depend on whether TCP or UDP is used. Two processes wishing to communicate over a
network create a socket each. These are similar to two ends of a pipe - but the actual pipe does
not yet exist.
JFree Chart:
JFree Chart is a free 100% Java chart library that makes it easy for developers to display
professional quality charts in their applications. JFree Chart's extensive feature set includes:
A flexible design that is easy to extend, and targets both server-side and client-side applications;
Support for many output types, including Swing components, image files (including PNG and
JPEG), and vector graphics file formats (including PDF, EPS and SVG);
JFree Chart is "open source" or, more specifically, free software. It is distributed under the
terms of the GNU Lesser General Public Licence (LGPL), which permits use in proprietary
applications.
1. Map Visualizations
Charts showing values that relate to geographical areas. Some examples include:
(a) Population density in each state of the United States,
(b) Income per capita for each country in Europe,
(c) Life expectancy in each country of the world.
The tasks in this project include:
Sourcing freely redistributable vector outlines for the countries of the world, states/provinces
in particular countries (USA in particular, but also other areas);
Implement a new (to JFree Chart) feature for interactive time series charts --- to display a
separate control that shows a small version of ALL the time series data, with a sliding "view"
rectangle that allows you to select the subset of the time series data to display in the main chart.
3. Dashboards
There is currently a lot of interest in dashboard displays. Create a flexible dashboard mechanism
that supports a subset of JFree Chart chart types (dials, pies, thermometers, bars, and lines/time
series) that can be delivered easily via both Java Web Start and an applet.
4. Property Editors
The property editor mechanism in JFree Chart only handles a small subset of the properties that
can be set for charts. Extend (or reimplement) this mechanism to provide greater end-user
control over the appearance of the charts.
Because many of the tasks involved in web application development can be repetitive or require
a surplus of boilerplate code, web frameworks can be applied to alleviate the overhead
associated with common activities. For example, many frameworks, such as Java Server Faces,
provide libraries for templating pages and session management, and often promote code reuse.
language for communication. HTML is the common language between server and client
andstands for Hyper Text Markup Language.
Web server and client needs a common communication protocol, HTTP (Hyper Text Transfer
Protocol) is the communication protocol between server and client. HTTP runs on top of
TCP/IP communication protocol.
Some of the important parts of HTTP Request are:
HTTP Method – action to be performed, usually GET, POST, PUT etc.
URL – Page to access
Form Parameters – similar to arguments in a java method, for example user, password
details from login page.
Sample HTTP Request:
1. GET /FirstServletProject/jsps/hello.jsp HTTP/1.1
2. Host: localhost:8080
3. Cache-Control: no-cache
Some of the important parts of HTTP Response are:
Status Code – an integer to indicate whether the request was success or not. Some of
the well known status codes are 200 for success, 404 for Not Found and 403 for Access
Forbidden.
Content Type – text, html, image, pdf etc. Also known as MIME type
Content – actual data that is rendered by client and shown to user.
If you see above sample HTTP response header, it contains tag “Content-Type”. It’s also called
MIME type and server sends it to client to let them know the kind of data it’s sending. It helps
client in rendering the data for user. Some of the mostly used mime types are text/html, text/xml,
application/xml etc.
Understanding URL
URL is acronym of Universal Resource Locator and it’s used to locate the server and resource.
Every resource on the web has it’s own unique address. Let’s see parts of URL with an example.
http://localhost:8080/FirstServletProject/jsps/hello.jsp
http:// – This is the first part of URL and provides the communication protocol to be used in
server-client communication.
localhost – The unique address of the server, most of the times it’s the hostname of the server
that maps to unique IP address. Sometimes multiple hostnames point to same IP addresses and
web server virtual host takes care of sending request to the particular server instance.
8080 – This is the port on which server is listening, it’s optional and if we don’t provide it in
URL then request goes to the default port of the protocol. Port numbers 0 to 1023 are reserved
ports for well known services, for example 80 for HTTP, 443 for HTTPS, 21 for FTP etc.
Java Servlet and JSPs are server side technologies to extend the capability of web servers by
providing support for dynamic response and data persistence.
Web Container
Tomcat is a web container, when a request is made from Client to web server, it passes the
request to web container and it’s web container job to find the correct resource to handle the
request (servlet or JSP) and then use the response from the resource to generate the response
and provide it to web server. Then web server sends the response back to the client.
When web container gets the request and if it’s for servlet then container creates two Objects
HTTPServletRequest and HTTPServletResponse. Then it finds the correct servlet based on the
URL and creates a thread for the request. Then it invokes the servlet service() method and based
on the HTTP method service() method invokes doGet() or doPost() methods. Servlet methods
generate the dynamic page and write it to response. Once servlet thread is complete, container
converts the response to HTTP response and send it back to client.
Some of the important work done by web container are: Communication Support – Container
provides easy way of communication between web server and the servlets and JSPs. Because of
Dept. of CSE, SEAGI, TIRUPATI Page 26
Research of Fine Grit Access Control Based on Time in Cloud Computing
container, we don’t need to build a server socket to listen for any request from web server, parse the
request and generate response. All these important and complex tasks are done by container and all
we need to focus is on our business logic for our applications.
Java Web Applications are packaged as Web Archive (WAR) and it has a defined structure.
You can export above dynamic web project as WAR file and unzip it to check the hierarchy. It
will be something like below image.
Deployment Descriptor
web.xml file is the deployment descriptor of the web application and contains mapping for
servlets (prior to 3.0), welcome pages, security configurations, session timeout settings etc.
MySQL:
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation.
The MySQL Web site (http://www.mysql.com/) provides the latest information about MySQL
software.
columns, offers a flexible programming environment. You set up rules governing the
relationships between different data fields, such as one-to-one, one-to-many, unique,
required or optional, and “pointers” between different tables. The database enforces these
rules, so that with a well-designed database, your application never sees inconsistent,
duplicate, orphan, out-of-date, or missing data.
The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the
most common standardized language used to access databases. Depending on your
programming environment, you might enter SQL directly (for example, to generate
reports), embed SQL statements into code written in another language, or use a language-
specific API that hides the SQL syntax.
SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been
evolving since 1986 and several versions exist. In this manual, “SQL-92” refers to the
standard released in 1992, “SQL:1999” refers to the standard released in 1999, and
“SQL:2003” refers to the current version of the standard. We use the phrase “the SQL
standard” to mean the current version of the SQL Standard at any time.
The MySQL Database Server is very fast, reliable, scalable, and easy
to use.
If that is what you are looking for, you should give it a try. MySQL Server can run
comfortably on a desktop or laptop, alongside your other applications, web servers, and
so on, requiring little or no attention. If you dedicate an entire machine to MySQL, you
can adjust the settings to take advantage of all the memory, CPU power, and I/O
capacity available. MySQL can also scale up to clusters of machines, networked together.
MySQL Server was originally developed to handle large databases much faster than
existing solutions and has been successfully used in highly demanding production
environments for several years. Although under constant development, MySQL Server
today offers a rich and useful set of functions. Its connectivity, speed, and security make
MySQL Server highly suited for accessing databases on the Internet.
7. SYSTEM DESIGN
1. The DFD is also called as bubble chart. It is a simple graphical formalism that can be
used to represent a system in terms of input data to the system, various processing
carried out on this data, and the output data is generated by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It is used to
model the system components. These components are the system process, the data used
by the process, an external entity that interacts with the system and the information
flows in the system.
3. DFD shows how the information moves through the system and how it is modified by a
series of transformations. It is a graphical technique that depicts information flow and
the transformations that are applied as data moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a system at any
level of abstraction. DFD may be partitioned into levels that represent increasing
information flow and functional detail.
UML DIAGRAMS
The goal is for UML to become a common language for creating models of object oriented
computer software. In its current form UML is comprised of two major components: a Meta-
model and a notation. In the future, some form of method or process may also be added to; or
associated with, UML.
The UML represents a collection of best engineering practices that have proven
successful in the modeling of large and complex systems.
The UML is a very important part of developing objects oriented software and the
software development process. The UML uses mostly graphical notations to express the design
of software projects.
GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that they can
develop and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations, frameworks, patterns
and components.
7. Integrate best practices.
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented
as use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles of the actors in
the system can be depicted.
Services Admin
self file
Owner unlock services
Cloud file
file services
self services
Accept
INPUT DESIGN
The input design is the link between the information system and the user. It comprises the
developing specification and procedures for data preparation and those steps are necessary to
put transaction data in to a usable form for processing can be achieved by inspecting the
computer to read data from a written or printed document or it can occur by having people
keying the data directly into the system. The design of input focuses on controlling the amount
of input required, controlling the errors, avoiding delay, avoiding extra steps and keeping the
process simple. The input is designed in such a way so that it provides security and ease of use
with retaining the privacy.
Input Design considered the following things:
Methods for preparing input validations and steps to follow when error occur.
OBJECTIVES
1. Input Design is the process of converting a user-oriented description of the input into a
computer-based system. This design is important to avoid errors in the data input process and
show the correct direction to the management for getting correct information from the
computerized system.
2. It is achieved by creating user-friendly screens for the data entry to handle large volume of
data. The goal of designing input is to make data entry easier and to be free from errors. The
data entry screen is designed in such a way that all the data manipulates can be performed. It
also provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be entered with the help of
screens. Appropriate messages are provided as when needed so that the user will not be in maize
of instant. Thus the objective of input design is to create an input layout that is easy to follow.
OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users and to
other system through outputs. In output design it is determined how the information is to be
displaced for immediate need and also the hard copy output. It is the most important and direct
source information to the user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.
1. Designing computer output should proceed in an organized, well thought out manner; the
right output must be developed while ensuring that each output element is designed so that
people will find the system can use easily and effectively. When analysis design computer
output, they should Identify the specific output that is needed to meet the requirements.
2. Select methods for presenting information.
3. Create document, report, or other formats that contain information produced by the system.
OBJECTIVES
The output form of an information system should accomplish one or more of the following
objectives.
Convey information about past activities, current status or projections of the
Future.
Signal important events, opportunities, problems, or warnings.
Trigger an action.
Confirm an action.
8. IMPLEMENTATION
Implementation is the stage of the project when the theoretical design is turned out into a
working system. Thus it can be considered to be the most critical stage in achieving a successful
new system and in giving the user, confidence that the new system will work and be effective.
The implementation stage involves careful planning, investigation of the existing system
and it’s constraints on implementation, designing of methods to achieve changeover and
evaluation of changeover methods.
MODULES
After careful analysis the system has been identified to have the following modules:
1. Owner
2. Admin
3. Authorization center
4. Control center
MODULES DESCRIPTION
1. Owner
In the first step Data Owner was register into the application with time factor.In the
second step owner will get the access from the admin in the form of public key owner was
login into the application. In the third step owner login into the application then after the
owner will scan the QR code for secret key then after the owner will enter the both secret key
and public key within the time. After successful verification the owner will can perform his
actions like file upload File share, file view, file download operations. The owner time
attributes was expired he need to send the update request to the Admin.
2. Admin
The admin module will maintain the application server. The admin module will give the
authorization to the owner and send the public key to the owner. The admin will approve the
time update request which was requested by the owner. The admin will revoke the user when
was block.
.
3. Authorization Center
During the authorization process, the subject is reflected to the identifiable subject
attributes in TFACM model according to the application information submitted voluntarily
by the subject. Then the access permission to the object represented by the object attributes is
setting. The subject Si submits the information and the valid access time period <T, t0> to the
authorization center. The tag generator receives the submission and generates the attribute tag
of Si=<AS1 AS2 ASn>i according to the subject attributes set as well as the identity
certification which is returned back to the subject Si. The identity certification is used as a
digital proof of Si during the following access control process. The rule matching module
checks the attribute tag of the subject Si as well as the object attributes Oj and the access
actions <ax>. The time authorization module audits the submitted using time <T, t0>. If the
submission is rational, then the valid time tag is generated and added to the subject attribute
tag. Otherwise, the submission is sent back to the subject for the modifying. The subject
attributes tag with the valid time identification is authorized in the authorization center. And
the authorization information (Si, Oj, <ax>, <T, t0>)_Py is saved. So far, the authorization
process is finished.
4. Control Center
The control process is the checking and responding for the access request submitted by
the subject. During the control process, the identity information of the subject is checked at
the first, and then is the examination of the access permission. The core of the permission
judging module is the fine grit inspection mechanism based on the time restraint. The subject
requests for access and sends the identity certification to the Identity Center. After the
certificate of the subject’s identity, the access request information is sent to the access control
center. If the identity certificate is failed, the failure result of access requires is returned back
to the subject. The control center receives the subject access requires and gets the control
result after verify the authorization center and the access rules set under the fine grit
inspection mechanism based on the time restraint. Finally, the control result is returned back
to the subject and the object
9. SAMPLE CODE
DBConnection.java:
package DBAction;
import java.sql.Connection;
import java.sql.DriverManager;
return con;
else{
return con;
}}
catch(Exception e){
e.printStackTrace();
return con;}
ContentExtractor.java
package FileReador;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
BufferedReader br = null;
String line;
try {
br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
sb.append(line + "\n");
} catch (IOException e) {
e.printStackTrace();
} finally {
if (br != null) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
return sb.toString();
QRCoder.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.javapapers.java;
import DBAction.DBConnectionn;
import javax.servlet.http.HttpServlet;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Map;
import javax.imageio.ImageIO;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.MultiFormatReader;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.NotFoundException;
import com.google.zxing.Result;
import com.google.zxing.WriterException;
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.HybridBinarizer;
import java.sql.Connection;
import java.sql.PreparedStatement;
import com.sun.mail.smtp.SMTPTransport;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.URLName;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class QRCoder extends HttpServlet {
public static void createQRCode(String qrCodeData, String filePath,
String charset, Map hintMap, int qrCodeheight, int qrCodewidth)
throws WriterException, IOException {
System.out.println(filePath);
BitMatrix matrix = new MultiFormatWriter().encode(new String(qrCodeData.getBytes(charset),
charset),
BarcodeFormat.QR_CODE, qrCodewidth, qrCodeheight, hintMap);
MatrixToImageWriter.writeToFile(matrix, filePath.substring(filePath.lastIndexOf('.') + 1), new
File(filePath));
}
public static String readQRCode(String filePath, String charset, Map hintMap)throws
FileNotFoundException, IOException, NotFoundException {
BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer(new
BufferedImageLuminanceSource(ImageIO.read(new FileInputStream(filePath)))));
Result qrCodeResult = new MultiFormatReader().decode(binaryBitmap,hintMap);
return qrCodeResult.getText();
}
public static void upSkey(String skey,String email){
Connection con=null;
try {
con=DBConnectionn.getConnection();
String sqlquery="update owner set qrcode='"+skey+"' where email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
Dept. of CSE, SEAGI, TIRUPATI Page 45
Research of Fine Grit Access Control Based on Time in Cloud Computing
}
public static void pSkey(String skey,String email,String time){
Connection con=null;
try {
con=DBConnectionn.getConnection();
String sqlquery="update owner set publickey='"+skey+"',timeinterval='"+time+"' where
email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void dreq(String email){
System.out.println("hi tisd dksfgkljdf");
Connection con=null;
try {
con=DBConnectionn.getConnection();
String sqlquery="delete from otimereq where email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
}
public static boolean sendMail(String msg, String userid, String to) {
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "465");
Dept. of CSE, SEAGI, TIRUPATI Page 46
Research of Fine Grit Access Control Based on Time in Cloud Computing
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
Dept. of CSE, SEAGI, TIRUPATI Page 47
Research of Fine Grit Access Control Based on Time in Cloud Computing
}
public static void uwkey(String email,int count){
Connection con=null;
try {
con=DBConnectionn.getConnection();
String sqlquery="update owner set count='"+count+"' where email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void nSkey(String skey,String email){
Connection con=null;
try {
System.out.println("pskey "+skey+" "+email);
con=DBConnectionn.getConnection();
String sqlquery="update owner set publickey='"+skey+"' where email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
}
public static int ubOwner(String email){
Connection con=null;
int count=0;
int k=0;
try {
con=DBConnectionn.getConnection();
String sqlquery="update owner set count='"+count+"' where email='"+email+"'";
PreparedStatement ps=con.prepareStatement(sqlquery);
k=ps.executeUpdate();
Dept. of CSE, SEAGI, TIRUPATI Page 48
Research of Fine Grit Access Control Based on Time in Cloud Computing
} catch (Exception e) {
e.printStackTrace();
}
return k; }
public static int tkey(String email, String time,String date){
Connection con=null;
int i=0;
try {
String publickey="requested";
con=DBConnectionn.getConnection();
String sqlquery="insert into otimereq(email,reqstatus,timeinterval)values(?,?,?)";
PreparedStatement ps=con.prepareStatement(sqlquery);
ps.setString(1, email);
ps.setString(2, publickey);
ps.setString(3, date+"-"+time);
i=ps.executeUpdate();
if(i>0){
System.out.println("ram is here");
}else{
System.out.println("fail");
}
} catch (Exception e) {
e.printStackTrace();
}
return i;
}
}
Signin.java
package action;
import DBAction.DBConnectionn;
import com.google.zxing.EncodeHintType;
0.53
All rights reserved | Java Developer
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></h5>
</div>
<div class="float-sm-right">
<ul>
<li><a href="#"><i class="fa fa-pinterest"></i></a></li>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-dribbble"></i></a></li>
<li><a href="#"><i class="fa fa-behance"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<!--================End Footer Area =================-->
</body>
</html>
9. SCREENSHOTS
Home Page
File Upload
TYPES OF TESTS
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components
is correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation.
System Test
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.
Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.
Field testing will be performed manually and functional tests will be written in detail.
Test objectives
Features to be tested
Verify that the entries are of the correct format.
No duplicate entries should be allowed.
All links should take the user to the correct page.
Integration Testing
Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications,
e.g. components in a software system or – one step up – software applications at the company
level – interact without error.
Test Results:
All the test cases mentioned above passed successfully. No defects encountered.
Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.
Test Results:
All the test cases mentioned above passed successfully. No defects encountered.
11. CONCLUSION
Even though existing cloud platforms are used as shared repositories, they do not support any
notion of shared ownership. We consider this a severe limitation because contributing parties
cannot jointly decide how their resources are used.
In this paper, we introduced a novel concept of shared ownership and we described it
through a formal access control model, called SOM. We then propose two possible
instantiations of our proposed shared ownership model. Our first solution, called Commune,
relies on secure file dispersal and collusion-resistant secret sharing to ensure that all access
grants in the cloud require the support of an agreed threshold of owners. As such, Commune
can be used in existing agnostic clouds without modifications to the platforms. Our second
solution, dubbed Comrade, leverages the blockchain technology in order to reach consensus on
access control decision. Unlike Commune, Comrade requires that the cloud is able to translate
access control decisions that achieved consensus in the block chain into storage access control
rules. Comrade, however, shows better performance than Commune. Given the rise of personal
clouds (e.g., [9], [10]), we argue that Commune and Comrade find direct applicability in setting
up shared repositories that are distributively managed atop of the various personal clouds owned
by users. We therefore hope that our findings motivate further research in this area.
12. BIBLIOGRAPHY
[1] The Treacherous 12-Top Threats to Cloud Computing + Industry Insights [R].
https://CloudSecurityalliance.org/group/top-treats.
[3]Lin C, Feng FJ, Li FS. Access Control in New Network Environment [J]. Journal of
software, 2007,18(4):955-966.
[4] Ferraio D, Kuhn DR. Role-Based Access Control[C]. In:Proc. of the 15th National
Computer Security Conf.1992.554-563.
[6] Kaur PJ, Kaushal S. Security concerns in Cloud Computing [c]. In:Proc. of the HPAGC
2011.CCIS 169,2011:103-112.
[7] Curry S, Darbyshire J, Fisher DW, Hartman B, Herrod S, kumar V, Martins F, Orrin S, Wolf
DE. Infrastructure Security: Getting to the Bottom of compliance in the cloud. The Security
Division of EMC,2010.
[8] Feng DG, Zhang M, Zhang Y, Xu Z, Study on Cloud Computing Security [J]. Journal of
software,2011,22(1):71-83.Wang XW, Zhao YM. A Task-Role-Based Access Control Model
for Cloud Computing [J]. Computer Engineering, 2012,38(24):9-13.
[9] Huang Y, Li KL, Model of Cloud Computing Oriented T-RBAC[J]. Application Research
of Computer ,2013,30(12):3735-3737.
[10] Ei EM, Thinn TN. The Pricacy-Aware Access Control System Using Attribute- and Role-
Based Access Control in Private Cloud [C]. In: Proc. of the 2011 4th IEEE Ic.BNM,
2011:447-451.
[11] Huang JW, David MN, Rakesh B, Jun HH. A Framework Integrating Attribute-Based
Policies into Role-Based Access Control [C]. In:Prc. of the SCMAT 2012,2012:187-196.
[12] Factor M, Hadas D, Hamama A, Har'el N, Kolodner EK. Secure Logical Isolation for
Multi-Tenancy in Cloud Storage [C]. In:Proc. of the 29th SYMP. On Mass Storage Systems
and Technologies, IEEE, 2013:1-5.