Glyue User Docs
  • What is Glyue?
  • Tutorials
    • Start Here
    • Building a Single-Step Integration
      • 1. Creating the Integration
      • 2. Calling the External System
      • 3. Running the Integration
      • 4. Crafting the Output
    • Building a Multi-System Integration
      • 1. Connecting to the Core
      • 2. Field Mapping
      • 3. Running the Integration
    • Building an Event-Driven Integration
      • 1. Setting up the Mock CRM
      • 2. Receiving Inbound Requests
      • 3. Triggering the Integration from the CRM
    • Building an Email Integration
      • 1. Create and Configure the Integration
      • 2. Input Validation
      • 3. Get Story IDs from Hacker News
      • 4. Get Story Content
      • 5. Sending the Email
      • 6. Wrapping Up
      • 7. Extra credit
        • extra_credit.json
    • Building a RESTful CRUD Web Service
      • 1. Integration Setup
      • 2. Vault Setup
      • 3. Create Web Service Endpoints
      • 4. Execute Web Service Endpoints with Vault Methods
      • 5. Vault Code Examples and Explanation
    • Building a Retrieval API against FIS CodeConnect
      • 1. Integration Setup
      • 2. Service Request Setup
      • 3. Field Mapping Setup
      • 4. Integration and Service Request Hook Setup
      • 5. Testing the Integration
      • 6. Common Errors
    • What is Pre-Mapping?
      • Before you start
      • Bookmarks
      • Source and Targets
      • Field Mapping Status
      • Field Mapping Comments
      • Summary
  • How-To Guides
    • How to Run an Integration from Glyue
    • How to Invite New Users
    • How to Create a Value Mapping Set
    • How to Build and Deploy a Custom Frontend
    • How to Migrate an Integration
    • How to Set Up Single Sign On (SSO)
      • Glyue Setup
      • JumpCloud Setup
      • Azure Setup
      • Okta Setup
      • Glyue SAML Config Reference
    • How to Install the Glyue App for Zoom Contact Center
    • How to use the Vault
  • Reference
    • Integration Builder Page
    • Integration Anatomy
    • Integration Components
      • Integration
      • Service Request
      • Field Mapping
      • Value Mapping Set
      • Value Mapping
      • Validation Rule
      • Mask
      • Integration Config
      • Integration Engine Versions
    • Integration Lifecycle
    • Special Functions
      • add_run_label
      • callint
      • debug
      • end
      • get_namespace
      • humanize
      • import_helper
      • keep
      • list_files
      • map_value
      • open_glyuefile
      • open_vault
      • Data Manipulation Utilities
      • calladapter
    • Special Variables
      • __adapter_config__
      • input
      • parentint
      • retvalue
      • run_history_id
      • Iterables
        • fitem/fidx
        • sritem/sridx
        • vritem/vridx/vrmsg
    • Adapters
      • Generic HTTP Adapter
      • Email SMTP Adapter
    • Web Service Endpoints
    • Vault Reference
  • Glyue Platform Reference
    • Banking Core Connectivity Guide
    • Authentication
    • Permissions
      • Service Accounts
      • Organizations
    • Frontends
    • Idempotency Layer
    • Integration Scheduler
    • Governance Reports
    • Arbitrary Integration Request Content Support
    • Admin Components
    • Logging
  • ETL
    • Glyue ETL Overview
    • Data Connectors
    • Workflows
    • Run History
    • Scheduler
Powered by GitBook
On this page
  • Creating a Vault
  • Creating a Vault Item
  • Connecting your integration to the Vault
  • Read the vault within your integration

Was this helpful?

  1. How-To Guides

How to use the Vault

The Glyue vault feature provides a way for configuration, secrets, and state to be read and written by integrations.

More specifically, it is an API for storing and retrieving JSON in the database, as well as a page in the Glyue application to manage the stored content.

Some useful vault vocabulary:

  • A "Vault Item" is a JSON object with a name, it can be read or written by integrations, as well as on the vault page.

  • A "Vault Secret" is like a Vault Item, except that it cannot be read on the vault page, only written.

  • A "Vault" is a named collection of Vault Items and Secrets

This guide will explain how to:

  1. Create a vault

  2. Create a vault item

  3. Configure your integration to have access to the vault

  4. Read the vault item in an integration hook

Prerequisites:

  • This guide expects you are familiar with the build page and editing integrations

  • You must be a superuser or have the "can view vault" permission

Creating a Vault

First, you must create a "Vault". This allows for your items and secrets to be logically organized.

3) Name your vault "my-vault" in the modal , then press "Create Vault"

Creating a Vault Item

Next, we'll create an item in the vault. This is the item your integration will read at runtime.

1) Select "my-vault" in the leftmost column

3) In the modal, provide the name "my-item" for your vault item, and in the text editor, provide some valid JSON.

4) Press "+ Create Vault Item"

You vault item is now saved, and can be seen on the vault page

Connecting your integration to the Vault

This step assumes you have an existing integration called "my-integration"

2) On the page that appears, scroll to and click on "+ Add" next to "Vault Permissions"

3) Fill out the form to give "my-integration" permission to read from "my-vault"

4) Press save

5) Return to the Glyue Application by pressing "View Site" on the top-right corner of your screen

Read the vault within your integration

First - some important concepts about the vault:

A given vault can only be opened by one running integration at a time. If another integration tries to open a vault that is already open, it will halt until the other running integration closes it.

For this reason, it is important to always close a vault when you are done using it. We make this easy by providing a vault context manager (The python 'with' statement)

Here is the code we will be putting into our integration before hook:

with open_vault('my-vault') as vault:
    my_data = vault.get("my-item")
# The with statement automatically closes the vault at this point
debug(my_data, label="Here's what was in the vault")

If you do the above, and run your integration, you should see this in your run history

If you want your vault contents to be accessible throughout the rest of your integration (meaning, not just within the before_hook), you can keep my_data:

with open_vault('my-vault') as vault:
    my_data = vault.get("my-item")
debug(my_data, label="Here's what was in the vault")
keep(my_data = my_data) # my_data can now be accessed in any other hook or expression
PreviousHow to Install the Glyue App for Zoom Contact CenterNextIntegration Builder Page

Last updated 1 month ago

Was this helpful?

1) Navigate to the vault page by clicking the vault icon on the sidebar:

2) Press the "+ Create Vault" button

2) Press "+ Create Vault Item"

1) Navigate to the admin page by pressing the profile icon on the top-right of Glyue and select "Admin"