Standardmäßig werden die folgenden Daten auf der Hybridlaufzeitebene verschlüsselt:
KMS-Daten (Key Management System)
Daten der Schlüsselwertzuordnung (KVM)
Daten im Cache
Die Datenverschlüsselung erfordert keine spezielle Konfiguration Ihrerseits. Wenn Sie jedoch Ihre eigenen Verschlüsselungsschlüssel verwenden möchten (die Standardschlüssel ersetzen), können Sie dies tun, wie in diesem Thema erläutert.
Bereich des Verschlüsselungsschlüssels
Die Verschlüsselungsschlüssel für KMS, KVM und Cache haben einen Bereich. KMS-Schlüssel haben beispielsweise den Bereich Organisation. Dies bedeutet, dass der Schlüssel verwendet wird, um KMS-Daten für die gesamte Organisation zu verschlüsseln.
In der folgenden Tabelle sind die Bereiche für jeden Schlüsseltyp aufgeführt:
Verschlüsselungsschlüssel
Umfang
KMS
Nur Organisation
KVM
Organisation oder Umgebung
Wenn eine KVM-Richtlinie den Bereich apiproxy oder policy (API-Proxy-Überarbeitung) angibt, wird der Schlüssel auf Organisationsebene zum Verschlüsseln der Daten verwendet. Eine allgemeine Übersicht über die Verwendung von KPMs in Apigee Edge finden Sie unter Mit Schlüsselwertzuordnungen arbeiten.
Cache
Nur Umgebung
Standardverschlüsselungsschlüssel
Standardmäßig stellt Apigee Hybrid eine Reihe von Base64-codierten Schlüsseln bereit, die zum Verschlüsseln von KVM-, KMS- und Cache-Daten verwendet werden. Das Hybridinstallationsprogramm von Apigee speichert die Schlüssel in der Laufzeitebene als Kubernetes Secrets und verwendet sie, um Ihre Daten mit der AES-128-Standardverschlüsselung zu verschlüsseln.
Die Schlüssel liegen unter Ihrer Kontrolle. Die hybride Verwaltungsebene ist sich ihrer zu keinem Zeitpunkt bewusst.
Standardverschlüsselungsschlüssel ändern
Obwohl nicht erforderlich, können Sie jeden der Standardverschlüsselungsschlüssel ändern, wenn Sie dies wünschen.
Gehen Sie folgendermaßen vor, um einen oder mehrere Standardschlüssel zu ersetzen:
Kopieren Sie die folgenden Stanzas in die Überschreibungsdatei.
Mit dieser Konfiguration können Sie die KMS- und KVM-Verschlüsselungsschlüssel für die Organisationsebene und die KVM- und Cache-Verschlüsselungsschlüssel für die Umgebungsebene ändern:
Generieren Sie einen neuen Schlüssel für jeden Schlüssel, den Sie ersetzen möchten. Jeder Schlüssel muss ein Base64-codierter String sein, der genau 16, 24 oder 32 Byte lang ist.
Siehe auch Codierten Schlüssel erstellen.
Ersetzen Sie die Standardschlüssel durch neue. In diesem Beispiel werden alle Standardschlüssel durch Schlüssel ersetzt:
Wenn Sie die Verschlüsselungsschlüssel aus Ihrer Überschreibungendatei bei der Erstinstallation von Apigee Hybrid entfernen, würden Sie die Verschlüsselung effektiv deaktivieren und die Werte werden unverschlüsselt gespeichert.
Wenn Sie die Verschlüsselung zu einem späteren Zeitpunkt durch die Bereitstellung von Schlüsseln aktivieren, bleiben die vorhandenen Daten unverschlüsselt. Alle zukünftig hinzugefügten Daten werden jedoch verschlüsselt. Das System funktioniert weiterhin mit den unverschlüsselten Daten und den neuen verschlüsselten Daten.
Beachten Sie außerdem, dass Sie die Verschlüsselungsschlüssel später nicht mehr ändern können, sobald die Laufzeitdaten verschlüsselt sind.
So erstellen Sie einen codierten Schlüssel
Ein korrekt formatierter Base64-codierter Schlüssel ist für KVM, KMS und Cache-Verschlüsselung erforderlich.
Der für diese Zwecke verwendete Schlüssel muss Base-64-codiert aus einem String mit 16, 24 oder 32 Byte sein, wie in den folgenden Schritten erläutert:
Die folgenden Beispielbefehle generieren geeignete, zufällig generierte, 32 Zeichen lange, Base64-codierte Strings, die keine nicht druckbaren Zeichen enthalten:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-28 (UTC)."],[[["\u003cp\u003eApigee hybrid encrypts KMS, KVM, and cache data by default using AES-128 encryption, with keys stored as Kubernetes Secrets.\u003c/p\u003e\n"],["\u003cp\u003eEncryption keys have varying scopes: KMS keys are organization-wide, KVM keys can be organization or environment-specific, and cache keys are environment-specific.\u003c/p\u003e\n"],["\u003cp\u003eWhile default encryption keys are provided, custom keys can be implemented by modifying the overrides file during initial Apigee hybrid installation, including generating new Base64-encoded keys of 16, 24, or 32 bytes in length.\u003c/p\u003e\n"],["\u003cp\u003eChanging encryption keys after the runtime is established will render previously encrypted data unusable; only newly added data will be encrypted with the updated keys.\u003c/p\u003e\n"],["\u003cp\u003eDisabling encryption during the initial setup will cause data to be stored unencrypted, and enabling it later will only encrypt future data, while existing unencrypted data will remain as such, however the system will continue working correctly.\u003c/p\u003e\n"]]],[],null,["# Data encryption\n\n| You are currently viewing version 1.4 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nBy default, the following data is stored *encrypted* in the hybrid\nruntime plane:\n\n- Key management system (KMS) data\n- Key-value map (KVM) data\n- Cache data\n\n\nData encryption does not require any special configuration on your part. However, if\nfor some reason you want to use your own encryption keys (replacing the default ones) you can\ndo so, as explained in this topic.\n\nEncryption key scope\n--------------------\n\n\nEncryption keys for KMS, KVM, and cache have scope. For example, KMS keys have *organization*\nscope. This means that the key is used to encrypt KMS data for the entire organization.\nThe following table lists the scope for\neach type of key:\n\nAbout the default encryption keys\n---------------------------------\n\n\nBy default, Apigee hybrid provides a set of Base64-encoded keys that are used to\nencrypt KVM, KMS, and cache data. The Apigee hybrid installer stores the keys in the\nruntime plane as\n[Kubernetes\nSecrets](https://kubernetes.io/docs/concepts/configuration/secret/), and uses them to encrypt your data with AES-128 standard encryption.\nThe keys are under your control;\nthe hybrid management plane is never aware of them at any time.\n| The default keys will work for most use cases. If you want to change the default encryption keys, do so when you initially install Apigee hybrid into a new cluster. If you change the encryption keys after the runtime is created in your cluster, previously encrypted data can no longer work (it cannot be decrypted); only new data added after the change will be encrypted and function as expected.\n\nChanging the default encryption keys\n------------------------------------\n\n\nAlthough not required, you can change any of the default encryption keys if you wish.\nTo replace one or more default keys, follow these steps:\n| If you change the encryption keys after the runtime is created in your cluster, previously encrypted data can no longer work (it cannot be decrypted); only new data added after the change will be encrypted and function as expected.\n\n1. Copy the following stanzas into your overrides file. This configuration lets you change the KMS and KVM encryption keys for the organization level and the KVM and cache encryption keys for the environment level: \n\n ```\n defaults:\n org:\n kmsEncryptionKey: base64-encoded-key\n kvmEncryptionKey: base64-encoded-key\n env:\n kvmEncryptionKey: base64-encoded-key\n cacheEncryptionKey: base64-encoded-key\n ```\n2. Generate a new key for each key you wish to replace. Each key must be a Base64-encoded string that is exactly **16, 24, or 32 bytes long** . See also [How to create an encoded\n key](#how-to-create-an-encoded-key).\n3. Replace the default keys with new ones. In this example, all of the default keys are replaced with keys: \n\n ```\n defaults:\n org:\n kmsEncryptionKey: \"JVpTb1FwI0otUHo2RUdRN3pnVyQqVGlMSEFAJXYmb1c=\"\n kvmEncryptionKey: \"T3VkRGM1U3cpOFgtNk9fMnNZU2NaSVA3I1BtZWxkaUU=\"\n env:\n kvmEncryptionKey: \"Q3h6M3R6OWdBeipxTURfKjQwQVdtTng2dU5mODFHcyE=\"\n cacheEncryptionKey: \"b2NTVXdKKjBzN0NORF9XSm9tWFlYKGJ6NUhpNystJVI=\"\n ```\n4. Apply the overrides file to your cluster as follows:\n - If you change KVM or Cache keys, update only the environment: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides.yaml --env env_name\n ```\n - If you change KMS keys, update both the org and environment: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides.yaml --env env_name --org org_name\n ```\n\nA note about backward compatibility\n-----------------------------------\n\n\nIf you were to remove the encryption keys in your overrides file the first\ntime you install Apigee hybrid, you would\neffectively disable encryption and values would be stored unencrypted.\nIf at a later\ntime you enable encryption by providing keys,\nexiting data remains unencrypted; however, any future data that is added will\nbe encrypted. The system\nwill continue working normally with the unencrypted data and the new encrypted\ndata.\n\n\nAlso, note that\nyou cannot later change the encryption keys\nonce the runtime data is encrypted.\n\nHow to create an encoded key\n----------------------------\n\n| NOTE: You must generate your key from ASCII characters. Apigee hybrid does not support using non-printable characters, such as characters generated using the openssl random command.\n\n\nA properly formatted Base-64-encoded key is required for KVM, KMS, and cache encryption.\nThe key used for any of these purposes must be Base-64 encoded from a string that is 16, 24, or\n32 bytes long, as explained in the following steps:\n| The key string length requirement exists because the [Advanced\n| Encryption Standard](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) (AES) cipher works on a block size of 128 bits, but can take three different key lengths: 128, 192, and 256 bits (16, 24, or 32 bytes).\n\n\nThe following example commands generate suitable, randomly generated, 32 character,\nBase64-encoded strings that do not include non-printable characters: \n\n```\nLC_ALL=C tr -dc A-Za-z0-9_\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\\\-+= \u003c /dev/urandom | head -c 32 | openssl base64\nPSFvX0BPc1Z2NVklcXdxcF8xR0N4MV4temFveStITU4=\n```\n\n\nor \n\n```\nLC_ALL=C tr -dc \"[:print:]\" \u003c /dev/urandom | head -c 32 | openssl base64\n```"]]