fusionauth.FusionAuthImportedKey
Explore with Pulumi AI
# 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.
Example Usage
using System.Collections.Generic;
using System.IO;
using Pulumi;
using Fusionauth = theogravity.Fusionauth;
return await Deployment.RunAsync(() =>
{
var name = new Fusionauth.FusionAuthImportedKey("name", new()
{
Kid = "8675309",
PrivateKey = File.ReadAllText("./AuthKey_8675309.p8"),
});
});
package main
import (
"os"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/theogravity/pulumi-fusionauth/sdk/v2/go/fusionauth"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := os.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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fusionauth.FusionAuthImportedKey;
import com.pulumi.fusionauth.FusionAuthImportedKeyArgs;
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 name = new FusionAuthImportedKey("name", FusionAuthImportedKeyArgs.builder()
.kid("8675309")
.privateKey(Files.readString(Paths.get("./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 fs from "fs";
import * as fusionauth from "pulumi-fusionauth";
const name = new fusionauth.FusionAuthImportedKey("name", {
kid: "8675309",
privateKey: fs.readFileSync("./AuthKey_8675309.p8"),
});
resources:
name:
type: fusionauth:FusionAuthImportedKey
properties:
kid: '8675309'
privateKey:
fn::readFile: ./AuthKey_8675309.p8
Create 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.
- Key
Id 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.
- Private
Key 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.
- Public
Key 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:
- 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.
- Key
Id 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.
- Private
Key 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.
- Public
Key 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
- 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
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 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.
- 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.
- Key
Id 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.
- Private
Key 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.
- Public
Key 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:
- 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.
- Key
Id 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.
- Private
Key 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.
- Public
Key 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
- 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:
- 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.
- key
Id 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.
- private
Key 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.
- public
Key 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:
Package Details
- Repository
- fusionauth theogravity/pulumi-fusionauth
- License
- MIT
- Notes
This Pulumi package is based on the
fusionauth
Terraform Provider.