forked from minio/minio-hs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for AssumeRole STS API (minio#188)
This change adds support for requesting temporary object storage credentials using the STS API. Some breaking changes are introduced to enable this support: - `Credentials` type has been removed. Use the `CredentialValue` type instead. Corresponding to this the type signature for `setCreds` has changed, though the functionality is the same. - The type alias `Provider` has been renamed to `CredentialLoader` to avoid naming confusion.
- Loading branch information
Showing
21 changed files
with
781 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
-- | ||
-- MinIO Haskell SDK, (C) 2017-2019 MinIO, Inc. | ||
-- MinIO Haskell SDK, (C) 2017-2023 MinIO, Inc. | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
|
@@ -16,21 +16,25 @@ | |
|
||
-- | | ||
-- Module: Network.Minio | ||
-- Copyright: (c) 2017-2019 MinIO Dev Team | ||
-- Copyright: (c) 2017-2023 MinIO Dev Team | ||
-- License: Apache 2.0 | ||
-- Maintainer: MinIO Dev Team <[email protected]> | ||
-- | ||
-- Types and functions to conveniently access S3 compatible object | ||
-- storage servers like MinIO. | ||
module Network.Minio | ||
( -- * Credentials | ||
Credentials (..), | ||
CredentialValue (..), | ||
credentialValueText, | ||
AccessKey (..), | ||
SecretKey (..), | ||
SessionToken (..), | ||
|
||
-- ** Credential providers | ||
-- ** Credential Loaders | ||
|
||
-- | Run actions that retrieve 'Credentials' from the environment or | ||
-- | Run actions that retrieve 'CredentialValue's from the environment or | ||
-- files or other custom sources. | ||
Provider, | ||
CredentialLoader, | ||
fromAWSConfigFile, | ||
fromAWSEnv, | ||
fromMinioEnv, | ||
|
@@ -54,6 +58,15 @@ module Network.Minio | |
awsCI, | ||
gcsCI, | ||
|
||
-- ** STS Credential types | ||
STSAssumeRole (..), | ||
STSAssumeRoleOptions (..), | ||
defaultSTSAssumeRoleOptions, | ||
requestSTSCredential, | ||
setSTSCredential, | ||
ExpiryTime (..), | ||
STSCredentialProvider, | ||
|
||
-- * Minio Monad | ||
|
||
---------------- | ||
|
@@ -225,14 +238,15 @@ This module exports the high-level MinIO API for object storage. | |
import qualified Data.Conduit as C | ||
import qualified Data.Conduit.Binary as CB | ||
import qualified Data.Conduit.Combinators as CC | ||
import Network.Minio.API | ||
import Network.Minio.CopyObject | ||
import Network.Minio.Credentials | ||
import Network.Minio.Data | ||
import Network.Minio.Errors | ||
import Network.Minio.ListOps | ||
import Network.Minio.PutObject | ||
import Network.Minio.S3API | ||
import Network.Minio.SelectAPI | ||
import Network.Minio.Utils | ||
|
||
-- | Lists buckets. | ||
listBuckets :: Minio [BucketInfo] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.