You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application uses AWS Single Sign-On (SSO) for authentication and it also uses SystemsManagerExtensions.AddSystemsManager(). When there is a valid SSO profile but a session has expired, the call fails and throws an exception with message System.ArgumentNullException: Value cannot be null. (Parameter 'Options property cannot be empty: ClientName').
In those circumstances some kind of exception is expected, but the message should be something like "SSO session expired" or "Authentication failure". Then a user could easily solve the problem and retry. With the actual message it takes significantly more time, effort and expertise to find debug the problem.
I'm not quite sure whether the problem is in Amazon.Extensions.Configuration.SystemsManager or AWSSDK.SimpleSystemsManagement.
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
Exception with message "SSO session expired" or "Authentication failure" or something similar.
Current Behavior
Exception with message "System.ArgumentNullException: Value cannot be null. (Parameter 'Options property cannot be empty: ClientName')", stack trace
Amazon.Runtime.Credentials.Internal.SSOTokenManager.GenerateNewTokenAsync(
SSOTokenManagerGetTokenOptions options, CancellationToken cancellationToken)
at Amazon.Runtime.Credentials.Internal.SSOTokenManager.GetTokenAsync(SSOToken
ManagerGetTokenOptions options, CancellationToken cancellationToken)
at Amazon.Runtime.SSOAWSCredentials.GetSsoCredentialsAsync(ICoreAmazonSSO sso
)
at Amazon.Runtime.SSOAWSCredentials.GenerateNewCredentialsAsync()
at Amazon.Runtime.RefreshingAWSCredentials.GetCredentialsAsync()
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionCont
ext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext exec
utionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext exec
utionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext e
xecutionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext e
xecutionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionCont
ext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext ex
ecutionContext)
at Amazon.Extensions.Configuration.SystemsManager.Internal.SystemsManagerProc
essor.GetParametersByPathAsync()
at Amazon.Extensions.Configuration.SystemsManager.Internal.SystemsManagerProc
essor.GetDataAsync()
at Amazon.Extensions.Configuration.SystemsManager.SystemsManagerConfiguration
Provider.LoadAsync(Boolean reload)
at Amazon.Extensions.Configuration.SystemsManager.SystemsManagerConfiguration
Provider.Load()
at Microsoft.Extensions.Configuration.ConfigurationManager.AddSource(IConfigu
rationSource source)
at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensio
ns.Configuration.IConfigurationBuilder.Add(IConfigurationSource source)
at Microsoft.Extensions.Configuration.SystemsManagerExtensions.AddSystemsMana
ger(IConfigurationBuilder builder, Action`1 configureSource)
at Microsoft.Extensions.Configuration.SystemsManagerExtensions.AddSystemsMana
ger(IConfigurationBuilder builder, String path, Boolean optional)
Reproduction Steps
Call SystemsManagerExtensions.AddSystemsManager() in an environment where SSO profile has been set up but SSO login is invalid or expired
@opottone Please see inputs from @dscpinheiro and the reasoning provided in #3535 (comment). Most likely this is a feature request to throw better exception message.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
My application uses AWS Single Sign-On (SSO) for authentication and it also uses
SystemsManagerExtensions.AddSystemsManager()
. When there is a valid SSO profile but a session has expired, the call fails and throws an exception with messageSystem.ArgumentNullException: Value cannot be null. (Parameter 'Options property cannot be empty: ClientName')
.In those circumstances some kind of exception is expected, but the message should be something like "SSO session expired" or "Authentication failure". Then a user could easily solve the problem and retry. With the actual message it takes significantly more time, effort and expertise to find debug the problem.
I'm not quite sure whether the problem is in Amazon.Extensions.Configuration.SystemsManager or AWSSDK.SimpleSystemsManagement.
Regression Issue
Expected Behavior
Exception with message "SSO session expired" or "Authentication failure" or something similar.
Current Behavior
Exception with message "System.ArgumentNullException: Value cannot be null. (Parameter 'Options property cannot be empty: ClientName')", stack trace
Reproduction Steps
Call
SystemsManagerExtensions.AddSystemsManager()
in an environment where SSO profile has been set up but SSO login is invalid or expiredPossible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Amazon.Extensions.Configuration.SystemsManager 6.2.1, AWSSDK.SimpleSystemsManagement 3.7.303.23
Targeted .NET Platform
net8.0
Operating System and version
Windows 10 Pro
The text was updated successfully, but these errors were encountered: