mirrors icon indicating copy to clipboard operation
mirrors copied to clipboard

Support for Vault namespaces

Open igorcoding opened this issue 3 years ago • 7 comments

This is needed for integration with Vault Enterprise. Should be a fairly simple addition.

igorcoding avatar Feb 15 '23 07:02 igorcoding

Any update regarding the feature. ? Also is the operator being actively developed?

linuxbsdfreak avatar Jun 27 '23 12:06 linuxbsdfreak

@igorcoding Could you let me know whether you could update the controller to support Vault Namespaces? I have a requirement to write secrets generated by Vault on AWS via Dyanamic creds to be written back to Vault. Also read secrets from Vault Namespaces.

linuxbsdfreak avatar Jul 04 '23 14:07 linuxbsdfreak

@linuxbsdfreak hi! Sorry for the delay. I'll try to have a look, but can't guarantee any specific ETA right now. Just want to mention, that PRs are always welcome - I'll respond swiftly if you want to contribute.

igorcoding avatar Jul 06 '23 15:07 igorcoding

Thx @igorcoding no issues. I thought it was a small fix . I will try to look. Could you provide me some pointers under which files I need to add the code ?

linuxbsdfreak avatar Jul 06 '23 16:07 linuxbsdfreak

I bet adding some more configuration, like adding a name of namespace to the spec - https://github.com/ktsstudio/mirrors/blob/main/api/v1alpha2/vault.go, and to add logic of supplying this namespace to https://github.com/ktsstudio/mirrors/blob/main/pkg/vaulter/vaulter.go would do the trick But if there is any trouble with building or anything - let me know

igorcoding avatar Jul 06 '23 16:07 igorcoding

@igorcoding I was trying to extend the code and saw that https://github.com/ktsstudio/mirrors/blob/main/pkg/vaulter/vaulter.go#L15

The DefaultConfig does not have a Namespace is the struct to work with https://github.com/hashicorp/vault/blob/main/api/client.go#L96

linuxbsdfreak avatar Jul 11 '23 14:07 linuxbsdfreak

Hi! I believe the Client's method WithNamespace is needed https://pkg.go.dev/github.com/hashicorp/vault/api#Client.WithNamespace

igorcoding avatar Jul 12 '23 06:07 igorcoding