UNPKG

@pulumi/kong

Version:

A Pulumi package for creating and managing Kong resources.

140 lines (139 loc) 5.33 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## # kong.ConsumerJwtAuth * * Consumer jwt auth is a resource that allows you to configure the jwt auth plugin for a consumer. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as kong from "@pulumi/kong"; * * const myConsumer = new kong.Consumer("my_consumer", { * username: "User1", * customId: "123", * }); * const jwtPlugin = new kong.Plugin("jwt_plugin", { * name: "jwt", * configJson: `\x09{ * \x09\x09"claims_to_verify": ["exp"] * \x09} * `, * }); * const consumerJwtConfig = new kong.ConsumerJwtAuth("consumer_jwt_config", { * consumerId: myConsumer.id, * algorithm: "HS256", * key: "my_key", * rsaPublicKey: "foo", * secret: "my_secret", * }); * ``` */ export declare class ConsumerJwtAuth extends pulumi.CustomResource { /** * Get an existing ConsumerJwtAuth 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?: ConsumerJwtAuthState, opts?: pulumi.CustomResourceOptions): ConsumerJwtAuth; /** * Returns true if the given object is an instance of ConsumerJwtAuth. 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 ConsumerJwtAuth; /** * The algorithm used to verify the token’s signature. Can be HS256, HS384, HS512, RS256, or ES256, Default is `HS256` */ readonly algorithm: pulumi.Output<string | undefined>; /** * the id of the consumer to be configured with jwt auth */ readonly consumerId: pulumi.Output<string>; /** * A unique string identifying the credential. If left out, it will be auto-generated. */ readonly key: pulumi.Output<string | undefined>; /** * If algorithm is `RS256` or `ES256`, the public key (in PEM format) to use to verify the token’s signature */ readonly rsaPublicKey: pulumi.Output<string>; /** * If algorithm is `HS256` or `ES256`, the secret used to sign JWTs for this credential. If left out, will be auto-generated */ readonly secret: pulumi.Output<string | undefined>; /** * A list of strings associated with the consumer JWT auth for grouping and filtering */ readonly tags: pulumi.Output<string[] | undefined>; /** * Create a ConsumerJwtAuth 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: ConsumerJwtAuthArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ConsumerJwtAuth resources. */ export interface ConsumerJwtAuthState { /** * The algorithm used to verify the token’s signature. Can be HS256, HS384, HS512, RS256, or ES256, Default is `HS256` */ algorithm?: pulumi.Input<string>; /** * the id of the consumer to be configured with jwt auth */ consumerId?: pulumi.Input<string>; /** * A unique string identifying the credential. If left out, it will be auto-generated. */ key?: pulumi.Input<string>; /** * If algorithm is `RS256` or `ES256`, the public key (in PEM format) to use to verify the token’s signature */ rsaPublicKey?: pulumi.Input<string>; /** * If algorithm is `HS256` or `ES256`, the secret used to sign JWTs for this credential. If left out, will be auto-generated */ secret?: pulumi.Input<string>; /** * A list of strings associated with the consumer JWT auth for grouping and filtering */ tags?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a ConsumerJwtAuth resource. */ export interface ConsumerJwtAuthArgs { /** * The algorithm used to verify the token’s signature. Can be HS256, HS384, HS512, RS256, or ES256, Default is `HS256` */ algorithm?: pulumi.Input<string>; /** * the id of the consumer to be configured with jwt auth */ consumerId: pulumi.Input<string>; /** * A unique string identifying the credential. If left out, it will be auto-generated. */ key?: pulumi.Input<string>; /** * If algorithm is `RS256` or `ES256`, the public key (in PEM format) to use to verify the token’s signature */ rsaPublicKey: pulumi.Input<string>; /** * If algorithm is `HS256` or `ES256`, the secret used to sign JWTs for this credential. If left out, will be auto-generated */ secret?: pulumi.Input<string>; /** * A list of strings associated with the consumer JWT auth for grouping and filtering */ tags?: pulumi.Input<pulumi.Input<string>[]>; }