1. Date & Task Title
Date: 26 October 2026 (Monday)
Task Title: School Staff Management System Development, Firebase Security Rules Testing & Backend Verification
2. Task Description
At approximately 8:00 a.m., I began my internship duties by continuing the development of the School Staff Management System for SMK Tanjong Puteri. The system is being developed using Flutter and Firebase to support the management of staff information, attendance, and whereabouts within the school.
Today's main focus was on reviewing the existing project and strengthening its backend security before proceeding with further development. Since the application manages staff records and potentially sensitive personal information, it is important to ensure that the database and file storage are protected against unauthorised access.
At approximately 9:00 a.m., I continued examining the existing Flutter project structure and Firebase configuration. During the project review, I identified several areas that required further attention, particularly the way staff information was stored and retrieved from Cloud Firestore.
The existing application used a Firestore collection named staff to store staff information. One important security concern was that some records contained telephone numbers alongside general staff profile information. The existing access structure needed to be reviewed to ensure that sensitive fields would not be unnecessarily exposed to ordinary users.
Around 10:30 a.m., I focused on understanding how Firebase security rules could be used to control access to different types of information. I explored the separation of general staff directory information from restricted staff details, with the aim of allowing users to access only the information appropriate to their roles.
For example, administrators may require access to more complete staff information, while ordinary authenticated users should only be allowed to access permitted profile details. This approach is important for protecting personal information and preventing unauthorised changes to staff records.
At approximately 11:45 a.m., I worked on connecting my development environment to the correct Firebase project using the Firebase Command Line Interface (CLI). I successfully authenticated my Firebase account and confirmed that the school's Firebase project, smktp-staff-system, was available.
This was an important step because the Firebase CLI provides tools for managing project configurations, testing security rules, and running local emulators. It also helps developers verify their work before applying changes to a production environment.
Around 12:15 p.m., I continued preparing the local testing environment for Firestore and Firebase Storage security rules. Instead of immediately changing the security settings of the live database, I worked towards testing the proposed access controls in an isolated environment to reduce the risk of disrupting the existing system.
I took my scheduled lunch and rest break from 1:00 p.m. to 2:00 p.m..
After the break, at approximately 2:00 p.m., I continued configuring the Firebase Local Emulator Suite. During the setup process, I encountered a compatibility issue involving the Java environment. The existing Java 17 configuration was insufficient for the Firestore Emulator being used, so the testing environment needed to be adjusted to use Java 21.
After addressing the Java compatibility issue, I was able to run the Firebase emulators and proceed with security testing without modifying the live database.
At approximately 2:40 p.m., I tested the proposed Cloud Firestore security rules. The tests were designed to verify different access scenarios, including whether administrators could access restricted staff details, whether ordinary users were limited to permitted information, and whether unauthorised users were prevented from accessing or modifying protected records.
The Firestore Emulator successfully completed 8 out of 8 security tests. The passing tests demonstrated that the tested rules correctly enforced the intended restrictions within the local emulator environment.
At approximately 3:00 p.m., I proceeded with testing the Firebase Storage security rules. Firebase Storage is relevant to the system because it can be used to manage files such as staff photographs. Security rules are necessary to control access to stored files and protect them from unauthorised operations.
Using the Storage Emulator, I successfully completed 9 out of 9 security tests. Combined with the Firestore results, a total of 17 out of 17 emulator tests passed.
At approximately 3:15 p.m., I reviewed the testing outcomes and the remaining security concerns. Although all the emulator tests passed, the existing staff collection still required further review because telephone number fields were accessible under the older data structure.
Before implementing the proposed changes in the live application, it would be necessary to examine the Flutter code that depended on the existing collection, plan the separation of sensitive information, and ensure that the security changes would not disrupt important system functions.
I concluded my working day at approximately 3:30 p.m.. Today's work represented important progress in validating the security design of the School Staff Management System, although the full data migration and live deployment had not yet been completed.
3. Challenges & Solutions
Challenge 1: Protecting Sensitive Staff Information
One of the main challenges was ensuring that sensitive staff information would only be accessible to authorised individuals. The existing Firestore data structure stored general staff information and telephone numbers within the same collection, making access control more complicated.
To address this concern, I reviewed the existing structure and explored a more secure approach that separates general directory information from restricted staff details. I also tested role-based access rules to verify that different users would receive appropriate levels of access.
Although the proposed rules passed the local emulator tests, the existing collection still required further changes. Therefore, the sensitive information issue was not considered fully resolved at this stage.
Challenge 2: Java Compatibility During Emulator Setup
Another challenge involved the Java version required to run the Firestore Emulator. The initial environment used Java 17, which resulted in a compatibility issue and prevented the emulator from operating as expected.
I addressed the issue by adjusting the Java environment to use Java 21. This allowed the emulator to run and enabled me to continue testing the Firebase security rules.
This experience helped me understand that software development sometimes requires troubleshooting the development environment itself, rather than focusing only on application code.
Challenge 3: Verifying Security Without Affecting the Live System
Updating Firebase security rules without proper testing can potentially interrupt existing application functions or expose information to unauthorised users.
To reduce this risk, I used the Firebase Local Emulator Suite to simulate different user-access scenarios. This allowed me to evaluate the proposed rules in a controlled environment without directly modifying the school's live database.
The testing process produced successful results, with 8 Firestore tests and 9 Storage tests passing. However, additional integration testing and data structure improvements would still be required before production deployment.
4. Key Learnings & Skills Gained
- Flutter Project Review: Improved my understanding of the existing application's structure and the relationship between its interface, staff information, and Firebase backend.
- Firebase CLI: Gained experience authenticating a Firebase account, identifying the correct project, and preparing a development environment for Firebase testing.
- Cloud Firestore Security Rules: Learned how database rules can restrict access based on authentication status and user permissions.
- Role-Based Access Control: Developed a better understanding of the importance of separating administrator permissions from ordinary staff permissions.
- Firebase Storage Security: Gained practical knowledge of testing access controls for files and resources managed through Firebase Storage.
- Firebase Local Emulator Suite: Learned how to test database and storage security rules in a controlled local environment before applying them to a live system.
- Technical Troubleshooting: Improved my debugging skills by identifying and addressing a Java version compatibility issue during emulator setup.
- Security Testing: Successfully verified 17 security test cases, consisting of 8 Firestore tests and 9 Storage tests, within the local emulator environment.
- Data Privacy & System Planning: Learned the importance of protecting personal staff information and carefully planning database changes to avoid affecting existing application functions.
5. Supporting Materials
Figure 1: Review of the School Staff Management System project structure and Firebase configuration.
Figure 2: Firebase CLI successfully connected to the school's Firebase project.
Figure 3: Firestore Emulator security test results showing 8 out of 8 tests passed
6. Reflection & Next Steps
Today's internship activities provided valuable experience in the technical aspects of developing a real-world school management application. Unlike interface design, backend security requires careful consideration of how information is stored, accessed, and protected.
One of the most important lessons I learned was that a functional application must also be secure. Even when an application successfully displays staff information, it is necessary to verify whether users are accessing only the information they are authorised to view.
Working with Firebase security rules helped me understand the relationship between user authentication, access permissions, data privacy, and database structure. It also showed me the importance of separating sensitive information from general profile data when designing a system that will be used by different categories of users.
The Java compatibility problem also taught me to approach technical errors systematically. Rather than repeatedly attempting the same process, I learned to examine the requirements of the development tools and identify the source of the issue before applying a suitable solution.
Successfully completing 17 out of 17 Firebase Emulator security tests was an encouraging achievement. However, I also learned that successful local testing does not automatically mean an application is ready for production. Further verification is still necessary to ensure that the tested rules work correctly with the existing Flutter application and its data.
For the next stage of development, I plan to continue reviewing how the Flutter application accesses staff information, particularly telephone numbers stored in the existing staff collection. I also aim to work towards separating restricted information from general directory profiles while preserving the application's existing functions.
Additional steps will involve preparing the relevant Firebase configurations, reviewing the proposed data changes, and performing further integration testing before deploying the security improvements to the live system.
Overall, today's experience strengthened my knowledge of Flutter development, Firebase backend management, security testing, technical debugging, and systematic problem-solving. It also helped me understand the responsibilities involved in developing a reliable application that handles important information for an actual school.



No comments:
Post a Comment