Skip to content

Auto Login not working as expected #107

@un0tec

Description

@un0tec

Describe the bug

According to the documentation:

Like login, you may use yawsso subcommand auto to SSO login then sync all in one go.
It will check if SSO session has expired and, if so, yawsso will attempt to auto login again.

So what's the point of the --profile argument? I thought it was a way to override the sync of all profiles, but it still syncs them all.

On the other hand, I need that at the moment of synchronizing all the profiles, the name with which they appear in .aws/credentials is changed, similar to dev:foo, but it only works with the profile of the --profile argument, I have tried to put multiple --profile, but it only works with the last one.

I could run the auto --profile X:foo command multiple times, but I would get the original profiles as well, since it does not override the sync of all the profiles

Expected Behavior

yawsso auto sync default profile OK (sync default profile, fails because is not SSO profile)
yawsso auto --profile dev sync dev profile KO (sync all profiles)
yawsso auto --profile dev:dev-cred sync dev profile and rename to dev-cred KO (works, but still synchronizes all profiles)
yawsso auto --profile dev:dev-cred --profile dev2:dev2-cred sync dev and dev2 profiles and rename to dev2 dev2-cred KO (works, but still synchronizes all profiles and only renames the last one)

My test case

.aws/config file

default profile --> iam profile
profile2 --> iam profile
profile3 --> sso profile
profile4 --> sso profile

What I am trying to do is to synchronize profiles 3 and 4, renaming them so that they do not appear with the same name.

Thanks for all the explanations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions