ASSIGNMENT 2 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 16: Cloud Computing Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Bui Quang Minh Student ID GCD210325 Class GCD1104 Assessor name Tran Trong Minh Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid P5 P6 P7 P8 M3 M4 D2 D3 Summative Feedback: Resubmission Feedback: Grade: Assessor Signature: Date: Internal Verifier’s Comments: Signature & Date: Table of Contents P5. CLOUD COMPUTING PLATFORM CONFIGURATION.
Connecting Render to Git. PostgreSql configuration on Render. CLOUD PLATFORM IMPLEMENTATION. Database for ATN.
Connecting database to postgreSql. Commiting code to Git. Uploading code on github. Deploying app to Render.
CLOUD PLATFORM PROBLEM ANALYSIS AND SOLUTIONS. Limited Control and Flexibility. Vendor Lock-In. ASSESS COMMON SECURITY ISSUES IN CLOUD ENVIRONMENTS.
Hijacking of accounts. Retricted access to network operations. DISCUSS PROBLEMS AND LIMITATIONS IN THE DEVELOPMENT PROCESS. Top challenges in cloud computing.
Issues in development process. Data security and privacy. Lack of expertise. Control or governance.
Multi Cloud environments. ADDRESS SECURITY ISSUES WHEN BUILDING SECURE CLOUD PLATFORM. Big questions for cloud security. Is cloud computing secure.
Why is cloud security important. How to overcome these security issues. Limit the cloud computing vendors. Confirm your access to cloud environment information.
Verify Security SLAs. Examine the specific security measures. Employ advanced firewall solutions. Implement data encryption.
Seek advice from cybersecurity experts. CRITICALLY DISCUSS HOW ORGANIZATIONS OVERCOME ISSUES. Data security and privacy. Lack of expertise.
Control or governance. Multi Cloud environments. CRITICALLY DISCUSS HOW ORGANIZATIONS PROTECT DATA WHEN MIGRATING TO CLOUD. How to protect data in migrating to cloud.
Evaluate current data landscape. Conprehend regulatory compliance framework. Select appropriate data security tools. Manage authorized personnel for data access.
Encrypt data during transit. Plan decommissioning activities for remaining data center. 47 Table of Figures. CLOUD COMPUTING PLATFORM CONFIGURATION I.
Render configuration When I click "Login" in the render, it redirects me to the login page. After that, when I log in using your GitHub account, my Render account automatically links or connects to my GitHub account. This allows for seamless integration and authentication between my Render and GitHub accounts. Login page in render Figure 2.
Login by github account II. Connecting Render to Git After successfully creating my Render account, I go to my GitHub account settings, navigate to "Installations," and there I can find my Render account. I click to configure Figure 3. Render account on github At this point, I change the repository access to "All repositories" to grant Render permission to access all of my repositories.
Repository access on github III. PostgreSql configuration on Render Then, I log in to Render using my GitHub account and click on "New" located on the top right side of the Render homepage. From there, I select "PostgreSQL" as the option to create a new PostgreSQL database. PostgreSQL selection What I need to do is simply enter the name of my database, and I can leave the other fields empty.
Render will automatically generate the necessary configurations for me. As a student, I can select the free option to use the database for free on Render. Interface for creating database (1) Figure 7. Interface for creating database (2) P6.
CLOUD PLATFORM IMPLEMENTATION I. Database for ATN 1. Creating database First, I need to create a database, and I set its name as "atn." Then, I create five tables: "category" (to classify toy categories), "role" (to categorize admin, director, and users), "shop" (to manage toy shops), "toy" (representing ATN company products), and "users" (for regular users). ATN database Figure 9.
Tables in ATN database Category Table: categoryid: A unique identifier for each category. categoryname: The name of the toy category (e., "Action Figures," "Puzzles"). Category table Role Table: roleid: A unique identifier for each role. rolename: The name of the role (e., "Admin," "Director," "User").
Role table Shop Table: shopid: A unique identifier for each shop user. username: The username of the shop user. password: The password for the shop user. Shop table Toy Table: toyid: A unique identifier for each toy.
toyname: The name of the toy. price: The price of the toy. origin: The origin or place of manufacture. description: A description of the toy.
category_id: A reference to the category of the toy, linking to the "category" table. image: Possibly a field to store an image of the toy. shop_id: A reference to the shop managing or selling the toy, linking to the "shop" table. Toy table Users Table: userid: A unique identifier for each user.
username: The username of the user. password: The password for the user. role_id: A reference to the user's role, linking to the "role" table. Connecting database to postgreSql After successfully creating the database on Render, I'll need to obtain the connection information for my PostgreSQL database.
This information typically includes: Host Name: The address of the PostgreSQL server where my database is hosted. Port: The port number on which the PostgreSQL server is listening for connections. Username: The username I'll use to access the database. Database information on render I'll use this information to set up a connection to my PostgreSQL database on my local development environment, allowing me to interact with the database and develop my application using the data stored in my Render-hosted database.
Database information on local II. UseCase diagram In my system for ATN Company Regular users can view the list of toys. Directors can view the list of toys and set the time interval for page refresh. Shop managers can view the list of toys, update the toy information, add new toys to the inventory, and delete toys from the inventory.
Admin users can view the list of all users and shoppers in the system. UseCase diagram for ATN 2. Project structure In my code, I've used the following technologies and structure: I've employed the Express.js framework for building my application. I've used Tailwind CSS to create an aesthetically pleasing user interface (UI).
I've incorporated common packages such as Nodemon for auto-reloading during development, Session for managing user sessions, and pg (presumably for PostgreSQL) for database interaction. Inside the "helpers" folder, I've organized JavaScript files to perform various external tasks that support my application. The "models" directory contains files responsible for interacting with the database, handling data storage, and retrieval. The "public" folder houses CSS, JavaScript, and image files that are publicly accessible to enhance the appearance and functionality of my application.
The "views" directory contains the pages and user interface components used in my application. Additionally, I have other external configuration files that are essential for my project's setup and configuration. This structure and the technologies I've chosen provide a foundation for developing a web application that includes a user-friendly UI, database interaction, and various functionalities. File structure in project 3.
Home page Below is the home page of the application, which includes a search bar with filter options and a list of toys. Each toy in the list displays its name, description, image, price, origin, and category: Search Bar: Users can use the search bar to input keywords for searching specific toys. Filter Options: The filter options allow users to refine their search based on specific criteria. List of Toys: Each toy item in the list typically includes the following details: Toy Name: The name or title of the toy.
Description: A brief description or information about the toy. Image: An image representing the toy to provide visual information. Price: The cost or price of the toy. Origin: The place or country where the toy is produced.
Category: The category or type to which the toy belongs, helping users classify and identify the toy easily. This home page provides a user-friendly interface for searching and browsing toys based on various criteria, making it easier for users to find the toys that match their preferences and needs. Interface of home page When the page runs, it triggers the load_data function, which initiates a request to a specific route in your application. This route, in turn, communicates with the database to fetch data related to toys.
Once the requested data is retrieved from the database, it is then returned to the page, allowing the application to display all the toys on the home page.ajax({ url: '/', method: "POST", data: { action: 'fetch', filter: filter, category: category}, dataType: "JSON", success: function (data) { var html = ''; if(data.length > 0) { for(var count = 0; count < data.length; count++) { html += ` <div class="bg-MyBlack border border-MyPaleGray rounded p-6 text-left flex flex-col justify-between gap-5"> <div class="flex flex-col justify-between h-full"> <div> <p class="font-semibold text-MyYellow mb-1">`+ data.toyname +`</p> <p class="text-sm">`+ data.description +`</p> </div> <div> <img src="/images/toy/`+ data.image +`" alt="" class="rounded mt-4 object-cover w-full h-[220px]"> </div> </div> <div class="w-full h-0.5 bg-white opacity-10"></div> <div class="flex justify-between"> <div class="text-sm"> <p class="">Price:<span class="text-MyYellow ml- 2">$`+ data.price +`</span></p> <p class="">Origin:<span class="text-MyYellow ml- 2">`+ data.origin +`</span></p> </div> <div> <button class="border border-MyYellow p-3 text-xs hover:bg-MyYellow hover:text-MyBlack">`+ data.categoryname +`</button> </div> </div> </div> `; } } $('#resultData'). Shop page If a salesperson wants to access the shop page, they will need to log in, if they login fail, they will receive a error message. Upon successful login, they will be directed to the shop page after a 2-second delay. This login and redirection process enhances the security of the shop page and ensures that only authorized salesmans can access it.
Login page Figure 22. Error message when login fail Figure 23. Success message when login successfully The shop page is designed for salesmen and provides the following functionalities: List of Toys: The page displays a list of toys, allowing salesperson to view the available products. Add Toy: salesperson can add new toys to the inventory, expanding the range of products offered.
Update Toy: The ability to update specific toy information enables salesperson to make changes to existing product details. Delete Toy: salesperson can delete specific toys from the inventory when needed. The page is tailored for salesperson, and upon their successful login, their unique salesperson ID is saved as a session variable. This salesperson ID is used to retrieve and manage the toys they are responsible for in the database.
This approach ensures that salesperson can only add, update, and delete the toys they are assigned to oversee, enhancing data security and management in the shop. Query for saleman Figure 25. Interface of shop page Figure 26. Interface when updating The result of updated toy has been shown on the home, as below result Figure 27.
Result when updating successfully When I type completely information in form of adding a new toy, then the new toy has been saved Figure 28. Interface when adding a new toy Figure 29. Result when adding successfully 5. Admin page Upon successfully logging in with an admin account, the system will send a message to inform the user that they have administrative privileges.
This message serves as a notification that the user has access to admin-specific features and functionalities within the system. Message for admin Figure 31. Access function In the admin page, the administrator has the authority to manage both users and shops within the system. Director page Similarly, when a user logs in using a director account, the system will send a message to inform them that they have director-level privileges.