From bc86f5a4b104f9d3a5590ce619278a687c495445 Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Sat, 7 Mar 2026 15:31:19 -0800 Subject: [PATCH 01/10] feat(api): add Applications CRUD (Keyfactor Command v25+) Add ListApplications, GetApplication, GetApplicationByName, CreateApplication, UpdateApplication, and DeleteApplication methods. PUT uses the base /Applications endpoint (ID in body) as the API does not support PUT /Applications/{id}. Co-Authored-By: Claude Opus 4.6 --- v3/api/application.go | 198 +++ v3/api/application_models.go | 70 + v3/api/client.go | 7 + v3/schema/v25_v1.json | 2507 ++++++++++++++++++++++++++++++++++ 4 files changed, 2782 insertions(+) create mode 100644 v3/api/application.go create mode 100644 v3/api/application_models.go create mode 100644 v3/schema/v25_v1.json diff --git a/v3/api/application.go b/v3/api/application.go new file mode 100644 index 0000000..a8d667e --- /dev/null +++ b/v3/api/application.go @@ -0,0 +1,198 @@ +// Copyright 2024 Keyfactor +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "encoding/json" + "fmt" + "log" +) + +// ListApplications returns all applications from the /Applications endpoint. +func (c *Client) ListApplications() ([]ApplicationListItem, error) { + log.Println("[INFO] Listing applications.") + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + req := &request{ + Method: "GET", + Endpoint: "Applications", + Headers: headers, + } + + resp, err := c.sendRequest(req) + if err != nil { + return nil, err + } + + var result []ApplicationListItem + err = json.NewDecoder(resp.Body).Decode(&result) + if err != nil { + return nil, err + } + return result, nil +} + +// GetApplication returns the full details of an application by its integer ID. +func (c *Client) GetApplication(id int) (*ApplicationResponse, error) { + log.Printf("[INFO] Fetching application with ID %d.", id) + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + req := &request{ + Method: "GET", + Endpoint: fmt.Sprintf("Applications/%d", id), + Headers: headers, + } + + resp, err := c.sendRequest(req) + if err != nil { + return nil, err + } + + var result ApplicationResponse + err = json.NewDecoder(resp.Body).Decode(&result) + if err != nil { + return nil, err + } + return &result, nil +} + +// GetApplicationByName returns the application matching the given name by +// listing all applications and then fetching the matching one by ID. +// Returns an error if no application with that name exists. +func (c *Client) GetApplicationByName(name string) (*ApplicationResponse, error) { + log.Printf("[INFO] Fetching application with name %q.", name) + + apps, err := c.ListApplications() + if err != nil { + return nil, err + } + + for _, app := range apps { + if app.Name == name { + return c.GetApplication(app.Id) + } + } + return nil, fmt.Errorf("application %q not found", name) +} + +// CreateApplication creates a new application and returns the created resource. +func (c *Client) CreateApplication(createReq *ApplicationCreateRequest) (*ApplicationResponse, error) { + log.Println("[INFO] Creating application.") + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + {"Content-Type", "application/json"}, + }, + } + + req := &request{ + Method: "POST", + Endpoint: "Applications", + Headers: headers, + Payload: createReq, + } + + resp, err := c.sendRequest(req) + if err != nil { + return nil, err + } + + var result ApplicationResponse + err = json.NewDecoder(resp.Body).Decode(&result) + if err != nil { + return nil, err + } + return &result, nil +} + +// UpdateApplication performs a full replacement (PUT) of an existing application. +// The API uses PUT /Applications (base URL, ID in body), not PUT /Applications/{id}. +// The Id field in updateReq is set automatically from the id argument. +func (c *Client) UpdateApplication(id int, updateReq *ApplicationUpdateRequest) (*ApplicationResponse, error) { + log.Printf("[INFO] Updating application with ID %d.", id) + + updateReq.Id = id + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + {"Content-Type", "application/json"}, + }, + } + + req := &request{ + Method: "PUT", + Endpoint: "Applications", + Headers: headers, + Payload: updateReq, + } + + resp, err := c.sendRequest(req) + if err != nil { + return nil, err + } + + var result ApplicationResponse + err = json.NewDecoder(resp.Body).Decode(&result) + if err != nil { + return nil, err + } + return &result, nil +} + +// DeleteApplication deletes an application by its integer ID. +// The server returns 204 No Content on success. +func (c *Client) DeleteApplication(id int) error { + log.Printf("[INFO] Deleting application with ID %d.", id) + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + req := &request{ + Method: "DELETE", + Endpoint: fmt.Sprintf("Applications/%d", id), + Headers: headers, + } + + resp, err := c.sendRequest(req) + if err != nil { + return err + } + + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("failed to delete application: HTTP %d", resp.StatusCode) + } + + return nil +} diff --git a/v3/api/application_models.go b/v3/api/application_models.go new file mode 100644 index 0000000..24bb417 --- /dev/null +++ b/v3/api/application_models.go @@ -0,0 +1,70 @@ +// Copyright 2024 Keyfactor +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +// ApplicationScheduleInterval defines an interval-based inventory schedule. +type ApplicationScheduleInterval struct { + Minutes int `json:"Minutes"` +} + +// ApplicationScheduleDaily defines a daily time-based inventory schedule. +type ApplicationScheduleDaily struct { + Time string `json:"Time"` // ISO 8601 datetime string (e.g. "2023-11-25T23:30:00Z") +} + +// ApplicationSchedule holds the schedule configuration for an application. +// Set exactly one of Interval or Daily; omit both to disable the schedule. +type ApplicationSchedule struct { + Interval *ApplicationScheduleInterval `json:"Interval,omitempty"` + Daily *ApplicationScheduleDaily `json:"Daily,omitempty"` +} + +// ApplicationCertStore is a minimal certificate store reference within an application detail response. +type ApplicationCertStore struct { + Id string `json:"Id"` // Store GUID (UUID) +} + +// ApplicationListItem represents one entry returned by GET /Applications (list endpoint). +// The Schedule field is returned as a cron expression string by the list endpoint. +type ApplicationListItem struct { + Id int `json:"Id"` + Name string `json:"Name"` + Schedule string `json:"Schedule"` +} + +// ApplicationResponse is the full application detail returned by GET /Applications/{id}. +type ApplicationResponse struct { + Id int `json:"Id"` + Name string `json:"Name"` + OverwriteSchedules bool `json:"OverwriteSchedules"` + Schedule *ApplicationSchedule `json:"Schedule,omitempty"` + CertificateStores []ApplicationCertStore `json:"CertificateStores,omitempty"` +} + +// ApplicationCreateRequest is the request body for POST /Applications. +type ApplicationCreateRequest struct { + Name string `json:"Name"` + OverwriteSchedules bool `json:"OverwriteSchedules"` + Schedule *ApplicationSchedule `json:"Schedule,omitempty"` +} + +// ApplicationUpdateRequest is the request body for PUT /Applications/{id}. +// The Id field is set automatically by UpdateApplication. +type ApplicationUpdateRequest struct { + Id int `json:"Id"` + Name string `json:"Name"` + OverwriteSchedules bool `json:"OverwriteSchedules"` + Schedule *ApplicationSchedule `json:"Schedule,omitempty"` +} diff --git a/v3/api/client.go b/v3/api/client.go index 7c7c136..bcd0856 100644 --- a/v3/api/client.go +++ b/v3/api/client.go @@ -126,6 +126,13 @@ type AuthConfig interface { GetServerConfig() *auth_providers.Server } +// NewKeyfactorClientWithAuth creates a Client with a pre-built AuthConfig, bypassing +// the Authenticate() network call. Used in unit tests with VCR cassettes. +func NewKeyfactorClientWithAuth(auth AuthConfig, ctx *context.Context) *Client { + initLogger(ctx) + return &Client{AuthClient: auth} +} + // NewKeyfactorClient creates a new Keyfactor client instance. A configured Client is returned with methods used to // interact with Keyfactor. func NewKeyfactorClient(cfg *auth_providers.Server, ctx *context.Context) (*Client, error) { diff --git a/v3/schema/v25_v1.json b/v3/schema/v25_v1.json new file mode 100644 index 0000000..08356bd --- /dev/null +++ b/v3/schema/v25_v1.json @@ -0,0 +1,2507 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Keyfactor API Reference and Utility", + "description": "

This page provides a utility through which the Keyfactor API endpoints can be called and results returned. \r\n It is intended to be used primarily for validation, testing and workflow development. \r\n It also serves secondarily as documentation for the API.

\r\n

If you would like to view documentation containing details on the Keyfactor API and endpoints, \r\n please refer to the Web API section of the Keyfactor Command documentation.

", + "version": "1.0" + }, + "servers": [ + { + "url": "/KeyfactorAPI" + } + ], + "paths": { + "/PamProviders/Local/{providerId}/Entries": { + "get": { + "tags": [ + "PAMLocalEntries" + ], + "summary": "Returns local PAM entries for the given PAM provider according to the provided filter and output parameters", + "parameters": [ + { + "name": "providerId", + "in": "path", + "description": "Keyfactor identifier of the PAM provider", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + } + }, + { + "name": "QueryString", + "in": "query", + "description": "Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)", + "schema": { + "type": "string" + } + }, + { + "name": "PageReturned", + "in": "query", + "description": "The current page within the result set to be returned", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ReturnLimit", + "in": "query", + "description": "Maximum number of records to be returned in a single call", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SortField", + "in": "query", + "description": "Field by which the results should be sorted (view results via Management Portal for sortable columns)", + "schema": { + "type": "string" + } + }, + { + "name": "SortAscending", + "in": "query", + "description": "Field sort direction [0=ascending, 1=descending]", + "schema": { + "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "PAMLocalEntries" + ], + "summary": "Creates a new local PAM entry with the associated properties", + "parameters": [ + { + "name": "providerId", + "in": "path", + "description": "Keyfactor identifier of the PAM provider", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "Local PAM entry properties to be used", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "PAMLocalEntries" + ], + "summary": "Updates local PAM entry with the associated properties", + "parameters": [ + { + "name": "providerId", + "in": "path", + "description": "Keyfactor identifier of the PAM provider", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "Local PAM entry properties to be used", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "PAMLocalEntries" + ], + "summary": "Deletes a local PAM entry", + "parameters": [ + { + "name": "providerId", + "in": "path", + "description": "Keyfactor identifier of the PAM provider", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + } + }, + { + "name": "secretName", + "in": "query", + "description": "Name of the secret entry to be deleted", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/PamProviders": { + "get": { + "tags": [ + "PAMProvider" + ], + "summary": "Returns all PAM providers according to the provided filter and output parameters", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "QueryString", + "in": "query", + "description": "Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)", + "schema": { + "type": "string" + } + }, + { + "name": "PageReturned", + "in": "query", + "description": "The current page within the result set to be returned", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ReturnLimit", + "in": "query", + "description": "Maximum number of records to be returned in a single call", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SortField", + "in": "query", + "description": "Field by which the results should be sorted (view results via Management Portal for sortable columns)", + "schema": { + "type": "string" + } + }, + { + "name": "SortAscending", + "in": "query", + "description": "Field sort direction [0=ascending, 1=descending]", + "schema": { + "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "PAMProvider" + ], + "summary": "Creates a new PAM provider with the associated properties", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "PAM provider properties to be used", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + } + } + } + }, + "put": { + "tags": [ + "PAMProvider" + ], + "summary": "Updates an existing PAM provider according to the provided properties", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "PAM provider properties to be used", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + } + } + } + } + }, + "/PamProviders/{id}": { + "get": { + "tags": [ + "PAMProvider" + ], + "summary": "Returns a single PAM Provider that matches the associated id", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Keyfactor identifier of the PAM provider", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" + } + } + } + } + } + }, + "delete": { + "tags": [ + "PAMProvider" + ], + "summary": "Deletes a PAM Provider", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Keyfactor identifier of the PAM provider to be deleted", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/PamProviders/Types/{id}": { + "delete": { + "tags": [ + "PAMProvider" + ], + "summary": "Deletes a PAM provider Type, as long as the PAM type is not currently in use.", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| CyberArk | string |", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "PAM provider type Id to be used", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/PamProviders/Types": { + "get": { + "tags": [ + "PAMProvider" + ], + "summary": "Returns all PAM provider types in the Keyfactor instance", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "PAMProvider" + ], + "summary": "Creates a new PAM provider type with the associated properties", + "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "PAM provider type properties to be used", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" + } + } + } + } + } + } + }, + "/CertificateStoreTypes/{id}": { + "get": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Returns a single certificate store type that matches id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Keyfactor identifier of the certificate store type", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -1, + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Deletes a certificate store type according to the provided identifier", + "description": "This will ignore individual delete failures, and continue processing certificate stores.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Keyfactor identifier of the certificate store type to be deleted", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/CertificateStoreTypes/Name/{name}": { + "get": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Returns a single certificate store type that matches the provided short name", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Short name of the certificate store type to return", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + } + } + } + } + } + }, + "/CertificateStoreTypes": { + "get": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Returns all certificate store types according to the provided filter and output parameters", + "parameters": [ + { + "name": "QueryString", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "PageReturned", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ReturnLimit", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SortField", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "SortAscending", + "in": "query", + "schema": { + "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" + } + }, + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Creates a new certificate store type with the provided properties", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "Certificate store type properties for the new type", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Updates an existing certificate store type with the provided properties", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "Certificate store type properties to be updated", + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "CertificateStoreType" + ], + "summary": "Deletes certificate store types according to the provided identifiers", + "description": "This will ignore individual delete failures, and continue processing the array.", + "parameters": [ + { + "name": "x-keyfactor-api-version", + "in": "header", + "description": "Desired version of the api, if not provided defaults to v1", + "schema": { + "type": "string" + }, + "example": "1.0" + }, + { + "name": "x-keyfactor-requested-with", + "in": "header", + "description": "Type of the request [XMLHttpRequest, APIClient]", + "required": true, + "schema": { + "type": "string" + }, + "example": "APIClient" + } + ], + "requestBody": { + "description": "Array of Keyfactor identifiers of the certificate store types to be deleted", + "content": { + "application/json-patch+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + } + } + } + } + }, + "components": { + "schemas": { + "Keyfactor.Common.QueryableExtensions.SortOrder": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Enums.CertStoreTypesPasswordStyles": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Core.Enums.CertificateStoreTypePropertyType": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Enums.CertificateStoreTypeHasPrivateKeyValidationOptions": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Core.Enums.CertStoreEntryParameterType": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Core.Enums.CertificateFormat": { + "enum": [ + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Core.Enums.CertificateStoreTypePropertyType": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Core.Enums.CertStorePrivateKey": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Enums.SecretType": { + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Models.Provider": { + "required": [ + "Name", + "ProviderType" + ], + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "minLength": 1, + "type": "string" + }, + "Area": { + "type": "integer", + "format": "int32" + }, + "ProviderType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" + }, + "ProviderTypeParamValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.PamProviderTypeParamValue" + }, + "nullable": true + }, + "SecuredAreaId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Remote": { + "type": "boolean" + }, + "IsInUse": { + "type": "boolean", + "readOnly": true + }, + "IsLocalDB": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false + }, + "CSS.CMS.Data.Model.Models.ProviderType": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "format": "uuid" + }, + "Name": { + "type": "string", + "nullable": true + }, + "ProviderTypeParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderTypeParam" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "CSS.CMS.Data.Model.Models.ProviderTypeParam": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "DataType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" + }, + "InstanceLevel": { + "type": "boolean" + }, + "ProviderType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" + } + }, + "additionalProperties": false + }, + "CSS.CMS.Data.Model.Enums.PamParameterDataType": { + "enum": [ + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "CSS.CMS.Data.Model.Models.KeyfactorAPISecret": { + "type": "object", + "properties": { + "SecretValue": { + "type": "string", + "nullable": true + }, + "Parameters": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "Provider": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "CSS.CMS.Data.Model.Models.KeyfactorSecret": { + "type": "object", + "properties": { + "Value": { + "nullable": true + }, + "SecretTypeGuid": { + "type": "string", + "format": "uuid" + }, + "InstanceId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InstanceGuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "ProviderTypeParameterValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.PamProviderTypeParamValue" + }, + "nullable": true + }, + "ProviderId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "IsManaged": { + "type": "boolean", + "readOnly": true + }, + "SecretType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.SecretType" + }, + "RemoteProviderName": { + "type": "string", + "nullable": true + }, + "HasValue": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false + }, + "CSS.CMS.Data.Model.Models.PamProviderTypeParamValue": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Value": { + "type": "string", + "nullable": true + }, + "ParameterId": { + "type": "integer", + "format": "int32" + }, + "InstanceId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InstanceGuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "Provider": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.Provider" + }, + "ProviderTypeParam": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderTypeParam" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest": { + "required": [ + "SecretName", + "SecretValue" + ], + "type": "object", + "properties": { + "SecretName": { + "maxLength": 400, + "minLength": 1, + "type": "string" + }, + "Description": { + "maxLength": 2000, + "type": "string", + "nullable": true + }, + "SecretValue": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse": { + "type": "object", + "properties": { + "ProviderId": { + "type": "integer", + "format": "int32" + }, + "SecretName": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest": { + "required": [ + "SecretName" + ], + "type": "object", + "properties": { + "SecretName": { + "maxLength": 400, + "minLength": 1, + "type": "string" + }, + "Description": { + "maxLength": 2000, + "type": "string", + "nullable": true + }, + "SecretValue": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.PamProviderTypeParamValueResponse": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Value": { + "type": "string", + "nullable": true + }, + "InstanceId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InstanceGuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "ProviderTypeParam": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest": { + "required": [ + "Name", + "ProviderType" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string" + }, + "Remote": { + "type": "boolean" + }, + "Area": { + "type": "integer", + "format": "int32" + }, + "ProviderType": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType" + }, + "ProviderTypeParamValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue" + }, + "nullable": true + }, + "SecuredAreaId": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderTypeParam": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "InstanceLevel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Value": { + "type": "string", + "nullable": true + }, + "InstanceId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InstanceGuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "ProviderTypeParam": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderTypeParam" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "Area": { + "type": "integer", + "format": "int32" + }, + "ProviderType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" + }, + "ProviderTypeParamValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.PamProviderTypeParamValueResponse" + }, + "nullable": true + }, + "SecuredAreaId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Remote": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest": { + "required": [ + "Name" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string" + }, + "Parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterCreateRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterCreateRequest": { + "required": [ + "Name" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string" + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "DataType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" + }, + "InstanceLevel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "DataType": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" + }, + "InstanceLevel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "format": "uuid" + }, + "Name": { + "type": "string", + "nullable": true + }, + "Parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy": { + "required": [ + "Id", + "Name", + "ProviderType" + ], + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "Name": { + "minLength": 1, + "type": "string" + }, + "Remote": { + "type": "boolean" + }, + "Area": { + "type": "integer", + "format": "int32" + }, + "ProviderType": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType" + }, + "ProviderTypeParamValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue" + }, + "nullable": true + }, + "SecuredAreaId": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest": { + "required": [ + "Name", + "ShortName" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string" + }, + "ShortName": { + "maxLength": 64, + "minLength": 0, + "type": "string" + }, + "Capability": { + "maxLength": 220, + "minLength": 0, + "type": "string", + "nullable": true + }, + "LocalStore": { + "type": "boolean" + }, + "SupportedOperations": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" + }, + "Properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" + }, + "nullable": true + }, + "PasswordOptions": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" + }, + "StorePathType": { + "type": "string", + "nullable": true + }, + "StorePathValue": { + "type": "string", + "nullable": true + }, + "PrivateKeyAllowed": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" + }, + "CertificateFormat": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" + }, + "ServerRequired": { + "type": "boolean" + }, + "PowerShell": { + "type": "boolean" + }, + "BlueprintAllowed": { + "type": "boolean" + }, + "CustomAliasAllowed": { + "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" + }, + "ServerRegistration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InventoryEndpoint": { + "type": "string", + "nullable": true + }, + "InventoryJobTypeId": { + "type": "string", + "format": "uuid" + }, + "ManagementJobTypeId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "DiscoveryJobTypeId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "EnrollmentJobTypeId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "EntryParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "ShortName": { + "type": "string", + "nullable": true + }, + "Capability": { + "type": "string", + "nullable": true + }, + "StoreType": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ImportType": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "LocalStore": { + "type": "boolean" + }, + "SupportedOperations": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" + }, + "Properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" + }, + "nullable": true + }, + "EntryParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" + }, + "nullable": true + }, + "PasswordOptions": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" + }, + "StorePathType": { + "type": "string", + "nullable": true + }, + "StorePathValue": { + "type": "string", + "nullable": true + }, + "PrivateKeyAllowed": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" + }, + "CertificateFormat": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" + }, + "JobProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "readOnly": true + }, + "ServerRequired": { + "type": "boolean" + }, + "PowerShell": { + "type": "boolean" + }, + "BlueprintAllowed": { + "type": "boolean" + }, + "CustomAliasAllowed": { + "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" + }, + "ServerRegistration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "InventoryEndpoint": { + "type": "string", + "nullable": true + }, + "InventoryJobType": { + "type": "string", + "format": "uuid" + }, + "ManagementJobType": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "DiscoveryJobType": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "EnrollmentJobType": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest": { + "required": [ + "Name", + "ShortName", + "StoreType" + ], + "type": "object", + "properties": { + "StoreType": { + "type": "integer", + "format": "int32" + }, + "Name": { + "minLength": 1, + "type": "string" + }, + "ShortName": { + "maxLength": 64, + "minLength": 0, + "type": "string" + }, + "Capability": { + "maxLength": 220, + "minLength": 0, + "type": "string", + "nullable": true + }, + "LocalStore": { + "type": "boolean" + }, + "SupportedOperations": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" + }, + "Properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" + }, + "nullable": true + }, + "PasswordOptions": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" + }, + "StorePathType": { + "type": "string", + "nullable": true + }, + "StorePathValue": { + "type": "string", + "nullable": true + }, + "PrivateKeyAllowed": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" + }, + "CertificateFormat": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" + }, + "ServerRequired": { + "type": "boolean" + }, + "PowerShell": { + "type": "boolean" + }, + "BlueprintAllowed": { + "type": "boolean" + }, + "CustomAliasAllowed": { + "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" + }, + "EntryParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters": { + "type": "object", + "properties": { + "StoreTypeId": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "Type": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStoreEntryParameterType" + }, + "ValidationOptions": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParametersValidationOptions" + }, + "DependsOn": { + "type": "string", + "nullable": true + }, + "DefaultValue": { + "type": "string", + "nullable": true + }, + "Options": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParametersValidationOptions": { + "type": "object", + "properties": { + "HasPrivateKey": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeHasPrivateKeyValidationOptions" + }, + "OnAdd": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" + }, + "OnRemove": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" + }, + "OnODKG": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions": { + "type": "object", + "properties": { + "EntrySupported": { + "type": "boolean" + }, + "StoreRequired": { + "type": "boolean" + }, + "Style": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertStoreTypesPasswordStyles" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PropertiesValidationOptions": { + "type": "object", + "properties": { + "OnCreation": { + "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "StoreTypeId": { + "type": "integer", + "format": "int32" + }, + "Name": { + "type": "string", + "nullable": true + }, + "DisplayName": { + "type": "string", + "nullable": true + }, + "Type": { + "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateStoreTypePropertyType" + }, + "DependsOn": { + "type": "string", + "nullable": true + }, + "DefaultValue": { + "type": "string", + "nullable": true + }, + "Required": { + "type": "boolean", + "nullable": true + }, + "ValidationOptions": { + "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PropertiesValidationOptions" + } + }, + "additionalProperties": false + }, + "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations": { + "type": "object", + "properties": { + "Add": { + "type": "boolean" + }, + "Create": { + "type": "boolean" + }, + "Discovery": { + "type": "boolean" + }, + "Enrollment": { + "type": "boolean" + }, + "Remove": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "System.DayOfWeek": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer", + "format": "int32" + } + } + } +} \ No newline at end of file From 5faf37eabc47247e1bb01cae0bd68505cfb8d3de Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:29:34 -0700 Subject: [PATCH 02/10] fix(certificate): Add `findLeafCert` helper --- v3/api/certificate.go | 38 ++++++++++++++++++++++++++++++++++---- v3/api/pam_types_test.go | 6 +++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/v3/api/certificate.go b/v3/api/certificate.go index b2ac95e..976cd5b 100644 --- a/v3/api/certificate.go +++ b/v3/api/certificate.go @@ -299,14 +299,44 @@ func (c *Client) DownloadCertificate( return nil, nil, &jsonResp.Content, p7bErr } - var leaf *x509.Certificate + leaf := findLeafCert(certs) if len(certs) > 1 { - //leaf is last cert in chain - leaf = certs[0] // First cert in chain is the leaf return leaf, certs, &jsonResp.Content, nil } + return leaf, nil, &jsonResp.Content, nil +} + +// findLeafCert returns the end-entity (leaf) certificate from a set of +// certificates. It identifies the leaf as the cert whose Subject is not used +// as an Issuer by any other cert in the set — i.e. nothing is signed by it. +// This is order-independent and handles both root-first and leaf-first P7Bs. +// +// When the set contains only one cert, or when the algorithm cannot determine +// a unique leaf (e.g. all certs are self-signed), certs[0] is returned as a +// safe fallback. +func findLeafCert(certs []*x509.Certificate) *x509.Certificate { + if len(certs) == 0 { + return nil + } + if len(certs) == 1 { + return certs[0] + } + + // Build a set of all RawIssuer values (subjects that issued something). + issuers := make(map[string]bool, len(certs)) + for _, c := range certs { + issuers[string(c.RawIssuer)] = true + } + + // The leaf's Subject is not in the issuers set. + for _, c := range certs { + if !issuers[string(c.RawSubject)] { + return c + } + } - return certs[0], nil, &jsonResp.Content, nil + // Fallback: cannot distinguish (e.g. single self-signed cert in multi-cert set). + return certs[0] } // EnrollCSR takes arguments for EnrollCSRFctArgs to enroll a passed Certificate Signing diff --git a/v3/api/pam_types_test.go b/v3/api/pam_types_test.go index da664aa..0cd8dc3 100644 --- a/v3/api/pam_types_test.go +++ b/v3/api/pam_types_test.go @@ -62,18 +62,18 @@ var ( mockProviderTypeResponse = ProviderTypeResponse{ Id: mockProviderTypeId, - Name: &mockProviderTypeName, + Name: mockProviderTypeName, Parameters: &[]ProviderTypeParameterResponse{ { Id: 1, - Name: stringPtr("Username"), + Name: "Username", DisplayName: stringPtr("User Name"), DataType: PamParameterDataTypeString, InstanceLevel: false, }, { Id: 2, - Name: stringPtr("Password"), + Name: "Password", DisplayName: stringPtr("Password"), DataType: PamParameterDataTypeSecret, InstanceLevel: true, From 93ef4741e524a8d8f4c9226af12c6a3f55e27921 Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Wed, 18 Mar 2026 19:28:06 -0700 Subject: [PATCH 03/10] fix(store-type): Paginate store-types list --- v3/api/store_type.go | 54 ++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/v3/api/store_type.go b/v3/api/store_type.go index 94dff94..15032c0 100644 --- a/v3/api/store_type.go +++ b/v3/api/store_type.go @@ -19,6 +19,7 @@ import ( "errors" "fmt" "log" + "strconv" ) // GetCertificateStoreType takes arguments for a certificate store type ID or name and if found will return the certificate store type @@ -101,9 +102,9 @@ func (c *Client) GetCertificateStoreTypeById(id int) (*CertificateStoreType, err return &jsonResp, nil } -// ListCertificateStoreTypes takes no arguments and returns a list of certificate store types from Keyfactor. +// ListCertificateStoreTypes returns all certificate store types from Keyfactor, paginating +// automatically using pq.pageReturned / pq.returnLimit until all results are fetched. func (c *Client) ListCertificateStoreTypes() (*[]CertificateStoreType, error) { - // Set Keyfactor-specific headers headers := &apiHeaders{ Headers: []StringTuple{ {"x-keyfactor-api-version", "1"}, @@ -111,25 +112,38 @@ func (c *Client) ListCertificateStoreTypes() (*[]CertificateStoreType, error) { }, } - endpoint := "CertificateStoreTypes" - keyfactorAPIStruct := &request{ - Method: "GET", - Endpoint: endpoint, - Headers: headers, - Payload: nil, - } - - resp, err := c.sendRequest(keyfactorAPIStruct) - if err != nil { - return nil, err - } - - var jsonResp []CertificateStoreType - err = json.NewDecoder(resp.Body).Decode(&jsonResp) - if err != nil { - return nil, err + const pageSize = 100 + var all []CertificateStoreType + for page := 1; ; page++ { + keyfactorAPIStruct := &request{ + Method: "GET", + Endpoint: "CertificateStoreTypes", + Headers: headers, + Payload: nil, + Query: &apiQuery{ + Query: []StringTuple{ + {"PageReturned", strconv.Itoa(page)}, + {"ReturnLimit", strconv.Itoa(pageSize)}, + }, + }, + } + + resp, err := c.sendRequest(keyfactorAPIStruct) + if err != nil { + return nil, err + } + + var pageResults []CertificateStoreType + err = json.NewDecoder(resp.Body).Decode(&pageResults) + if err != nil { + return nil, err + } + all = append(all, pageResults...) + if len(pageResults) < pageSize { + break + } } - return &jsonResp, nil + return &all, nil } // CreateStoreType takes arguments for CreateStoreFctArgs to facilitate the creation From e86c430a8f0d8186a852fc1bbdab8811be63a400 Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Thu, 19 Mar 2026 11:22:53 -0700 Subject: [PATCH 04/10] feat(applications): Add all schedule types. --- v3/api/application_models.go | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/v3/api/application_models.go b/v3/api/application_models.go index 24bb417..63e1bac 100644 --- a/v3/api/application_models.go +++ b/v3/api/application_models.go @@ -20,15 +20,41 @@ type ApplicationScheduleInterval struct { } // ApplicationScheduleDaily defines a daily time-based inventory schedule. +// Also reused as the shape for ExactlyOnce. type ApplicationScheduleDaily struct { Time string `json:"Time"` // ISO 8601 datetime string (e.g. "2023-11-25T23:30:00Z") } +// ApplicationScheduleWeekly defines a weekly inventory schedule. +// Days are weekday names ("Sunday"…"Saturday"); Time is an ISO 8601 UTC datetime. +type ApplicationScheduleWeekly struct { + Days []string `json:"Days"` // e.g. ["Monday", "Wednesday"] + Time string `json:"Time"` // ISO 8601 datetime string +} + +// ApplicationScheduleMonthly defines a monthly inventory schedule. +// Day is the day-of-month (1–31); Time is an ISO 8601 UTC datetime. +type ApplicationScheduleMonthly struct { + Day int `json:"Day"` + Time string `json:"Time"` // ISO 8601 datetime string +} + // ApplicationSchedule holds the schedule configuration for an application. -// Set exactly one of Interval or Daily; omit both to disable the schedule. +// Set exactly one field; omit all to disable the schedule (Off). +// +// - Immediate: run once immediately (server may convert to ExactlyOnce on next read) +// - Interval: run every N minutes +// - Daily: run at the same time each day +// - Weekly: run on specific weekdays at a given time +// - Monthly: run on a specific day of each month at a given time +// - ExactlyOnce: run exactly once at the specified time type ApplicationSchedule struct { - Interval *ApplicationScheduleInterval `json:"Interval,omitempty"` - Daily *ApplicationScheduleDaily `json:"Daily,omitempty"` + Immediate *bool `json:"Immediate,omitempty"` + Interval *ApplicationScheduleInterval `json:"Interval,omitempty"` + Daily *ApplicationScheduleDaily `json:"Daily,omitempty"` + Weekly *ApplicationScheduleWeekly `json:"Weekly,omitempty"` + Monthly *ApplicationScheduleMonthly `json:"Monthly,omitempty"` + ExactlyOnce *ApplicationScheduleDaily `json:"ExactlyOnce,omitempty"` } // ApplicationCertStore is a minimal certificate store reference within an application detail response. From 5a0498897cf4f240c24365684b0a2b6ea1951b5e Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Thu, 19 Mar 2026 12:48:37 -0700 Subject: [PATCH 05/10] feat(applications): Add compatability for Command < v25. --- v3/api/application.go | 74 ++++++++++++++++++++++--------- v3/api/client.go | 1 + v3/api/pam_types_test.go | 4 ++ v3/api/store_container.go | 93 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 20 deletions(-) diff --git a/v3/api/application.go b/v3/api/application.go index a8d667e..d8002ad 100644 --- a/v3/api/application.go +++ b/v3/api/application.go @@ -18,9 +18,44 @@ import ( "encoding/json" "fmt" "log" + "strconv" + "strings" ) -// ListApplications returns all applications from the /Applications endpoint. +// isLegacyContainerAPI returns true when the server is pre-v25 and uses +// CertificateStoreContainers instead of the v25+ Applications endpoint. +// Both endpoints accept and return the same JSON schedule format. +func (c *Client) isLegacyContainerAPI() bool { + v := c.AuthClient.GetCommandVersion() + major := commandVersionMajor(v) + return major > 0 && major < 25 +} + +// commandVersionMajor parses the major version number from a product version +// string such as "24.4.0.0" or "25.1.0.0". Returns 0 if unparseable. +func commandVersionMajor(version string) int { + if version == "" { + return 0 + } + parts := strings.SplitN(version, ".", 2) + major, err := strconv.Atoi(parts[0]) + if err != nil { + return 0 + } + return major +} + +// appEndpoint returns the base API endpoint for the connected Command version. +// Pre-v25 uses CertificateStoreContainers; v25+ uses Applications. +// Both endpoints share the same JSON request/response format. +func (c *Client) appEndpoint() string { + if c.isLegacyContainerAPI() { + return "CertificateStoreContainers" + } + return "Applications" +} + +// ListApplications returns all applications/containers. func (c *Client) ListApplications() ([]ApplicationListItem, error) { log.Println("[INFO] Listing applications.") @@ -33,7 +68,7 @@ func (c *Client) ListApplications() ([]ApplicationListItem, error) { req := &request{ Method: "GET", - Endpoint: "Applications", + Endpoint: c.appEndpoint(), Headers: headers, } @@ -43,14 +78,13 @@ func (c *Client) ListApplications() ([]ApplicationListItem, error) { } var result []ApplicationListItem - err = json.NewDecoder(resp.Body).Decode(&result) - if err != nil { + if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return nil, err } return result, nil } -// GetApplication returns the full details of an application by its integer ID. +// GetApplication returns the full details of an application/container by integer ID. func (c *Client) GetApplication(id int) (*ApplicationResponse, error) { log.Printf("[INFO] Fetching application with ID %d.", id) @@ -63,7 +97,7 @@ func (c *Client) GetApplication(id int) (*ApplicationResponse, error) { req := &request{ Method: "GET", - Endpoint: fmt.Sprintf("Applications/%d", id), + Endpoint: fmt.Sprintf("%s/%d", c.appEndpoint(), id), Headers: headers, } @@ -73,8 +107,7 @@ func (c *Client) GetApplication(id int) (*ApplicationResponse, error) { } var result ApplicationResponse - err = json.NewDecoder(resp.Body).Decode(&result) - if err != nil { + if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return nil, err } return &result, nil @@ -99,7 +132,7 @@ func (c *Client) GetApplicationByName(name string) (*ApplicationResponse, error) return nil, fmt.Errorf("application %q not found", name) } -// CreateApplication creates a new application and returns the created resource. +// CreateApplication creates a new application/container and returns the created resource. func (c *Client) CreateApplication(createReq *ApplicationCreateRequest) (*ApplicationResponse, error) { log.Println("[INFO] Creating application.") @@ -113,7 +146,7 @@ func (c *Client) CreateApplication(createReq *ApplicationCreateRequest) (*Applic req := &request{ Method: "POST", - Endpoint: "Applications", + Endpoint: c.appEndpoint(), Headers: headers, Payload: createReq, } @@ -124,16 +157,15 @@ func (c *Client) CreateApplication(createReq *ApplicationCreateRequest) (*Applic } var result ApplicationResponse - err = json.NewDecoder(resp.Body).Decode(&result) - if err != nil { + if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return nil, err } return &result, nil } -// UpdateApplication performs a full replacement (PUT) of an existing application. -// The API uses PUT /Applications (base URL, ID in body), not PUT /Applications/{id}. -// The Id field in updateReq is set automatically from the id argument. +// UpdateApplication performs a full replacement of an existing application/container. +// For v25+ the API uses PUT /Applications with the ID in the body. +// For pre-v25 the API uses PUT /CertificateStoreContainers/{id} with the ID in the path. func (c *Client) UpdateApplication(id int, updateReq *ApplicationUpdateRequest) (*ApplicationResponse, error) { log.Printf("[INFO] Updating application with ID %d.", id) @@ -147,9 +179,12 @@ func (c *Client) UpdateApplication(id int, updateReq *ApplicationUpdateRequest) }, } + // Both pre-v25 and v25+ use PUT /{endpoint} with the ID in the request body. + endpoint := c.appEndpoint() + req := &request{ Method: "PUT", - Endpoint: "Applications", + Endpoint: endpoint, Headers: headers, Payload: updateReq, } @@ -160,14 +195,13 @@ func (c *Client) UpdateApplication(id int, updateReq *ApplicationUpdateRequest) } var result ApplicationResponse - err = json.NewDecoder(resp.Body).Decode(&result) - if err != nil { + if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return nil, err } return &result, nil } -// DeleteApplication deletes an application by its integer ID. +// DeleteApplication deletes an application/container by its integer ID. // The server returns 204 No Content on success. func (c *Client) DeleteApplication(id int) error { log.Printf("[INFO] Deleting application with ID %d.", id) @@ -181,7 +215,7 @@ func (c *Client) DeleteApplication(id int) error { req := &request{ Method: "DELETE", - Endpoint: fmt.Sprintf("Applications/%d", id), + Endpoint: fmt.Sprintf("%s/%d", c.appEndpoint(), id), Headers: headers, } diff --git a/v3/api/client.go b/v3/api/client.go index bcd0856..add6a21 100644 --- a/v3/api/client.go +++ b/v3/api/client.go @@ -124,6 +124,7 @@ type AuthConfig interface { Authenticate() error GetHttpClient() (*http.Client, error) GetServerConfig() *auth_providers.Server + GetCommandVersion() string } // NewKeyfactorClientWithAuth creates a Client with a pre-built AuthConfig, bypassing diff --git a/v3/api/pam_types_test.go b/v3/api/pam_types_test.go index 0cd8dc3..e5b1d8f 100644 --- a/v3/api/pam_types_test.go +++ b/v3/api/pam_types_test.go @@ -41,6 +41,10 @@ func (m *mockAuthConfig) Authenticate() error { return nil } +func (m *mockAuthConfig) GetCommandVersion() string { + return "25.1.0.0" +} + // newTestClient creates a test client with mock server func newTestClient(server *httptest.Server) *Client { return &Client{ diff --git a/v3/api/store_container.go b/v3/api/store_container.go index 1a7dcdf..74ec154 100644 --- a/v3/api/store_container.go +++ b/v3/api/store_container.go @@ -15,6 +15,7 @@ package api import ( + "bytes" "encoding/json" "fmt" "log" @@ -128,3 +129,95 @@ func (c *Client) GetStoreContainer(id interface{}) (*CertStoreContainer, error) } return nil, fmt.Errorf("invalid API response from Keyfactor while getting cert store container %s", id) } + +// CreateStoreContainer creates a new certificate store container (pre-v25 legacy API). +func (c *Client) CreateStoreContainer(req *CertStoreContainer) (*CertStoreContainer, error) { + log.Println("[INFO] Creating certificate store container.") + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + payload, err := json.Marshal(req) + if err != nil { + return nil, err + } + + keyfactorAPIStruct := &request{ + Method: "POST", + Endpoint: "CertificateStoreContainers", + Headers: headers, + Payload: bytes.NewReader(payload), + } + + resp, err := c.sendRequest(keyfactorAPIStruct) + if err != nil { + return nil, err + } + + jsonResp := &CertStoreContainer{} + if err = json.NewDecoder(resp.Body).Decode(jsonResp); err != nil { + return nil, err + } + return jsonResp, nil +} + +// UpdateStoreContainer updates an existing certificate store container (pre-v25 legacy API). +func (c *Client) UpdateStoreContainer(id int, req *CertStoreContainer) (*CertStoreContainer, error) { + log.Printf("[INFO] Updating certificate store container %d.\n", id) + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + req.Id = &id + payload, err := json.Marshal(req) + if err != nil { + return nil, err + } + + keyfactorAPIStruct := &request{ + Method: "PUT", + Endpoint: fmt.Sprintf("CertificateStoreContainers/%d", id), + Headers: headers, + Payload: bytes.NewReader(payload), + } + + resp, err := c.sendRequest(keyfactorAPIStruct) + if err != nil { + return nil, err + } + + jsonResp := &CertStoreContainer{} + if err = json.NewDecoder(resp.Body).Decode(jsonResp); err != nil { + return nil, err + } + return jsonResp, nil +} + +// DeleteStoreContainer deletes a certificate store container by ID (pre-v25 legacy API). +func (c *Client) DeleteStoreContainer(id int) error { + log.Printf("[INFO] Deleting certificate store container %d.\n", id) + + headers := &apiHeaders{ + Headers: []StringTuple{ + {"x-keyfactor-api-version", "1"}, + {"x-keyfactor-requested-with", "APIClient"}, + }, + } + + keyfactorAPIStruct := &request{ + Method: "DELETE", + Endpoint: fmt.Sprintf("CertificateStoreContainers/%d", id), + Headers: headers, + } + + _, err := c.sendRequest(keyfactorAPIStruct) + return err +} From 8db732d4b429507d12ca37bc045acc7dc56e0bfa Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:53:37 -0700 Subject: [PATCH 06/10] feat(certificates): Allow for specifying enrollment pattern and/or template for PFX enrollments. --- v3/api/certificate.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/v3/api/certificate.go b/v3/api/certificate.go index 976cd5b..8e281c2 100644 --- a/v3/api/certificate.go +++ b/v3/api/certificate.go @@ -343,13 +343,14 @@ func findLeafCert(certs []*x509.Certificate) *x509.Certificate { // Request with Keyfactor. An EnrollResponse containing a signed certificate is returned upon successful // enrollment. Required fields to complete a CSR enrollment are: // - CSR : string -// - Template : string +// - Template : string (or EnrollmentPatternId on Command v25+) // - CertificateAuthority : string func (c *Client) EnrollCSR(ea *EnrollCSRFctArgs) (*EnrollResponse, error) { log.Println("[INFO] Signing CSR with Keyfactor") - /* Ensure required inputs exist */ - if (ea.Template == "") || (ea.CertificateAuthority == "") { + /* Ensure required inputs exist. + On Command v25+ an EnrollmentPatternId can substitute for Template. */ + if (ea.Template == "" && ea.EnrollmentPatternId == 0) || (ea.CertificateAuthority == "") { return nil, errors.New("invalid or nonexistent values required for csr enrollment") } From 505239cd24f70f4c67c4cca5d28c1ebe22e1441e Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:54:08 -0700 Subject: [PATCH 07/10] feat(store): Capitalize `PUT` method. --- v3/api/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/api/store.go b/v3/api/store.go index 7ff31b1..6fbc525 100644 --- a/v3/api/store.go +++ b/v3/api/store.go @@ -117,7 +117,7 @@ func (c *Client) UpdateStore(ua *UpdateStoreFctArgs) (*UpdateStoreResponse, erro } keyfactorAPIStruct := &request{ - Method: "Put", + Method: "PUT", Endpoint: "CertificateStores", Headers: headers, Payload: &ua, From 814776ccd5612138165c57eb845b9b0073736899 Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:54:36 -0700 Subject: [PATCH 08/10] fix(helpers): Handle ed448 keys gracefully. --- v3/api/helpers.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v3/api/helpers.go b/v3/api/helpers.go index 8a2d460..c57f590 100644 --- a/v3/api/helpers.go +++ b/v3/api/helpers.go @@ -242,6 +242,13 @@ func EncodePrivateKey(key interface{}) (*pem.Block, error) { Type: "PRIVATE KEY", Bytes: k, }, nil + case *pkcs12.OpaquePrivateKey: + // Algorithm not supported by Go's x509 (e.g. Ed448, OID 1.3.101.113). + // The DER is already valid PKCS#8; wrap it directly. + return &pem.Block{ + Type: "PRIVATE KEY", + Bytes: k.DER, + }, nil default: return nil, fmt.Errorf("unsupported private key type: %T", key) } From 5458819d72b0b22b998a4228a60de3ba48c03fc4 Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:51:53 -0700 Subject: [PATCH 09/10] feat(store): Add ability to easily schedule immediate inventory on a store --- v3/api/store.go | 41 +++++++++++++++++++++++++++++++++++++++++ v3/api/store_models.go | 4 ++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/v3/api/store.go b/v3/api/store.go index 6fbc525..9baf9f7 100644 --- a/v3/api/store.go +++ b/v3/api/store.go @@ -614,6 +614,47 @@ func unmarshalPropertiesString(properties string) map[string]interface{} { return make(map[string]interface{}) } +// ScheduleImmediateInventory triggers an immediate inventory job on the given certificate store. +// If the store already has any inventory schedule configured this is a no-op. +// When no schedule is present (common for newly-created stores that have never had inventory run) +// it sends a PUT with InventorySchedule.Immediate=true so the orchestrator runs inventory on its +// next check-in and updates Command's inventory record. +// +// Password and server-credential Properties (ServerUsername/Password/UseSsl) are not included in +// the PUT body because they are write-only and are not returned by the GET endpoint. With the +// Password field now tagged json:"Password,omitempty", nil is omitted from JSON entirely so +// Command does not receive a null and will preserve whatever password is already configured. +func (c *Client) ScheduleImmediateInventory(storeId string) error { + storeResp, err := c.GetCertificateStoreByID(storeId) + if err != nil { + return fmt.Errorf("ScheduleImmediateInventory: could not read store %s: %w", storeId, err) + } + + // No-op if any schedule is already configured. + sched := storeResp.InventorySchedule + if sched.Immediate != nil || sched.Interval != nil || sched.Daily != nil || sched.ExactlyOnce != nil { + return nil + } + + immediate := true + _, err = c.UpdateStore(&UpdateStoreFctArgs{ + Id: storeResp.Id, + ClientMachine: storeResp.ClientMachine, + StorePath: storeResp.StorePath, + CertStoreType: storeResp.CertStoreType, + AgentId: storeResp.AgentId, + // Password intentionally nil (omitted from JSON via omitempty) — preserves existing password. + // PropertiesString intentionally empty (omitted from JSON via omitempty) — preserves existing properties. + InventorySchedule: &InventorySchedule{ + Immediate: &immediate, + }, + }) + if err != nil { + return fmt.Errorf("ScheduleImmediateInventory: UpdateStore failed for store %s: %w", storeId, err) + } + return nil +} + func validateCreateStoreArgs(ca *CreateStoreFctArgs) error { if ca.ClientMachine == "" { return errors.New("client machine is required for creation of new certificate store") diff --git a/v3/api/store_models.go b/v3/api/store_models.go index 6cbb38c..0486fea 100644 --- a/v3/api/store_models.go +++ b/v3/api/store_models.go @@ -34,7 +34,7 @@ type CreateStoreFctArgs struct { InventorySchedule *InventorySchedule `json:"InventorySchedule,omitempty"` ReEnrollmentStatus *ReEnrollmnentConfig `json:"ReEnrollmentStatus,omitempty"` SetNewPasswordAllowed *bool `json:"SetNewPasswordAllowed,omitempty"` - Password *UpdateStorePasswordConfig `json:"Password"` + Password *UpdateStorePasswordConfig `json:"Password,omitempty"` } // UpdateStoreFctArgs holds the function arguments used for calling the UpdateStore method. @@ -58,7 +58,7 @@ type UpdateStoreFctArgs struct { InventorySchedule *InventorySchedule `json:"InventorySchedule,omitempty"` ReEnrollmentStatus *ReEnrollmnentConfig `json:"ReEnrollmentStatus,omitempty"` SetNewPasswordAllowed *bool `json:"SetNewPasswordAllowed,omitempty"` - Password *UpdateStorePasswordConfig `json:"Password"` + Password *UpdateStorePasswordConfig `json:"Password,omitempty"` } type UpdateStorePasswordConfig struct { From 2053e2f3a0bb61e1244d8b240f44f0ae20e49c0f Mon Sep 17 00:00:00 2001 From: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:33:10 -0700 Subject: [PATCH 10/10] chore: Remove v25 schema ref --- v3/schema/v25_v1.json | 2507 ----------------------------------------- 1 file changed, 2507 deletions(-) delete mode 100644 v3/schema/v25_v1.json diff --git a/v3/schema/v25_v1.json b/v3/schema/v25_v1.json deleted file mode 100644 index 08356bd..0000000 --- a/v3/schema/v25_v1.json +++ /dev/null @@ -1,2507 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Keyfactor API Reference and Utility", - "description": "

This page provides a utility through which the Keyfactor API endpoints can be called and results returned. \r\n It is intended to be used primarily for validation, testing and workflow development. \r\n It also serves secondarily as documentation for the API.

\r\n

If you would like to view documentation containing details on the Keyfactor API and endpoints, \r\n please refer to the Web API section of the Keyfactor Command documentation.

", - "version": "1.0" - }, - "servers": [ - { - "url": "/KeyfactorAPI" - } - ], - "paths": { - "/PamProviders/Local/{providerId}/Entries": { - "get": { - "tags": [ - "PAMLocalEntries" - ], - "summary": "Returns local PAM entries for the given PAM provider according to the provided filter and output parameters", - "parameters": [ - { - "name": "providerId", - "in": "path", - "description": "Keyfactor identifier of the PAM provider", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - } - }, - { - "name": "QueryString", - "in": "query", - "description": "Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)", - "schema": { - "type": "string" - } - }, - { - "name": "PageReturned", - "in": "query", - "description": "The current page within the result set to be returned", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ReturnLimit", - "in": "query", - "description": "Maximum number of records to be returned in a single call", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SortField", - "in": "query", - "description": "Field by which the results should be sorted (view results via Management Portal for sortable columns)", - "schema": { - "type": "string" - } - }, - { - "name": "SortAscending", - "in": "query", - "description": "Field sort direction [0=ascending, 1=descending]", - "schema": { - "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "PAMLocalEntries" - ], - "summary": "Creates a new local PAM entry with the associated properties", - "parameters": [ - { - "name": "providerId", - "in": "path", - "description": "Keyfactor identifier of the PAM provider", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "Local PAM entry properties to be used", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "PAMLocalEntries" - ], - "summary": "Updates local PAM entry with the associated properties", - "parameters": [ - { - "name": "providerId", - "in": "path", - "description": "Keyfactor identifier of the PAM provider", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "Local PAM entry properties to be used", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "PAMLocalEntries" - ], - "summary": "Deletes a local PAM entry", - "parameters": [ - { - "name": "providerId", - "in": "path", - "description": "Keyfactor identifier of the PAM provider", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - } - }, - { - "name": "secretName", - "in": "query", - "description": "Name of the secret entry to be deleted", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/PamProviders": { - "get": { - "tags": [ - "PAMProvider" - ], - "summary": "Returns all PAM providers according to the provided filter and output parameters", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "QueryString", - "in": "query", - "description": "Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)", - "schema": { - "type": "string" - } - }, - { - "name": "PageReturned", - "in": "query", - "description": "The current page within the result set to be returned", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ReturnLimit", - "in": "query", - "description": "Maximum number of records to be returned in a single call", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SortField", - "in": "query", - "description": "Field by which the results should be sorted (view results via Management Portal for sortable columns)", - "schema": { - "type": "string" - } - }, - { - "name": "SortAscending", - "in": "query", - "description": "Field sort direction [0=ascending, 1=descending]", - "schema": { - "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "PAMProvider" - ], - "summary": "Creates a new PAM provider with the associated properties", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "PAM provider properties to be used", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - } - } - } - }, - "put": { - "tags": [ - "PAMProvider" - ], - "summary": "Updates an existing PAM provider according to the provided properties", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "PAM provider properties to be used", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - } - } - } - } - }, - "/PamProviders/{id}": { - "get": { - "tags": [ - "PAMProvider" - ], - "summary": "Returns a single PAM Provider that matches the associated id", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Keyfactor identifier of the PAM provider", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 0, - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy" - } - } - } - } - } - }, - "delete": { - "tags": [ - "PAMProvider" - ], - "summary": "Deletes a PAM Provider", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Keyfactor identifier of the PAM provider to be deleted", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/PamProviders/Types/{id}": { - "delete": { - "tags": [ - "PAMProvider" - ], - "summary": "Deletes a PAM provider Type, as long as the PAM type is not currently in use.", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| CyberArk | string |", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "PAM provider type Id to be used", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/PamProviders/Types": { - "get": { - "tags": [ - "PAMProvider" - ], - "summary": "Returns all PAM provider types in the Keyfactor instance", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "PAMProvider" - ], - "summary": "Creates a new PAM provider type with the associated properties", - "description": "### PAM Provider Data Types ###\r\n| Value | Description |\r\n|--------------------|---------------------------|\r\n| 1 | string |\r\n| 2 | secret |", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "PAM provider type properties to be used", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse" - } - } - } - } - } - } - }, - "/CertificateStoreTypes/{id}": { - "get": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Returns a single certificate store type that matches id", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Keyfactor identifier of the certificate store type", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": -1, - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Deletes a certificate store type according to the provided identifier", - "description": "This will ignore individual delete failures, and continue processing certificate stores.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Keyfactor identifier of the certificate store type to be deleted", - "required": true, - "schema": { - "maximum": 2147483647, - "minimum": 0, - "type": "integer", - "format": "int32" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/CertificateStoreTypes/Name/{name}": { - "get": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Returns a single certificate store type that matches the provided short name", - "parameters": [ - { - "name": "name", - "in": "path", - "description": "Short name of the certificate store type to return", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - } - } - } - } - } - }, - "/CertificateStoreTypes": { - "get": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Returns all certificate store types according to the provided filter and output parameters", - "parameters": [ - { - "name": "QueryString", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "PageReturned", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ReturnLimit", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SortField", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "SortAscending", - "in": "query", - "schema": { - "$ref": "#/components/schemas/Keyfactor.Common.QueryableExtensions.SortOrder" - } - }, - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Creates a new certificate store type with the provided properties", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "Certificate store type properties for the new type", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Updates an existing certificate store type with the provided properties", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "Certificate store type properties to be updated", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "CertificateStoreType" - ], - "summary": "Deletes certificate store types according to the provided identifiers", - "description": "This will ignore individual delete failures, and continue processing the array.", - "parameters": [ - { - "name": "x-keyfactor-api-version", - "in": "header", - "description": "Desired version of the api, if not provided defaults to v1", - "schema": { - "type": "string" - }, - "example": "1.0" - }, - { - "name": "x-keyfactor-requested-with", - "in": "header", - "description": "Type of the request [XMLHttpRequest, APIClient]", - "required": true, - "schema": { - "type": "string" - }, - "example": "APIClient" - } - ], - "requestBody": { - "description": "Array of Keyfactor identifiers of the certificate store types to be deleted", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - } - } - } - } - }, - "components": { - "schemas": { - "Keyfactor.Common.QueryableExtensions.SortOrder": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Enums.CertStoreTypesPasswordStyles": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Core.Enums.CertificateStoreTypePropertyType": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Enums.CertificateStoreTypeHasPrivateKeyValidationOptions": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Core.Enums.CertStoreEntryParameterType": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Core.Enums.CertificateFormat": { - "enum": [ - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Core.Enums.CertificateStoreTypePropertyType": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Core.Enums.CertStorePrivateKey": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Enums.SecretType": { - "enum": [ - 0, - 1, - 2, - 3, - 4 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Models.Provider": { - "required": [ - "Name", - "ProviderType" - ], - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "minLength": 1, - "type": "string" - }, - "Area": { - "type": "integer", - "format": "int32" - }, - "ProviderType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" - }, - "ProviderTypeParamValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.PamProviderTypeParamValue" - }, - "nullable": true - }, - "SecuredAreaId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "Remote": { - "type": "boolean" - }, - "IsInUse": { - "type": "boolean", - "readOnly": true - }, - "IsLocalDB": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "CSS.CMS.Data.Model.Models.ProviderType": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "format": "uuid" - }, - "Name": { - "type": "string", - "nullable": true - }, - "ProviderTypeParams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderTypeParam" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "CSS.CMS.Data.Model.Models.ProviderTypeParam": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "DataType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" - }, - "InstanceLevel": { - "type": "boolean" - }, - "ProviderType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" - } - }, - "additionalProperties": false - }, - "CSS.CMS.Data.Model.Enums.PamParameterDataType": { - "enum": [ - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "CSS.CMS.Data.Model.Models.KeyfactorAPISecret": { - "type": "object", - "properties": { - "SecretValue": { - "type": "string", - "nullable": true - }, - "Parameters": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "Provider": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "CSS.CMS.Data.Model.Models.KeyfactorSecret": { - "type": "object", - "properties": { - "Value": { - "nullable": true - }, - "SecretTypeGuid": { - "type": "string", - "format": "uuid" - }, - "InstanceId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InstanceGuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "ProviderTypeParameterValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.PamProviderTypeParamValue" - }, - "nullable": true - }, - "ProviderId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "IsManaged": { - "type": "boolean", - "readOnly": true - }, - "SecretType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.SecretType" - }, - "RemoteProviderName": { - "type": "string", - "nullable": true - }, - "HasValue": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "CSS.CMS.Data.Model.Models.PamProviderTypeParamValue": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Value": { - "type": "string", - "nullable": true - }, - "ParameterId": { - "type": "integer", - "format": "int32" - }, - "InstanceId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InstanceGuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "Provider": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.Provider" - }, - "ProviderTypeParam": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderTypeParam" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryCreateRequest": { - "required": [ - "SecretName", - "SecretValue" - ], - "type": "object", - "properties": { - "SecretName": { - "maxLength": 400, - "minLength": 1, - "type": "string" - }, - "Description": { - "maxLength": 2000, - "type": "string", - "nullable": true - }, - "SecretValue": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryResponse": { - "type": "object", - "properties": { - "ProviderId": { - "type": "integer", - "format": "int32" - }, - "SecretName": { - "type": "string", - "nullable": true - }, - "Description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.Local.LocalPAMEntryUpdateRequest": { - "required": [ - "SecretName" - ], - "type": "object", - "properties": { - "SecretName": { - "maxLength": 400, - "minLength": 1, - "type": "string" - }, - "Description": { - "maxLength": 2000, - "type": "string", - "nullable": true - }, - "SecretValue": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.PamProviderTypeParamValueResponse": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Value": { - "type": "string", - "nullable": true - }, - "InstanceId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InstanceGuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "ProviderTypeParam": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequest": { - "required": [ - "Name", - "ProviderType" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, - "type": "string" - }, - "Remote": { - "type": "boolean" - }, - "Area": { - "type": "integer", - "format": "int32" - }, - "ProviderType": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType" - }, - "ProviderTypeParamValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue" - }, - "nullable": true - }, - "SecuredAreaId": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "format": "uuid" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderTypeParam": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "InstanceLevel": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Value": { - "type": "string", - "nullable": true - }, - "InstanceId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InstanceGuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "ProviderTypeParam": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderTypeParam" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderResponseLegacy": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "Area": { - "type": "integer", - "format": "int32" - }, - "ProviderType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Models.ProviderType" - }, - "ProviderTypeParamValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.PamProviderTypeParamValueResponse" - }, - "nullable": true - }, - "SecuredAreaId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "Remote": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeCreateRequest": { - "required": [ - "Name" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, - "type": "string" - }, - "Parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterCreateRequest" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterCreateRequest": { - "required": [ - "Name" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, - "type": "string" - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "DataType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" - }, - "InstanceLevel": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "DataType": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.PamParameterDataType" - }, - "InstanceLevel": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeResponse": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "format": "uuid" - }, - "Name": { - "type": "string", - "nullable": true - }, - "Parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderTypeParameterResponse" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderUpdateRequestLegacy": { - "required": [ - "Id", - "Name", - "ProviderType" - ], - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "Name": { - "minLength": 1, - "type": "string" - }, - "Remote": { - "type": "boolean" - }, - "Area": { - "type": "integer", - "format": "int32" - }, - "ProviderType": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestProviderType" - }, - "ProviderTypeParamValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.PAM.ProviderCreateRequestTypeParamValue" - }, - "nullable": true - }, - "SecuredAreaId": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeCreationRequest": { - "required": [ - "Name", - "ShortName" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, - "type": "string" - }, - "ShortName": { - "maxLength": 64, - "minLength": 0, - "type": "string" - }, - "Capability": { - "maxLength": 220, - "minLength": 0, - "type": "string", - "nullable": true - }, - "LocalStore": { - "type": "boolean" - }, - "SupportedOperations": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" - }, - "Properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" - }, - "nullable": true - }, - "PasswordOptions": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" - }, - "StorePathType": { - "type": "string", - "nullable": true - }, - "StorePathValue": { - "type": "string", - "nullable": true - }, - "PrivateKeyAllowed": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" - }, - "CertificateFormat": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" - }, - "ServerRequired": { - "type": "boolean" - }, - "PowerShell": { - "type": "boolean" - }, - "BlueprintAllowed": { - "type": "boolean" - }, - "CustomAliasAllowed": { - "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" - }, - "ServerRegistration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InventoryEndpoint": { - "type": "string", - "nullable": true - }, - "InventoryJobTypeId": { - "type": "string", - "format": "uuid" - }, - "ManagementJobTypeId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "DiscoveryJobTypeId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "EnrollmentJobTypeId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "EntryParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeResponse": { - "type": "object", - "properties": { - "Name": { - "type": "string", - "nullable": true - }, - "ShortName": { - "type": "string", - "nullable": true - }, - "Capability": { - "type": "string", - "nullable": true - }, - "StoreType": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "ImportType": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "LocalStore": { - "type": "boolean" - }, - "SupportedOperations": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" - }, - "Properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" - }, - "nullable": true - }, - "EntryParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" - }, - "nullable": true - }, - "PasswordOptions": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" - }, - "StorePathType": { - "type": "string", - "nullable": true - }, - "StorePathValue": { - "type": "string", - "nullable": true - }, - "PrivateKeyAllowed": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" - }, - "CertificateFormat": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" - }, - "JobProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "readOnly": true - }, - "ServerRequired": { - "type": "boolean" - }, - "PowerShell": { - "type": "boolean" - }, - "BlueprintAllowed": { - "type": "boolean" - }, - "CustomAliasAllowed": { - "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" - }, - "ServerRegistration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "InventoryEndpoint": { - "type": "string", - "nullable": true - }, - "InventoryJobType": { - "type": "string", - "format": "uuid" - }, - "ManagementJobType": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "DiscoveryJobType": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "EnrollmentJobType": { - "type": "string", - "format": "uuid", - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.CertificateStoreTypeUpdateRequest": { - "required": [ - "Name", - "ShortName", - "StoreType" - ], - "type": "object", - "properties": { - "StoreType": { - "type": "integer", - "format": "int32" - }, - "Name": { - "minLength": 1, - "type": "string" - }, - "ShortName": { - "maxLength": 64, - "minLength": 0, - "type": "string" - }, - "Capability": { - "maxLength": 220, - "minLength": 0, - "type": "string", - "nullable": true - }, - "LocalStore": { - "type": "boolean" - }, - "SupportedOperations": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations" - }, - "Properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty" - }, - "nullable": true - }, - "PasswordOptions": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions" - }, - "StorePathType": { - "type": "string", - "nullable": true - }, - "StorePathValue": { - "type": "string", - "nullable": true - }, - "PrivateKeyAllowed": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStorePrivateKey" - }, - "CertificateFormat": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateFormat" - }, - "ServerRequired": { - "type": "boolean" - }, - "PowerShell": { - "type": "boolean" - }, - "BlueprintAllowed": { - "type": "boolean" - }, - "CustomAliasAllowed": { - "$ref": "#/components/schemas/Keyfactor.Orchestrators.Common.Enums.CertStoreCustomAlias" - }, - "EntryParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParameters": { - "type": "object", - "properties": { - "StoreTypeId": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "Type": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertStoreEntryParameterType" - }, - "ValidationOptions": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParametersValidationOptions" - }, - "DependsOn": { - "type": "string", - "nullable": true - }, - "DefaultValue": { - "type": "string", - "nullable": true - }, - "Options": { - "type": "string", - "nullable": true - }, - "Id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.EntryParametersValidationOptions": { - "type": "object", - "properties": { - "HasPrivateKey": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeHasPrivateKeyValidationOptions" - }, - "OnAdd": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" - }, - "OnRemove": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" - }, - "OnODKG": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PasswordOptions": { - "type": "object", - "properties": { - "EntrySupported": { - "type": "boolean" - }, - "StoreRequired": { - "type": "boolean" - }, - "Style": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertStoreTypesPasswordStyles" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PropertiesValidationOptions": { - "type": "object", - "properties": { - "OnCreation": { - "$ref": "#/components/schemas/CSS.CMS.Data.Model.Enums.CertificateStoreTypeValidationOptions" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.StoreTypeProperty": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int32" - }, - "StoreTypeId": { - "type": "integer", - "format": "int32" - }, - "Name": { - "type": "string", - "nullable": true - }, - "DisplayName": { - "type": "string", - "nullable": true - }, - "Type": { - "$ref": "#/components/schemas/CSS.CMS.Core.Enums.CertificateStoreTypePropertyType" - }, - "DependsOn": { - "type": "string", - "nullable": true - }, - "DefaultValue": { - "type": "string", - "nullable": true - }, - "Required": { - "type": "boolean", - "nullable": true - }, - "ValidationOptions": { - "$ref": "#/components/schemas/Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.PropertiesValidationOptions" - } - }, - "additionalProperties": false - }, - "Keyfactor.Web.KeyfactorApi.Models.CertificateStoresTypes.SupportedOperations": { - "type": "object", - "properties": { - "Add": { - "type": "boolean" - }, - "Create": { - "type": "boolean" - }, - "Discovery": { - "type": "boolean" - }, - "Enrollment": { - "type": "boolean" - }, - "Remove": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "System.DayOfWeek": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - } - } - } -} \ No newline at end of file