Vault Plugin: Artifactory Secrets Backend

Artifactory Secrets Engine (API)

This is the API documentation for the Vault Artifactory secrets engine.

This documentation assumes the Artifactory secrets engine is enabled at the /artifactory path in Vault. Since it is possible to enable secrets engines at any location, please update your API calls accordingly.

Configure Access

This endpoint configures the access information for Artifactory. This access information is used so that Vault can communicate with Artifactory and generate Artifactory access tokens.

Method Path
POST /artifactory/config

Paramaters

Sample Payload

{
    "address": "https://artifactory.example.com/artifactory",
    "api_key": "AKCp5ZkK11XnHiqJ1mFgivc1NePCXXE2Ujk9jGHhPp4K4XqMp25bpoSFeFwn6ExSBXy7n7uw9"
}

Create/Update Role

This endpoint creates/updates an Artifactory role definition. If the role does not exist, it will be created. If the role already exists, it will receive updated attributes.

Method Path
POST /artifactory/roles/:name

Paramaters

Sample Payload

{
    "username": "rt-user",
    "member_of_groups": [
        "Readers",
        "Group with spaces"
    ],
    "ttl": "1h"
}

Read Role

This endpoint queries for information about a Artifactory role with the given name. If no role exists with that name, a 404 is returned.

Method Path
GET /artifactory/roles/:name

Paramaters

List Roles

This endpoint lists all existing roles in the secrets engine.

Method Path
LIST /artifactory/roles

Delete Role

This endpoint lists all existing roles in the secrets engine.

Method Path
DELETE /artifactory/roles/:name

Paramaters

Create Access Token

This endpoint creates an Artifactory access token based on the given role definition.

Method Path
GET /artifactory/token/:name

Paramaters

Sample Response

{
    "data": {
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "scope": "api:* member-of-groups:readers",
        "token_type": "Bearer"
    }
}