IAM-Berechtigungshierarchie in Apigee Spaces

Diese Seite gilt für Apigee und Apigee Hybrid.

Apigee Edge-Dokumentation aufrufen

Auf dieser Seite wird beschrieben, wie Berechtigungshierarchien des Identity and Access Management (IAM) auf Apigee API-Ressourcen (API-Proxys, freigegebene Abläufe und API-Produkte) und ihre untergeordneten Elemente angewendet werden, wenn Apigee Spaces verwendet wird.

IAM-Interaktion mit Apigee Spaces

Im Allgemeinen werden IAM-Richtlinien, die den Zugriff auf Ressourcen steuern, über die Google Cloud Ressourcenhierarchie vererbt. Die spezifischen IAM-Richtlinien, die für eine bestimmte Ressource gelten, umfassen Folgendes:

  • Alle Richtlinien, die direkt auf die Ressource angewendet werden
  • Alle Richtlinien, die die Ressource von ihren Vorfahren übernimmt

Ressourcen- und Berechtigungshierarchie in Apigee

In Apigee steht an oberster Stelle der Ressourcenhierarchie die Organisationsressource. Zu den untergeordneten Ressourcen einer Organisation gehören API-Proxys, freigegebene Abläufe und API-Produkte. Wenn Sie Apigee ohne Spaces verwenden, werden Berechtigungen auf das Google Cloud Projekt angewendet, das direkt mit der Apigee-Organisationsressource verknüpft ist. Die IAM-Richtlinien, die den Zugriff auf einen bestimmten API-Proxy, einen freigegebenen Ablauf oder ein API-Produkt regeln, umfassen daher alle von der Organisation übernommenen Richtlinien sowie alle Richtlinien, die direkt auf die jeweilige Ressource angewendet werden.

Ressourcen- und Berechtigungshierarchie mit Gruppenbereichen

Wenn Sie Apigee mit Gruppenbereichen verwenden, wird die Gruppenbereichsressource der Hierarchie hinzugefügt. Angenommen, eine Apigee-Organisation hat drei API-Proxys: proxy-a, proxy-b und proxy-c. In diesem Beispiel sind proxy-b und proxy-c jeweils mit space-red und space-blue verknüpft. Wenn Sie eine API-Ressource mit einem Gruppenbereich verknüpfen, wird das Attribut space für die Ressource festgelegt.

Wenn Sie einen API-Aufruf ausführen, um die Details von proxy-c abzurufen, spiegelt Ihr API-Endpunkt die tatsächliche Ressourcenhierarchie wider. Dabei ist der API-Proxy ein untergeordnetes Element der Organisation mit einem Attribut für Gruppenbereiche, wie im folgenden Beispiel gezeigt:

curl -X GET -H "Authorization: Bearer $TOKEN" "https://apigee.googleapis.com/v1/organizations/org1/apis/proxy-c"
{
  "metaData": {
    "createdAt": "1725665197737",
    "lastModifiedAt": "1725665462105",
    "subType": "Proxy"
  },
  "name": "proxy-c",
  "revision": [
    "1"
  ],
  "apiProxyType": "PROGRAMMABLE",
  "space": "space-blue"
}

Der Pfad zu einer API-Ressource, die mit einem Space verknüpft ist, bleibt zwar gleich, aber die IAM-Berechtigungshierarchie ändert sich. In unserem Beispielszenario verhalten sich die IAM-Berechtigungsprüfungen so, als wäre die API-Ressource ein untergeordnetes Element des Spaces. Daher umfassen die IAM-Richtlinien, die für die API-Ressource gelten, neben allen Richtlinien, die direkt auf den Space angewendet werden, auch die vom Space übernommenen Richtlinien, wie in der folgenden Abbildung dargestellt:

IAM-Hierarchie für Gruppenbereiche
Abbildung 1: Die effektive IAM-Berechtigungshierarchie für API-Ressourcen bei Verwendung von Gruppenbereichen

IAM-Richtlinienprüfungen für Space-Ressourcen

Wie bereits in einem vorherigen Abschnitt erwähnt, werden API-Proxys, freigegebene Abläufe und API-Produkte, die mit einem Space verknüpft sind, bei IAM-Richtlinienprüfungen als untergeordnete Ressourcen des Space behandelt. Diese effektive Ressourcenhierarchie gilt für alle untergeordneten Elemente von API-Proxys, freigegebenen Abläufen und API-Produkten.

API-Produktattribute sind beispielsweise untergeordnete Ressourcen eines API-Produkts. Wenn Sie alle Attribute des API-Produkts product-a in der Apigee-Organisation org1 auflisten möchten, die mit dem Apigee-Space space-blue verknüpft ist, lautet der tatsächliche Ressourcenpfad GET organizations/org1/apiproduct/product-a/attributes. Der Pfad, der auf IAM-Berechtigungen geprüft wird, ist jedoch organizations/org1/spaces/space-blue/apiproduct/product-a/attributes.

IAM-Richtlinienprüfungen für Bereitstellungen

Die Ressource Umgebung ist nicht mit Gruppenbereichen verknüpft. Einige vorhandene APIs wurden jedoch aktualisiert, um einen detaillierten Zugriff auf Bereitstellungen und Debug-Sitzungen für API-Proxys und freigegebene Abläufe zu ermöglichen.

Im Folgenden werden die Änderungen an den IAM-Berechtigungsprüfungen für die folgenden Bereitstellungsvorgänge auf Ressourcen in einem Space beschrieben:

Methode IAM-Berechtigungsüberprüfung für Gruppenbereiche
organizations.deployments.list Keine Änderungen
organizations.apis.deployments.list apigee.deployments.list auf organizations/$ORG/spaces/$SPACE/apis/$API
organizations.apis.revisions.deployments.list apigee.deployments.list auf organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV
organizations.environments.deployments.list Keine Änderungen
organizations.environments.deployments.get Keine Änderungen
organizations.environments.apis.deployments.list apigee.deployments.list auf organizations/$ORG/environments/$ENV
ODER

organizations/$ORG/spaces/$SPACE/apis/$API

organizations.environments.apis.revisions.deployments.get apigee.deployments.get am organizations/$ORG/environments/$ENV

OR

apigee.deployments.get am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.deployments.deploy apigee.deployments.create am organizations/$ORG/environments/$ENV

AND

apigee.proxyrevisions.deploy am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.deployments.generateDeployChangeReport apigee.deployments.create am organizations/$ORG/environments/$ENV

AND

apigee.proxyrevisions.deploy am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.deployments.generateUndeployChangeReport apigee.deployments.delete am organizations/$ORG/environments/$ENV

AND

apigee.proxyrevisions.undeploy am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.deployments.undeploy apigee.deployments.delete am organizations/$ORG/environments/$ENV

AND

apigee.proxyrevisions.undeploy am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.sharedflows.deployments.list apigee.deployments.list auf organizations/$ORG/environments/$ENV
ODER
apigee.deployments.list auf
organizations/$ORG/spaces/$SPACE/sharedflows/$SF
organizations.environments.sharedflows.revisions.deployments.deploy apigee.deployments.create am organizations/$ORG/environments/$ENV

AND

apigee.sharedflowrevisions.deploy am organizations/$ORG/spaces/$SPACE/sharedflow/$SF/revisions/$REV

organizations.environments.sharedflows.revisions.deployments.get apigee.deployments.get am organizations/$ORG/environments/$ENV

ODER

apigee.deployments.get auf

organizations/$ORG/spaces/$SPACE/sharedflows/$SF/revisions/$REV

organizations.environments.sharedflows.revisions.deployments.undeploy apigee.deployments.delete am organizations/$ORG/environments/$ENV

AND

apigee.sharedflowrevisions.undeploy am organizations/$ORG/spaces/$SPACE/sharedflow/$SF/revisions/$REV

organizations.sharedflows.deployments.list apigee.deployments.list auf
organizations/$ORG/spaces/$SPACE/sharedflows/$SF
organizations.sharedflows.revisions.deployments.list apigee.deployments.list auf
organizations/$ORG/spaces/$SPACE/sharedflows/$SF/revisions/$REV

Berechtigungsprüfungen für Debugsitzungen

Wenn ein API-Proxy mit einem Space verknüpft ist, haben sich die IAM-Berechtigungsprüfungen für die Debug-Sitzungen des Proxys geändert, wie in der folgenden Tabelle beschrieben:

Methode IAM-Berechtigungsüberprüfung für Gruppenbereiche
organizations.environments.apis.revisions.debugsessions.create apigee.tracesessions.create am organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

AND

organizations/$ORG/environments/$ENV

organizations.environments.apis.revisions.debugsessions.get apigee.tracesessions.get am organizations/$ORG/environments/$ENV
UND organizations/$ORG/spaces/$SPACE/apis/$API
organizations.environments.apis.revisions.debugsessions.deleteData apigee.tracesessions.delete am organizations/$ORG/environments/$ENV
UND

apigee.tracesessions.delete auf

organizations/$ORG/spaces/$SPACE/apis/$API

organizations.environments.apis.revisions.debugsessions.list apigee.tracesessions.list auf organizations/$ORG/environments/$ENV

OR

apigee.tracesessions.list auf organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.debugsessions.data.get apigee.tracesessions.get auf organizations/$ORG/environments/$ENV

AND

apigee.tracesessions.get auf organizations/$ORG/spaces/$SPACE/apis/$API/revisions/$REV

organizations.environments.apis.revisions.debugsessions.data.list apigee.tracesessions.get auf organizations/$ORG/environments/$ENV

UND

apigee.tracesessions.get auf organizations/$ORG/spaces/$SPACE/apis/$API