-
Notifications
You must be signed in to change notification settings - Fork 43
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS SSO Exception #168
Comments
Are you using sleet.exe or the dotnet tool package? I'll take a look at updating to the latest AWS. From the error it looks like a dependency didn't make it into the package or exe. |
dotnet tool |
@hutterm try installing the updated version here: https://www.nuget.org/packages/Sleet/5.1.3 Let me know if your SSO profile works with these changes. If not I may need some help from you to get the AWS profile load correct. |
Can confirm, it works! Thanks a lot! heads up for anyone that comes across this: I worked through that thread and as it turns out my AWS CLI needed an update as well. After that it worked flawlessly when previously logging in with |
Glad it worked! Thanks for including help on the client name, I'm sure others will run into that as well. |
@emgarten Just to explain to you quickly what was throwing there. I went through your code to see what was happening. First finding: Second: if (credFile.TryGetProfile(profileName, out var profile))
{
// Successfully created the credentials using the profile
var awsCredentials = profile.GetAWSCredentials(profileSource: null);
((SSOAWSCredentials)awsCredentials).Options.ClientName = "SSO";
((SSOAWSCredentials)awsCredentials).Options.SsoVerificationCallback = ssoArgs =>
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
{
FileName = ssoArgs.VerificationUriComplete, UseShellExecute = true
});
amazonS3Client = new AmazonS3Client(awsCredentials, config);
} with this code in place, you will actually handle timed out credentials. You probably would need some considerations to not get a CastException if you have other credentials and I'm not sure if you can start a process form every context where Sleet would run, but that code at least opens the browser for me and does the SSO verification and gets a new token. |
I would happy to take a PR that improves the SSO experience. I don't have an AWS account that signs in this way which makes it difficult for me to improve this myself. |
when pointing sleet to a profile with AWS SSO credentials sleet responds with
[System.InvalidOperationException] Assembly AWSSDK.SSOOIDC could not be found or loaded. This assembly must be available at runtime to use Amazon.Runtime.SSOAWSCredentials, AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604.
for reference, my
sleet.json
uses"profileName": "aws-dev"
and a corresponding entry is in my
~/.aws/config
:I'm getting new credentials with
aws sso login --profile aws-dev
before, so everything seems to be setup correctly on my side.Looks like sleet might just need to update it's dependency on the aws core sdk libraries?
The text was updated successfully, but these errors were encountered: