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

Make the service path support variable depths #70

Closed
wants to merge 3 commits into from
Closed

Make the service path support variable depths #70

wants to merge 3 commits into from

Conversation

imjoshholloway
Copy link

@imjoshholloway imjoshholloway commented Jan 19, 2018

This PR makes it possible to have the service have a variable depth for the service (<path>/<service>). The default "." separator is also supported

e.g

chamber write some/path/to/service mykey myvalue
chamber write some/service myotherkey myothervalue

chamber list some/path/to/service
Key             Version         LastModified    User
mykey    1               01-19 13:34:56  arn:aws:iam::0000000000:user/imjoshholloway

chamber list some/service
Key             Version         LastModified    User
myotherkey    1               01-19 13:34:56  arn:aws:iam::0000000000:user/imjoshholloway

chamber list some
Key             Version         LastModified    User

Happy to write some tests if needed but wanted to guage the desire to support this before spending too much time on it.

@Joholland
Copy link

I tested this in a private build and I'm not sure if it is actually working correctly. I'll try pushing a PR out later with fixes to the regular expressions. At the moment, I get a validation error.

@imjoshholloway
Copy link
Author

imjoshholloway commented Feb 8, 2018

@Joholland What's the validation error? We're using the following build and so far we've not seen any issues https://github.com/splunkcloud/chamber/releases/tag/temp

Update: Nevermind, I see the error (we're only use path based internally hence not hitting the issue)

@vood
Copy link

vood commented Apr 3, 2018

This looks promising. I'll try to fix the conflicts

@jwilner
Copy link

jwilner commented Apr 24, 2018

Just to put in my two cents -- we'd love to use chamber but can't in its current form. We don't use multiple AWS accounts for namespacing, so we need to establish those namespaces within the store itself. This PR would let us do so -- so if there's anything I can do to help it along, please let me know!

@vood
Copy link

vood commented Apr 24, 2018

I've merged this code into the latest master and built the binary. You can find it here https://github.com/people-ai/chamber/releases

@jwilner
Copy link

jwilner commented Apr 25, 2018

Thanks @vood -- it would be best if we could get the original maintainers of the code to merge it in though!

@vood
Copy link

vood commented Apr 25, 2018 via email

@jwilner
Copy link

jwilner commented May 3, 2018

@dfuentes any chance you could comment on whether or not there's a future for this PR?

@dfuentes
Copy link
Contributor

dfuentes commented May 7, 2018

Sorry, I've been pretty busy with other projects. I will give this a look over today and see what we can do.

@dfuentes
Copy link
Contributor

dfuentes commented May 7, 2018

In order to get this merged, I think we need some more validation. For example, I tried this build out and was able to get things in a pretty confusing state:

$ export CHAMBER_NO_PATHS=1
$ chamber write test/with/mixed key val
Error: ValidationException: Parameter name must be a fully qualified name.
	status code: 400, request id: e21e2ecf-7340-47d0-b885-b00f5ec1cc28
exit status 1
$ export CHAMBER_NO_PATHS=1
$ chamber write /test/with/mixed key val
$ chamber list /test/with/mixed
Key	Version		LastModified	User

Because the path based api doesn't play well with the older API, I suggest updating the validation such that service names may not contain forward slashes when CHAMBER_NO_PATHS is set. Similarly, we should not allow periods in service names when CHAMBER_NO_PATHS is not set.

@hoobaman
Copy link

We need this too , chamber is currently not usable.

@jwilner
Copy link

jwilner commented May 17, 2018

If it helps folks, I wrote something that doesn't provide all the perks of this project but is less opinionated about namespaces and keys: https://github.com/energyhub/secretly

(all it does is aim to have a nice API for dumping values from your param store into your container)

@dfuentes
Copy link
Contributor

I'd say "chamber is currently not usable" is a bit of hyperbole. I'm not opposed to having this feature, but this PR in it's current state is not something I'm comfortable merging. If the validation is fixed up and the edge cases between paths/non-paths uses are fixed, then we can get it in.

@robinbowes
Copy link

I've just discovered that chamber doesn't support this which makes it unusable for our use-case too. Looks like I shall have to use raw aws ssm commands for now.

@AndreyMarchuk
Copy link

+1, this is highly anticipated feature for us.
Following feature request will be resolved with PR merge:
#128

@stefano-b2c2
Copy link

If it helps folks, I wrote something that doesn't provide all the perks of this project but is less opinionated about namespaces and keys: https://github.com/energyhub/secretly

(all it does is aim to have a nice API for dumping values from your param store into your container)

Thank you! This is exactly what I needed.

@mechanical-fish
Copy link
Contributor

It appears that #118 has built upon this PR and implemented this feature, so this specific PR can be closed. I've successfully tested variable-length service paths with the latest version of Chamber. Thanks, everyone!

This pull request was closed.
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.