-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implement schema for user secrets management #440
Implement schema for user secrets management #440
Conversation
a6b838b
to
cd5e57a
Compare
f39fab8
to
9f3261a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial thoughts and hints
da78d75
to
7281184
Compare
bd42bb0
to
364a1ca
Compare
bf6b60b
to
ae8fd59
Compare
763573d
to
48b94fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of small points noted, QA went well. Approving, but the check against 2.9 for the secrets api is needed.
967b436
to
b31adff
Compare
This commit introduces internal/juju/userSecret and adds method to add user secrets. Implement internal Juju secrets add, update, and remove functionality This commit introduces several changes to the Juju client in the `internal/juju/client.go` file. It includes the implementation of methods for adding, updating, and removing secrets. Additionally, Furthermore, the commit includes changes to the `secret.go` file, introducing new types for managinng secrets. It also includes changes to the `interfaces.go` file, defining new interfaces for the Juju client API. Add secretURI to UpdateSecret Add secretURI to DeleteSecret Add AutoPrunt to UpdateSecret schema Add SecretId to ReadSecret func instead of name. Add lost Asserts. Add secretNotFoundError Extract mocks creation into separate suite. Introduce typedError(err) usage in ClientAPI funcs. Add renaming to UpdateSecret Use struct raather than pointer for Output structures. Introcue NewName in Update input struct. Use pointers in all places in structs where the parameter is not neccessary. Implement schema for user secrets management This commit introduces the ability to add, update, and remove user secrets in the schema. This is done through the `userSecretResource` struct, which has methods for each of these actions. The `Add`, `Update`, and `Remove` methods are currently stubbed out and will need to be implemented in future commits. Add ReadSecret function implementation. Implement Delete secret function Add base64 encoding co Create and change Read fucntion to get value with decode. Add base64 encoding for values in Update
b31adff
to
d6d2504
Compare
Description
This PR introduces the ability to add, update, and remove user secrets in the schema. This is done through the
userSecretResource
struct, which has methods for each of these actions.Fixes:
Type of change
QA steps
Check acceptance tests:
TF_ACC=1 TEST_CLOUD=lxd TF_ACC_LOG=TRACE TF_LOG=TRACE TF_ACC_LOG_PATH=/tmp/test.txt go test ./...
Example of TF plan: