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

Add an ability to create and edit namespaced secrets by workspace user #44

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

vinokurig
Copy link
Contributor

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

What does this PR do?

To be able to create edit and delete namespaced secretes workspace user needs special permissions. This PR adds a kubernetes role for secrets, and binds it to a workspace user.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#19837

How to test this PR?

  1. Start a workspace and open a terminal from ide container
  2. Send an HTTP request to kubernetes API to create a secret: curl -X POST <kubernetes API url>/api/v1/namespaces/<namespace name>/secrets --header "Content-Type: application/json" -d '{ "apiVersion": "v1", "kind": "Secret", "metadata": { "name" : "new-secret" } }'

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.

…e user

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

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pay attention that it won't work for existing namespaces, only newly created due eclipse-che/che#19697

@che-bot
Copy link
Contributor

che-bot commented Jul 6, 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

Do we need documentation for that?

SECRETS_ROLE_NAME,
Arrays.asList("secrets"),
singletonList(""),
Arrays.asList("list", "create", "delete"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to test these roles?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a testcase but all tests in this module are ignored. Should I create an issue for that?

@skabashnyuk
Copy link
Contributor

LGTM to me in general. Let's see that other folks are thinking about that.

Copy link
Member

@sparkoo sparkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Do we need documentation for that?

I don't think so because it doesn't affect user experience. We might add some for the related issue.

@che-bot
Copy link
Contributor

che-bot commented Jul 13, 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

@vinokurig vinokurig merged commit e88ba6c into main Jul 14, 2021
@vinokurig vinokurig deleted the che-19837 branch July 14, 2021 07:08
@che-bot che-bot added this to the 7.34 milestone Jul 14, 2021
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.

5 participants