Skip to content

[NoCredentialProviders: no valid providers in chain] when using custom AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY #166

Description

@bokchoi2020

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed

Current Behavior

Login works fine, Sync Server status is green, notes can sync (except images, spins).
When sharing space, get error: NoCredentialProviders: no valid providers in chain.
This only happens if AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are not the default upon first "make start".
If default is used, the invite link creation is instant.

Expected Behavior

Expect invite link to be created.

Steps To Reproduce

  1. Edit .env.override to customize AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for security. (still using minio, not amazon s3)
  2. Follow steps here to create storage folder, chown to user, add docker.override.yml : https://github.com/anyproto/any-sync-dockercompose/wiki/Configuration#running-as-a-non-privileged-user-only-for-linux
  3. make start
  4. Switch to client, add client.yml, create account login. See initial space sync.
  5. Create new space.
  6. Share the space.
Image

Environment

- OS:RHEL10
- Version:Server is at github commit bbdb10753a178b10fd38866a0236376ae9966978 (HEAD), client is stable 0.55.5

Anything else?

  • If the server is failing to share, when I remove the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the .env.override, it continues to fail.

  • To make it work again, I have to remove the ./storage folder completely, remove the custom AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, then "make start", and recreate user on client.

  • Note: 40.png in the demo space keeps syncing (spinner spins) if I use custom keyid and key. When default keyid and key is used, the upload is almost instant. Sharing space is similar, default is instant while custom spins then errors out. I feel like maybe somewhere the key/keyid is hardcoded?

  • Syntax for password and user id is fine.
    I tried to create another bucket with the same user and password.
    mc alias set myminio http://minio:9000 non_default_user non_default_password

And it returned
Added myminio successfully.

Checking with: "mc admin info myminio" showed details regarding the bucket uptime and storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions