Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start workspace with public SSH key stored on an alias with unexpected characters #19024

Closed
skabashnyuk opened this issue Feb 10, 2021 · 0 comments · Fixed by #19031
Assignees
Labels
area/che-server kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@skabashnyuk
Copy link
Contributor

Is your task related to a problem? Please describe.

When a workspace is created and a new public SSH key is added while alias for this SSH Key contains unexpected characters, then:

  1. The key is inaccessible with SSH View Public Key
  2. The workspace cannot be opened while this error is printed:
Error: Failed to run the workspace: "Failure executing: POST at: https://172.25.0.1/api/v1/namespaces/rludva-codeready/secrets. Message: Secret "workspaceydj4p4unbgz9f6ze-sshprivatekeys" is invalid: data[https://c-example.net]: Invalid value: "https://c-example.net": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+'). Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=data[https://c-example.net], message=Invalid value: "https://c-example.net": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+'), reason=FieldValueInvalid, additionalProperties={})], group=null, kind=Secret, name=workspaceydj4p4unbgz9f6ze-sshprivatekeys, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Secret "workspaceydj4p4unbgz9f6ze-sshprivatekeys" is invalid: data[https://c-example.net]: Invalid value: "https://c-example.net": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+'), metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={})."
  1. Any other workspace is not possible to create so the whole environment is blocked.

Describe the solution you'd like

  • Workspaces should be able to start without errors with mounted ssh keys.
  • We should validate the alias of the ssh key before we add it to the permanent storage.

Describe alternatives you've considered

Additional context

@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. area/che-server kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. and removed kind/task Internal things, technical debt, and to-do tasks to be performed. labels Feb 10, 2021
This was referenced Feb 10, 2021
@skabashnyuk skabashnyuk added this to the 7.27 milestone Feb 10, 2021
@skabashnyuk skabashnyuk self-assigned this Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
1 participant