Week 3: Building Secure Functions with GCP and Firebase Auth
June 23–27, 2025
Christian M. Lagarde – 3rd Year Computer Science Student
Bicol University
Securing the Flow: First Steps into GCP and Firebase Integration
Week 3 marked a shift from setup to system-building. After two weeks of AWS-based backend development and server setup, I was introduced to another critical cloud platform in modern development—Google Cloud Platform (GCP). While the environment and terminology differed from AWS, the underlying architecture felt familiar: serverless functions, secure access, and scalable deployments.
At the center of this learning curve was Google Cloud Functions—a serverless solution that lets developers run backend logic without managing infrastructure. I spent the first half of the week exploring how these functions are deployed, triggered, and monitored in production environments. It was my first real exposure to GCP, and I took time to understand not just the tools, but the philosophy behind Google’s approach to cloud services.
Lodging Flow Begins: Laying the Security Foundation
Midweek, I officially joined the Lodging Flow project—an internal system aimed at managing lodging transactions and operations. My initial assignment was to help establish the foundation: ensuring that the backend functions were secure, CORS-compliant, and protected through authentication and encryption.
The first task was enabling CORS (Cross-Origin Resource Sharing) on our cloud functions. This seemingly small configuration step was critical in ensuring that frontend clients—especially those hosted on different domains or ports—could securely interact with our backend services.
Next came Firebase Authentication integration. Using the modular SDK, I updated key endpoints to require valid ID tokens before allowing access. Functions were now protected behind identity checks—no longer open to anonymous requests. These checks were configured server-side to ensure that sensitive operations, such as booking or editing user information, could only be performed by authenticated users.
Encryption and Decryption: Handling Sensitive Data Responsibly
Data privacy is at the core of any modern cloud system. For Lodging Flow, that meant integrating AES encryption and decryption into our function logic. Any sensitive fields—personal information, room booking details, or financial data—were encrypted before storage and decrypted upon retrieval.
I built out utility functions that handled this process, ensuring each field followed a consistent encryption protocol using a shared secret key stored in environment variables. These functions were tested locally and remotely, confirming they preserved integrity even under edge cases.
Working through this made it clear: cloud functions aren’t just event handlers—they’re guardians of trust. They control access, enforce logic, and protect data. And when configured properly, they form the backbone of a secure application.
Documenting the Workflow: Clarity Through Postman
To ensure consistency across our team, I also began creating Postman documentation for each cloud function. I annotated each endpoint with request samples, expected headers (including Bearer tokens), and sample encrypted response payloads.
Postman became more than just a testing tool—it was now part of our internal documentation strategy. Clear requests. Valid test cases. Reproducible errors. These helped streamline our discussions and validate functionality with mentors and peers.
Reflection: A New Platform, A Familiar Mission
This week wasn’t about building complex new modules—it was about laying a secure and reliable foundation on a new platform. GCP may have introduced new syntax, but the goals were the same: protect the system, enforce access control, and build with scalability in mind.
The Lodging Flow project is just beginning, but it already reflects a real-world mindset: prioritize security early, understand the full request lifecycle, and always document your decisions.
By the end of Week 3, I had contributed to a system that accepts authenticated requests, secures its data, and runs on scalable infrastructure—and I now understood not only how, but why that matters.
Completed Highlights
-
Familiarization with Google Cloud Functions architecture and deployment
-
Joined Lodging Flow project and began backend implementation
-
Added CORS configuration to cloud functions
-
Integrated Firebase Authentication with route-level protection
-
Implemented AES encryption and decryption of sensitive fields
-
Created Postman documentation for Lodging Flow API endpoints
Comments
Post a Comment