Activer les achats intégrés à l'aide d'un client OAuth géré par Google
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment activer Identity-Aware Proxy (IAP) pour une ressource Google Cloud à l'aide d'un client OAuth géré par Google.
Lorsque vous activez l'IAP sur une ressource à l'aide d'un client OAuth géré par Google, seuls les utilisateurs de l'organisation dans laquelle la ressource se trouve peuvent y accéder. Si vous souhaitez autoriser des utilisateurs externes à l'organisation à accéder à une ressource compatible avec les achats intégrés, activez des identifiants OAuth personnalisés.
Activer l'IAP pour une nouvelle ressource
Les nouvelles ressources Google Cloud ne sont pas activées IAP.
Pour activer IAP sur une nouvelle ressource, procédez comme suit :
Dans la console Google Cloud , accédez à la page d'IAP.
Dans la liste des ressources, accédez aux paramètres de la ressource pour laquelle vous souhaitez configurer des identifiants OAuth personnalisés.
Cochez la case Activer des identifiants OAuth personnalisés pour permettre aux utilisateurs externes à cette organisation d'accéder à cette application.
Dans la boîte de dialogue Configuration OAuth, saisissez un ID client et un secret.
Facultatif: Pour qu'un ID client et un secret soient générés pour vous, cliquez sur Générer automatiquement des identifiants.
Vous pouvez télécharger les identifiants client dans un fichier CSV ou les supprimer. Une fois vos modifications enregistrées, les identifiants client personnalisés ne peuvent plus être récupérés. Nous vous recommandons donc de les enregistrer.
Si vous supprimez les identifiants, le client OAuth généré automatiquement est également supprimé.
Pour enregistrer vos modifications, cliquez sur Enregistrer. L'enregistrement de vos modifications ne modifie pas l'état d'activation d'IAP.
Passer à un client OAuth géré par Google
Pour modifier les ressources à l'aide d'un client OAuth personnalisé afin d'utiliser un client OAuth géré par Google, procédez comme suit :
Dans la console Google Cloud , accédez à la page d'IAP.
Dans la liste des ressources, accédez aux paramètres de la ressource pour laquelle vous souhaitez utiliser un client OAuth géré par Google.
Décochez la case Activer des identifiants OAuth personnalisés pour permettre aux utilisateurs externes à cette organisation d'accéder à cette application.
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 2025/09/09 (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 2025/09/09 (UTC)."],[],[],null,["# Enable IAP using a Google-managed OAuth client\n\nThis page describes how to enable Identity-Aware Proxy (IAP) for\na Google Cloud resource, using a Google-managed\nOAuth client.\n\nWhen enabling IAP on a resource using a Google-managed\nOAuth client, only users within the organization in which the resource is\ncontained can access that resource. If you want to allow users outside of\nthe organization access to an IAP-enabled resource, [enable\ncustom OAuth credentials](#custom-oauth-credentials).\n\nEnable IAP for a new resource\n-----------------------------\n\nNew Google Cloud resources don't have IAP enabled.\nComplete the following steps to enable IAP on a new resource.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. From the list of resources, select the resource for which you want to enable\n IAP.\n\n4. In the **IAP** column, click the toggle to the on position.\n\n5. For the **Turn on IAP** option, click **Turn on**.\n\nSet up custom OAuth credentials for a resource\n----------------------------------------------\n\nTo allow users outside of the organization access to an\nIAP-enabled resource, complete the following steps.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. In the list of resources, go to the settings of the resource for which you\n want to configure custom OAuth credentials.\n\n4. Select the **Enable custom OAuth credentials to allow users outside of this\n organization to access this application** checkbox.\n\n5. In the **OAuth configuration** dialog, enter a client ID and secret.\n\n6. Optional: To have a client ID and secret generated for you, click\n **Auto generate credentials**.\n\n You can download the client credentials to a CSV file, or delete the\n credentials. After you save your changes, custom client credentials cannot\n be retrieved, so we recommend that you save your credentials.\n\n If you delete the credentials, the auto-generated OAuth client\n is also deleted.\n7. To save your changes, Click **Save**. Saving your changes does not change\n the IAP enabled state.\n\nChange to a Google-managed OAuth client\n---------------------------------------\n\nYou can change resources using a custom OAuth client to use a Google-managed\nOAuth client by completing the following steps.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. In the list of resources, go to the settings of the resource for which you\n want to change to use a Google-managed OAuth client.\n\n4. Deselect the **Enable custom OAuth credentials to allow users outside of this\n organization to access this application** checkbox.\n\n5. Click **Save**."]]