Control Git SSH passphrase injection in Che Dashboard instead of DevWorkspace Operator #23248
Labels
area/dashboard
area/devworkspace-operator
kind/task
Internal things, technical debt, and to-do tasks to be performed.
severity/P1
Has a major impact to usage or development of the system.
Is your task related to a problem? Please describe
Currently, DevWorkspace Operator is responsible for injecting a postStart event that allows the workspace's SSH agent to automatically read the SSH passphrase mounted in a workspace.
This SSH agent initialization postStart event was previously injected unconditionally to all workspaces, causing issues such as #23213 & devfile/devworkspace-operator#1337. In order to prevent this feature from breaking existing workspaces, we have guarded this feature under the DevWorkspaceOperatorConfig's
config.enableExperimentalFeatures
option & ensured the postStart event will always succeed.After reconsideration (mentioned in devfile/devworkspace-operator#1337 (comment) and devfile/devworkspace-operator#1340 (comment)) I believe the Che Dashboard would be better suited for injecting the postStart event as well as creating an automount configmap that provides a passphrase-injection script for the SSH agent to use.
Describe the solution you'd like
If the user provides a passphrase for their SSH key, the Dashboard should:
.bashrc
is sourced.Once this functionality is implemented in the Dashboard, we should remove it from DevWorkspace Operator.
Describe alternatives you've considered
Before migrating the SSH passphrase injection functionality from the DevWorkspace Operator to the Che Dashboard, we could:
Keep the SSH agent functionality in DWO, but have it enabled only when a devworkspace attribute is provided, e.g.
controller.devfile.io/initialize-ssh-agent: true
. The Che Dashboard could then add this attribute to devworkspace's when the user provides an SSH key that has a passphrase.By performing this intermediary step, we would no longer have to guard the SSH passphrase injection functionality with the DevWorkspaceOperatorConfigs
config.enableExperimentalFeatures
field. Instead, this functionality would be guarded by thecontroller.devfile.io/initialize-ssh-agent: true
devworkspace attribute, that the Dashboard would inject when appropriate.Additional context
Currently https://issues.redhat.com/browse/CRW-6614 is marked as a Technology Preview Feature. Resolving the current issue (with the proposed solution or the alternate solution) would allow us to move it out of tech preview.
The text was updated successfully, but these errors were encountered: