Portal Report
Portal Report
Overview
The Portal SPOC (Single Point of Contact) login validation system plays a
critical role in securing access to internal resources. It is intended to
authenticate authorized users and prevent unauthorized access. During the
internship, I was assigned to design, develop, and test the login system with
necessary security validations.
Design Objectives
Technological Stack
1. Form Creation
o A clean login form was created using HTML and styled with CSS.
o Client-side validation was added using JavaScript to ensure that
empty submissions were prevented.
o Focus management and basic accessibility features were included.
2. Backend Logic
o The backend PHP script accepted POST requests from the login
form.
o Input sanitation was performed using PHP's
htmlspecialchars() and
mysqli_real_escape_string().
o Database connection was securely established using mysqli.
o Credentials were compared using the password_verify()
function.
o If matched, session variables were set to preserve user state.
3. Session & Cookie Handling
o Sessions were initiated on successful login using
session_start().
o The session ID was regenerated to prevent fixation attacks.
o HTTPOnly cookies were used to mitigate XSS-based session
hijacking.
4. User Feedback
o If login failed, a styled message was displayed.
o Logs were maintained for each login attempt with timestamp and
IP.
5. Security Mechanisms
o Brute-force protection was implemented using attempt counters
and temporary lockouts.
o SQL injection prevention with prepared statements
(mysqli_prepare).
o Encrypted password storage using password_hash() with the
BCRYPT algorithm.
Challenges Encountered
Testing Procedures
Manual testing for edge cases (e.g., blank input, special characters).
Automated testing with tools like Selenium for repeated login sequences.
Environment Setup
Installed MySQL Workbench for GUI-based interaction.
Configured a MySQL server instance with necessary privileges.
Ensured system compatibility (UTF-8 encoding and strict mode enabled).
Restoration Process
1. Import Method
o Used Workbench’s "Import from Self-Contained File" feature.
o Defined the default target schema.
o Selected “Dump Structure and Data”.
2. Fixes and Adjustments
o Disabled foreign key checks during import: SET
foreign_key_checks = 0;
o Identified circular dependencies and reordered insert statements.
o Adjusted SQL modes temporarily to bypass strict validation errors.
Schema Review
Data Validation
Issues Faced
Resolutions
Objective
Technology Stack
Design Requirements
A form with fields for current password, new password, and confirm new
password.
Clear error messages for mismatches or weak passwords.
Responsive design compatible with mobile and desktop screens.
Development Steps
1. Layout Design
o Created a form layout with labeled input fields using HTML
<form>, <label>, and <input> tags.
o Grouped fields using semantic containers like <fieldset> and
<div>.
2. Styling and Responsiveness
o Used CSS Flexbox for vertical alignment.
o Applied media queries to adapt to screen widths under 600px.
o Implemented theme colors consistent with the TNSDC portal
branding.
3. Client-Side Validation
o JavaScript functions to:
Check if all fields are filled.
Ensure new password matches confirmation.
Verify password length and complexity.
o Provided real-time feedback with dynamic error messages.
4. Accessibility Enhancements
o ARIA labels added for screen reader support.
o Tab index management for seamless keyboard navigation.
Security Considerations
Challenges Encountered
Testing Procedures
Improvements Suggested
The primary purpose of the SRS document is to define the goals, constraints,
and the functionality of the system. It serves as a foundation for:
In the case of the “Change Password” page, the SRS document ensures that
everyone involved knows how the feature will work and is designed to handle
security and usability.
Conclusion
The SRS document is vital in ensuring that the “Change Password” page is
developed according to expectations. By clearly outlining both functional and
non-functional requirements, it serves as a foundation for the development
process.
CSS is used to enhance the visual appeal and usability of web pages. For the
“Change Password” page, CSS not only ensures the page looks aesthetically
pleasing but also contributes to the page's responsiveness and overall user
experience.
Center the Form: Ensuring that the form is centrally aligned on the page
for easy access.
Spacing and Margins: Proper spacing between form elements to avoid
clutter.
Form Input Styling: Input fields are styled to be clear and easy to fill
out, with borders, padding, and background color that stand out.
Responsive Design
Responsive design ensures that the page works well on different screen sizes.
The CSS media queries help adjust the layout depending on the screen size.
This includes:
A good color scheme and appropriate typography enhance readability and make
the page more engaging. The CSS defines:
Buttons on the page are designed to be visually distinct, with hover effects that
provide immediate visual feedback to the user. The CSS for buttons includes:
Conclusion
CSS plays a key role in making the "Change Password" page visually appealing,
functional, and responsive. It ensures that the page is user-friendly, easy to
navigate, and provides a positive user experience.
Backend Workflow
When a user submits a password change request, the following steps are
executed:
1. User Authentication: The user must first authenticate with the current
password.
2. New Password Validation: The backend validates the new password for
strength and confirms that it meets the necessary criteria.
3. Password Update: If the new password is valid, it is hashed and stored in
the database.
4. Feedback: The system sends feedback to the user, notifying them
whether the password change was successful or failed.
The backend system uses APIs to communicate between the client and the
server. A typical “Change Password” API might involve:
The database design involves creating a secure table to store user credentials.
Best practices include:
Security Measures
Security is a key consideration in the backend integration:
Conclusion
The backend integration of the "Change Password" page ensures that the system
is secure, efficient, and reliable. It handles authentication, password validation,
and updates securely, while providing essential feedback to users.
Tools Used
1. Frontend Development Tools