okta.FactorTotp
Explore with Pulumi AI
Allows you to manage the time-based one-time password (TOTP) factors. A time-based one-time password (TOTP) is a temporary passcode that is generated for user authentication. Examples of TOTP include hardware authenticators and mobile app authenticators.
Once saved, the settings cannot be changed (except for the ’name’ field). Any other change would force resource recreation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.FactorTotp("example", {
name: "example",
otpLength: 10,
hmacAlgorithm: "HMacSHA256",
timeStep: 30,
clockDriftInterval: 10,
sharedSecretEncoding: "hexadecimal",
});
import pulumi
import pulumi_okta as okta
example = okta.FactorTotp("example",
name="example",
otp_length=10,
hmac_algorithm="HMacSHA256",
time_step=30,
clock_drift_interval=10,
shared_secret_encoding="hexadecimal")
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := okta.NewFactorTotp(ctx, "example", &okta.FactorTotpArgs{
Name: pulumi.String("example"),
OtpLength: pulumi.Int(10),
HmacAlgorithm: pulumi.String("HMacSHA256"),
TimeStep: pulumi.Int(30),
ClockDriftInterval: pulumi.Int(10),
SharedSecretEncoding: pulumi.String("hexadecimal"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.FactorTotp("example", new()
{
Name = "example",
OtpLength = 10,
HmacAlgorithm = "HMacSHA256",
TimeStep = 30,
ClockDriftInterval = 10,
SharedSecretEncoding = "hexadecimal",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.FactorTotp;
import com.pulumi.okta.FactorTotpArgs;
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 example = new FactorTotp("example", FactorTotpArgs.builder()
.name("example")
.otpLength(10)
.hmacAlgorithm("HMacSHA256")
.timeStep(30)
.clockDriftInterval(10)
.sharedSecretEncoding("hexadecimal")
.build());
}
}
resources:
example:
type: okta:FactorTotp
properties:
name: example
otpLength: 10
hmacAlgorithm: HMacSHA256
timeStep: 30
clockDriftInterval: 10
sharedSecretEncoding: hexadecimal
Create FactorTotp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FactorTotp(name: string, args?: FactorTotpArgs, opts?: CustomResourceOptions);
@overload
def FactorTotp(resource_name: str,
args: Optional[FactorTotpArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def FactorTotp(resource_name: str,
opts: Optional[ResourceOptions] = None,
clock_drift_interval: Optional[int] = None,
hmac_algorithm: Optional[str] = None,
name: Optional[str] = None,
otp_length: Optional[int] = None,
shared_secret_encoding: Optional[str] = None,
time_step: Optional[int] = None)
func NewFactorTotp(ctx *Context, name string, args *FactorTotpArgs, opts ...ResourceOption) (*FactorTotp, error)
public FactorTotp(string name, FactorTotpArgs? args = null, CustomResourceOptions? opts = null)
public FactorTotp(String name, FactorTotpArgs args)
public FactorTotp(String name, FactorTotpArgs args, CustomResourceOptions options)
type: okta:FactorTotp
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 FactorTotpArgs
- 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 FactorTotpArgs
- 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 FactorTotpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FactorTotpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FactorTotpArgs
- 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 factorTotpResource = new Okta.FactorTotp("factorTotpResource", new()
{
ClockDriftInterval = 0,
HmacAlgorithm = "string",
Name = "string",
OtpLength = 0,
SharedSecretEncoding = "string",
TimeStep = 0,
});
example, err := okta.NewFactorTotp(ctx, "factorTotpResource", &okta.FactorTotpArgs{
ClockDriftInterval: pulumi.Int(0),
HmacAlgorithm: pulumi.String("string"),
Name: pulumi.String("string"),
OtpLength: pulumi.Int(0),
SharedSecretEncoding: pulumi.String("string"),
TimeStep: pulumi.Int(0),
})
var factorTotpResource = new FactorTotp("factorTotpResource", FactorTotpArgs.builder()
.clockDriftInterval(0)
.hmacAlgorithm("string")
.name("string")
.otpLength(0)
.sharedSecretEncoding("string")
.timeStep(0)
.build());
factor_totp_resource = okta.FactorTotp("factorTotpResource",
clock_drift_interval=0,
hmac_algorithm="string",
name="string",
otp_length=0,
shared_secret_encoding="string",
time_step=0)
const factorTotpResource = new okta.FactorTotp("factorTotpResource", {
clockDriftInterval: 0,
hmacAlgorithm: "string",
name: "string",
otpLength: 0,
sharedSecretEncoding: "string",
timeStep: 0,
});
type: okta:FactorTotp
properties:
clockDriftInterval: 0
hmacAlgorithm: string
name: string
otpLength: 0
sharedSecretEncoding: string
timeStep: 0
FactorTotp 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 FactorTotp resource accepts the following input properties:
- Clock
Drift intInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - Hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - Name string
- The TOTP name.
- Otp
Length int - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - Time
Step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- Clock
Drift intInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - Hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - Name string
- The TOTP name.
- Otp
Length int - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - Time
Step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift IntegerInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm String - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name String
- The TOTP name.
- otp
Length Integer - Length of the password. Default is
6
. - String
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step Integer - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift numberInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name string
- The TOTP name.
- otp
Length number - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step number - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock_
drift_ intinterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac_
algorithm str - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name str
- The TOTP name.
- otp_
length int - Length of the password. Default is
6
. - str
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time_
step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift NumberInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm String - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name String
- The TOTP name.
- otp
Length Number - Length of the password. Default is
6
. - String
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step Number - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
Outputs
All input properties are implicitly available as output properties. Additionally, the FactorTotp 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 FactorTotp Resource
Get an existing FactorTotp 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?: FactorTotpState, opts?: CustomResourceOptions): FactorTotp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
clock_drift_interval: Optional[int] = None,
hmac_algorithm: Optional[str] = None,
name: Optional[str] = None,
otp_length: Optional[int] = None,
shared_secret_encoding: Optional[str] = None,
time_step: Optional[int] = None) -> FactorTotp
func GetFactorTotp(ctx *Context, name string, id IDInput, state *FactorTotpState, opts ...ResourceOption) (*FactorTotp, error)
public static FactorTotp Get(string name, Input<string> id, FactorTotpState? state, CustomResourceOptions? opts = null)
public static FactorTotp get(String name, Output<String> id, FactorTotpState 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.
- Clock
Drift intInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - Hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - Name string
- The TOTP name.
- Otp
Length int - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - Time
Step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- Clock
Drift intInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - Hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - Name string
- The TOTP name.
- Otp
Length int - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - Time
Step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift IntegerInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm String - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name String
- The TOTP name.
- otp
Length Integer - Length of the password. Default is
6
. - String
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step Integer - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift numberInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm string - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name string
- The TOTP name.
- otp
Length number - Length of the password. Default is
6
. - string
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step number - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock_
drift_ intinterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac_
algorithm str - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name str
- The TOTP name.
- otp_
length int - Length of the password. Default is
6
. - str
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time_
step int - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
- clock
Drift NumberInterval - Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values:
3
,5
,10
. Default is3
. - hmac
Algorithm String - HMAC Algorithm. Valid values:
HMacSHA1
,HMacSHA256
,HMacSHA512
. Default isHMacSHA512
. - name String
- The TOTP name.
- otp
Length Number - Length of the password. Default is
6
. - String
- Shared secret encoding. Valid values:
base32
,base64
,hexadecimal
. Default isbase32
. - time
Step Number - Time step in seconds. Valid values:
15
,30
,60
. Default is15
.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
okta
Terraform Provider.