38,907
edits
(Created page with "Authentification multifacteur") |
(Updating to match new version of source page) |
||
Line 2: | Line 2: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Multifactor authentication (MFA) allows you to protect your account with more than a password. Once your account is | Multifactor authentication (MFA) allows you to protect your account with more than a password. Once your account is configured to use this feature, you will need to enter your username and password as usual, and then perform a second action (the <i>second factor</i>) to access our services. <br> | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Factors for this second authentication step currently are: | |||
*approving a notification on a smart device through the Duo Mobile application; | |||
*entering a code generated on demand; | |||
*pushing a button on a hardware key (YubiKey).<br> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
This feature will be progressively deployed; however, some of our services may not support it. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
= Registering factors = | |||
== Registering multiple factors == | |||
When you enable multifactor authentication for your account, we <b>strongly recommend</b> that you configure at least two options for your second factor. For example, you can use a phone and single-use codes; a phone and a hardware key; or two hardware keys. This will ensure that if you lose one factor, you can still use your other one to access your account. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== | == To use a smartphone or tablet == | ||
= | #Install the Duo Mobile authentication application from the [https://itunes.apple.com/us/app/duo-mobile/id422663827 Apple Store] or on [https://play.google.com/store/apps/details?id=com.duosecurity.duomobile Google Play] | ||
#Connect to your account and select <i>My account → [https://ccdb.computecanada.ca/multi_factor_authentications Multifactor authentication management]</i>. | |||
#Under <i>Register a device</i>, click on <i>Duo Mobile</i>. | |||
#Enter a name for your device. | |||
#Scan the QR code that is shown to you. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== | == To use a YubiKey == | ||
A YubiKey is a hardware token made by the company Yubico. If you do not have a smartphone or tablet, do not wish to use your phone or tablet for multifactor authentication, or are often in a situation when using your phone or tablet is not possible, then a YubiKey is your best option. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
A YubiKey is the size of a small USB stick and costs between $50 and $100. Different models can fit in USB-A, USB-C, or Lightning ports, and some also support near-field communication (NFC) for use with a phone or tablet. | |||
</div> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
YubiKeys | Among the many protocols supported by YubiKeys, the one which works with SSH connections to our clusters is the Yubico One-Time Password (OTP). After you have registered a YubiKey for multifactor authentication, when you log in to one of our clusters you will be prompted for a one-time password (OTP). You respond by touching a button on your YubiKey, which generates and transmits a string of 32 characters to complete your authentication. | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
To register your YubiKey you will need its Public ID, Private ID, and Secret Key. If you have this information, go to the [https://ccdb.computecanada.ca/multi_factor_authentications Multifactor authentication management page]. If you do not have this information, configure your key using the steps below. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
=== Configuring your YubiKey for Yubico OTP === | |||
</div> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
# Download and install the YubiKey Manager software from the [https://www.yubico.com/support/download/yubikey-manager/ Yubico website]. | # Download and install the YubiKey Manager software from the [https://www.yubico.com/support/download/yubikey-manager/ Yubico website]. | ||
# Insert your YubiKey and launch the YubiKey Manager software. | # Insert your YubiKey and launch the YubiKey Manager software. | ||
# In the YubiKey Manager software, select < | # In the YubiKey Manager software, select <i>Applications</i>, then <i>OTP</i> | ||
# Select < | # Select <i>Configure</i> for either slot 1 or slot 2. Slot 1 corresponds to a short touch, while slot 2 is a long touch on the key. Slot 1 is typically pre-registered for Yubico cloud mode. If you are already using this slot for other services, either use slot 2, or click on <i>Swap</i> to transfer the configuration to slot 2. | ||
# Select < | # Select <i>Yubico OTP</i> | ||
# Select < | # Select <i>Use serial</i>, then generate a private ID and a secret key. <b>Securely save a copy of the data in the Public ID, Private ID, and Secret Key fields before you click on <i>Finish</i>, as you will need the data for the next step.</b> | ||
# Keep the previous screen open and log into the CCDB to register your YubiKey in | # Keep the previous screen open and log into the CCDB to register your YubiKey in the <i>[https://ccdb.computecanada.ca/multi_factor_authentications Multifactor authentication management page]</i>. | ||
<gallery widths=300px heights=300px> | <gallery widths=300px heights=300px> | ||
File:Yubico Manager OTP.png|Step 3 | File:Yubico Manager OTP.png|Step 3 | ||
Line 52: | Line 70: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
= Using your second factor = | |||
== When connecting via SSH == | |||
If your account has multifactor authentication enabled, when you connect via SSH to a cluster which supports MFA, you will be prompted to use your second factor after you first use either your password or your [[SSH Keys|SSH key]]. This prompt will look like this: | |||
{{Command|ssh cluster.computecanada.ca | {{Command|ssh cluster.computecanada.ca | ||
|result= Duo two-factor login for name | |result= Duo two-factor login for name | ||
Line 69: | Line 87: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Passcode or option (1-1):}} | Passcode or option (1-1):}} | ||
At this point, you can either select which phone or tablet | At this point, you can either select which phone or tablet you want Duo to send a notification to. If you have multiple devices enrolled, you will be shown a list. You will then get a notification on your device, which you accept to complete the authentication. | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
If you are using a YubiKey, a backup code, or if you prefer to enter the time-based one-time password that the Duo Mobile application shows, you would write these instead of selecting an option. For example: | If you are using a YubiKey, a backup code, or if you prefer to enter the time-based one-time password that the Duo Mobile application shows, you would write these instead of selecting an option. For example: | ||
{{Command|ssh cluster.computecanada.ca | {{Command|ssh cluster.computecanada.ca | ||
|result= Duo two-factor login for name | |result= Duo two-factor login for name | ||
Line 92: | Line 110: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
=== Configuring your SSH client to only ask every so often === | |||
If you use OpenSSH to connect, you can reduce the frequency with which you are asked for a second factor. To do so, edit your <code>.ssh/config</code> to add the lines: | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<pre> | <pre> | ||
Host HOSTNAME | Host HOSTNAME | ||
Line 100: | Line 121: | ||
ControlPersist 10m | ControlPersist 10m | ||
</pre> | </pre> | ||
where you would replace < | where you would replace <code>HOSTNAME</code> with the host name of the server for which you want this configuration. | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== When authenticating to our account portal == | |||
Once multifactor authentication is enabled on your account, you will be required to use it when connecting to our account portal. After | Once multifactor authentication is enabled on your account, you will be required to use it when connecting to our account portal. After entering your username and password, you will see a prompt similar to this, where you click on the option you want to use. | ||
<gallery widths=300px heights=300px> | <gallery widths=300px heights=300px> | ||
File:CCDB MFA prompt.png | File:CCDB MFA prompt.png | ||
</gallery> | </gallery> | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
= Frequently asked questions = | |||
=== I do not have a | === I do not have a smartphone or tablet, or they are too old. Can I still use multifactor authentication? === | ||
Yes. In this case, you need to use | Yes. In this case, you need [[#To use a YubiKey|to use a YubiKey]]. | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
=== I have lost my second factor device. What can I do? === | === I have lost my second factor device. What can I do? === | ||
* If you have backup codes, or if you have more than one device, use that other mechanism to connect to your account on our [https://ccdb.computecanada.ca/multi_factor_authentications account portal], and then delete your lost device. Then, register a new device. | * If you have backup codes, or if you have more than one device, use that other mechanism to connect to your account on our [https://ccdb.computecanada.ca/multi_factor_authentications account portal], and then delete your lost device from the list. Then, register a new device. | ||
* If you do not have backup codes, or if have lost all of your devices, contact | * If you do not have backup codes, or if have lost all of your devices, contact [[technical support]] for assistance. | ||
</div> | </div> |