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

generating Credentials from 2 ByteStrings #109

Closed
joeyh opened this issue Aug 3, 2014 · 2 comments
Closed

generating Credentials from 2 ByteStrings #109

joeyh opened this issue Aug 3, 2014 · 2 comments

Comments

@joeyh
Copy link
Collaborator

joeyh commented Aug 3, 2014

My program already stores AWS credentials in its own way, so I need a way to get from ByteString -> ByteString -> Credentials

It's certainly possible to write that in my program, but then I have to worry about the v4SigningKeys and iamToken fields, which seem like implementation details that could change. And one of them, being an IORef, I'm wary of constructing on my own, since making an IORef that's empty when it should be full can lead to problems, for example.

So, I suggest providing in aws:

genCredentials :: ByteString -> ByteString -> IO Credentials

Using that might also simplify the implementation of loadCredentials*

@ozataman
Copy link
Collaborator

ozataman commented Aug 3, 2014

This would also make it easier to read creds from custom config files, which is commonplace, say if you're working with a snap web app.

On Aug 3, 2014, at 12:55 PM, Joey Hess notifications@github.com wrote:

My program already stores AWS credentials in its own way, so I need a way to get from ByteString -> ByteString -> Credentials

It's certainly possible to write that in my program, but then I have to worry about the v4SigningKeys and iamToken fields, which seem like implementation details that could change. And one of them, being an IORef, I'm wary of constructing on my own, since making an IORef that's empty when it should be full can lead to problems, for example.

So, I suggest providing in aws:

genCredentials :: ByteString -> ByteString -> IO Credentials

Using that might also simplify the implementation of loadCredentials*


Reply to this email directly or view it on GitHub.

@aristidb
Copy link
Owner

aristidb commented Aug 3, 2014

You're lucky that I didn't tell you to make a pull request and just went ahead and implemented it. :P

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

3 participants