-
Notifications
You must be signed in to change notification settings - Fork 54
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
Only add SSH Agent PostStart event if SSH key with passphrase is used #1340
Milestone
Comments
@l0rd BTW I was unable to pull the specific version of your distro-less image that does not contain
|
AObuchow
added a commit
to AObuchow/devworkspace-operator
that referenced
this issue
Nov 4, 2024
Only add the SSH agent initialization postStart event if an SSH key with a passphrase is being used. fix devfile#1340 Signed-off-by: Andrew Obuchowicz <[email protected]>
AObuchow
added a commit
to AObuchow/devworkspace-operator
that referenced
this issue
Nov 6, 2024
Only add the SSH agent initialization postStart event if an SSH key with a passphrase is being used & experimental features are enabled. We don't use the config package's ExperimentalFeaturesEnabled function so that the SSH agent initialization postStart event injection can be enabled from an external DWOC, or the global DWOC if no external DWOC is used. fix devfile#1340 Signed-off-by: Andrew Obuchowicz <[email protected]>
AObuchow
added a commit
to AObuchow/devworkspace-operator
that referenced
this issue
Nov 7, 2024
Only add the SSH agent initialization postStart event if an SSH key with a passphrase is being used & experimental features are enabled. We don't use the config package's ExperimentalFeaturesEnabled function so that the SSH agent initialization postStart event injection can be enabled from an external DWOC, or the global DWOC if no external DWOC is used. fix devfile#1340 Signed-off-by: Andrew Obuchowicz <[email protected]>
dkwon17
pushed a commit
that referenced
this issue
Nov 7, 2024
Only add the SSH agent initialization postStart event if an SSH key with a passphrase is being used & experimental features are enabled. We don't use the config package's ExperimentalFeaturesEnabled function so that the SSH agent initialization postStart event injection can be enabled from an external DWOC, or the global DWOC if no external DWOC is used. fix #1340 Signed-off-by: Andrew Obuchowicz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we are adding the
init-ssh-agent-command-...
postStart event unconditionally to all workspaces.There are cases where this automatically-injected postStart event can actually cause the workspace to fail. For example, if a devworkspace contains a container component that uses a distro-less image where
sh
is missing, as described here.We should instead only inject the
init-ssh-agent-command-...
postStart event if the SSH secret that will be mounted to the workspace pod actually requires a passphrase.Short term solution
In the short term, we could check if there's an SSH secret with a predefined name
git-ssh-key
(that the Che Dashboard uses) in the workspace's namespace, and check if it has a passphrase. However, this solution creates a coupling between DevWorkspace Operator and the Eclipse Che Dashboard, as DWO does not actually enforce you to name your SSH secretgit-ssh-key
. Instead, it's only given as an example SSH secret name in the docs.Long term solution
In the long term, echo'ing @l0rd's thoughts, we should revise how the automatic SSH passphrase injection is handled:
Some ideas:
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.The text was updated successfully, but these errors were encountered: