S3deck: auto-connect personal-files (read $HOME/.aws) and password-manager-service

Hi! I’m the publisher of the `s3deck` snap (https://snapcraft.io/s3deck), a desktop client for AWS S3 and S3-compatible object storage (Cloudflare R2, MinIO, Backblaze B2, Wasabi and others). It connects directly from the user’s computer to their storage; there is no server of ours in between.

I’d like to request the following for s3deck:

  1. Installation and auto-connection of a personal-files plug, read-only:

    plugs:

    aws-config:

     interface: personal-files
    
     read:
    
       - $HOME/.aws
    

S3Deck can sign in with an AWS CLI profile. Profiles live in ~/.aws/config and ~/.aws/credentials, the standard location every AWS tool reads, which the `home` interface doesn’t cover because it is a hidden directory. Access is read-only and limited to ~/.aws. S3Deck only reads these files to sign requests to the user’s own storage; their contents are never sent anywhere else.

  1. Auto-connection of password-manager-service.

S3Deck never writes secret access keys to a config file. It stores them in the system keyring through the Secret Service API (libsecret: GNOME Keyring or KWallet), the same way it uses the Keychain on macOS and Credential Manager on Windows. Without this interface connected, saving a connection fails until the user runs `snap connect` by hand. S3Deck only creates, reads and deletes its own items (service name “S3Deck”).

Snap: s3deck

Publisher: richardpham201

Confinement: strict, base core24 with the gnome extension. Other plugs: network, network-bind (OpenID Connect sign-in receives the browser’s redirect on 127.0.0.1), home, removable-media (manual connection is fine).

Privacy policy: https://s3deck.com/privacy-policy

Thanks!

This request has been added to the queue for review by the @reviewers team.

Hello @richardpham201 :slight_smile:

Reading AWS CLI profiles from ~/.aws/config and ~/.aws/credentials is a well-understood use case for an S3 client that supports AWS CLI profile sign-in. Per least-privilege, we’d prefer the plug scoped to the two files you actually read rather than the whole directory, as ~/.aws can also contain other sensitive material (e.g. sso/cache ). If you genuinely need to read other files under ~/.aws , let us know which and why, otherwise the two-file scope is safer and easier to justify.

Regarding the password-manager-service int, consistent with how we handle this interface. When password-manager-service is connected, your snap can access all stored secrets in the keyring, and conversely your snap’s secrets become accessible to every other connected application.

Because that isn’t obvious to users, we discourage auto-connection and instead we suggest using snapctl is-connected password-manager-service to detect availability, and when it isn’t connected, show a dialog explaining what the interface grants and how to connect it manually (snap connect s3deck:password-manager-service).

Manual connection of password-manager-service still works without any declaration from us and users can connect it themselves whenever they like.

1 Like

Thanks for the review! Both points are addressed in the new revisions of s3deck (1.1.1, amd64 and arm64):

  1. aws-config is now scoped to the two files S3Deck reads:

    plugs:

    aws-config:

     interface: personal-files
    
     read:
    
       - $HOME/.aws/config
    
       - $HOME/.aws/credentials
    

S3Deck doesn’t need anything else under ~/.aws. An IAM Identity Center sign-in started from the app caches its token in the snap’s own $HOME, so ~/.aws/sso/cache is never read. In a test install, reading ~/.aws/sso/cache and listing ~/.aws are both denied, as expected.

  1. I withdraw the auto-connection request for password-manager-service. S3Deck now runs `snapctl is-connected password-manager-service`. While it isn’t connected, a dialog explains that connecting it lets S3Deck read every secret in the keyring, and lets other connected apps read the secrets S3Deck stores. The dialog gives `snap connect s3deck:password-manager-service` to copy, and `snap disconnect s3deck:password-manager-service` to take it back. It shows at launch, with a “Don’t remind me” option, and again whenever an action needs the keyring; that action is retried once the interface is connected. Signing in with an AWS CLI profile works without it.

So the remaining request is installation and auto-connection of personal-files (aws-config) for the two files above. I removed the earlier revision with the directory-wide plug from the review queue.

Thanks again!

Hi @richardpham201

I agree with @yomonokio verdict that it is expected for S3deck to have read access to $HOME/.aws/config and $HOME/.aws/credentials. +1 from me as well to grant read access to requested files using personal-file interface after successful publisher vetting.

Is the project private or public? In case the project is public, could you please share the link to the repo?

1 Like

Thanks @shishirsub10 and @yomonokio!

S3Deck is proprietary, so its source code is private. The public repository github.com/s3deck/s3deck only hosts the release binaries and the issue tracker.

For publisher vetting:

  • The support email listed on s3deck.com is the same address as this publisher account.
  • I’ve verified ownership of s3deck.com on the snap’s listing with the SNAPCRAFT_IO_VERIFICATION DNS TXT record.
  • The same account also publishes the roam snap.

I’m happy to provide anything else you need to verify me.

Hello @richardpham201 :slight_smile:

A key step in the process for granting super-privileged interfaces, is publisher vetting. Since this is a closed-source project, the only way to get successfully vetted is through the Verified Accounts process.

If the process is completed successfully, I am happy to grant read access to the requested files,through the personal-file interface!

Thanks @yomonokio!

Before I open a Verified Accounts request, I’d like to check whether we’re eligible. Richard Pham (https://richardpham.com) is a small team of developers who build and maintain S3Deck and Roam. We aren’t a registered company yet. We have a shared address on our own domain, support@richardpham.com, which several developers on the team can access, and I’d tie the publisher account to it.

Is that enough to apply for Verified Accounts? If not, is there another way to vet an independent publisher of a closed-source snap?

Given that there is no registered company yet, there might be a blocker. However, there is also the process for Star Developers.

Vetting is performed by Canonical’s advocacy team, and they assess each case individually, so I can’t pre-approve the outcome from the review side. I would suggest that you open the Verified Accounts request, tying the publisher account to support@richardpham.com as you described, and briefly describing the team and its relationship to S3Deck and Roam.

Once vetting is complete, comment here and we’ll proceed with the review!

1 Like