Please use this identifier to cite or link to this item: https://dspace.ctu.edu.vn/jspui/handle/123456789/127667
Title: PHÁT TRIỂN HỆ THỐNG QUẢN LÝ KHO HÀNG TÍCH HỢP DỊCH VỤ XÁC THỰC TẬP TRUNG (OAuth2 Google, JWT) THEO KIẾN TRÚC MICROSERVICE
Other Titles: DEVELOPMENT OF A WAREHOUSE MANAGEMENT SYSTEM WITH A CENTRALIZED AUTHENTICATION SERVICE (GOOGLE OAUTH2, JWT) BASED ON MICROSERVICE ARCHITECTURE
Authors: Huỳnh, Quang Nghi
Võ, Trí Khải
Keywords: KỸ THUẬT PHẦN MỀM
Issue Date: 2026
Publisher: Đại Học Cần Thơ
Abstract: Bối cảnh: Trong bối cảnh chuyển đổi số và nhu cầu quản trị vận hành ngày càng tăng, hoạt động quản lý kho hàng đóng vai trò quan trọng đối với nhiều doanh nghiệp và hộ kinh doanh. Tuy nhiên, các hệ thống quản lý kho truyền thống thường gặp hạn chế trong việc mở rộng chức năng, tái sử dụng dịch vụ xác thực và đảm bảo an toàn truy cập. Bên cạnh đó, xu hướng phát triển phần mềm hiện đại ưu tiên kiến trúc Microservice nhằm tối ưu tính linh hoạt, khả năng mở rộng và dễ bảo trì. Vì vậy, việc xây dựng một hệ thống quản lý kho hàng tích hợp xác thực tập trung dựa trên các tiêu chuẩn phổ biến như OAuth2 và JWT là cần thiết và có tính ứng dụng cao. Mục tiêu: Đề tài nhằm phát triển một hệ thống quản lý kho hàng dưới dạng ứng dụng web, cung cấp các chức năng cơ bản như quản lý sản phẩm, nhập kho, xuất kho, theo dõi tồn kho và lịch sử giao dịch. Đồng thời, hệ thống tích hợp dịch vụ xác thực tập trung thông qua Google OAuth2 và cơ chế cấp phát JWT để kiểm soát truy cập API. Kiến trúc Microservice được áp dụng để phân tách rõ ràng giữa dịch vụ xác thực và dịch vụ nghiệp vụ kho hàng, từ đó nâng cao tính mở rộng và khả năng triển khai độc lập giữa các module [1]. Phương pháp: Đề tài triển khai theo phương pháp xây dựng hệ thống theo từng tầng (Controller – Service – Repository) dựa trên Spring Boot. Auth Service sử dụng Spring Security OAuth2 Client để thực hiện đăng nhập Google và phát hành JWT phục vụ xác thực. Warehouse Service triển khai các REST API quản lý kho, đồng thời kiểm tra và xác minh JWT trong mỗi request để bảo vệ tài nguyên. Cơ sở dữ liệu được thiết kế theo hướng tách biệt giữa dữ liệu xác thực người dùng và dữ liệu nghiệp vụ kho hàng, đảm bảo phù hợp kiến trúc Microservice. Quá trình kiểm thử API được thực hiện bằng Postman nhằm xác nhận tính đúng đắn của luồng đăng nhập và các chức năng kho. Kết quả: Hệ thống sau khi hoàn thiện đáp ứng các yêu cầu chính: (1) người dùng có thể đăng nhập bằng Google thông qua OAuth2, (2) hệ thống cấp phát JWT và sử dụng token này để truy cập các API của Warehouse Service, (3) các chức năng quản lý kho cơ bản hoạt động ổn định gồm quản lý sản phẩm/nhà cung cấp/khách hàng, nhập/xuất kho, cập nhật tồn kho và báo cáo thống kê. Việc tách Auth Service và Warehouse Service giúp hệ thống có cấu trúc rõ ràng, dễ mở rộng và thuận lợi trong việc phát triển thêm các dịch vụ nghiệp vụ khác trong tương lai. Kết luận: Kết quả triển khai cho thấy việc ứng dụng kiến trúc Microservice kết hợp dịch vụ xác thực tập trung bằng Google OAuth2 và JWT vào hệ thống quản lý kho hàng không chỉ đáp ứng nhu cầu hiện đại hóa và tăng cường bảo mật truy cập, mà còn góp phần nâng cao hiệu quả vận hành thông qua việc chuẩn hóa luồng đăng nhập, kiểm soát quyền truy cập và giảm thiểu rủi ro sai sót trong quá trình thao tác dữ liệu kho. Đề tài cũng mở ra định hướng phát triển và nghiên cứu sâu hơn về xác thực, phân quyền và Luận văn KTPM Trường CNTT & TT, Đại học Cần Thơ trang viii bảo mật trong môi trường Microservice, từ đó mang lại giá trị ứng dụng lâu dài cho cả thực tiễn triển khai hệ thống và định hướng học thuật. Context: In the context of digital transformation and the increasing demand for operational management, warehouse management plays a crucial role for many enterprises and business households. However, traditional warehouse management systems often face limitations in scalability, service reusability—especially authentication services—and access security. Meanwhile, modern software development trends favor Microservice architecture to optimize flexibility, scalability, and maintainability. Therefore, building a warehouse management system integrated with centralized authentication based on widely adopted standards such as OAuth2 and JWT is both necessary and highly practical. Objectives: This project aims to develop a web-based warehouse management system that provides core functionalities such as product management, stock import, stock export, inventory tracking, and transaction history monitoring. At the same time, the system integrates a centralized authentication service using Google OAuth2 and JWT issuance mechanisms to control API access. The Microservice architecture is applied to clearly separate the authentication service from the warehouse business service, thereby enhancing scalability and enabling independent deployment of system modules. Methodology: The system is implemented using a layered architecture approach (Controller – Service – Repository) based on Spring Boot. The Auth Service utilizes Spring Security OAuth2 Client to handle Google login and issue JWTs for authentication. The Warehouse Service implements RESTful APIs for warehouse management while validating JWTs in each request to secure resources. The database is designed with a clear separation between user authentication data and warehouse business data, ensuring alignment with the Microservice architecture. API testing is conducted using Postman to verify the correctness of the authentication flow and warehouse functionalities. Results: The completed system meets the main requirements: (1) users can log in via Google using OAuth2, (2) the system issues JWTs and uses them to access Warehouse Service APIs, and (3) core warehouse management functions operate reliably, including management of products/suppliers/customers, stock import/export, inventory updates, and statistical reporting. The separation between Auth Service and Warehouse Service results in a clear system structure, improved scalability, and facilitates the addition of new business services in the future. Conclusion: The implementation demonstrates that applying Microservice architecture combined with centralized authentication using Google OAuth2 and JWT in a warehouse management system not only meets the needs for modernization and enhanced access security but also improves operational efficiency by standardizing the Luận văn KTPM Trường CNTT & TT, Đại học Cần Thơ trang x login process, controlling access permissions, and minimizing errors in warehouse data handling. The project also opens up directions for further development and research in authentication, authorization, and security within Microservice environments, providing long-term practical and academic value.
Description: 78 Tr
URI: https://dspace.ctu.edu.vn/jspui/handle/123456789/127667
Appears in Collections:Trường Công nghệ Thông tin & Truyền thông

Files in This Item:
File Description SizeFormat 
_file_
  Restricted Access
2.69 MBAdobe PDF
Your IP: 216.73.216.94


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.