@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
214 lines (213 loc) • 8.11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages OIDC Clients in a Vault server. See the [Vault documentation](https://www.vaultproject.io/api-docs/secret/identity/oidc-provider#create-or-update-an-assignment)
* for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const test = new vault.identity.OidcAssignment("test", {
* name: "my-assignment",
* entityIds: ["ascbascas-2231a-sdfaa"],
* groupIds: ["sajkdsad-32414-sfsada"],
* });
* const testOidcClient = new vault.identity.OidcClient("test", {
* name: "my-app",
* redirectUris: [
* "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
* "http://127.0.0.1:8251/callback",
* "http://127.0.0.1:8080/callback",
* ],
* assignments: [test.name],
* idTokenTtl: 2400,
* accessTokenTtl: 7200,
* });
* ```
*
* ## Import
*
* OIDC Clients can be imported using the `name`, e.g.
*
* ```sh
* $ pulumi import vault:identity/oidcClient:OidcClient test my-app
* ```
*/
export declare class OidcClient extends pulumi.CustomResource {
/**
* Get an existing OidcClient resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OidcClientState, opts?: pulumi.CustomResourceOptions): OidcClient;
/**
* Returns true if the given object is an instance of OidcClient. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is OidcClient;
/**
* The time-to-live for access tokens obtained by the client.
*/
readonly accessTokenTtl: pulumi.Output<number>;
/**
* A list of assignment resources associated with the client.
*/
readonly assignments: pulumi.Output<string[] | undefined>;
/**
* The Client ID returned by Vault.
*/
readonly clientId: pulumi.Output<string>;
/**
* The Client Secret Key returned by Vault.
* For public OpenID Clients `clientSecret` is set to an empty string `""`
*/
readonly clientSecret: pulumi.Output<string>;
/**
* The client type based on its ability to maintain confidentiality of credentials.
* The following client types are supported: `confidential`, `public`. Defaults to `confidential`.
*/
readonly clientType: pulumi.Output<string>;
/**
* The time-to-live for ID tokens obtained by the client.
* The value should be less than the `verificationTtl` on the key.
*/
readonly idTokenTtl: pulumi.Output<number>;
/**
* A reference to a named key resource in Vault.
* This cannot be modified after creation. If not provided, the `default`
* key is used.
*/
readonly key: pulumi.Output<string>;
/**
* The name of the client.
*/
readonly name: pulumi.Output<string>;
/**
* The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
readonly namespace: pulumi.Output<string | undefined>;
/**
* Redirection URI values used by the client.
* One of these values must exactly match the `redirectUri` parameter value
* used in each authentication request.
*/
readonly redirectUris: pulumi.Output<string[] | undefined>;
/**
* Create a OidcClient resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: OidcClientArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OidcClient resources.
*/
export interface OidcClientState {
/**
* The time-to-live for access tokens obtained by the client.
*/
accessTokenTtl?: pulumi.Input<number>;
/**
* A list of assignment resources associated with the client.
*/
assignments?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Client ID returned by Vault.
*/
clientId?: pulumi.Input<string>;
/**
* The Client Secret Key returned by Vault.
* For public OpenID Clients `clientSecret` is set to an empty string `""`
*/
clientSecret?: pulumi.Input<string>;
/**
* The client type based on its ability to maintain confidentiality of credentials.
* The following client types are supported: `confidential`, `public`. Defaults to `confidential`.
*/
clientType?: pulumi.Input<string>;
/**
* The time-to-live for ID tokens obtained by the client.
* The value should be less than the `verificationTtl` on the key.
*/
idTokenTtl?: pulumi.Input<number>;
/**
* A reference to a named key resource in Vault.
* This cannot be modified after creation. If not provided, the `default`
* key is used.
*/
key?: pulumi.Input<string>;
/**
* The name of the client.
*/
name?: pulumi.Input<string>;
/**
* The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
namespace?: pulumi.Input<string>;
/**
* Redirection URI values used by the client.
* One of these values must exactly match the `redirectUri` parameter value
* used in each authentication request.
*/
redirectUris?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a OidcClient resource.
*/
export interface OidcClientArgs {
/**
* The time-to-live for access tokens obtained by the client.
*/
accessTokenTtl?: pulumi.Input<number>;
/**
* A list of assignment resources associated with the client.
*/
assignments?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The client type based on its ability to maintain confidentiality of credentials.
* The following client types are supported: `confidential`, `public`. Defaults to `confidential`.
*/
clientType?: pulumi.Input<string>;
/**
* The time-to-live for ID tokens obtained by the client.
* The value should be less than the `verificationTtl` on the key.
*/
idTokenTtl?: pulumi.Input<number>;
/**
* A reference to a named key resource in Vault.
* This cannot be modified after creation. If not provided, the `default`
* key is used.
*/
key?: pulumi.Input<string>;
/**
* The name of the client.
*/
name?: pulumi.Input<string>;
/**
* The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
namespace?: pulumi.Input<string>;
/**
* Redirection URI values used by the client.
* One of these values must exactly match the `redirectUri` parameter value
* used in each authentication request.
*/
redirectUris?: pulumi.Input<pulumi.Input<string>[]>;
}