using private s3 repos

12 views
Skip to first unread message

Mike Hogan

unread,
Jun 3, 2013, 9:34:11 AM6/3/13
to shave...@googlegroups.com
Folks,

I have a need of getting artifacts from private repo in s3.

I was thinking of doing something like 

s3://file:///Users/mike/aws.pro...@repo.bodar.com/com.googlecode.yadic:yadic:jar:151

and that would look for the file /Users/mike/aws.properties and expect it to contain AWSAccessKeyId=xxxx and AWSSecretKey=yyyy

Bit clunky maybe.  Can you think of a better way to express this?

Ta,

Mike.

Matt Savage

unread,
Jun 3, 2013, 9:56:18 AM6/3/13
to shave...@googlegroups.com

Maybe have SM look for secret key instructions in the build directory?

It would need to blow up with a nice exception including instructions on adding a key if it gets a forbidden response from S3.

Below are two options for the key instructions file- one direct, one indirect. The indirect option has the advantage of avoiding accidentally checking in the actual secret.

build\

   runtime.dependencies

      s3://repo.bodar.com/com.googlecode.yadic:yadic:jar:151

   repo.bodar.com.s3key
      pattern=repo.bodar.com\*
      file=\Users\mike\repo.bodar.com.properties

   repo.bodar.com.s3key
      pattern=repo.bodar.com\*
      key_id=xxxx
   secret=yyyy

   .hgignore
      *.s3key



--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Worthington-Bodart

unread,
Jun 3, 2013, 10:11:24 AM6/3/13
to shave...@googlegroups.com
What about copying mercurial's format?  Also I don't think you want the credentials to be anywhere near the dependency file so probably better to be in you home directory:

~/.smrc
[auth]
privates3.prefix = s3://repo.bodar.com
privates3.access = meerkatteam
privates3.password = foobar

Daniel Worthington-Bodart

unread,
Jun 3, 2013, 10:13:45 AM6/3/13
to shave...@googlegroups.com
Sorry should have said username for http

privates3.username = meerkatteam

or maybe for s3 urls

privates3.secret_key =31231
privates3.access_key = 323123

Daniel Worthington-Bodart

unread,
Jun 3, 2013, 10:20:18 AM6/3/13
to shave...@googlegroups.com
Actually this would be really nice as we could get the default repo property "shavenmaven.default-repository" into the same file which would make life really easy.

Matt Savage

unread,
Jun 3, 2013, 10:27:08 AM6/3/13
to shave...@googlegroups.com

Yes, much safer.

Mike Hogan

unread,
Jun 4, 2013, 4:38:20 AM6/4/13
to shave...@googlegroups.com
hmmm not getting these emails for some reason.  did it Matts initial way last night, will rework to this more sensible form.
Folks,

and that would look for the file /Users/mike/aws.properties and expect it to contain AWSAccessKeyId=xxxx and AWSSecretKey=yyyy

Bit clunky maybe.  Can you think of a better way to express this?

Ta,

Mike.

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mike Hogan

unread,
Jun 4, 2013, 4:47:35 AM6/4/13
to shave...@googlegroups.com


On Monday, 3 June 2013 15:20:18 UTC+1, d...@bodar.com wrote:
Actually this would be really nice as we could get the default repo property "shavenmaven.default-repository" into the same file which would make life really easy.

Dan, can you explain this default rule? 

Daniel Worthington-Bodart

unread,
Jun 4, 2013, 5:35:15 AM6/4/13
to shave...@googlegroups.com

Do you use Gmail as I've been getting quite a few list emails?

Weirdly some emails only appear on my mobile!

Stuart Miller

unread,
Jun 4, 2013, 5:51:21 AM6/4/13
to shave...@googlegroups.com

FYI, I got all of them...

Mike Hogan

unread,
Jun 4, 2013, 4:19:00 PM6/4/13
to shave...@googlegroups.com
working code, comments welcome


Folks,

and that would look for the file /Users/mike/aws.properties and expect it to contain AWSAccessKeyId=xxxx and AWSSecretKey=yyyy

Bit clunky maybe.  Can you think of a better way to express this?

Ta,

Mike.

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Worthington-Bodart

unread,
Jun 5, 2013, 3:07:58 AM6/5/13
to shave...@googlegroups.com
This is really cool and makes think about creating a new AWS S3 client library that is UtterlyIdle based (HttpHandler/Request/Response) using the signing stuff you have just done here.

Unless anyone else has an objection, Mike feel free to merge with trunk

Matt Savage

unread,
Jun 5, 2013, 4:41:22 AM6/5/13
to shave...@googlegroups.com
Looks great to me too.

Mike Hogan

unread,
Jun 5, 2013, 5:34:17 AM6/5/13
to shave...@googlegroups.com
merged

daniel...@gmail.com

unread,
Aug 20, 2013, 5:00:51 AM8/20/13
to shave...@googlegroups.com
Hey people I've started moving ShavenMaven to use UtterlyIdle for it's HttpClient.

I noticed that the S3ConnectorTest is a bit crap (it only tests the URL), so I don't have much confidence that the new code is actually valid.

If someone that is using the private S3 authentication could download version 64 and tell me if it works that would be great.

I'll then retrofit tests based on the data that is currently there.

I'm going to refactor the shavenmaven/ s3 code a fair bit so would be great to get feedback.

daniel...@gmail.com

unread,
Aug 20, 2013, 9:57:10 AM8/20/13
to shave...@googlegroups.com
Okay 64 was broken, I've now fixed it please use version 68.

daniel...@gmail.com

unread,
Aug 20, 2013, 10:12:59 AM8/20/13
to shave...@googlegroups.com
Ooops sorry try 69 (stuffed up the JarJar)

Raymond Barlow

unread,
Aug 20, 2013, 12:21:41 PM8/20/13
to shave...@googlegroups.com
Tested it on spmiller-baron-greenback-bootstrap which uses s3: urls and it worked fine.

/Raymond



--
Reply all
Reply to author
Forward
0 new messages