5 min readUpdated Mar 2, 2026

Show Credentials Page

Purpose

The "Show Credentials Page" component is designed to fetch, decrypt, and display credential data securely. It provides a user-friendly interface that allows users to view important information about a specific credential, including its ID, the version of the key used for encryption, creation and update timestamps, and the decrypted content of the credential.

How It Works

  1. Credential ID Retrieval: The component currently uses a hardcoded credential ID. In a production setting, this would typically be derived from user session data or URL parameters to ensure the correct credential is being accessed.

  2. Data Fetching: The component queries the database for a credential record matching the specified ID. The data retrieved includes:

    • Encrypted data
    • Initialization vector (IV)
    • Authentication tag
    • Key version
    • Timestamps for creation and last update
  3. Error Handling: If there is no record found for the specified ID, an error message is displayed to inform the user.

  4. Decryption: If a record is found, it invokes the decrypt function to decrypt the credential data using the retrieved parameters.

  5. Display: The component then formats and displays the credential information, including the decrypted payload, in a readable format.

Settings

The following are the specific details regarding settings, data, and expected inputs:

Credential ID

Encrypted Data

Initialization Vector (IV)

Authentication Tag

Key Version

Created At

Updated At

Data Expectations

The component expects the presence of a credential record in the database. Specifically, it needs:

Use Cases & Examples

Use Case 1: Access Control for API Keys

An organization managing numerous API integrations can use the Show Credentials Page to securely display API keys to authorized personnel only. This ensures that sensitive key data is only visible to users with the appropriate permissions.

Use Case 2: Auditing and Compliance

Compliance officers may need to periodically review the creation and updates of sensitive credentials. The Show Credentials Page provides them with quick access to critical timestamps, improving the auditing process.

Use Case 3: Security Incident Response

In the event of a security breach, security teams can utilize this page to quickly identify when a credential was created and last updated, helping them assess whether the credential was compromised.

Example Configuration

For instance, if a user needed to configure the component to fetch and display an API token stored with ID 123, they would replace the current hard-coded credential ID with:

javascript
const credentialId = 123; // Dynamic retrieval or parameterization is recommended.

Moreover, the credential record in the database could look like the following:

json
{
    "id": 123,
    "encryptedData": "b84e9...3c9f",
    "iv": "c11b...0e74",
    "authTag": "d7de...36dc",
    "keyVersion": "v2",
    "created": "2023-03-15T12:34:56Z",
    "updated": "2023-04-15T14:22:05Z"
}

This setup allows users to access real API credential information plotted clearly on the Show Credentials Page, facilitating secure information management in various organizational contexts.