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

improve initializing ConnectInfo #101

Merged
merged 1 commit into from
Jun 30, 2018
Merged

Conversation

krisis
Copy link
Member

@krisis krisis commented Jun 26, 2018

  • Remove ConnectInfo's Default instance
  • Add support for reading from well-known credential files and
    environment variables

TBD

  • should we move minioPlayCI, awsCI etc to use connectInfo / connectInfoWithCreds?
  • should we make then IO ConnectInfo as opposed to pure values?

##TODO

  • update documentation
  • add examples

@krisis
Copy link
Member Author

krisis commented Jun 26, 2018

This PR passes stack test. I tested with ~/.aws/credentials file containing sample creds and setting relevant env variables. I have posted this for early feedback. If everything looks good I can move examples and docs accordingly.
There are a couple of issues in this new approach

  1. It is possible for user to provide a Manager with incorrect ManagerSettings. e.g supplying defaultManagerSettings when endpoint is HTTPS.
  2. Too many ways to create ConnectInfo to the point it may confuse new users.

, connectIsSecure = NC.secure req
}

getAwsCreds :: IO (Maybe (Text, Text))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is an attempt to do this, I would prefer if you can follow the https://github.com/minio/minio-go/tree/master/pkg/credentials style where we will simply implement many variations of the same credentials.Value structure.

This would allow using minio-hs in a wide range of situations. Maybe not everything but starting with aws creds, iam and environment variables

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donatello donatello changed the title WIP improve initializing ConnectInfo improve initializing ConnectInfo Jun 30, 2018
- Remove ConnectInfo's Default instance
- Add support for reading from well-known credential files and
  environment variables
@donatello donatello merged commit 44bbd66 into minio:master Jun 30, 2018
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.

3 participants