FusionAuth

Community
Package contributed by a community member
v0.9.7 published on Thursday, Jul 28, 2022 by Theo Gravity

FusionAuthImportedKey

# Imported 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.

Keys API

Example Usage

using System.IO;
using Pulumi;
using Fusionauth = theogravity.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var name = new Fusionauth.FusionAuthImportedKey("name", new Fusionauth.FusionAuthImportedKeyArgs
        {
            Kid = "8675309",
            PrivateKey = File.ReadAllText("./AuthKey_8675309.p8"),
        });
    }

}
package main

import (
	"io/ioutil"

	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.NewFusionAuthImportedKey(ctx, "name", &fusionauth.FusionAuthImportedKeyArgs{
			Kid:        pulumi.String("8675309"),
			PrivateKey: readFileOrPanic("./AuthKey_8675309.p8"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var name = new FusionAuthImportedKey("name", FusionAuthImportedKeyArgs.builder()        
            .kid("8675309")
            .privateKey(Files.readString("./AuthKey_8675309.p8"))
            .build());

    }
}
import pulumi
import theogravity_pulumi-fusionauth as fusionauth

name = fusionauth.FusionAuthImportedKey("name",
    kid="8675309",
    private_key=(lambda path: open(path).read())("./AuthKey_8675309.p8"))
import * as pulumi from "@pulumi/pulumi";
import * as pulumi_fusionauth from "pulumi-fusionauth";
import * from "fs";

const name = new fusionauth.FusionAuthImportedKey("name", {
    kid: "8675309",
    privateKey: fs.readFileSync("./AuthKey_8675309.p8"),
});

Coming soon!

Create a FusionAuthImportedKey Resource

new FusionAuthImportedKey(name: string, args?: FusionAuthImportedKeyArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthImportedKey(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          algorithm: Optional[str] = None,
                          certificate: Optional[str] = None,
                          key_id: Optional[str] = None,
                          kid: Optional[str] = None,
                          name: Optional[str] = None,
                          private_key: Optional[str] = None,
                          public_key: Optional[str] = None,
                          secret: Optional[str] = None,
                          type: Optional[str] = None)
@overload
def FusionAuthImportedKey(resource_name: str,
                          args: Optional[FusionAuthImportedKeyArgs] = None,
                          opts: Optional[ResourceOptions] = None)
func NewFusionAuthImportedKey(ctx *Context, name string, args *FusionAuthImportedKeyArgs, opts ...ResourceOption) (*FusionAuthImportedKey, error)
public FusionAuthImportedKey(string name, FusionAuthImportedKeyArgs? args = null, CustomResourceOptions? opts = null)
public FusionAuthImportedKey(String name, FusionAuthImportedKeyArgs args)
public FusionAuthImportedKey(String name, FusionAuthImportedKeyArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthImportedKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FusionAuthImportedKeyArgs
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 FusionAuthImportedKeyArgs
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 FusionAuthImportedKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FusionAuthImportedKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FusionAuthImportedKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FusionAuthImportedKey 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 FusionAuthImportedKey resource accepts the following input properties:

Algorithm string

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

Certificate string

The certificate to import. The publicKey will be extracted from the certificate.

KeyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

Kid string

The Key identifier 'kid'.

Name string

The name of the Key.

PrivateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

PublicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

Secret string

The Key secret. This field is required if importing an HMAC key type.

Type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
Algorithm string

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

Certificate string

The certificate to import. The publicKey will be extracted from the certificate.

KeyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

Kid string

The Key identifier 'kid'.

Name string

The name of the Key.

PrivateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

PublicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

Secret string

The Key secret. This field is required if importing an HMAC key type.

Type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm String

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate String

The certificate to import. The publicKey will be extracted from the certificate.

keyId String

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid String

The Key identifier 'kid'.

name String

The name of the Key.

privateKey String

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey String

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret String

The Key secret. This field is required if importing an HMAC key type.

type String

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm string

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate string

The certificate to import. The publicKey will be extracted from the certificate.

keyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid string

The Key identifier 'kid'.

name string

The name of the Key.

privateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret string

The Key secret. This field is required if importing an HMAC key type.

type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm str

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate str

The certificate to import. The publicKey will be extracted from the certificate.

key_id str

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid str

The Key identifier 'kid'.

name str

The name of the Key.

private_key str

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

public_key str

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret str

The Key secret. This field is required if importing an HMAC key type.

type str

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm String

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate String

The certificate to import. The publicKey will be extracted from the certificate.

keyId String

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid String

The Key identifier 'kid'.

name String

The name of the Key.

privateKey String

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey String

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret String

The Key secret. This field is required if importing an HMAC key type.

type String

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC

Outputs

All input properties are implicitly available as output properties. Additionally, the FusionAuthImportedKey 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 an Existing FusionAuthImportedKey Resource

Get an existing FusionAuthImportedKey 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?: FusionAuthImportedKeyState, opts?: CustomResourceOptions): FusionAuthImportedKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        algorithm: Optional[str] = None,
        certificate: Optional[str] = None,
        key_id: Optional[str] = None,
        kid: Optional[str] = None,
        name: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: Optional[str] = None,
        secret: Optional[str] = None,
        type: Optional[str] = None) -> FusionAuthImportedKey
func GetFusionAuthImportedKey(ctx *Context, name string, id IDInput, state *FusionAuthImportedKeyState, opts ...ResourceOption) (*FusionAuthImportedKey, error)
public static FusionAuthImportedKey Get(string name, Input<string> id, FusionAuthImportedKeyState? state, CustomResourceOptions? opts = null)
public static FusionAuthImportedKey get(String name, Output<String> id, FusionAuthImportedKeyState 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

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

Certificate string

The certificate to import. The publicKey will be extracted from the certificate.

KeyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

Kid string

The Key identifier 'kid'.

Name string

The name of the Key.

PrivateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

PublicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

Secret string

The Key secret. This field is required if importing an HMAC key type.

Type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
Algorithm string

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

Certificate string

The certificate to import. The publicKey will be extracted from the certificate.

KeyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

Kid string

The Key identifier 'kid'.

Name string

The name of the Key.

PrivateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

PublicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

Secret string

The Key secret. This field is required if importing an HMAC key type.

Type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm String

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate String

The certificate to import. The publicKey will be extracted from the certificate.

keyId String

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid String

The Key identifier 'kid'.

name String

The name of the Key.

privateKey String

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey String

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret String

The Key secret. This field is required if importing an HMAC key type.

type String

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm string

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate string

The certificate to import. The publicKey will be extracted from the certificate.

keyId string

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid string

The Key identifier 'kid'.

name string

The name of the Key.

privateKey string

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey string

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret string

The Key secret. This field is required if importing an HMAC key type.

type string

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm str

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate str

The certificate to import. The publicKey will be extracted from the certificate.

key_id str

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid str

The Key identifier 'kid'.

name str

The name of the Key.

private_key str

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

public_key str

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret str

The Key secret. This field is required if importing an HMAC key type.

type str

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC
algorithm String

The algorithm used to encrypt the Key. The following values represent algorithms supported by FusionAuth:

certificate String

The certificate to import. The publicKey will be extracted from the certificate.

keyId String

The Id to use for the new key. If not specified a secure random UUID will be generated.

kid String

The Key identifier 'kid'.

name String

The name of the Key.

privateKey String

The Key private key. Optional if importing an RSA or EC key. If the key is only to be used for token validation, only a public key is necessary and this field may be omitted.

publicKey String

"The Key public key. Required if importing an RSA or EC key and a certificate is not provided."

secret String

The Key secret. This field is required if importing an HMAC key type.

type String

The Key type. This field is required if importing an HMAC key type, or if importing a public key / private key pair. The possible values are:

  • EC
  • RSA
  • HMAC

Package Details

Repository
https://github.com/theogravity/pulumi-fusionauth
License
MIT
Notes

This Pulumi package is based on the fusionauth Terraform Provider.