Bobcares

How to Manage KVM in Apigee

by | Sep 15, 2024

Learn how to manage KVM in Apigee. Our KVM Support team is here to help you with your questions and concerns.

How to Manage KVM in Apigee

In Apigee, Key Value Maps (KVMs) are used to store configuration data such as credentials, settings, and other critical information in encrypted or unencrypted form.

KVM entries for API proxy, organization, and environment scopes are protected using a Cloud KMS key when an Apigee organization is provisioned.

How to Manage KVM in Apigee

Today, we will take a look at how to manage KVMs, including creating, retrieving, and deleting them, as well as how to set up key value maps for Apigee Edge and Apigee X.

An Overview:

Retrieving Encrypted and Unencrypted KVMs

KVMs can be retrieved using the KeyValueMapOperations policy in Apigee. For both encrypted and unencrypted values, use the `<Ge>>` element.

When retrieving encrypted KVMs, prefix the variable name with `private.` to prevent the value from being visible during debugging and trace sessions. This method ensures the security of sensitive data.

  • Policy Configuration:

    Use the `<Get>` element in the KeyValueMapOperations policy to fetch values.

  • Private Prefix:

    For encrypted values, use the `private.` prefix to hide them during debugging.

Using the Management API for KVMs

For administrative purposes, such as backing up KVMs or managing key/value pairs, the Management API lets us retrieve JSON definitions of KVMs. However, note that encrypted values will appear as masked in the API response.

  • Backup KVMs:

    Use the Management API to export and store KVM definitions.

  • Encrypted Values:

    Be aware that encrypted KVM values are not visible in API responses.

Creating a New KVM in Apigee

To create a new KVM, follow these steps:

  1. Open Apigee in Google Cloud Console at this link.
  2. Then, go to Management > Environments in the left panel.
  3. Select the desired environment.
  4. Next, go to the Key Value Maps tab and click + Create Key Value Map.
  5. Then, enter a name for the KVM (letters, numbers, and hyphens only, max 255 characters).
  6. Finally, click Create. The new KVM will be listed on the page.

Deleting a KVM

To delete a KVM, follow these steps:

  1. Open the Apigee Console and go to Management > Environments.
  2. Select the appropriate environment and go to the Key Value Maps tab.
  3. Then, find the KVM we want to delete and click Delete in the Actions column.
  4. Confirm the deletion in the dialog box.

Uploading a Proxy Bundle to Apigee

To upload a proxy bundle in Apigee, follow these steps:

  1. Download the proxy bundle from Settings > API Gateways.
  2. Log in to Apigee and go to Develop > API Proxies.
  3. Then, click + Proxy and choose Upload Proxy Bundle.
  4. Drag and drop the bundle or upload it from the system.
  5. Finally, click Create to finish uploading the proxy.

Setting Up Key Value Maps for Apigee Edge

After uploading the proxy bundle to Apigee Edge, create KVMs to store credentials:

  1. Go to Admin > Environments > Key Value Maps.
  2. Click + Key Value Map and provide a name for the KVM.
  3. Then, select the Encrypted checkbox for sensitive data.
  4. Add key-value pairs such as `username` and `password`.

Setting Up Key Value Maps for Apigee X

For Apigee X, the process is similar, but we will need to handle service user credentials using a service account JSON file:

  1. Go to Admin > Environments > Key Value Maps.
  2. Then, create a new KVM and set the service account credentials as the `serviceAccountCredentialsFile` parameter.
  3. Use the KeyValueMapOperations policy to add or retrieve data from KVMs in Apigee X.

Deploying the Proxy and Mapping Authentication Credentials

Once the key value maps are set up, deploy the proxy and map the authentication credentials:

  1. Go to Develop > API Proxies and open the API proxy.
  2. Under Policies, select the appropriate policy.
  3. Then, map the credentials by entering the KVM name.
  4. Deploy the proxy to the desired environment and view the deployment URL in the Overview tab.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

Managing KVMs in Apigee is a crucial part of maintaining secure and organized configurations. Whether we are working with encrypted credentials, creating new KVMs, or deploying proxies, the process involves various tools and policies within the Apigee ecosystem. By following these steps, we can ensure proper management of key-value pairs across Apigee environments, whether on Edge or X.

In brief, our Support Experts demonstrated how to manage KVM in Apigee.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF