Agent de service de l'environnement standard App Engine
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
En plus du compte de service App Engine par défaut, l'environnement standard App Engine inclut un agent de service de l'environnement standard App Engine. L'agent de service permet à votre projet Google Cloud d'interagir avec les ressources de votre application indépendamment des autres services Google Cloud.
Google crée automatiquement ce compte lorsque vous déployez la première application d'un projet dans l'environnement standard App Engine à l'aide des outils App Engine, tels que la commande gcloud app deploy.
L'agent de service n'est pas répertorié sur la page "Comptes de service" de la console Google Cloud et présente les restrictions suivantes :
Ne révoquez pas les rôles attribués à l'agent de service.
Dans l'angle supérieur droit de la page Autorisations, cochez la case Inclure les attributions de rôles fournies par Google.
Dans la liste Comptes principaux, recherchez l'ID de l'agent de service de l'environnement standard App Engine, qui utilise l'ID service-PROJECT_NUMBER@gcp-gae-service.iam.gserviceaccount.com.
Vérifiez que l'agent de service a reçu le rôle Agent de service de l'environnement standard App Engine.
Rôle d'agent de service
L'agent de service a le rôle d'agent de service de l'environnement standard App Engine.
Le rôle comprend un ensemble d'autorisations requis par l'environnement standard Java 8 pour gérer vos applications d'environnement standard. Par exemple, ce rôle inclut des autorisations permettant d'effectuer les tâches suivantes :
Obtenez un jeton d'accès permettant aux instances App Engine d'accéder à d'autres ressources Google Cloud, telles qu'un bucket Cloud Storage.
Utilisez l'API Blobstore des anciens services groupés App Engine.
Le rôle d'agent de service de l'environnement standard App Engine est réservé à l'agent de service. N'attribuez pas ce rôle IAM à un autre compte, car les autorisations qu'il inclut peuvent changer sans préavis.
Restaurer un agent de service supprimé
Si vous supprimez accidentellement l'agent de service de l'environnement standard App Engine, vous pouvez le restaurer en procédant comme suit :
Saisissez l'ID de l'agent de service au format service-PROJECT_NUMBER@gcp-gae-service.iam.gserviceaccount.com.
Sélectionnez le rôle Agent de service de l'environnement standard App Engine.
Cliquez sur Enregistrer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/12/22 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2024/12/22 (UTC)."],[[["\u003cp\u003eThe App Engine standard environment includes a service agent that allows your Google Cloud project to interact with your app's resources separately from other services.\u003c/p\u003e\n"],["\u003cp\u003eThis service agent is automatically created upon the first deployment of an app to the App Engine standard environment using App Engine tooling.\u003c/p\u003e\n"],["\u003cp\u003eThe service agent is not listed on the Service Accounts page and should not have its granted roles revoked, nor should the associated role be granted to other accounts.\u003c/p\u003e\n"],["\u003cp\u003eThe service agent has a specific role, the "App Engine standard environment Service Agent" role, which is essential for managing standard environment apps and grants permissions for tasks like accessing Google Cloud resources.\u003c/p\u003e\n"],["\u003cp\u003eIf the service agent is accidentally deleted, it can be restored by adding a new principal using the specified service agent ID and assigning it the "App Engine standard environment Service Agent" role.\u003c/p\u003e\n"]]],[],null,["# The App Engine standard environment service agent\n\nIn addition to the [App Engine default service\naccount](/appengine/docs/legacy/standard/java/service-account), the\nApp Engine standard environment includes a *App Engine standard environment service agent*. The service agent\nenables your Google Cloud project to interact with the resources of your app\nseparately from other Google Cloud services.\n\nGoogle automatically creates this account when you deploy a project's first app\nto the App Engine standard environment using App Engine tooling,\nsuch as the `gcloud app deploy` command.\n\nThe service agent is not listed on the Service\nAccounts page of the Google Cloud console and has the following restrictions:\n\n- Do not revoke the roles that are granted to the service agent.\n- Do not grant the related [App Engine standard environment service agent\n role](#service_agent_role) to any other account because the permissions that the role includes can change without notice.\n\n| **Warning:** Removing the service agent removes the binding for the service agent from your Google Cloud project. If you remove the binding or change the permissions for the service agent, any deployment to your app in the standard environment might fail.\n\nVerifying the App Engine standard environment service agent\n-----------------------------------------------------------\n\nTo verify that the service agent exists\nin your Google Cloud project, perform the following steps:\n\n1. Open the Google Cloud console:\n\n [Go to the Permissions\n page](https://console.cloud.google.com/iam-admin/iam)\n2. In the upper-right corner of the **Permissions** page, select the\n **Include Google-provided role grants** checkbox.\n\n3. In the **Principals** list, locate the ID of the App Engine standard environment service\n agent, which uses the ID \n\n `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-gae-service.iam.gserviceaccount.com`.\n\n4. Verify that the service agent has been\n granted the **App Engine standard environment Service Agent** role.\n\nService Agent role\n------------------\n\nThe service agent has the\n[App Engine standard environment Service Agent role](/iam/docs/understanding-roles#appengine.serviceAgent).\nThe role includes a set of permissions needed by Java 8 standard environment to\nmanage your standard environment apps. For example,\nthis role includes permissions to perform the following tasks:\n\n- Get an access token for App Engine instances to access other Google Cloud resources, such as a Cloud Storage bucket.\n- Use the [Blobstore API](/appengine/docs/legacy/standard/java/blobstore) from App Engine legacy bundled services.\n\nThe App Engine standard environment Service Agent role is reserved for the\nservice agent. Do not grant this\n[IAM role](/iam/docs/overview#roles) to any other account, because the\npermissions that the role includes can change without notice.\n\nRestoring a deleted service agent\n---------------------------------\n\nIf you accidentally delete the App Engine standard environment service agent,\nrestore it by performing the following steps:\n\n1. Open the Google Cloud console:\n\n [Go to the Permissions\n page](https://console.cloud.google.com/iam-admin/iam)\n2. Click **Add**.\n\n3. Enter the service agent ID using the format \n\n `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-gae-service.iam.gserviceaccount.com`.\n\n4. Select the **App Engine standard environment Service Agent** role.\n\n5. Click **Save**."]]