Skip to content

Commit 35dc2fe

Browse files
authored
Merge pull request #129 from Portkey-AI/chore/secret_mappings
chore: secret mappings
2 parents f040e37 + 5fb6205 commit 35dc2fe

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

openapi.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12303,6 +12303,11 @@ paths:
1230312303
expires_at:
1230412304
type: string
1230512305
format: date-time
12306+
secret_mappings:
12307+
type: array
12308+
items:
12309+
$ref: '#/components/schemas/SecretMapping'
12310+
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config.<field>" (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. When "key" is mapped, the key field becomes optional.
1230612311
examples:
1230712312
generic:
1230812313
value:
@@ -12637,6 +12642,11 @@ paths:
1263712642
required: ["apiVersion", "deploymentName"]
1263812643
usage_limits:
1263912644
$ref: "#/components/schemas/UsageLimits"
12645+
secret_mappings:
12646+
type: array
12647+
items:
12648+
$ref: '#/components/schemas/SecretMapping'
12649+
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config.<field>" (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique.
1264012650
responses:
1264112651
"200":
1264212652
description: Successful response
@@ -31121,6 +31131,11 @@ components:
3112131131
pattern: '^[a-zA-Z0-9_-]+$'
3112231132
maxLength: 255
3112331133
description: Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error.
31134+
secret_mappings:
31135+
type: array
31136+
items:
31137+
$ref: '#/components/schemas/SecretMapping'
31138+
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted.
3112431139

3112531140
UpdateIntegrationRequest:
3112631141
type: object
@@ -31161,6 +31176,11 @@ components:
3116131176
title: Cortex
3116231177
- $ref: '#/components/schemas/CustomHostConfiguration'
3116331178
title: Custom Base URL
31179+
secret_mappings:
31180+
type: array
31181+
items:
31182+
$ref: '#/components/schemas/SecretMapping'
31183+
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique.
3116431184

3116531185
IntegrationDetailResponse:
3116631186
allOf:
@@ -31211,6 +31231,11 @@ components:
3121131231
workspace_count:
3121231232
type: integer
3121331233
description: Number of workspaces with access to this integration
31234+
secret_mappings:
31235+
type: array
31236+
items:
31237+
$ref: '#/components/schemas/SecretMapping'
31238+
description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.<field>".
3121431239

3121531240
GlobalWorkspaceAccess:
3121631241
type: object
@@ -31458,6 +31483,28 @@ components:
3145831483
type: string
3145931484
description: Custom headers to send with requests (can be used along with other provider specific configuration fields)
3146031485

31486+
SecretMapping:
31487+
type: object
31488+
required:
31489+
- target_field
31490+
- secret_reference_id
31491+
properties:
31492+
target_field:
31493+
type: string
31494+
description: |
31495+
The field on the entity to populate from the secret reference. Must be unique within the array.
31496+
- **Integrations**: `key` or `configurations.<field>` (e.g. `configurations.aws_secret_access_key`)
31497+
- **Virtual Keys**: `key` or `model_config.<field>` (e.g. `model_config.awsSecretAccessKey`)
31498+
example: "key"
31499+
secret_reference_id:
31500+
type: string
31501+
description: UUID or slug of the secret reference. Must belong to the same organisation and be accessible by the workspace.
31502+
example: "my-aws-secret"
31503+
secret_key:
31504+
type: string
31505+
nullable: true
31506+
description: Override the secret_key defined on the secret reference. Use to pick a specific key from a multi-value secret.
31507+
3146131508
CreateSecretReferenceRequest:
3146231509
type: object
3146331510
required:
@@ -32081,6 +32128,11 @@ components:
3208132128
expires_at:
3208232129
type: string
3208332130
format: date-time
32131+
secret_mappings:
32132+
type: array
32133+
items:
32134+
$ref: '#/components/schemas/SecretMapping'
32135+
description: Secret reference mappings for this virtual key. Valid target_field values are "key" or "model_config.<field>".
3208432136
object:
3208532137
type: string
3208632138
enum: [virtual-key]

0 commit comments

Comments
 (0)