Bug #17691

[Workbench2] the "add new ssh key" page does overly strict validation

Added by Ward Vandewege 4 months ago. Updated 30 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Start date:
08/02/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

The "Add new ssh key" form seems to require a key format that is "ssh-rsa thewholelongkey some-comment@something". If "some-comment@something" is not present, the user sees "Public key is invalid" in red, which is not true.

This form should not require a comment on the key.


Subtasks

Task #17959: Review 17681-relax-add-ssh-validationResolvedStephen Smith

Associated revisions

Revision fd49462a
Added by Stephen Smith about 2 months ago

Merge branch '17691-relax-add-ssh-validation' into main. Closes #17691

Arvados-DCO-1.1-Signed-off-by: Stephen Smith <>

History

#1 Updated by Ward Vandewege 4 months ago

  • Description updated (diff)

#2 Updated by Ward Vandewege about 2 months ago

  • Description updated (diff)

#3 Updated by Ward Vandewege about 2 months ago

  • Release deleted (31)
  • Target version set to 2021-08-04 sprint
  • Assigned To set to Stephen Smith

#4 Updated by Stephen Smith about 2 months ago

  • Status changed from New to In Progress

#5 Updated by Stephen Smith about 2 months ago

Changes at 065273b6a85d33939edad2b25efaf7028610e1e4 - branch 17681-relax-add-ssh-validation
Tests: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/453/

Updated the ssh key validation regex to accept either (at the end of the key)
  • Original pattern which requires a single space and comment containing @
    or
  • No whitespace at the end of the key

Since the comment validation wasn't mentioned, I assume the existing behavior in requiring something@something is ok
Keys without a comment must not have any trailing whitespace or other characters (hopefully that's not too strict)

#6 Updated by Lucas Di Pentima about 2 months ago

  • Just one suggestion: Some unit tests could be easily added to check that isRsaKey() behaves correctly.

With that, it LGTM.

#7 Updated by Stephen Smith about 2 months ago

  • Status changed from In Progress to Resolved

Added some tests and merged in fd49462a5a09e107b7bb5c0ef8635db328b399b8

#8 Updated by Peter Amstutz 30 days ago

  • Release set to 41

Also available in: Atom PDF