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

feat: Add user-preferences/profile secrets to the workspace-secret role #172

Closed
wants to merge 1 commit into from

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Oct 27, 2021

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What does this PR do?

Include the user-preferences and user-profile secrets to the workspace-secrets role. This gives an ability to read and edit those secrets.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#20622

How to test this PR?

  1. Start a workspace and open a terminal from the ide container.
  2. Send an HTTP request to the kubernetes API to edit user-preferences secret: curl -X POST <kubernetes API url>/api/v1/namespaces/<namespace name>/secrets/user-preferences --header "Content-Type: application/json-patch+json" -d '[{ "op": "add", "path": "/data", "value": { "key": "" } }]'

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

…secret role

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Oct 27, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@skabashnyuk
Copy link
Contributor

@vinokurig we don't expect someone will write directly to that secrets. On the next provisioning check, the content will be overwritten.

@skabashnyuk
Copy link
Contributor

@vinokurig have you checked that data is not overwritten on the next /namespace/provision call that is going to be called from dashboard on each workspace/factory related operations?

@vinokurig
Copy link
Contributor Author

@skabashnyuk yes, you are right, the data is overwritten after workspace restart.

@l0rd
Copy link
Contributor

l0rd commented Oct 28, 2021

@skabashnyuk @vinokurig @svor what I think we should do

  • drepecating che-server user preferences API
  • having workspace-secrets created and managed by che-server (theia can read but cannot write) for user preferences managed by Che.
  • having theia-secrets created by che-server at first workspace startup but managed by che-theia (in the future we will have similar secrets for vscode and idea IDEs)

My questions are:

  • Does Theia even need read access to workspace-secrets? If the preferences are the ones mentioned here, Theia doesn't need them right?
  • I think that loosing Theia preferences when migrating from che-server to devworkspace is acceptable but I may miss some important use case. Are you ok with that?

@vinokurig
Copy link
Contributor Author

@l0rd @skabashnyuk @svor Opened another PR for the secrets approach #174

@vinokurig vinokurig closed this Nov 24, 2021
@vinokurig vinokurig deleted the che-20622 branch April 21, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants