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# Supported MFA triggers for the Helix Perforce Server
See [Perforce second factor authentication](https://www.perforce.com/perforce/doc.current/manuals/p4sag/Content/P4SAG/triggers.second_factor_auth.html) for more information on MFA triggers.
## [okta/okta-mfa.rb](https://swarm.workshop.perforce.com/projects/perforce_software-mfa/files/main/okta/okta-mfa.rb)
#### Installation
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://...
#### okta-mfa.rb command line options
-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
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #3 | 24372 | Doug Scheirer | Link fix | ||
| #2 | 24371 | Doug Scheirer | Link for okta-mfa.rb | ||
| #1 | 24370 | Doug Scheirer | First pass at README |