A credential stored in a vault: a token for an MCP server, or a secret exposed to OpenAI-hosted environments as an environment variable. Sessions use the credentials of the vaults attached to them; an MCP tool can pick one with credentialId.
Secrets can be rotated in place. Everything else about how the credential authenticates is fixed once it is created, so changing it replaces the credential.
Import a credential with an ID of the form <vaultId>/<credentialId>.
This resource uses the beta Agents API.
Create VaultCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def VaultCredential(resource_name: str,
args: VaultCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VaultCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
auth: Optional[CredentialAuthArgs] = None,
name: Optional[str] = None,
vault_id: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None)
type: openai:VaultCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "openai_vault_credential" "name" {
# resource properties
}
Parameters
- resource_name
str
- The unique name of the resource.
- args
VaultCredentialArgs
- The arguments to resource properties.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resource.
- args
VaultCredentialArgs
- The arguments to resource properties.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resource.
- args
VaultCredentialArgs
- The arguments to resource properties.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vaultCredentialResource = new Openai.VaultCredential("vaultCredentialResource", new()
{
Auth = new Openai.Inputs.CredentialAuthArgs
{
Type = Openai.CredentialAuthType.McpOAuth,
AccessToken = "string",
ExpiresAt = "string",
McpServerUrl = "string",
Networking = new Openai.Inputs.CredentialNetworkingArgs
{
Type = Openai.CredentialNetworkingType.Limited,
AllowedHosts = new[]
{
"string",
},
},
Refresh = new Openai.Inputs.CredentialOAuthRefreshArgs
{
ClientId = "string",
RefreshToken = "string",
TokenEndpoint = "string",
TokenEndpointAuth = new Openai.Inputs.CredentialTokenEndpointAuthArgs
{
Type = Openai.TokenEndpointAuthType.None,
ClientSecret = "string",
},
Resource = "string",
Scope = "string",
},
SecretName = "string",
SecretValue = "string",
Token = "string",
},
Name = "string",
VaultId = "string",
Metadata =
{
{ "string", "string" },
},
});
example, err := openai.NewVaultCredential(ctx, "vaultCredentialResource", &openai.VaultCredentialArgs{
Auth: &pulumiopenai.CredentialAuthArgs{
Type: openai.CredentialAuthTypeMcpOAuth,
AccessToken: pulumi.String("string"),
ExpiresAt: pulumi.String("string"),
McpServerUrl: pulumi.String("string"),
Networking: &pulumiopenai.CredentialNetworkingArgs{
Type: openai.CredentialNetworkingTypeLimited,
AllowedHosts: pulumi.StringArray{
pulumi.String("string"),
},
},
Refresh: &pulumiopenai.CredentialOAuthRefreshArgs{
ClientId: pulumi.String("string"),
RefreshToken: pulumi.String("string"),
TokenEndpoint: pulumi.String("string"),
TokenEndpointAuth: &pulumiopenai.CredentialTokenEndpointAuthArgs{
Type: openai.TokenEndpointAuthTypeNone,
ClientSecret: pulumi.String("string"),
},
Resource: pulumi.String("string"),
Scope: pulumi.String("string"),
},
SecretName: pulumi.String("string"),
SecretValue: pulumi.String("string"),
Token: pulumi.String("string"),
},
Name: pulumi.String("string"),
VaultId: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "openai_vault_credential" "vaultCredentialResource" {
lifecycle {
create_before_destroy = true
}
auth = {
type = "mcp_oauth"
access_token = "string"
expires_at = "string"
mcp_server_url = "string"
networking = {
type = "limited"
allowed_hosts = ["string"]
}
refresh = {
client_id = "string"
refresh_token = "string"
token_endpoint = "string"
token_endpoint_auth = {
type = "none"
client_secret = "string"
}
resource = "string"
scope = "string"
}
secret_name = "string"
secret_value = "string"
token = "string"
}
name = "string"
vault_id = "string"
metadata = {
"string" = "string"
}
}
var vaultCredentialResource = new VaultCredential("vaultCredentialResource", VaultCredentialArgs.builder()
.auth(CredentialAuthArgs.builder()
.type(com.pulumi.openai.enums.CredentialAuthType.McpOAuth)
.accessToken("string")
.expiresAt("string")
.mcpServerUrl("string")
.networking(CredentialNetworkingArgs.builder()
.type(com.pulumi.openai.enums.CredentialNetworkingType.Limited)
.allowedHosts("string")
.build())
.refresh(CredentialOAuthRefreshArgs.builder()
.clientId("string")
.refreshToken("string")
.tokenEndpoint("string")
.tokenEndpointAuth(CredentialTokenEndpointAuthArgs.builder()
.type(com.pulumi.openai.enums.TokenEndpointAuthType.None)
.clientSecret("string")
.build())
.resource("string")
.scope("string")
.build())
.secretName("string")
.secretValue("string")
.token("string")
.build())
.name("string")
.vaultId("string")
.metadata(Map.of("string", "string"))
.build());
vault_credential_resource = openai.VaultCredential("vaultCredentialResource",
auth={
"type": openai.CredentialAuthType.MCP_O_AUTH,
"access_token": "string",
"expires_at": "string",
"mcp_server_url": "string",
"networking": {
"type": openai.CredentialNetworkingType.LIMITED,
"allowed_hosts": ["string"],
},
"refresh": {
"client_id": "string",
"refresh_token": "string",
"token_endpoint": "string",
"token_endpoint_auth": {
"type": openai.TokenEndpointAuthType.NONE,
"client_secret": "string",
},
"resource": "string",
"scope": "string",
},
"secret_name": "string",
"secret_value": "string",
"token": "string",
},
name="string",
vault_id="string",
metadata={
"string": "string",
})
const vaultCredentialResource = new openai.VaultCredential("vaultCredentialResource", {
auth: {
type: openai.CredentialAuthType.McpOAuth,
accessToken: "string",
expiresAt: "string",
mcpServerUrl: "string",
networking: {
type: openai.CredentialNetworkingType.Limited,
allowedHosts: ["string"],
},
refresh: {
clientId: "string",
refreshToken: "string",
tokenEndpoint: "string",
tokenEndpointAuth: {
type: openai.TokenEndpointAuthType.None,
clientSecret: "string",
},
resource: "string",
scope: "string",
},
secretName: "string",
secretValue: "string",
token: "string",
},
name: "string",
vaultId: "string",
metadata: {
string: "string",
},
});
type: openai:VaultCredential
properties:
auth:
accessToken: string
expiresAt: string
mcpServerUrl: string
networking:
allowedHosts:
- string
type: limited
refresh:
clientId: string
refreshToken: string
resource: string
scope: string
tokenEndpoint: string
tokenEndpointAuth:
clientSecret: string
type: none
secretName: string
secretValue: string
token: string
type: mcp_oauth
metadata:
string: string
name: string
vaultId: string
VaultCredential Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VaultCredential resource accepts the following input properties:
- Auth
Pulumi.Labs.Openai.Inputs.CredentialAuth
- How the credential authenticates, and its secrets.
- Name
string
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- VaultId
string
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - Metadata
Dictionary<string, string>
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- Auth
CredentialAuthArgs
- How the credential authenticates, and its secrets.
- Name
string
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- VaultId
string
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - Metadata
map[string]string
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- auth
object
- How the credential authenticates, and its secrets.
- name
string
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- vault_id
string
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - metadata
map(string)
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- auth
CredentialAuth
- How the credential authenticates, and its secrets.
- name
String
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- vaultId
String
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - metadata
Map<String,String>
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- auth
CredentialAuth
- How the credential authenticates, and its secrets.
- name
string
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- vaultId
string
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - metadata
{[key: string]: string}
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- auth
CredentialAuthArgs
- How the credential authenticates, and its secrets.
- name
str
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- vault_id
str
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - metadata
Mapping[str, str]
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
- auth
Property Map
- How the credential authenticates, and its secrets.
- name
String
- A human-readable name for the credential, 1 to 256 bytes once leading and trailing whitespace is trimmed. Names need not be unique.
- vaultId
String
- The ID of the vault that holds the credential, such as the
id of a Vault resource. - metadata
Map<String>
- Up to 16 custom key-value pairs. Keys can be up to 64 characters and values up to 512 characters.
Outputs
All input properties are implicitly available as output properties. Additionally, the VaultCredential resource produces the following output properties:
- CreatedAt
int
- When the credential was created, as a Unix timestamp in seconds.
- Id
string
- The provider-assigned unique ID for this managed resource.
- UpdatedAt
int
- When the credential was last updated, as a Unix timestamp in seconds.
- CreatedAt
int
- When the credential was created, as a Unix timestamp in seconds.
- Id
string
- The provider-assigned unique ID for this managed resource.
- UpdatedAt
int
- When the credential was last updated, as a Unix timestamp in seconds.
- created_at
number
- When the credential was created, as a Unix timestamp in seconds.
- id
string
- The provider-assigned unique ID for this managed resource.
- updated_at
number
- When the credential was last updated, as a Unix timestamp in seconds.
- createdAt
Integer
- When the credential was created, as a Unix timestamp in seconds.
- id
String
- The provider-assigned unique ID for this managed resource.
- updatedAt
Integer
- When the credential was last updated, as a Unix timestamp in seconds.
- createdAt
number
- When the credential was created, as a Unix timestamp in seconds.
- id
string
- The provider-assigned unique ID for this managed resource.
- updatedAt
number
- When the credential was last updated, as a Unix timestamp in seconds.
- created_at
int
- When the credential was created, as a Unix timestamp in seconds.
- id
str
- The provider-assigned unique ID for this managed resource.
- updated_at
int
- When the credential was last updated, as a Unix timestamp in seconds.
- createdAt
Number
- When the credential was created, as a Unix timestamp in seconds.
- id
String
- The provider-assigned unique ID for this managed resource.
- updatedAt
Number
- When the credential was last updated, as a Unix timestamp in seconds.
Look up Existing VaultCredential Resource
Get an existing VaultCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
func GetVaultCredential(ctx *Context, name string, id IDInput, state *VaultCredentialState, opts ...ResourceOption) (*VaultCredential, error)
public static VaultCredential get(String name, Output<String> id, CustomResourceOptions options)
resources: existingVaultCredential: type: openai:VaultCredential get: id: ${id}
import {
to = openai_vault_credential.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
VaultCredentialState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
CredentialAuth, CredentialAuthArgs
How a credential authenticates. type selects the kind of credential; each other property applies only to the credential types named in its description. Secrets are write-only: the API never returns them, so they are not refreshed.
- Type
Pulumi.Labs.Openai.CredentialAuthType
- The kind of credential. It cannot be changed: changing it replaces the credential.
- AccessToken
string
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- ExpiresAt
string
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- McpServerUrl
string
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- Networking
Pulumi.Labs.Openai.Inputs.CredentialNetworking
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- Refresh
Pulumi.Labs.Openai.Inputs.CredentialOAuthRefresh
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- SecretName
string
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- SecretValue
string
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- Token
string
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- Type
CredentialAuthType
- The kind of credential. It cannot be changed: changing it replaces the credential.
- AccessToken
string
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- ExpiresAt
string
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- McpServerUrl
string
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- Networking
CredentialNetworking
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- Refresh
CredentialOAuthRefresh
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- SecretName
string
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- SecretValue
string
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- Token
string
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- type
"mcp_oauth" | "static_bearer" | "environment_variable"
- The kind of credential. It cannot be changed: changing it replaces the credential.
- access_token
string
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- expires_at
string
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- mcp_server_url
string
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- networking
object
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- refresh
object
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- secret_name
string
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- secret_value
string
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- token
string
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- type
CredentialAuthType
- The kind of credential. It cannot be changed: changing it replaces the credential.
- accessToken
String
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- expiresAt
String
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- mcpServerUrl
String
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- networking
CredentialNetworking
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- refresh
CredentialOAuthRefresh
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- secretName
String
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- secretValue
String
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- token
String
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- type
CredentialAuthType
- The kind of credential. It cannot be changed: changing it replaces the credential.
- accessToken
string
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- expiresAt
string
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- mcpServerUrl
string
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- networking
CredentialNetworking
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- refresh
CredentialOAuthRefresh
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- secretName
string
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- secretValue
string
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- token
string
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- type
CredentialAuthType
- The kind of credential. It cannot be changed: changing it replaces the credential.
- access_token
str
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- expires_at
str
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- mcp_server_url
str
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- networking
CredentialNetworking
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- refresh
CredentialOAuthRefresh
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- secret_name
str
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- secret_value
str
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- token
str
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
- type
"mcp_oauth" | "static_bearer" | "environment_variable"
- The kind of credential. It cannot be changed: changing it replaces the credential.
- accessToken
String
mcp_oauth credentials: the OAuth access token. Required. Changing it rotates the token in place.- expiresAt
String
mcp_oauth credentials: when the access token expires, as an RFC 3339 timestamp, if known. OpenAI updates the expiry when it refreshes the token; that is not reported as drift.- mcpServerUrl
String
mcp_oauth and static_bearer credentials: the HTTPS URL of the MCP server the credential authorizes. Required. An MCP tool uses the credential whose server URL matches, or the one its credentialId names. Changing it replaces the credential.- networking
Property Map
environment_variable credentials: where the secret may be sent. Required. Changing it replaces the credential.- refresh
Property Map
mcp_oauth credentials: how OpenAI refreshes the access token. When unset, the token is not refreshed. Adding or removing it replaces the credential.- secretName
String
environment_variable credentials: the name of the environment variable that receives a placeholder for the secret. Required. Use ASCII letters, digits and underscores, starting with a letter or underscore; names starting with CODEX_ are reserved. It must be unique among the vault's environment variable credentials. Changing it replaces the credential.- secretValue
String
environment_variable credentials: the secret. Required. It must not contain carriage returns, newlines or NUL bytes. Sandbox code only sees a placeholder; OpenAI's egress proxy substitutes the secret in requests to allowed hosts. Changing it rotates the secret in place, for sessions created afterwards.- token
String
static_bearer credentials: the bearer token, which is not refreshed automatically. Required. Changing it rotates the token in place.
CredentialAuthType
| Name | Value | Description |
|---|
| McpOAuth | mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
| StaticBearer | static_bearer | A bearer token for an MCP server. |
| EnvironmentVariable | environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Name | Value | Description |
|---|
| CredentialAuthTypeMcpOAuth | mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
| CredentialAuthTypeStaticBearer | static_bearer | A bearer token for an MCP server. |
| CredentialAuthTypeEnvironmentVariable | environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Value | Description |
|---|
mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
static_bearer | A bearer token for an MCP server. |
environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Name | Value | Description |
|---|
| McpOAuth | mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
| StaticBearer | static_bearer | A bearer token for an MCP server. |
| EnvironmentVariable | environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Name | Value | Description |
|---|
| McpOAuth | mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
| StaticBearer | static_bearer | A bearer token for an MCP server. |
| EnvironmentVariable | environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Name | Value | Description |
|---|
| MCP_O_AUTH | mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
| STATIC_BEARER | static_bearer | A bearer token for an MCP server. |
| ENVIRONMENT_VARIABLE | environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
| Value | Description |
|---|
mcp_oauth | An OAuth access token for an MCP server, optionally refreshed by OpenAI. |
static_bearer | A bearer token for an MCP server. |
environment_variable | A secret exposed to OpenAI-hosted environments as an environment variable placeholder. |
CredentialNetworking, CredentialNetworkingArgs
- Type
Pulumi.Labs.Openai.CredentialNetworkingType
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- AllowedHosts
List<string>
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- Type
CredentialNetworkingType
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- AllowedHosts
[]string
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- type
"limited" | "unrestricted"
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- allowed_hosts
list(string)
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- type
CredentialNetworkingType
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- allowedHosts
List<String>
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- type
CredentialNetworkingType
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- allowedHosts
string[]
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- type
CredentialNetworkingType
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- allowed_hosts
Sequence[str]
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
- type
"limited" | "unrestricted"
limited sends the secret only to allowedHosts. unrestricted sends it to any host the session's network policy allows, which must then be restricted with explicit allowed domains.- allowedHosts
List<String>
limited networking: the hosts the secret may be sent to, 1 to 16 lowercase host names or IPv4 addresses, without a scheme, path, port or wildcard. They must also be allowed by the session's network policy. Required.
CredentialNetworkingType
| Name | Value |
|---|
| Limited | limited |
| Unrestricted | unrestricted |
| Name | Value |
|---|
| CredentialNetworkingTypeLimited | limited |
| CredentialNetworkingTypeUnrestricted | unrestricted |
| Name | Value |
|---|
| Limited | limited |
| Unrestricted | unrestricted |
| Name | Value |
|---|
| Limited | limited |
| Unrestricted | unrestricted |
| Name | Value |
|---|
| LIMITED | limited |
| UNRESTRICTED | unrestricted |
CredentialOAuthRefresh, CredentialOAuthRefreshArgs
- ClientId
string
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- RefreshToken
string
- The OAuth refresh token. Changing it rotates the token in place.
- TokenEndpoint
string
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- TokenEndpointAuth
Pulumi.Labs.Openai.Inputs.CredentialTokenEndpointAuth
- How the client authenticates to the token endpoint.
- Resource
string
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- Scope
string
- The space-separated OAuth scopes requested when refreshing.
- ClientId
string
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- RefreshToken
string
- The OAuth refresh token. Changing it rotates the token in place.
- TokenEndpoint
string
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- TokenEndpointAuth
CredentialTokenEndpointAuth
- How the client authenticates to the token endpoint.
- Resource
string
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- Scope
string
- The space-separated OAuth scopes requested when refreshing.
- client_id
string
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- refresh_token
string
- The OAuth refresh token. Changing it rotates the token in place.
- token_endpoint
string
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- token_endpoint_auth
object
- How the client authenticates to the token endpoint.
- resource
string
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- scope
string
- The space-separated OAuth scopes requested when refreshing.
- clientId
String
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- refreshToken
String
- The OAuth refresh token. Changing it rotates the token in place.
- tokenEndpoint
String
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- tokenEndpointAuth
CredentialTokenEndpointAuth
- How the client authenticates to the token endpoint.
- resource
String
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- scope
String
- The space-separated OAuth scopes requested when refreshing.
- clientId
string
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- refreshToken
string
- The OAuth refresh token. Changing it rotates the token in place.
- tokenEndpoint
string
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- tokenEndpointAuth
CredentialTokenEndpointAuth
- How the client authenticates to the token endpoint.
- resource
string
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- scope
string
- The space-separated OAuth scopes requested when refreshing.
- client_id
str
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- refresh_token
str
- The OAuth refresh token. Changing it rotates the token in place.
- token_endpoint
str
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- token_endpoint_auth
CredentialTokenEndpointAuth
- How the client authenticates to the token endpoint.
- resource
str
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- scope
str
- The space-separated OAuth scopes requested when refreshing.
- clientId
String
- The OAuth client ID used to request a new token. Changing it replaces the credential.
- refreshToken
String
- The OAuth refresh token. Changing it rotates the token in place.
- tokenEndpoint
String
- The HTTPS token endpoint the refresh token is exchanged at. Changing it replaces the credential.
- tokenEndpointAuth
Property Map
- How the client authenticates to the token endpoint.
- resource
String
- The resource URI sent when refreshing, if the server requires one. Changing it replaces the credential.
- scope
String
- The space-separated OAuth scopes requested when refreshing.
CredentialTokenEndpointAuth, CredentialTokenEndpointAuthArgs
- Type
Pulumi.Labs.Openai.TokenEndpointAuthType
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - ClientSecret
string
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- Type
TokenEndpointAuthType
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - ClientSecret
string
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- type
"none" | "client_secret_basic" | "client_secret_post"
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - client_secret
string
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- type
TokenEndpointAuthType
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - clientSecret
String
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- type
TokenEndpointAuthType
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - clientSecret
string
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- type
TokenEndpointAuthType
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - client_secret
str
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
- type
"none" | "client_secret_basic" | "client_secret_post"
- How the client authenticates:
none sends only the client ID, client_secret_basic sends the client secret with HTTP Basic authentication, and client_secret_post sends it in the request body. Changing it replaces the credential. - clientSecret
String
client_secret_basic and client_secret_post: the OAuth client secret. Required. Changing it rotates the secret in place.
TokenEndpointAuthType
| Name | Value |
|---|
| None | none |
| ClientSecretBasic | client_secret_basic |
| ClientSecretPost | client_secret_post |
| Name | Value |
|---|
| TokenEndpointAuthTypeNone | none |
| TokenEndpointAuthTypeClientSecretBasic | client_secret_basic |
| TokenEndpointAuthTypeClientSecretPost | client_secret_post |
| Value |
|---|
none |
client_secret_basic |
client_secret_post |
| Name | Value |
|---|
| None | none |
| ClientSecretBasic | client_secret_basic |
| ClientSecretPost | client_secret_post |
| Name | Value |
|---|
| None | none |
| ClientSecretBasic | client_secret_basic |
| ClientSecretPost | client_secret_post |
| Name | Value |
|---|
| NONE | none |
| CLIENT_SECRET_BASIC | client_secret_basic |
| CLIENT_SECRET_POST | client_secret_post |
| Value |
|---|
none |
client_secret_basic |
client_secret_post |
Package Details
- Repository
- openai pulumi-labs/pulumi-openai
- License
- Apache-2.0