aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.28k stars 4.06k forks source link

aws-cli 2.9.19 snap does not open browser when running sso login #7666

Closed rafaltrojniak closed 1 month ago

rafaltrojniak commented 1 year ago

Describe the bug

When running aws sso login, I would expect the web browser to open automatically and present confirmation page. Instead of that, web browser does not open, and I have to open it manually.

Expected Behavior

Web browser to open and direct to confirmation/verification page of SSO process

Current Behavior

Web page does not open, and given message is presented:

$ aws sso login
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:

https://device.sso.eu-west-1.amazonaws.com/

Then enter the code:

XXXX-XXX

Additionally following error is logged bu auditd

lut 13 10:50:58 hostname kernel: audit: type=1400 audit(1676281858.876:4529): apparmor=\"DENIED\" operation=\"exec\" profile=\"snap.aws-cli.aws\" name=\"/usr/bin/xdg-open\" pid=1549889 comm=\"python\" requested_mask=\"x\" denied_mask=\"x\" fsuid=1000 ouid=0

Reproduction Steps

Install aws-cli from snap

sudo snap install aws-cli --channel=v2/beta

Configure your sso_start_url and sso_region

$ aws configure set sso_start_url https://XXXXXX/
$ aws configure set sso_region eu-west-1

Run the aws sso login

Possible Solution

Add desktop plug into the snap configuration, just like done here https://github.com/nysasounds/amz-aws-cli/commit/0bf2243bdac80aec3c2a38a8c426f5839b6ad23c

Additional Information/Context

No response

CLI version used

aws-cli 2.9.19 snap (178)

Environment details (OS name and version, etc.)

Ubuntu 22.04

tim-finnigan commented 1 year ago

Hi @rafaltrojniak thanks for reporting this. There is some ongoing work on the AWS CLI Snap package which is being tracked here: https://github.com/aws/aws-cli/issues/6010. As mentioned in this comment from earlier today, the team is investigating issues caused by strict confinement, but for now we can continue tracking this issue here.

tim-finnigan commented 1 month ago

Checking in, the AWS CLI version on Snapcraft is now up to date (https://snapcraft.io/aws-cli). Is this still an issue in the latest version?

github-actions[bot] commented 1 month ago

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.