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

DLP sample tests need to be refactored #9186

Closed
Sita04 opened this issue Feb 28, 2023 · 2 comments
Closed

DLP sample tests need to be refactored #9186

Sita04 opened this issue Feb 28, 2023 · 2 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@Sita04
Copy link
Collaborator

Sita04 commented Feb 28, 2023

Currently DLP samples uses a hard-coded key and key ring. Additionally secrets wrapped with the key is also hard-coded into the test files. These need to be refactored so that resources can be created and deleted as part of the test lifecycle.
Related PR: #9091

@Sita04 Sita04 added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Feb 28, 2023
@Sita04 Sita04 self-assigned this Feb 28, 2023
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Feb 28, 2023
@m-strzelczyk
Copy link
Contributor

Note: keyrings and keys can't be really fully deleted, so it's ok to have some that are reused in tests.

We still should use project specific resources if we use separate projects.

@kweinmeister kweinmeister assigned realjordanna and unassigned Sita04 Mar 23, 2023
@annadata annadata assigned annadata and unassigned realjordanna Apr 3, 2023
@BigBlackWolf BigBlackWolf assigned BigBlackWolf and unassigned annadata May 7, 2024
@BigBlackWolf
Copy link
Contributor

As mentioned by @m-strzelczyk and according to the documentation, there is no way to delete the keyring.
The only way to "delete" a key is to disable all of its versions. However, the keys won't be removed entirely and will leave tombstones, which will persist indefinitely. Since those samples have only read operations with the keys, without any modifications, they won't generate many versions. Overall it appears to be efficient to have hard-coded values in this scenario, to properly utilize the resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants