okta.FactorTotp
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
using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.FactorTotp("example", new()
{
ClockDriftInterval = 10,
HmacAlgorithm = "HMacSHA256",
OtpLength = 10,
SharedSecretEncoding = "hexadecimal",
TimeStep = 30,
});
});
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v3/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{
ClockDriftInterval: pulumi.Int(10),
HmacAlgorithm: pulumi.String("HMacSHA256"),
OtpLength: pulumi.Int(10),
SharedSecretEncoding: pulumi.String("hexadecimal"),
TimeStep: pulumi.Int(30),
})
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.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()
.clockDriftInterval(10)
.hmacAlgorithm("HMacSHA256")
.otpLength(10)
.sharedSecretEncoding("hexadecimal")
.timeStep(30)
.build());
}
}
import pulumi
import pulumi_okta as okta
example = okta.FactorTotp("example",
clock_drift_interval=10,
hmac_algorithm="HMacSHA256",
otp_length=10,
shared_secret_encoding="hexadecimal",
time_step=30)
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.FactorTotp("example", {
clockDriftInterval: 10,
hmacAlgorithm: "HMacSHA256",
otpLength: 10,
sharedSecretEncoding: "hexadecimal",
timeStep: 30,
});
resources:
example:
type: okta:FactorTotp
properties:
clockDriftInterval: 10
hmacAlgorithm: HMacSHA256
otpLength: 10
sharedSecretEncoding: hexadecimal
timeStep: 30
Create FactorTotp Resource
new FactorTotp(name: string, args?: FactorTotpArgs, opts?: CustomResourceOptions);
@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)
@overload
def FactorTotp(resource_name: str,
args: Optional[FactorTotpArgs] = None,
opts: Optional[ResourceOptions] = 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.
- 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.
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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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 is"HMacSHA512"
.- 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 is"base32"
.- 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.