[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\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)."]]