fusionauth.FusionAuthKey
Explore with Pulumi AI
# Key Resource
Cryptographic keys are used in signing and verifying JWTs and verifying responses for third party identity providers. It is more likely you will interact with keys using the FusionAuth UI in the Key Master menu.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fusionauth from "pulumi-fusionauth";
const adminId = new fusionauth.FusionAuthKey("adminId", {
algorithm: "RS256",
length: 2048,
});
import pulumi
import theogravity_pulumi_fusionauth as fusionauth
admin_id = fusionauth.FusionAuthKey("adminId",
algorithm="RS256",
length=2048)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := fusionauth.NewFusionAuthKey(ctx, "adminId", &fusionauth.FusionAuthKeyArgs{
Algorithm: pulumi.String("RS256"),
Length: pulumi.Int(2048),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fusionauth = theogravity.Fusionauth;
return await Deployment.RunAsync(() =>
{
var adminId = new Fusionauth.FusionAuthKey("adminId", new()
{
Algorithm = "RS256",
Length = 2048,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fusionauth.FusionAuthKey;
import com.pulumi.fusionauth.FusionAuthKeyArgs;
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 adminId = new FusionAuthKey("adminId", FusionAuthKeyArgs.builder()
.algorithm("RS256")
.length(2048)
.build());
}
}
resources:
adminId:
type: fusionauth:FusionAuthKey
properties:
algorithm: RS256
length: 2048
Create FusionAuthKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FusionAuthKey(name: string, args: FusionAuthKeyArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthKey(resource_name: str,
args: FusionAuthKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FusionAuthKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
key_id: Optional[str] = None,
length: Optional[int] = None,
name: Optional[str] = None)
func NewFusionAuthKey(ctx *Context, name string, args FusionAuthKeyArgs, opts ...ResourceOption) (*FusionAuthKey, error)
public FusionAuthKey(string name, FusionAuthKeyArgs args, CustomResourceOptions? opts = null)
public FusionAuthKey(String name, FusionAuthKeyArgs args)
public FusionAuthKey(String name, FusionAuthKeyArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FusionAuthKeyArgs
- 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 FusionAuthKeyArgs
- 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 FusionAuthKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FusionAuthKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FusionAuthKeyArgs
- 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 fusionAuthKeyResource = new Fusionauth.FusionAuthKey("fusionAuthKeyResource", new()
{
Algorithm = "string",
KeyId = "string",
Length = 0,
Name = "string",
});
example, err := fusionauth.NewFusionAuthKey(ctx, "fusionAuthKeyResource", &fusionauth.FusionAuthKeyArgs{
Algorithm: pulumi.String("string"),
KeyId: pulumi.String("string"),
Length: pulumi.Int(0),
Name: pulumi.String("string"),
})
var fusionAuthKeyResource = new FusionAuthKey("fusionAuthKeyResource", FusionAuthKeyArgs.builder()
.algorithm("string")
.keyId("string")
.length(0)
.name("string")
.build());
fusion_auth_key_resource = fusionauth.FusionAuthKey("fusionAuthKeyResource",
algorithm="string",
key_id="string",
length=0,
name="string")
const fusionAuthKeyResource = new fusionauth.FusionAuthKey("fusionAuthKeyResource", {
algorithm: "string",
keyId: "string",
length: 0,
name: "string",
});
type: fusionauth:FusionAuthKey
properties:
algorithm: string
keyId: string
length: 0
name: string
FusionAuthKey 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 FusionAuthKey resource accepts the following input properties:
- Algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- Key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- Length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- Name string
- The name of the Key.
- Algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- Key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- Length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- Name string
- The name of the Key.
- algorithm String
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id String - The Id to use for the new key. If not specified a secure random UUID will be generated.
- length Integer
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name String
- The name of the Key.
- algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- length number
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name string
- The name of the Key.
- algorithm str
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key_
id str - The Id to use for the new key. If not specified a secure random UUID will be generated.
- length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name str
- The name of the Key.
- algorithm String
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id String - The Id to use for the new key. If not specified a secure random UUID will be generated.
- length Number
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name String
- The name of the Key.
Outputs
All input properties are implicitly available as output properties. Additionally, the FusionAuthKey resource produces the following output properties:
Look up Existing FusionAuthKey Resource
Get an existing FusionAuthKey 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?: FusionAuthKeyState, opts?: CustomResourceOptions): FusionAuthKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
key_id: Optional[str] = None,
kid: Optional[str] = None,
length: Optional[int] = None,
name: Optional[str] = None) -> FusionAuthKey
func GetFusionAuthKey(ctx *Context, name string, id IDInput, state *FusionAuthKeyState, opts ...ResourceOption) (*FusionAuthKey, error)
public static FusionAuthKey Get(string name, Input<string> id, FusionAuthKeyState? state, CustomResourceOptions? opts = null)
public static FusionAuthKey get(String name, Output<String> id, FusionAuthKeyState 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.
- Algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- Key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- Kid string
- The id used in the JWT header to identify the key used to generate the signature
- Length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- Name string
- The name of the Key.
- Algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- Key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- Kid string
- The id used in the JWT header to identify the key used to generate the signature
- Length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- Name string
- The name of the Key.
- algorithm String
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id String - The Id to use for the new key. If not specified a secure random UUID will be generated.
- kid String
- The id used in the JWT header to identify the key used to generate the signature
- length Integer
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name String
- The name of the Key.
- algorithm string
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id string - The Id to use for the new key. If not specified a secure random UUID will be generated.
- kid string
- The id used in the JWT header to identify the key used to generate the signature
- length number
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name string
- The name of the Key.
- algorithm str
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key_
id str - The Id to use for the new key. If not specified a secure random UUID will be generated.
- kid str
- The id used in the JWT header to identify the key used to generate the signature
- length int
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name str
- The name of the Key.
- algorithm String
- The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:
ES256
- ECDSA using P-256 curve and SHA-256 hash algorithmES384
- ECDSA using P-384 curve and SHA-384 hash algorithmES512
- ECDSA using P-521 curve and SHA-512 hash algorithmRS256
- RSA using SHA-256 hash algorithmRS384
- RSA using SHA-384 hash algorithmRS512
- RSA using SHA-512 hash algorithmHS256
- HMAC using SHA-256 hash algorithmHS384
- HMAC using SHA-384 hash algorithmHS512
- HMAC using SHA-512 hash algorithm
- key
Id String - The Id to use for the new key. If not specified a secure random UUID will be generated.
- kid String
- The id used in the JWT header to identify the key used to generate the signature
- length Number
- The length of the RSA or EC certificate. This field is required when generating RSA key types.
- name String
- The name of the Key.
Package Details
- Repository
- fusionauth theogravity/pulumi-fusionauth
- License
- MIT
- Notes
- This Pulumi package is based on the
fusionauth
Terraform Provider.