Documentation MFRA
Documentation MFRA
OF BUSINESS TRANSACTION
By
Areeba Nazir
2018-GCUF-05270
BACHELOR OF SCIENCE
IN
INFORMATION TECHNOLOGY
August 2022
DECLARATION
The work reported in this thesis was carried out by me under the supervision of Mr. AFZAAL
HUSSAIN Department of Information Technology GC University, Faisalabad, Pakistan.
Areeba Nazir
2018-GCUF-05270
ii
CERTIFICATE BY SUPERVISORY COMMITTEE
We certify that the contents and form of a thesis submitted by Miss. Areeba Nazir Registration
No: 2018-GCUF-05270. Has been Found satisfactory and in accordance with the prescribed
format. We recommend it to the processor the evaluation by the External Examiner for the
award the of Degree.
Name.……………………………..………
Designation with stamp………………….
Name.……………………………..………
Name.……………………………..………
Chairperson
Name.……………………………..………
iii
DEDICATED
TO
&
iv
ACKNOWLEDGEMENTS
All praise to ALMIGHTY ALLAH, the most merciful and the most compassionate and
his Holy Prophet ‘MUHAMMAD’(Peace) be upon him) the most perfect and exalted among
and even born on the surface of earth, who is, forever a torch of guidance and knowledge for
the humanity as a whole.
The work presented in this manuscript was accomplished under the inspiring guidance,
gorgeous assistance, constructive criticism, and enlightened supervision of Mr. Afzaal Hussain
Department of Information Technology GC University, Faisalabad for his skillful guidance,
constructive criticism, masterly advice, valuable suggestions, and sympathetic behavior for the
completion of this manuscript.
I feel highly privileged to take this opportunity to express my heartiest gratitude and
deep sense of indebt to my worthy supervisory committee, Dr. Sheraz Malik and Mr.Tahir
Abdullah Department of Information technology GC University, Faisalabad under whose kind
and scholastic guidance, keen interest and constant encouragement.
Words are very important to convey thoughts and thanks, the words are impossible to
find to thank our Father and whole family for their prayers and encouragement for us and for
our work.
Finally, I apologize if I have caused anger of offence to anybody and the errors that
remain in the manuscript are mine alone.
AREEBA NAZIR
v
TABLE OF CONTENTS
Chapter 1 .................................................................................................................................. 13
1.5 Solution.................................................................................................................. 14
Chapter 2 .................................................................................................................................. 17
Chapter 3 .................................................................................................................................. 23
vi
3.1 Project overview .................................................................................................... 23
Chapter 4 .................................................................................................................................. 31
Chapter 5 .................................................................................................................................. 41
vii
5.8 Test Approach........................................................................................................ 42
Chapter 6 .................................................................................................................................. 47
Chapter 7 .................................................................................................................................. 56
MANUAL ............................................................................................................................ 56
viii
7.9 Biometric authentication........................................................................................ 60
ix
LIST OF TABLE
x
LIST OF FIGURE
xi
ABSTRACT
xii
Chapter 1
SOFTWARE REQUIREMENT SPECIFICATION
1.1 Introduction
Basically multi-factor remote authorization is a multi-module solution base project which
means it has huge work on the backend side. We use Adobe standard for remote authorization.
13
Remote biometric authorization of users on the go without requiring them to provide
any kind of OTPs. Which will result in the streaming of business transactions on your behalf.
This requires biometric devices to be physically available with the User all the time
attached to the computer or laptop on which the transaction is performed. Not to mention that it
requires biometric device maintenance, care and cost as well.
1.5 Solution
1.6.1 Tools
1.6.2 Technologies
Angular
Material Angular
14
MySQL (Database)
SpringBoot Java
Spring Security
DOM (Document Object Model)
JSON web token
Rest Client Api (Application programming interface)
Jwt Oauth2
Android
Biometric
1.7 Scope
The scope of this project is very broad in terms of multi-factor remote authorization of the
business transaction. There are two major scopes are following:
Banking Applications
Notary Applications
15
1.8.2 First year goals
1.9 Limitation
The limitation of MFRA is the Internet, which is a necessary condition for testing.
16
Chapter 2
SOFTWARE PROJECT MANAGEMENT PLAN
2.1 Scope and reference
This project aims to design a system that manages the user security and authenticates the
user then secures the business transaction. The objectives of the study are as follows:
17
PCP (Project Communication Plan)
18
2.5.2 Releases
STD To document how the software will be tested and record the
results.
19
Figure 2.1: Scrum Lifecycle
Scrum lifecycle is a number of consecutive steps and iterative stages that should be
performed during the realization of any Scrum project. The iterative approach is the main
principle of the m lifecycle. The work on a Scrum project is subdivided into segments called
Sprints. The project develops from one sprint to another until the final product is ready. Each
sprint cycle is subdivided into several consecutive stages that it must pass from the
beginning till the end. Scrum methodology also includes more specialized lifecycles like the
testing life cycle and the defect life cycle.
A flexibility model helps communicate what dimensions of the project are fixed,
constrained, and flexible
20
Project Dimensions Fixed Constrained Flexible
Cost X
Schedule X
Scope X
21
support group activities in user documentation, training, software quality assurance, and
configuration management.
22
Chapter 3
SOFTWARE REQUIREMENT SPECIFICATION
3.1 Project overview
This project aims to design a security system that will replace the present manual system.
The objectives of the study are as follows:
23
Front- End Angular
Back-End Spring Boot
Web Server Tomcat
Application Android Studio
3.3.5 Operation
Operations are categorized into two types:
24
3.4.1 Website panel
Register: This requirement enables a user to register a new user on the website.
Login: The user should have a username and password to login into the website.
Profile: This enables users to view their personal information.
Transaction: This enables the user to do a transaction on a document, download it if
the admin accepts it, transaction if the admin declines the transaction, and delete it.
25
3.6.3 Objects:
Users and administrators that manage the security
3.7 System functions
Following are the system functionalities of this project
3.7.1 Validity checks on the inputs
Validity checks are the following
3.7.1.1 Login:
The system shall allow the user to log in only when the user provides a valid username
and password.
26
3.7.3.3 Error handling and recovery
Error handling and recovery will be done in the maintenance phase.
3.7.8.1 Reliability
The System will assure login facility effectively with all working modules regarding the
reservation.
27
3.7.8.2 Availability
The system must be always available.
3.7.8.3 Maintainability
The system should be completely remote administrable. This means that system statistics
(average transaction time, current active sessions, number of sessions processed in last
3ur/day/month) and system functions (start/ stop system, reboot system, restart services, etc.)
3.7.8.4 Portability
Percentage of components with the host-dependent code: 0 to 5 %
Percentage of code that is host-dependent: 0 to 5 %
Use of a particular operating system: Widows
3.7.8.6 Environmental
The client-side will run on any environment which supports a web browser. The server-
side environment will not be a concern to the clients and can be upgraded/changed as necessary,
without affecting the clients.
3.7.8.8 Scalability
The system shall be designed so that it can easily be scaled to increase performance
(response time). This means that the various tiers can be running on different processors.
28
3.8.1 User interface
Our Desktop Application has a formal and decent look, does not have any shocking colors
each written thing is prominent and well-managed. The instructions given are easy and have a
clear meaning. Form instruction is all about to related form and only performs only that form.
3.8.5 Understandability
We should use understandable icons and buttons that will be self-explanatory, and the
interface of the App is not complex.
3.8.7 Longevity
We are using a spring environment along with an MYSQL Database that is easily
understandable, and has flexible tools so our system will perform its working to the maximum of
its capacity.
29
3.9 Functional Requirements
List of Functional Requirement
Registration
Login
Profile
Transaction
Transaction record
30
Chapter 4
SOFTWARE ANALYSIS AND DESIGN DESCRIPTION
4.1 Project relevancy, feasibility
The feasibility study for the project is:
31
4.2.1 Planning
The purpose of this phase is to determine the best solution and steps taken to develop the
system. Planning involves detailed planning for the timing of the working progress and the types
of techniques that will be taken next. Planning also involves the methodology that will be going
to use for this project.
4.2.3 Design
This phase will produce a draft of the system architecture and the prototype of the
application that will satisfy all requirement analyses. At this phase, the user interface and all
necessary input and processes will be identified. This phase also determines the application
architecture, which is going to show how to transform the logical design into basic system coding
to generate the prototype of the system. The result of this phase is the application interface and
system design specification. For this project, the design will be created using Java Net beans.
4.2.4 Implementation
During this implementation phase, the system will be constructed. All codes are generated
inside this phase. At the end of this phase, the system should run and most of the functions of the
system should be able to use. Based on the previous phase, from the prototype, the system will
become the first version inside this phase.
4.2.5 Testing
This phase will evaluate or verify the system that was developed. This phase will have
simulation data that will simulate the true database for the system. This is to test the functionality
of the system in comparing captured data with a database. Besides, all the functionality that may
cause errors or problems to the system must be specified inside this phase because the result of
32
the system is a very high priority and importance. However, the testing phase will only cover
overcoming the problem statement and the system objectives.
Hardware requirements:
Processor i7
Memory 8 GB RAM
512 KB Cache Memory
Hard disk 16 GB
Software requirements:
33
4.5 System architectural
Design System architectural design describes as:
Presentation tier
The presentation layer is directly concerned with the end - user. End-user performs his
actions using this layer. It contains the components dealing with user interface and user
interactions.
Logic tier
Also called the middle tier, logic tier, business logic, or logic tier, this tier is pulled from
the presentation tier. It controls application functionality by performing detailed processing.
Data tier
The data layer contains the data access components and database. Database access
components are objects providing access to underlying database tables, reading values from tables
into objects, storing values, etc.
34
4.5.3 System interface description
35
4.6.2 Flow of Spring Security JWT
You can have an overview of our Spring Boot Security JWT example with the diagram
below:
36
object. If s successful, AuthenticationManager returns a fully populated Authentication object
(including granted authorities).
OncePerRequestFilter makes a single execution for each request to our API. It provides
a doFilterInternal() method that we will implement parsing & validating JWT, loading User
details(using UserDetailsService),checking Authorization
(using UsernamePasswordAuthenticationToken).
Repository contains User Repository & RoleRepository to work with Database, will be
imported into Controller.
Repository has interfaces that extend Spring Data JPA JpaRepository to interact with
Database.
37
Models defines two main models for Authentication (User) & Authorization
(Role). They have many-to-many relationship.
We also have application.properties for configuring Spring Datasource, Spring Data JPA
and App properties (such as JWT Secret string or Token expiration time).
provides information about the input and output of each entity and the process itself. It has no
control flow, there are no decision and no loops. Data flow diagram is a part of the structured
analysis.
38
Figure 4.5: Data Flow
39
4.8 Entity relationship diagram
An entity relationship diagram (ERD) shows the relationships of entity sets stored in a
database. An entity in this context is an object, a component of data. By defining the entities their
attributes, and showing the relationships between them , an ER diagram illustrates the logical
structure of databases
40
Chapter 5
SOFTWARE TESTING
5.1 Testing
Software testing can be stated as process of verifying and validating that a software or
application is bug free, meets the technical requirements as guided by its design and development
and meets the user requirements effectively and efficiently with handling all the exceptional and
boundary cases . It mainly aims measuring specification, functionality performance of a software
program or application. Software testing is done during the development process. Software testing
involves the execution of software component to evaluate one or more properties, testing stages
of the project can be explained as below, and system was tested for all these stages.
41
a useful function within a computer application or program. Features or functional requirements
for this system are given below:
Req1 Register User A user can register their account for login
Req1 Login and User A user can login and logout from the system using the
logout login page of the system
42
LOGIN
“Verify Login, when correct Username and Password are entered, it should log in
successfully "
T3 is our technical requirement in which we decide that if the username and password is correct
then the user login to the system
Step 3: In this step, we Note this Technical Requirement (T3) in the Test Case
Step 4: Identify the Requirement for which this TR (Technical Requirement - T3) is defined We
noted the as it was the requirement which is checked.
43
No# TR Test Case Test Step Test Data Result
Brief Description : This case enables the user admin to log in the system .
44
Steps Strateg Action Inpu Case Actual Expected Status Remar
y(Test t Result ks
Result
to Pass)
/(Test to
fail)
T-T –P /
T-T-
F
45
Submi
ssion
46
Chapter 6
TOOLS AND TECHNOLOGES
6.1 Testing and technologies
In this project we used the following techniques. We will discuss each briefly.
Frontend (Website):
Angular
Material Angular
Database:
MySQL
Server:
SpringBoot Java
Spring Security
DOM (Document Object Model)
JSON web token
Rest Client Api (Application programming interface)
Jwt Oauth2
Application
Android
Biometric
6.2 Angular
Angular is a development platform, built on TypeScript. As a platform, Angular
includes:
With Angular, you're taking advantage of a platform that can scale from single-developer
projects to enterprise-level applications. Angular is designed to make updating as straightforward
as possible, so take advantage of the latest developments with a minimum of effort. Best of all,
the Angular ecosystem consists of a diverse group of over 1.7 million developers, library authors,
and content creators.
Each component is ready to go with default styling that follows the Material Design
Specification. Nonetheless, you can easily customize the look and feel of Angular Material
components. The list of available Angular Material components continues to grow with each
iteration of the library.
6.4 MySQL
In regard to the general definition, MySQL is an open-source relational database
management system (RDBMS) with a client-server model. RDBMS is a software or service
used to create and manage databases based on a relational model. Now, let’s take a closer
look at each term:
6.4.1 Database
A database is simply a collection of structured data. Think of taking a selfie: you push
a button and capture an image of yourself. Your photo is data, and your phone’s gallery is
the database. A database is a place in which data is stored and organized. The word
“relational” means that the data stored in the dataset is organized as tables. Every table relates
in some way. If the software doesn’t support the relational data model, just call it DBMS.
48
6.4.2 Open source
Open source means that you’re free to use and modify it. Anybody can install the
software. You can also learn and customize the source code to better accommodate your
needs. However, The GPL (GNU Public License) determines what you can do depending on
conditions. The commercially licensed version is available if you need more flexible
ownership and advanced support.
MySQL is one of many RDBMS software options. RDBMS and MySQL are often
thought to be the same because of MySQL’s popularity. A few big web applications like
Facebook, Twitter, YouTube, Google, and Yahoo! all use MySQL for data storage purposes.
Even though it was initially created for limited usage, it is now compatible with m any
important computing platforms like Linux, macOS, Microsoft Windows, and Ubuntu.
Advantages
Goals
49
Offer an easier way of getting started with the application
Features
Although JWTs can be encrypted to also provide secrecy between parties, we will focus
on signed tokens. Signed tokens can verify the integrity of the claims contained within it, while
encrypted tokens hide those claims from other parties. When tokens are signed using
public/private key pairs, the signature also certifies that only the party holding the private key is
the one that signed it.
6.7.1 Use:
Here are some scenarios where JSON Web Tokens are useful:
6.7.1.1 Authorization:
This is the most common scenario for using JWT. Once the user is logged in, each
subsequent request will include the JWT, allowing the user to access routes, services, and
50
resources that are permitted with that token. Single Sign On is a feature that widely uses JWT
nowadays, because of its small overhead and its ability to be easily used across different domains.
6.7.2 Structure:
In its compact form, JSON Web Tokens consist of three parts separated by dots (.), which
are:
Header
Payload
Signature
Therefore, a JWT typically looks like the following.
xxxxx.yyyyy.zzzzz
6.7.2.1 Header
The header typically consists of two parts: the type of the token, which is JWT, and the
signing algorithm being used, such as HMAC SHA256 or RSA.
For example:
{
"alg": "HS256",
"typ": "JWT"
}
Then, this JSON is Base64Url encoded to form the first part of the JWT.
6.7.2.2 Payload
The second part of the token is the payload, which contains the claims. Claims are
statements about an entity (typically, the user) and additional data. There are three types of
claims: registered, public, and private claims.
51
An example payload could be:
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
The payload is then Base64Url encoded to form the second part of the JSON Web Token.
Do note that for signed tokens this information, though protected against tampering, is
readable by anyone. Do not put secret information in the payload or header elements of a JWT
unless it is encrypted.
6.7.2.3 Signature
To create the signature part you have to take the encoded header, the encoded payload, a
secret, the algorithm specified in the header, and sign that.
For example if you want to use the HMAC SHA256 algorithm, the signature will be
created in the following way:
HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
secret)
The signature is used to verify the message wasn't changed along the way, and, in the case
of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it
is. Putting all together
The output is three Base64-URL strings separated by dots that can be easily passed in
HTML and HTTP environments, while being more compact when compared to XML-based
standards such as SAML.
52
The following shows a JWT that has the previous header and payload encoded, and it is
signed with a secret.
When a client request is made via a RESTful API, it transfers a representation of the state
of the resource to the requester or endpoint. This information, or representation, is delivered in one
of several formats via HTTP: JSON (Javascript Object Notation), HTML, XLT, Python, PHP, or
plain text. JSON is the most generally popular file format to use because, despite its name, it’s
language-agnostic, as well as readable by both humans and machines.
Something else to keep in mind: Headers and parameters are also important in the HTTP
methods of a RESTful API HTTP request, as they contain important identifier information as to
the request's metadata, authorization, uniform resource identifier (URI), caching, cookies, and
more. There are request headers and response headers, each with their own HTTP connection
information and status codes.
53
A uniform interface between components so that information is transferred in a
standard form. This requires that:
o resources requested are identifiable and separate from the representations sent to the
client.
o resources can be manipulated by the client via the representation they receive
because the representation contains enough information to do so.
o self-descriptive messages returned to the client have enough information to describe
how the client should process it.
o hypertext/hypermedia is available, meaning that after accessing a resource the client
should be able to use hyperlinks to find all other currently available actions they can
take.
A layered system that organizes each type of server (those responsible for security, load-
balancing, etc.) involved the retrieval of requested information into hierarchies,
invisible to the client.
Code-on-demand (optional): the ability to send executable code from the server to the
client when requested, extending client functionality.
Though the REST API has these criteria to conform to, it is still considered easier to use
than a prescribed protocol like SOAP (Simple Object Access Protocol), which has specific
requirements like XML messaging, and built-in security and transaction compliance that make it
slower and heavier.
In contrast, REST is a set of guidelines that can be implemented as needed, making REST
APIs faster and more lightweight, with increased scalability—perfect for Internet of Things
(IoT) and mobile app development.
6.9 OAuth 2
JWTs can be used as OAuth 2.0 Bearer Tokens to encode all relevant parts of an access
token into the access token itself instead of having to store them in a database.
54
6.10 Android
Android provides the fastest tools for building apps on every Android device. With an
intelligent code editor, flexible build system, real-time profilers and emulators. Create connected
apps. Creating the best code. Build rich experiences. Building without limits.
6.11 Biometric
One method of protecting sensitive information or premium content within your app is to
request biometric authentication, such as using face recognition or fingerprint recognition. This
guide explains how to support biometric login flows in your app.
55
Chapter 7
MANUAL
7.1 Index
56
7.3 Registered User
57
7.5 Dashboard
58
7.7 Business transaction
59
7.9 Biometric authentication
60
7.10 Application login
61
7.11 App Dashboard
62
7.12 Business transaction
63
7.13 Final business transaction
64