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
Where #152 introduced -Protocol offering Modern Authentication (OpenID Connect next to existing WS-Federation/WS-Trust) implementation on .NET 4.8 (Windows PowerShell 5.1) and .NET6+ (PowerShell 7.3+) along the happy path.
This issue tries to validate edge cases of misconfiguration up till token refresh.
Authentication over System Browser, so Authorization Code Flow with Proof Key for Code Exchange (PKCE), will give you 60 seconds. Any slower and you will see the New-IShSession/Test-IShSession cmdlets respond with TaskCanceledException exception stating Browser login canceled after 60 seconds.
Authentication over Client Credentials Flow with non-existing -ClientId will error out with GetTokensOverClientCredentialsAsync Access Error[invalid_client]; either invalid ClientId/ClientSecret combination or expired ClientSecret.. Please make sure you activate a client/secret on your Access Management User Profile (ISHAM).
Authentication over Client Credentials Flow with expired -ClientId/-ClientSecret combination will error out with GetTokensOverClientCredentialsAsync Access Error[invalid_client]; either invalid ClientId/ClientSecret combination or expired ClientSecret.. Please recycle expired client/secret on your Access Management User Profile (ISHAM).
Authentication over Client Credentials Flow with valid -ClientId/-ClientSecret combination, but not mapped in the CMS to a User Profile over FISHEXTERNALID will [-14] The access is denied because no profile match was found. 0. Please make sure that the client (which you can find on the Access Management User Profile) is added in Organize Space on one CMS User Profile in the comma-seperated External Id field.
Authentication over Client Credentials Flow with valid -ClientId/-ClientSecret combination, and mapped in the CMS to a User Profile over FISHEXTERNALID which is disabled will error out with [-6] Your account has been disabled. Please see your system administrator.. Please make sure in Organize Space that the one CMS User Profile holding the client in the External Id field is an enabled profile.
Authentication over either Client Credentials or System Browser was succesful but the Access Token expired. You do not need to create a New-IShSession, every cmdlet will attempt to get a token (either refresh or re-logon if required) based on the cmdlets (implicit) -IShSession parameter.
Using New-IshSession parameter -PSCredential on 14SP4/14.0.4 or earlier works like before, as it means username/password authentication over protocol WcfSoapWithWsTrust. However, using -PSCredential on 15/15.0.0 means that you are using protocol WcfSoapOverOpenIdConnect, so expecting a client/secret. If you then provide username/password, you will get error GetTokensOverClientCredentialsAsync Access Error[invalid_client]. Note that you can force by adding -Protocol WcfSoapWithWsTrust to the New-IshSession cmdlet.
Be consistent in the usage of AccessToken and BearerToken, prefer AccessToken as much as possible
Get-Help updates required for example... $ishSessionA = New-IshSession -WsBaseUrl "https://example.com/ISHWSPROD/" -PSCredential "Admin" --> -PSCredential Admin only works for -Protocol WcfSoapWithWsTrust so it is an outdated sample ... all New-IshSession should be reviewed.
The text was updated successfully, but these errors were encountered:
…enIdConnect protocol... Next are more manual tests to document known issues; New-IShSession Pester tests and perhaps add/test over OpenApiAM10Service... Much later deep dive into folder or project cmdlets based on OpenApi
* Implemented support for getting a refresh token before token expires and retrieving a new access token after expiration.
* #174 Add refresh token for WcfSoapWithOpenIdConnect and OpenApiWithOpenIdConnect protocol... Next are more manual tests to document known issues; New-IShSession Pester tests and perhaps add/test over OpenApiAM10Service... Much later deep dive into folder or project cmdlets based on OpenApi
* #174 Add refresh token for WcfSoapWithOpenIdConnect and OpenApiWithOpenIdConnect protocol... New-IShSession Pester tests... Much later deep dive into folder or project cmdlets based on OpenApi
* #174 Add refresh token for WcfSoapWithOpenIdConnect and OpenApiWithOpenIdConnect protocol... Finishing touchups on this feature... Much later deep dive into folder or project cmdlets based on OpenApi
---------
Co-authored-by: Ivo van de Lagemaat <ivandelagemaat@sdl.com>
Co-authored-by: ddemeyer <ddemeyer@rws.com>
Where #152 introduced
-Protocol
offering Modern Authentication (OpenID Connect next to existing WS-Federation/WS-Trust) implementation on .NET 4.8 (Windows PowerShell 5.1) and .NET6+ (PowerShell 7.3+) along the happy path.This issue tries to validate edge cases of misconfiguration up till token refresh.
New-IShSession
/Test-IShSession
cmdlets respond withTaskCanceledException
exception statingBrowser login canceled after 60 seconds.
-ClientId
will error out withGetTokensOverClientCredentialsAsync Access Error[invalid_client]; either invalid ClientId/ClientSecret combination or expired ClientSecret.
. Please make sure you activate a client/secret on your Access Management User Profile (ISHAM).-ClientId
/-ClientSecret
combination will error out withGetTokensOverClientCredentialsAsync Access Error[invalid_client]; either invalid ClientId/ClientSecret combination or expired ClientSecret.
. Please recycle expired client/secret on your Access Management User Profile (ISHAM).-ClientId
/-ClientSecret
combination, but not mapped in the CMS to a User Profile overFISHEXTERNALID
will[-14] The access is denied because no profile match was found. 0
. Please make sure that the client (which you can find on the Access Management User Profile) is added in Organize Space on one CMS User Profile in the comma-seperated External Id field.-ClientId
/-ClientSecret
combination, and mapped in the CMS to a User Profile overFISHEXTERNALID
which is disabled will error out with[-6] Your account has been disabled. Please see your system administrator.
. Please make sure in Organize Space that the one CMS User Profile holding the client in the External Id field is an enabled profile.New-IShSession
, every cmdlet will attempt to get a token (either refresh or re-logon if required) based on the cmdlets (implicit)-IShSession
parameter.New-IshSession
parameter-PSCredential
on 14SP4/14.0.4 or earlier works like before, as it means username/password authentication over protocolWcfSoapWithWsTrust
. However, using-PSCredential
on 15/15.0.0 means that you are using protocolWcfSoapOverOpenIdConnect
, so expecting a client/secret. If you then provide username/password, you will get errorGetTokensOverClientCredentialsAsync Access Error[invalid_client]
. Note that you can force by adding-Protocol WcfSoapWithWsTrust
to theNew-IshSession
cmdlet.-PSCredential Admin
only works for-Protocol WcfSoapWithWsTrust
so it is an outdated sample ... all New-IshSession should be reviewed.The text was updated successfully, but these errors were encountered: