1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. OidcKey
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

vault.identity.OidcKey

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

    Import

    The key can be imported with the key name, for example

     $ pulumi import vault:identity/oidcKey:OidcKey key key
    

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var key = new Vault.Identity.OidcKey("key", new()
        {
            Algorithm = "RS256",
        });
    
        var roleOidcRole = new Vault.Identity.OidcRole("roleOidcRole", new()
        {
            Key = key.Name,
        });
    
        var roleOidcKeyAllowedClientID = new Vault.Identity.OidcKeyAllowedClientID("roleOidcKeyAllowedClientID", new()
        {
            KeyName = key.Name,
            AllowedClientId = roleOidcRole.ClientId,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		key, err := identity.NewOidcKey(ctx, "key", &identity.OidcKeyArgs{
    			Algorithm: pulumi.String("RS256"),
    		})
    		if err != nil {
    			return err
    		}
    		roleOidcRole, err := identity.NewOidcRole(ctx, "roleOidcRole", &identity.OidcRoleArgs{
    			Key: key.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = identity.NewOidcKeyAllowedClientID(ctx, "roleOidcKeyAllowedClientID", &identity.OidcKeyAllowedClientIDArgs{
    			KeyName:         key.Name,
    			AllowedClientId: roleOidcRole.ClientId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.OidcKey;
    import com.pulumi.vault.identity.OidcKeyArgs;
    import com.pulumi.vault.identity.OidcRole;
    import com.pulumi.vault.identity.OidcRoleArgs;
    import com.pulumi.vault.identity.OidcKeyAllowedClientID;
    import com.pulumi.vault.identity.OidcKeyAllowedClientIDArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var key = new OidcKey("key", OidcKeyArgs.builder()        
                .algorithm("RS256")
                .build());
    
            var roleOidcRole = new OidcRole("roleOidcRole", OidcRoleArgs.builder()        
                .key(key.name())
                .build());
    
            var roleOidcKeyAllowedClientID = new OidcKeyAllowedClientID("roleOidcKeyAllowedClientID", OidcKeyAllowedClientIDArgs.builder()        
                .keyName(key.name())
                .allowedClientId(roleOidcRole.clientId())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    key = vault.identity.OidcKey("key", algorithm="RS256")
    role_oidc_role = vault.identity.OidcRole("roleOidcRole", key=key.name)
    role_oidc_key_allowed_client_id = vault.identity.OidcKeyAllowedClientID("roleOidcKeyAllowedClientID",
        key_name=key.name,
        allowed_client_id=role_oidc_role.client_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const key = new vault.identity.OidcKey("key", {algorithm: "RS256"});
    const roleOidcRole = new vault.identity.OidcRole("roleOidcRole", {key: key.name});
    const roleOidcKeyAllowedClientID = new vault.identity.OidcKeyAllowedClientID("roleOidcKeyAllowedClientID", {
        keyName: key.name,
        allowedClientId: roleOidcRole.clientId,
    });
    
    resources:
      key:
        type: vault:identity:OidcKey
        properties:
          algorithm: RS256
      roleOidcRole:
        type: vault:identity:OidcRole
        properties:
          key: ${key.name}
      roleOidcKeyAllowedClientID:
        type: vault:identity:OidcKeyAllowedClientID
        properties:
          keyName: ${key.name}
          allowedClientId: ${roleOidcRole.clientId}
    

    Create OidcKey Resource

    new OidcKey(name: string, args?: OidcKeyArgs, opts?: CustomResourceOptions);
    @overload
    def OidcKey(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                algorithm: Optional[str] = None,
                allowed_client_ids: Optional[Sequence[str]] = None,
                name: Optional[str] = None,
                namespace: Optional[str] = None,
                rotation_period: Optional[int] = None,
                verification_ttl: Optional[int] = None)
    @overload
    def OidcKey(resource_name: str,
                args: Optional[OidcKeyArgs] = None,
                opts: Optional[ResourceOptions] = None)
    func NewOidcKey(ctx *Context, name string, args *OidcKeyArgs, opts ...ResourceOption) (*OidcKey, error)
    public OidcKey(string name, OidcKeyArgs? args = null, CustomResourceOptions? opts = null)
    public OidcKey(String name, OidcKeyArgs args)
    public OidcKey(String name, OidcKeyArgs args, CustomResourceOptions options)
    
    type: vault:identity:OidcKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args OidcKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OidcKeyArgs
    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 OidcKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OidcKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OidcKeyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    OidcKey Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The OidcKey resource accepts the following input properties:

    Algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    AllowedClientIds List<string>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    Name string

    Name of the OIDC Key to create.

    Namespace 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. Available only for Vault Enterprise.

    RotationPeriod int

    How often to generate a new signing key in number of seconds

    VerificationTtl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    Algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    AllowedClientIds []string

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    Name string

    Name of the OIDC Key to create.

    Namespace 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. Available only for Vault Enterprise.

    RotationPeriod int

    How often to generate a new signing key in number of seconds

    VerificationTtl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm String

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds List<String>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name String

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod Integer

    How often to generate a new signing key in number of seconds

    verificationTtl Integer

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds string[]

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name string

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod number

    How often to generate a new signing key in number of seconds

    verificationTtl number

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm str

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowed_client_ids Sequence[str]

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name str

    Name of the OIDC Key to create.

    namespace str

    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. Available only for Vault Enterprise.

    rotation_period int

    How often to generate a new signing key in number of seconds

    verification_ttl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm String

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds List<String>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name String

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod Number

    How often to generate a new signing key in number of seconds

    verificationTtl Number

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OidcKey resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing OidcKey Resource

    Get an existing OidcKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OidcKeyState, opts?: CustomResourceOptions): OidcKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            algorithm: Optional[str] = None,
            allowed_client_ids: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            rotation_period: Optional[int] = None,
            verification_ttl: Optional[int] = None) -> OidcKey
    func GetOidcKey(ctx *Context, name string, id IDInput, state *OidcKeyState, opts ...ResourceOption) (*OidcKey, error)
    public static OidcKey Get(string name, Input<string> id, OidcKeyState? state, CustomResourceOptions? opts = null)
    public static OidcKey get(String name, Output<String> id, OidcKeyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    AllowedClientIds List<string>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    Name string

    Name of the OIDC Key to create.

    Namespace 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. Available only for Vault Enterprise.

    RotationPeriod int

    How often to generate a new signing key in number of seconds

    VerificationTtl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    Algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    AllowedClientIds []string

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    Name string

    Name of the OIDC Key to create.

    Namespace 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. Available only for Vault Enterprise.

    RotationPeriod int

    How often to generate a new signing key in number of seconds

    VerificationTtl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm String

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds List<String>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name String

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod Integer

    How often to generate a new signing key in number of seconds

    verificationTtl Integer

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm string

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds string[]

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name string

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod number

    How often to generate a new signing key in number of seconds

    verificationTtl number

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm str

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowed_client_ids Sequence[str]

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name str

    Name of the OIDC Key to create.

    namespace str

    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. Available only for Vault Enterprise.

    rotation_period int

    How often to generate a new signing key in number of seconds

    verification_ttl int

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    algorithm String

    Signing algorithm to use. Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.

    allowedClientIds List<String>

    Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.

    name String

    Name of the OIDC Key to create.

    namespace 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. Available only for Vault Enterprise.

    rotationPeriod Number

    How often to generate a new signing key in number of seconds

    verificationTtl Number

    "Controls how long the public portion of a signing key will be available for verification after being rotated in seconds.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vault Terraform Provider.

    vault logo
    HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi