DelineaDSV

Manage credentials for applications, databases, CI/CD tools, and services without causing friction in the development process.

Authentication & Identity Management · Delinea DevOps Secrets Vault

Details

IDDelineaDSV
ProviderDelinea
CategoryAuthentication & Identity Management
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Supported ModulesAgentix XSIAM

README

Manage credentials for applications, databases, CI/CD tools, and services without causing friction in the development process.
This integration was integrated and tested with version 1.37.0 of DelineaDSV

Configure DelineaDSV in Cortex

Parameter Required
Server URL (e.g. https://example.com) True
Trust any certificate (not secure) False
Use system proxy settings False
Client ID True
Client Secret True

Commands

You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

dsv-secret-get


Getting a secret fom DSV

Base Command

dsv-secret-get

Input

Argument Name Description Required
name Secret name for DSV. Required

Context Output

Path Type Description
secret String Received JSON object secret

Command Example

!dsv-secret-get name="accounts/xsoar"

Context Example

{
    "DSV": {
        "Secret": {
            "attributes": {},
            "created": "2022-05-17T10:55:41Z",
            "createdBy": "users:thy-one:testuser@accessecm.com",
            "data": {
                "password": "XSOARPassword",
                "username": "xsoar"
            },
            "description": "",
            "id": "e88f725b-ff1c-4902-961e-fcdf3c7f712f",
            "lastModified": "2022-05-17T10:55:41Z",
            "lastModifiedBy": "users:thy-one:testuser@accessecm.com",
            "path": "accounts:xsoar",
            "version": "1"
        }
    }
}

Configuration parameters

  • url — Server URL (e.g. https://example.com) (required)
  • client_id — Username (required)
  • client_secret — Password (required)
  • insecure — Trust any certificate (not secure)
  • proxy — Use system proxy settings

Commands (1)

  • dsv-secret-get

    Getting a secret fom DSV.

import pytest
from DelineaDSV import Client, dsv_secret_get_command
from test_data.context import SECRET_GET_ARGS_CONTEXT
from test_data.http_responses import SECRET_GET_ARGS_RAW_RESPONSE
from unittest.mock import patch

SECRET_GET_ARGS = {"name": "accounts/xsoar"}


@pytest.mark.parametrize(
    "command, args, http_response, context",
    [(dsv_secret_get_command, SECRET_GET_ARGS, SECRET_GET_ARGS_RAW_RESPONSE, SECRET_GET_ARGS_CONTEXT)],
)
def test_delinea_commands(command, args, http_response, context, mocker):
    mocker.patch.object(Client, "_generate_token")
    client = Client(
        server_url="https://example.com",
        client_id="example",
        client_secret="test@123",
        provider="Local Login",
        proxy=False,
        verify=False,
    )

    mocker.patch.object(Client, "_http_request", return_value=http_response)

    outputs = command(client, **args)
    results = outputs.to_context()

    assert results.get("EntryContext") == context


SAMPLE_RESPONSE = {"accessToken": "sample_access_token"}


@pytest.fixture
def client_with_mocked_http_request():
    with patch("DelineaDSV.Client._http_request") as mock_http_request:
        mock_http_request.return_value = SAMPLE_RESPONSE
        yield Client(
            server_url="https://example.com",
            client_id="example",
            client_secret="test@123",
            provider="Local Login",
            proxy=False,
            verify=False,
        )


def test_generate_token(client_with_mocked_http_request):
    token = client_with_mocked_http_request._generate_token()
    assert token == "Bearer sample_access_token"