Questa pagina mostra come utilizzare i vincoli personalizzati del servizio Policy dell'organizzazione per limitare operazioni specifiche sulle seguenti risorse Google Cloud :
datastream.googleapis.com/ConnectionProfiledatastream.googleapis.com/Streamdatastream.googleapis.com/PrivateConnection
Per saperne di più sulle policy dell'organizzazione, consulta Policy dell'organizzazione personalizzate.
Informazioni sulle policy dell'organizzazione e sui vincoli
Il servizio Google Cloud Policy dell'organizzazione offre un controllo centralizzato e programmatico sulle risorse della tua organizzazione. In qualità di amministratore della policy dell'organizzazione, puoi definire una policy dell'organizzazione, ovvero un insieme di limitazioni chiamate vincoli che si applicano alle risorseGoogle Cloud e ai discendenti di queste risorse nella gerarchia delle risorseGoogle Cloud . Puoi applicare le policy dell'organizzazione a livello di organizzazione, cartella o progetto.
Policy dell'organizzazione fornisce vincoli gestiti integrati per vari servizi Google Cloud . Tuttavia, se cerchi un controllo più granulare e personalizzabile sui campi specifici limitati nelle policy dell'organizzazione, puoi anche creare vincoli personalizzati e utilizzarli in una policy dell'organizzazione personalizzata.
Ereditarietà delle policy
Per impostazione predefinita, le policy dell'organizzazione vengono ereditate dai discendenti delle risorse su cui applichi la policy. Ad esempio, se applichi una policy a una cartella, Google Cloud applica la policy a tutti i progetti contenuti nella cartella. Per scoprire di più su questo comportamento e su come modificarlo, consulta Regole di valutazione della gerarchia.
Vantaggi
Puoi utilizzare policy dell'organizzazione personalizzate per applicare policy di sicurezza specifiche alle tue risorse Datastream. Ad esempio, puoi limitare i nomi visualizzati dei flussi, i tipi di profili di connessione o le regioni in cui è possibile stabilire la connettività privata. Ciò contribuisce a garantire la conformità e la governance in tutta l'organizzazione.
Limitazioni
- Le modifiche ai criteri non vengono applicate retroattivamente alle risorse Datastream esistenti.
- Una configurazione delle risorse esistente rimane valida anche se contiene valori non conformi, a meno che non venga aggiornata.
- La valutazione dei vincoli personalizzati potrebbe aggiungere una piccola latenza alle richieste di creazione e aggiornamento delle risorse.
Prima di iniziare
- Accedi al tuo account Google Cloud . Se non conosci Google Cloud, crea un account per valutare le prestazioni dei nostri prodotti in scenari reali. I nuovi clienti ricevono anche 300 $di crediti senza costi per l'esecuzione, il test e il deployment dei carichi di lavoro.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Installa Google Cloud CLI.
-
Se utilizzi un provider di identità (IdP) esterno, devi prima accedere a gcloud CLI con la tua identità federata.
-
Per inizializzare gcloud CLI, esegui questo comando:
gcloud init -
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Installa Google Cloud CLI.
-
Se utilizzi un provider di identità (IdP) esterno, devi prima accedere a gcloud CLI con la tua identità federata.
-
Per inizializzare gcloud CLI, esegui questo comando:
gcloud init - Assicurati di conoscere il tuo ID organizzazione.
Ruoli obbligatori
Per ottenere le autorizzazioni necessarie per gestire le policy dell'organizzazione personalizzate, chiedi all'amministratore di concederti il ruolo IAM Organization Policy Administrator (roles/orgpolicy.policyAdmin) sulla risorsa organizzazione.
Per saperne di più sulla concessione dei ruoli, consulta Gestisci l'accesso a progetti, cartelle e organizzazioni.
Potresti anche riuscire a ottenere le autorizzazioni richieste tramite i ruoli personalizzati o altri ruoli predefiniti.
Risorse supportate da Datastream
La tabella seguente elenca le risorse Datastream a cui puoi fare riferimento nei vincoli personalizzati.| Risorsa | Campo |
|---|---|
| datastream.googleapis.com/ConnectionProfile |
resource.displayName
|
resource.forwardSshConnectivity.hostname
| |
resource.forwardSshConnectivity.port
| |
resource.forwardSshConnectivity.username
| |
resource.gcsProfile.bucket
| |
resource.gcsProfile.rootPath
| |
resource.mongodbProfile.hostAddresses.hostname
| |
resource.mongodbProfile.hostAddresses.port
| |
resource.mongodbProfile.replicaSet
| |
resource.mongodbProfile.standardConnectionFormat.directConnection
| |
resource.mongodbProfile.username
| |
resource.mysqlProfile.hostname
| |
resource.mysqlProfile.port
| |
resource.mysqlProfile.username
| |
resource.oracleProfile.connectionAttributes
| |
resource.oracleProfile.databaseService
| |
resource.oracleProfile.hostname
| |
resource.oracleProfile.oracleAsmConfig.asmService
| |
resource.oracleProfile.oracleAsmConfig.connectionAttributes
| |
resource.oracleProfile.oracleAsmConfig.hostname
| |
resource.oracleProfile.oracleAsmConfig.oracleSslConfig.serverCertificateDistinguishedName
| |
resource.oracleProfile.oracleAsmConfig.port
| |
resource.oracleProfile.oracleAsmConfig.username
| |
resource.oracleProfile.oracleSslConfig.serverCertificateDistinguishedName
| |
resource.oracleProfile.port
| |
resource.oracleProfile.username
| |
resource.postgresqlProfile.database
| |
resource.postgresqlProfile.hostname
| |
resource.postgresqlProfile.port
| |
resource.postgresqlProfile.username
| |
resource.privateConnectivity.privateConnection
| |
resource.salesforceProfile.domain
| |
resource.salesforceProfile.oauth2ClientCredentials.clientId
| |
resource.salesforceProfile.userCredentials.username
| |
resource.sqlServerProfile.database
| |
resource.sqlServerProfile.hostname
| |
resource.sqlServerProfile.port
| |
resource.sqlServerProfile.username
| |
| datastream.googleapis.com/PrivateConnection |
resource.displayName
|
resource.pscInterfaceConfig.networkAttachment
| |
resource.vpcPeeringConfig.subnet
| |
resource.vpcPeeringConfig.vpc
| |
| datastream.googleapis.com/Stream |
resource.backfillAll.mongodbExcludedObjects.databases.collections.collection
|
resource.backfillAll.mongodbExcludedObjects.databases.collections.fields.field
| |
resource.backfillAll.mongodbExcludedObjects.databases.database
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.database
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.column
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.length
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.precision
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.scale
| |
resource.backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.table
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.column
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.dataType
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.encoding
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.length
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.nullable
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.precision
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.scale
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.table
| |
resource.backfillAll.oracleExcludedObjects.oracleSchemas.schema
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.table
| |
resource.backfillAll.postgresqlExcludedObjects.postgresqlSchemas.schema
| |
resource.backfillAll.salesforceExcludedObjects.objects.fields.dataType
| |
resource.backfillAll.salesforceExcludedObjects.objects.fields.name
| |
resource.backfillAll.salesforceExcludedObjects.objects.fields.nillable
| |
resource.backfillAll.salesforceExcludedObjects.objects.objectName
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.schema
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.column
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.dataType
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.length
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.nullable
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.ordinalPosition
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.precision
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.primaryKey
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.columns.scale
| |
resource.backfillAll.sqlServerExcludedObjects.schemas.tables.table
| |
resource.customerManagedEncryptionKey
| |
resource.destinationConfig.bigqueryDestinationConfig.blmtConfig.bucket
| |
resource.destinationConfig.bigqueryDestinationConfig.blmtConfig.connectionName
| |
resource.destinationConfig.bigqueryDestinationConfig.blmtConfig.fileFormat
| |
resource.destinationConfig.bigqueryDestinationConfig.blmtConfig.rootPath
| |
resource.destinationConfig.bigqueryDestinationConfig.blmtConfig.tableFormat
| |
resource.destinationConfig.bigqueryDestinationConfig.dataFreshness
| |
resource.destinationConfig.bigqueryDestinationConfig.singleTargetDataset.datasetId
| |
resource.destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.datasetIdPrefix
| |
resource.destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.kmsKeyName
| |
resource.destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.location
| |
resource.destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.projectId
|