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

Error while checking connectivity against bucket from another account #44

Closed
algra opened this issue Nov 24, 2016 · 4 comments
Closed

Comments

@algra
Copy link

algra commented Nov 24, 2016

Hi guys,

We have GoCD running in one account, and artefacts bucket in another one, but GoCD still can access it because AWS policies are allowing it.

The problem with the s3material plugin is that during connectivity check it executes client.listBuckets():

https://github.com/indix/gocd-s3-artifacts/blob/master/utils/src/main/java/com/indix/gocd/utils/store/S3ArtifactStore.java#L100-L106

which returns list of buckets only from the same account, which obviously lead to failed check because bucket is never included in the returned list.

Would it make sense to fix it with, like, client.listObjects(...), with some random prefix, which will lead to empty result list if the bucket exists and to exception if it doesn't or GoCD has no permissions to list bucket it, which will be required later during polling anyway?

If you're ok with the proposed solution, either me or my colleagues will send a PR. What do you think?

@ashwanthkumar
Copy link
Member

@algra Sorry you're running into the problem - I think this is a duplicate of #12
To me both client.listObjects(...) and client.doesBucketExist sounds good.

@haimizrael @manojlds @brewkode what do you guys think?

@ajitchahal
Copy link

Any news on this..? I would really appreciate this fix.

@ashwanthkumar
Copy link
Member

@ajitchahal Would you be able to take a stab at sending the above fix as a PR? The approaches to solving the problem has been laid out in this issue and on #12

@manojlds
Copy link
Member

manojlds commented Sep 7, 2017

This is taken care of in v5.0.1

@manojlds manojlds closed this as completed Sep 7, 2017
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

No branches or pull requests

4 participants