Time-base One-Time Password Algorithm (RFC 6238) with CyberArk integration of seed as secret retrieval
This is an implementation of the RFC 6238 Time-Based One-Time Password Algorithm draft based upon the HMAC-based One-Time Password (HOTP) algorithm (RFC 4226). This is a time based variant of the HOTP algorithm providing short-lived OTP values.
Credits for the HOTP powershell implementation goes to Jon Friesen and his provided TOTP powershell function https://gist.github.com/jonfriesen/234c7471c3e3199f97d5
The example platform MFA-TOTP_Platform.zip can be imported. It takes existing parameters (Timeout/Duration) for OTP size and duration.
Calculate OTP from a CyberArk Account
Default Parameter set
Search keywords and filter to specify an account which has the seed secret and given platform with Time-Step and Digits parameters (optional)
RADIUS, LDAP or CyberArk (Default: LDAP)
MFA Platform that will be added to the account search. Set a default to make the search easier, e.g. this could enable to search for MFA seeds via "username" only.
Pvwa BaseUrl and Applicationlike: "https://pvwa.acme.com/PasswordVault"
Generate a TOTP based on a given seed without any CyberArk connection/retrieval
BASE32 seed
Time step windows in seconds (Default: 30)
Number of digits of the calculated OTP (Default: 6)
Set -CopyToClipboard:$false to not copy the resulted OTP into the actual clipboard
Calculate OTP from a CyberArk Account (Default Auth Method LDAP, )
.\CyberArk-GetOTP.ps1 -AccountSearch "root-mfa,1.1.1.1&filter=safeName eq AWS_ROOT"
Calculate OTP from a seed secret to insert directly (Default Digits = 6, Time Step Interval = 30s)
.\CyberArk-GetOTP.ps1 -OTPOnly
Calculate OTP from a seed as secureString (Default Digits = 6, Time Step Interval = 30s)
.\CyberArk-GetOTP.ps1 -OTPOnly -Secret $secureString
Check also the PSM-TOTPToken from CyberArk to add as additional PSM RDP Connection which calculates the TOTP in the RDP session. https://cyberark-customers.force.com/mplace/s/#a352J000000GPw5QAG-a392J000002hZX8QAM
Add this as connection component to the MFA-TOTP Platform or download the MFA-TOTP_withPSMTOTP Platform directly.
- Reto Schelbert : Gravitir AG
- Jon Friesen : TOTP powershell function https://gist.github.com/jonfriesen/234c7471c3e3199f97d5