External credential storage

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of External credential storage

    ServiceNow instances can securely store credentials used by Discovery, Orchestration, and Service Mapping in an external credential repository instead of within ServiceNow itself. This approach uses a unique credential identifier and type, which the MID Server uses to retrieve actual credentials from third-party vaults like CyberArk or BeyondTrust. This enhances security by avoiding direct storage of sensitive credential details in the ServiceNow instance.

    Show full answer Show less

    Key Features

    • External Credential Retrieval: The MID Server obtains credential identifiers from ServiceNow and uses a customer-supplied Java Credential Resolver to fetch actual credentials from the external vault.
    • Supported Vaults: Currently supports CyberArk and BeyondTrust for external credential storage integration.
    • Credential Resolver Process: The Credential Resolver interacts with vendor applications that can cache credentials locally, reducing network calls to the vault and improving performance.
    • Caching and Security: MID Server caches credentials only briefly in encrypted memory, ensuring security while allowing repeated requests during a discovery job.
    • Credential Affinity: Credential affinity rules still apply, ensuring credentials are used consistently per device or target.
    • Logging and Troubleshooting: MID Server logs external credential storage activity and errors with clear prefixes to aid troubleshooting.
    • Configuration and Control: The Enable External Credential Storage system property toggles this feature. Disabling it automatically deactivates external credentials; re-enabling requires manual reactivation of credentials.
    • Business Rule Automation: Adjusts credential record views and prompts MID Server to refresh its cache when external credential storage is enabled or disabled.
    • OAuth 2.0 Support: OAuth client credentials can be stored in CyberArk and retrieved by the MID Server for token management, keeping sensitive tokens off the instance.

    Practical Benefits for ServiceNow Customers

    • Improves security posture by eliminating direct storage of sensitive credentials in the ServiceNow instance.
    • Enables integration with enterprise-grade credential vaults, leveraging their advanced management and auditing capabilities.
    • Supports seamless credential retrieval during Discovery, Orchestration, and Service Mapping jobs without manual intervention.
    • Maintains credential affinity and caching efficiency to optimize discovery and orchestration performance.
    • Provides clear logging for easier diagnosis of credential retrieval issues.
    • Allows flexible enablement or disablement of external credential storage to suit organizational policies.

    Next Steps

    To implement external credential storage, request the plugin and configure your instance to connect with your chosen vault (e.g., CyberArk). Ensure the MID Server is equipped with the appropriate Credential Resolver JAR and vendor applications as required. Manage the Enable External Credential Storage property to control activation and credential record states during configuration changes.

    An instance can store credentials used by Discovery, Orchestration, and Service Mapping in an external credential repository rather than directly in a ServiceNow credentials record.

    The instance maintains a unique identifier for each credential, the credential type (such as SSH, SNMP, or Windows), and any credential affinities. The MID Server obtains the credential identifier from the instance, and then uses a customer-provided JAR file to resolve the identifier from the repository into a usable credential. Currently, the ServiceNow® platform supports the use of the CyberArk vault or BeyondTrust for external credential storage.

    External credential storage architecture

    Figure 1. External credential storage architecture
    ServiceNow external credential storage architecture

    Credential process flow

    The MID Server retrieves credentials from an external store using this process:
    1. MID Server downloads credential objects from the ServiceNow Credentials [discovery_credentials] table that contain the corresponding credential ID from the target vault.
    2. As each probe or pattern runs from Discovery or Orchestration jobs, the MID Server requests the credential by passing information such as credential ID, target IP address, and credential type to the Credential Resolver Java Jar file. The details about the correct credential object to retrieve from the vault are determined by the Credential Resolver.

      Many Credential Resolvers such CyberArk call an application supplied by the third-party vault vendor running on same machine as the MID Server. That application can often be configured to cache credentials and knows to update the cache when a credential changes in the vault, which is very important to avoid unnecessary network calls to the vault each time MID Server requests a credential. The Credential Resolver (using optional vendor application if present) makes a call to the vault to get the actual user name, password, etc.

      For Credential Resolvers supplied out-of-box (only CyberArk today), the MID Server only caches a credential for up to several seconds using encryption in MID Server process memory. This means the MID Server can make multiple requests to the Credential Resolver for the same credential even when discovering a single device. Contact third party vendors for information about caching implementations for other Credential Resolvers.

    3. MID Server executes the probe with the appropriate credential.
    Note:
    Credential affinity still applies. The mechanism remains the same, since the only real difference from the MID Server's perspective is that the real credential details (user name and password) come from the third party vault.

    External credential storage logging

    The MID Server posts log messages about external credential storage.

    If the repository encounters an error while attempting to resolve a credentials request, the MID Server posts log messages with this prefix: Problem with client's CredentialResolver:

    Components installed with External Credential Storage

    Business rule

    The External Credential Storage business rule performs the following tasks when an administrator makes any change to the Enable External Credential Storage property:

    • Changes the view for the Credentials record list and form to the External Storage view. This view enables users to see the Credential ID column in the list.
    • Instructs the MID Server to refresh its credentials cache in preparation for a change in the way credentials are obtained.
    Property

    A property called Enable External Credential Storage [com.snc.use_external_credentials] enables or disables the External Credential Storage plugin after it’s activated. The property is located in Discovery Definition > Properties and Orchestration > MID Server Properties, and is enabled when you activate the plugin.

    If you disable external credential storage with the system property, the system automatically sets all the external credentials to inactive in the instance. If you re-enable the feature with this property, the system doesn’t reset the external credential records to active. You must reactivate each credential record manually.