diff -r 351d40b21cbc -r b9eb748ac1e4 YubikeyManagement.php --- a/YubikeyManagement.php Fri Apr 08 17:23:16 2016 -0400 +++ b/YubikeyManagement.php Mon Apr 11 11:23:30 2016 -0400 @@ -92,6 +92,7 @@ msg_no_yubikeys: 'No Yubikeys found', msg_editing_zero: 'Notice: You are currently viewing the YMS profile for Client ID 0, the pool of claimable keys. By default, anybody can validate or claim these Yubikeys, but you can prevent validation of these keys by marking them inactive here. All key settings such as lifecycle state and notes are reset when a user claims a key here.', btn_add_key: 'Add Yubikey', + btn_add_batch: 'Batch upload Yubikeys', btn_add_key_preregistered: 'Claim a New Key', btn_switch_to_zero: 'Edit claimable pool', btn_switch_from_zero: 'Switch back to my client', @@ -129,6 +130,41 @@ err_addkey_invalid_otp: 'The OTP from the Yubikey is invalid.', err_addkey_key_exists: 'This Yubikey is already registered on this server.', + // Batch add key interface + lbl_add_batch_heading: 'Batch upload new Yubikeys', + lbl_add_batch_desc: '

Using this form you can upload a CSV file containing any number of new Yubikeys to add.

+

Binary columns may be in either hexadecimal or ModHex format. If the format is ambiguous, hexadecimal will be assumed.

+

The header for the CSV must specify which columns are included. See below:

+ ', + lbl_add_batch_field_csv: 'Paste CSV:', + lbl_add_batch_field_csv_hint: 'See the format documentation above.', + btn_add_batch_submit: 'Register Yubikeys', + + err_add_batch_missing_aes_key: 'Column "aes_secret" is missing.', + err_add_batch_missing_id: 'You must provide either the "otp" column or "public_id" and "private_id".', + + lbl_add_batch_success_head: 'CSV processed successfully.', + err_add_batch_success: 'Line %line%, public ID %public_id%: success', + err_add_batch_bad_row_count: 'Line %line%: Missing or extra columns', + err_add_batch_aes_secret: 'Line %line%: AES key must be 16 bytes binary', + err_add_batch_bad_otp: 'Line %line%: Failed to decode OTP', + err_add_batch_bad_public_id: 'Line %line%: Public ID must be 6 bytes binary', + err_add_batch_bad_lifecycle_state: 'Line %line%: Lifecycle state must be "active" or "inactive"', + err_add_batch_bad_access: 'Line %line%: Access must be "global" or "restricted"', + err_add_batch_duplicate: 'Line %line%, public ID %public_id%: Duplicate Yubikey, this key is already registered in the system', + err_add_batch_query: 'Line %line%, public ID %public_id%: SQL error: %error%', + // Claim key interface lbl_claimkey_heading: 'Claim Yubikey', lbl_claimkey_desc: 'Attach a key you have not reprogrammed to your YMS account, so that you can see its AES secret key and keep track of it.',