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

list and exec on non-existent or inaccessible services fails silently on S3 KMS backend #358

Open
nick96 opened this issue Aug 19, 2022 · 0 comments

Comments

@nick96
Copy link

nick96 commented Aug 19, 2022

I'm running into an issue when running chamber list or chamber exec with a service that doesn't exist will report back in the same way as if the list was empty. I found this out when I accidentally messed up the IAM policy to allow an EC2 instance to read the secrets for a particular chamber service. The instance didn't have access to the service it needed but successfully running exec, just not setting any of the secrets as env vars. I see similar behavior with list, where the table is just empty.

I'm not sure if there is a way of differentiating non-existent, empty and inaccessible, from stepping through with a debugger I can see that the list objects response for a non-existent service is empty:

github.com/aws/aws-sdk-go/aws/request.Pagination {
	NewRequest: github.com/aws/aws-sdk-go/service/s3.(*S3).ListObjectsPagesWithContext.func1,
	EndPageOnSameToken: false,
	started: true,
	prevTokens: []interface {} len: 0, cap: 0, nil,
	nextTokens: []interface {} len: 0, cap: 0, nil,
	err: error nil,
	curPage: interface {}(*github.com/aws/aws-sdk-go/service/s3.ListObjectsOutput) *{
		_: struct {} {},
		CommonPrefixes: []*github.com/aws/aws-sdk-go/service/s3.CommonPrefix len: 0, cap: 0, nil,
		Contents: []*github.com/aws/aws-sdk-go/service/s3.Object len: 0, cap: 0, nil,
		Delimiter: *string nil,
		EncodingType: *string nil,
		IsTruncated: *false,
		Marker: *"",
		MaxKeys: *1000,
		Name: *"chamber-bucket",
		NextMarker: *string nil,
		Prefix: *"non-existant-app/__kms",},}

Perhaps we could write a warning that would simplify the debugging process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants