See Perforce second factor authentication for more information on MFA triggers.
You will need to install the ruby and rest-client gem and support package on linux:
sudo apt-get install ruby-dev
The above is to install the header files for ruby, so the gem install below can compile the native parts.
sudo gem install rest-client
To install the trigger, run ruby okta-mfa.rb -o
to output the appropriate trigger lines for insertion into the triggers table using the p4 triggers
command. You must either provide a configuration file with your Okta configuration or modify the okta-mfa.rb
file directly.
The configuration file format is YAML and supports the following settings:
logging : /var/log/triggers/triggers.log
okta_key: (obtain from your okta admin console)
okta_url: https://...
-o, --output Output the required trigger lines
-c, --config=CONFIGFILE Configuration file for Okta presets
-u, --user=USER User ID
-e, --email=email User email
-h, --host=HOST Host machine
-t, --type=TYPE Trigger type
-s, --scheme=SCHEME 2fa scheme
-m, --method=METHOD 2fa method
-T, --token=TOKEN 2fa token