Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini menjelaskan cara Fleet Engine mengamankan pertukaran informasi antara tiga lingkungan utama sistem Fleet Engine Anda: server backend Anda, server Fleet Engine, dan aplikasi serta situs klien Anda.
Fleet Engine mengelola keamanan dalam dua cara mendasar, menggunakan prinsip
hak istimewa terendah:
Kredensial Default Aplikasi (ADC): Untuk lingkungan dengan hak istimewa tinggi seperti komunikasi server ke server. Digunakan saat server backend Anda membuat kendaraan dan perjalanan serta mengelolanya di Fleet Engine. Untuk mengetahui detailnya, lihat Kredensial Default Aplikasi.
Token Web JSON (JWT): Untuk lingkungan dengan tingkat kepercayaan rendah seperti aplikasi klien yang berjalan di smartphone dan browser. Digunakan untuk menyelesaikan
operasi dengan hak istimewa yang lebih rendah, seperti memperbarui
lokasi kendaraan di Fleet Engine.
JWT yang diperlukan oleh lingkungan dengan tingkat kepercayaan rendah dibuat dan dikeluarkan oleh server backend Anda untuk mengamankan kunci rahasia akun layanan, dan menyertakan klaim tambahan khusus untuk Fleet Engine. Untuk mengetahui detailnya, lihat Token Web JSON.
Misalnya, jika Anda memiliki aplikasi pengemudi, pengemudi mengakses data dari Fleet Engine melalui aplikasi. Aplikasi diautentikasi menggunakan JWT yang didapat dari server backend Anda. Klaim JWT yang disertakan, beserta peran akun layanan, menentukan bagian sistem Anda yang dapat diakses oleh aplikasi pengemudi dan apa yang dapat dilakukannya. Pendekatan ini membatasi akses hanya ke data yang diperlukan untuk menyelesaikan tugas mengemudi mereka.
Fleet Engine menggunakan pendekatan keamanan ini untuk menyediakan hal berikut:
Otentikasi memverifikasi identitas entitas yang membuat permintaan.
Fleet Engine menggunakan ADC untuk lingkungan tepercaya tinggi dan JWT untuk lingkungan tepercaya rendah.
Otorisasi menentukan sumber daya mana yang dapat diakses oleh entitas yang diautentikasi. Fleet Engine menggunakan akun layanan dengan peran IAM Google Cloud, ditambah klaim JWT yang memastikan entitas yang diautentikasi memiliki izin untuk melihat atau mengubah data yang mereka minta.
Penyiapan keamanan server dan klien
Untuk mengaktifkan keamanan dengan Fleet Engine, siapkan akun dan keamanan yang diperlukan di server backend serta di aplikasi dan situs klien Anda.
Diagram berikut menunjukkan ringkasan langkah-langkah untuk menyiapkan keamanan di
server backend dan aplikasi klien Anda.
Untuk detail selengkapnya, lihat bagian berikut.
Penyiapan keamanan server backend
Administrator armada harus mengikuti langkah-langkah berikut:
Membuat dan mengonfigurasi akun layanan:
Di Konsol Google Cloud, buat akun layanan.
Tetapkan peran IAM tertentu ke akun layanan.
Konfigurasi server backend Anda dengan akun layanan yang dibuat. Untuk
mengetahui detailnya, lihat Peran akun layanan.
Mengonfigurasi komunikasi yang aman dengan Fleet Engine (ADC): Konfigurasi backend Anda untuk berkomunikasi dengan instance Fleet Engine menggunakan Kredensial Default Aplikasi dengan akun layanan *Admin yang sesuai. Untuk
detailnya, lihat
Kredensial Default Aplikasi.
Konfigurasi komunikasi yang aman dengan aplikasi klien (JWT): Buat generator Token Web JSON untuk membuat JWT dengan klaim yang sesuai untuk aplikasi klien dan situs pemantauan. Untuk mengetahui detailnya, lihat
Menerbitkan Token Web JSON.
Penyiapan keamanan aplikasi
Developer aplikasi perlu menyertakan cara untuk mengambil Token Web JSON yang dibuat
oleh server backend di aplikasi atau situs klien, dan menggunakannya untuk berkomunikasi
dengan Fleet Engine secara aman. Untuk mengetahui detailnya, lihat petunjuk penyiapan dalam dokumentasi
Pengalaman Pengemudi atau Pengalaman
Konsumen untuk aplikasi yang Anda butuhkan.
Alur keamanan aplikasi server dan klien
Diagram urutan berikut menunjukkan alur autentikasi dan otorisasi aplikasi server dan klien dengan Fleet Engine menggunakan ADC dengan server backend dan JWT dengan aplikasi dan situs klien.
Server backend Anda membuat kendaraan dan perjalanan atau tugas di Fleet Engine.
Server backend Anda mengirimkan perjalanan atau tugas ke kendaraan:
Aplikasi pengemudi, saat aktif, mengambil tugas.
Server backend Anda: Menandatangani dan menerbitkan JWT untuk akun layanan masing-masing dengan peran IAM yang sesuai untuk tugas atau perjalanan yang ditetapkan.
Aplikasi klien: Aplikasi klien menggunakan JWT yang diterima untuk mengirim pembaruan lokasi kendaraan ke Fleet Engine.
[null,null,["Terakhir diperbarui pada 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)."]]