Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài liệu này giải thích cách Fleet Engine bảo mật việc trao đổi thông tin giữa 3 môi trường chính của hệ thống Fleet Engine: máy chủ phụ trợ, máy chủ Fleet Engine và các ứng dụng cũng như trang web của khách hàng.
Fleet Engine quản lý tính bảo mật theo 2 cách cơ bản, dựa trên nguyên tắc về đặc quyền tối thiểu:
Thông tin xác thực mặc định của ứng dụng (ADC): Dành cho các môi trường có đặc quyền cao, chẳng hạn như giao tiếp giữa các máy chủ. Được dùng khi máy chủ phụ trợ của bạn đang tạo và quản lý xe cũng như chuyến đi trong Fleet Engine. Để biết thông tin chi tiết, hãy xem phần Thông tin xác thực mặc định của ứng dụng.
Mã thông báo web JSON (JWT): Đối với các môi trường có độ tin cậy thấp như ứng dụng khách chạy trên điện thoại thông minh và trình duyệt. Được dùng để hoàn thành các thao tác có đặc quyền thấp hơn, chẳng hạn như cập nhật vị trí xe trong Fleet Engine.
Các JWT mà môi trường có độ tin cậy thấp yêu cầu được máy chủ phụ trợ của bạn tạo và phát hành để bảo vệ khoá bí mật của tài khoản dịch vụ, đồng thời bao gồm các xác nhận quyền sở hữu bổ sung dành riêng cho Fleet Engine. Để biết thông tin chi tiết, hãy xem Mã thông báo web JSON.
Ví dụ: nếu bạn có một ứng dụng dành cho tài xế, thì tài xế sẽ truy cập vào dữ liệu từ Fleet Engine thông qua ứng dụng. Ứng dụng này được xác thực bằng JWT mà ứng dụng nhận được từ máy chủ phụ trợ của bạn. Các xác nhận JWT đi kèm, cùng với vai trò tài khoản dịch vụ, sẽ xác định những phần nào trong hệ thống mà ứng dụng trình điều khiển có quyền truy cập và những việc mà ứng dụng đó có thể làm. Phương pháp này giới hạn quyền truy cập chỉ vào dữ liệu cần thiết để hoàn thành nhiệm vụ lái xe.
Fleet Engine sử dụng các phương pháp bảo mật này để cung cấp những thông tin sau:
Xác thực xác minh danh tính của thực thể đưa ra yêu cầu.
Fleet Engine sử dụng ADC cho các môi trường có độ tin cậy cao và JWT cho các môi trường có độ tin cậy thấp.
Uỷ quyền chỉ định những tài nguyên mà một thực thể đã xác thực có quyền truy cập. Fleet Engine sử dụng tài khoản dịch vụ có vai trò IAM của Google Cloud, cộng với các xác nhận quyền sở hữu JWT để đảm bảo các thực thể đã xác thực có quyền xem hoặc thay đổi dữ liệu mà họ đang yêu cầu.
Thiết lập bảo mật cho máy chủ và ứng dụng
Để bật tính năng bảo mật bằng Fleet Engine, hãy thiết lập các tài khoản và chế độ bảo mật bắt buộc trên máy chủ phụ trợ, cũng như trên các ứng dụng và trang web của khách hàng.
Sơ đồ sau đây cho thấy thông tin tổng quan về các bước thiết lập bảo mật trên máy chủ phụ trợ và ứng dụng khách của bạn.
Để biết thêm thông tin chi tiết, hãy xem các phần sau.
Thiết lập bảo mật máy chủ phụ trợ
Quản trị viên đội xe cần làm theo các bước sau:
Tạo và định cấu hình tài khoản dịch vụ:
Trong Google Cloud Console, hãy tạo tài khoản dịch vụ.
Chỉ định các vai trò IAM cụ thể cho tài khoản dịch vụ.
Định cấu hình máy chủ phụ trợ bằng các tài khoản dịch vụ đã tạo. Để biết thông tin chi tiết, hãy xem bài viết Các vai trò của tài khoản dịch vụ.
Định cấu hình hoạt động giao tiếp an toàn với Fleet Engine (ADC): Định cấu hình phần phụ trợ để giao tiếp với phiên bản Fleet Engine bằng Thông tin đăng nhập mặc định của ứng dụng với Tài khoản dịch vụ quản trị thích hợp. Để biết thông tin chi tiết, hãy xem phần Thông tin xác thực mặc định của ứng dụng.
Định cấu hình hoạt động giao tiếp an toàn với các ứng dụng khách (JWT): Tạo một trình tạo Mã thông báo web JSON để tạo JWT có các xác nhận quyền sở hữu phù hợp cho các ứng dụng khách và trang web giám sát. Để biết thông tin chi tiết, hãy xem phần Phát hành mã thông báo web JSON.
Thiết lập bảo mật ứng dụng
Nhà phát triển ứng dụng cần có cách để tìm nạp Mã thông báo web JSON do máy chủ phụ trợ của bạn tạo trong các ứng dụng hoặc trang web của ứng dụng khách, đồng thời sử dụng các mã thông báo này để giao tiếp an toàn với Fleet Engine. Để biết thông tin chi tiết, hãy xem hướng dẫn thiết lập trong tài liệu Trải nghiệm của người lái xe hoặc Trải nghiệm của người tiêu dùng cho các ứng dụng bạn cần.
Luồng bảo mật ứng dụng máy chủ và ứng dụng khách
Sơ đồ trình tự sau đây minh hoạ quy trình xác thực và uỷ quyền ứng dụng máy chủ và ứng dụng khách bằng Fleet Engine bằng cách sử dụng ADC với máy chủ phụ trợ và JWT với các ứng dụng và trang web của ứng dụng khách.
Máy chủ phụ trợ của bạn tạo các phương tiện và chuyến đi hoặc nhiệm vụ trong Fleet Engine.
Máy chủ phụ trợ của bạn sẽ gửi một chuyến đi hoặc nhiệm vụ đến một chiếc xe: Ứng dụng dành cho tài xế sẽ truy xuất thông tin được giao khi đang hoạt động.
Máy chủ phụ trợ của bạn: Ký và phát hành JWT cho tài khoản dịch vụ tương ứng với vai trò IAM phù hợp cho nhiệm vụ hoặc chuyến đi được chỉ định.
Ứng dụng khách: Ứng dụng khách sử dụng JWT nhận được để gửi thông tin cập nhật về vị trí xe cho Fleet Engine.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eFleet Engine secures communication between your backend server, the Fleet Engine server, and your client applications using Application Default Credentials (ADC) and JSON Web Tokens (JWT).\u003c/p\u003e\n"],["\u003cp\u003eADC is used for high-privilege communication between your backend server and Fleet Engine, while JWT is used for low-trust environments like client applications.\u003c/p\u003e\n"],["\u003cp\u003eYour backend server generates and issues JWTs to client applications, limiting access based on JWT claims and service account roles for enhanced security.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine employs authentication to verify the identity of the requesting entity and authorization to control access to specific resources based on defined roles and claims.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure security, you need to configure service accounts, set up ADC for backend communication, implement JWT generation on your server, and enable client applications to fetch and use JWTs for secure interaction with Fleet Engine.\u003c/p\u003e\n"]]],[],null,["# Security overview\n\nThis document explains how Fleet engine secures information exchange between the\nthree primary environments of your Fleet Engine system: your backend server,\nyour Fleet Engine server, and your client applications and websites.\n\nFleet Engine manages security in two fundamental ways, using the principle of\nleast privilege:\n\n- **Application Default Credentials (ADC)** : For high-privileged environments\n such as server to server communications. Used when your backend server is\n creating vehicles and trips and managing them in Fleet Engine. For details,\n see [Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).\n\n | **Note:** While you can use JWTs for server-to-server communication, Google recommends you use ADC.\n- **JSON Web Tokens (JWT)**: For low-trust environments like client\n applications running on smartphones and browsers. Used to accomplish\n lower-privileged operations, such as updating\n vehicle location in Fleet Engine.\n\n The JWTs required by low-trust environments are generated and issued by your\n backend server to safeguard service account secret keys, and include\n additional claims specific to Fleet Engine. For details, see [JSON Web\n Tokens](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/jwt).\n\n For example, if you have a driver app, drivers access data from Fleet Engine\n through the app. The app is authenticated using JWTs it gets from your\n backend server. The included JWT claims, along with the service account\n role, determine what parts of your system the driver app has access to and\n what it can do. This approach limits access to only the data required\n to complete their driving assignments.\n\nFleet Engine uses these security approaches to provide the following:\n\n- *Authentication* verifies the identity of the entity making the request.\n Fleet Engine uses ADC for high-trust environments and JWT for low-trust\n environments.\n\n- *Authorization* specifies which resources an authenticated entity has access\n to. Fleet Engine uses service accounts with Google Cloud IAM roles, plus JWT\n claims that ensure authenticated entities have permissions to see or change\n the data they're requesting.\n\nServer and client security setup\n--------------------------------\n\nTo enable security with Fleet Engine, set up the required accounts\nand security on your backend server and on your client applications and\nwebsites.\n\nThe following diagram shows an overview of the steps to set up security on your\nbackend server and client applications.\n\nFor more details, see the following sections.\n\n### Backend server security setup\n\nA fleet administrator needs to follow these steps:\n\n1. **Create and configure service accounts**:\n\n 1. In the Google Cloud Console, create service accounts.\n\n 2. Assign specific IAM roles to the service accounts.\n\n 3. Configure your backend server with the created service accounts. For\n details, see [Service account roles](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/service-accounts).\n\n2. **Configure secure communication with Fleet Engine (ADC)** : Configure your\n backend to communicate with your Fleet Engine instance using Application\n Default Credentials with the appropriate \\*Admin service account. For\n details, See\n [Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).\n\n3. **Configure secure communication with client apps (JWT)** : Create a JSON Web\n Token generator to create JWTs with appropriate claims for client\n applications and monitoring websites. For details, see\n [Issue JSON Web Tokens](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt).\n\n### Application security setup\n\nApplication developers need to include a way to fetch JSON Web Tokens generated\nby your backend server in your client apps or websites, and use them to securely\ncommunicate with Fleet Engine. For details, see the setup instructions in the\n[Driver Experience](/maps/documentation/mobility/driver-sdk) or [Consumer\nExperience](/maps/documentation/mobility/journey-sharing) documentation for the\napplications you need.\n\nServer and client app security flow\n-----------------------------------\n\nThe following sequence diagram demonstrates the server and client app\nauthentication and authorization flow with Fleet Engine using ADC with the\nbackend server and JWTs with the client applications and websites.\n\n- **Your backend server creates vehicles and trips or tasks in Fleet Engine**.\n\n- **Your backend server a trip or task to a vehicle**:\n The driver app, when active, retrieves the assignment.\n\n- **Your backend server**: Signs and issues a JWT for the respective service\n account with the appropriate IAM role for the assigned task or trip.\n\n- **The client app**: The client app uses the received JWT to send vehicle\n location updates to Fleet Engine.\n\nWhat's next\n-----------\n\n- Create your [Fleet Engine project](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project).\n- Learn how to [Issue JSON Web Tokens](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt) from your server.\n- Learn more about [Service account roles](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/service-accounts).\n- Learn more about [JWTs](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/jwt)."]]