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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

wal-g doesn't seem to respect aws.credentials.ChainProvider #562

Open
kujon opened this issue Feb 13, 2020 · 0 comments
Open

wal-g doesn't seem to respect aws.credentials.ChainProvider #562

kujon opened this issue Feb 13, 2020 · 0 comments

Comments

@kujon
Copy link
Contributor

kujon commented Feb 13, 2020

Hi 馃憢

I understand that there was an exactly the same issue raised a while ago and a PR that addressed it, but it seems it has been broken since moving to a separate storages package.

A simple example to reproduce would be:

# ~/.aws/credentials
[default]
aws_access_key_id = redacted
aws_secret_access_key = redacted

# ~/.aws/config
[default]
region = eu-west-1
output = json

[profile dev_admin_cli]
role_arn = arn:aws:iam::redacted:role/AdminCLI
region = eu-west-1
source_profile = default
external_id = redacted
> export AWS_PROFILE=dev_admin_cli
> aws sts get-caller-identity
{
    "Account": "redacted",
    "UserId": "redacted:botocore-session-redacted",
    "Arn": "arn:aws:sts::redacted:assumed-role/AdminCLI/botocore-session-redacted"
}
> wal-g backup-list
DEBUG: 2020/02/13 17:17:44.240330 --- COMPILED ENVIRONMENT VARS ---
DEBUG: 2020/02/13 17:17:44.241627 HOSTNAME=redacted
DEBUG: 2020/02/13 17:17:44.242767 PGPORT=5432
DEBUG: 2020/02/13 17:17:44.243837 AWS_PROFILE=dev_admin_cli
DEBUG: 2020/02/13 17:17:44.244858 PGPASSWORD=redacted
DEBUG: 2020/02/13 17:17:44.245814 AWS_REGION=eu-west-1
DEBUG: 2020/02/13 17:17:44.246788 PWD=/
DEBUG: 2020/02/13 17:17:44.247164 WALG_S3_PREFIX=s3://redacted
DEBUG: 2020/02/13 17:17:44.247274 HOME=/root
DEBUG: 2020/02/13 17:17:44.247841 PGUSER=redacted
DEBUG: 2020/02/13 17:17:44.248862 TERM=xterm
DEBUG: 2020/02/13 17:17:44.249351 WALG_LOG_LEVEL=DEVEL
DEBUG: 2020/02/13 17:17:44.249779 SHLVL=1
DEBUG: 2020/02/13 17:17:44.250353 PGHOST=redacted
DEBUG: 2020/02/13 17:17:44.250387 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEBUG: 2020/02/13 17:17:44.250928 _=/usr/local/bin/wal-g
DEBUG: 2020/02/13 17:17:44.250961 WALG_DOWNLOAD_CONCURRENCY=10
DEBUG: 2020/02/13 17:17:44.251533 WALG_UPLOAD_QUEUE=2
DEBUG: 2020/02/13 17:17:44.251568 WALG_USE_WAL_DELTA=false
DEBUG: 2020/02/13 17:17:44.251690 TOTAL_BG_UPLOADED_LIMIT=32
DEBUG: 2020/02/13 17:17:44.251722 WALG_UPLOAD_CONCURRENCY=16
DEBUG: 2020/02/13 17:17:44.252356 WALG_TAR_SIZE_THRESHOLD=1073741823
DEBUG: 2020/02/13 17:17:44.252390 WALG_PREVENT_WAL_OVERWRITE=false
DEBUG: 2020/02/13 17:17:44.252511 WALG_UPLOAD_DISK_CONCURRENCY=1
DEBUG: 2020/02/13 17:17:44.253053 WALG_COMPRESSION_METHOD=lz4
DEBUG: 2020/02/13 17:17:44.253085 WALG_DELTA_MAX_STEPS=0
ERROR: 2020/02/13 17:17:49.547473 NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors
failed to get AWS credentials; please specify AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3.createSession
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3/session.go:110
github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3.ConfigureFolder
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3/folder.go:99
github.com/wal-g/wal-g/internal.ConfigureFolder
	/home/travis/gopath/src/github.com/wal-g/wal-g/internal/configure.go:124
github.com/wal-g/wal-g/cmd/pg.glob..func2
	/home/travis/gopath/src/github.com/wal-g/wal-g/cmd/pg/backup_list.go:23
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:766
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).ExecuteC
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:852
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).Execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:800
github.com/wal-g/wal-g/cmd/pg.Execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/cmd/pg/pg.go:28
main.main
	/home/travis/gopath/src/github.com/wal-g/wal-g/main/pg/main.go:8
runtime.main
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/proc.go:201
runtime.goexit
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/asm_amd64.s:1333
failed to create new session
github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3.ConfigureFolder
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/wal-g/storages/s3/folder.go:101
github.com/wal-g/wal-g/internal.ConfigureFolder
	/home/travis/gopath/src/github.com/wal-g/wal-g/internal/configure.go:124
github.com/wal-g/wal-g/cmd/pg.glob..func2
	/home/travis/gopath/src/github.com/wal-g/wal-g/cmd/pg/backup_list.go:23
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:766
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).ExecuteC
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:852
github.com/wal-g/wal-g/vendor/github.com/spf13/cobra.(*Command).Execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:800
github.com/wal-g/wal-g/cmd/pg.Execute
	/home/travis/gopath/src/github.com/wal-g/wal-g/cmd/pg/pg.go:28
main.main
	/home/travis/gopath/src/github.com/wal-g/wal-g/main/pg/main.go:8
runtime.main
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/proc.go:201
runtime.goexit
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/asm_amd64.s:1333

More than happy to take a shot at submitting a PR.

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

2 participants
@kujon and others