Forum Discussion

Gerard_Samuel's avatar
Gerard_Samuel
Icon for Nimbostratus rankNimbostratus
Aug 18, 2020

401 F5 Authorization Required: Authorization failed

We have been running LTM VE appliances in Azure for just about a year with version 14.1.0.3.

Our developers execute pipeline tasks against them using this PowerShell module:

https://github.com/joel74/POSH-LTM-Rest

 

We updated the appliances due to CVE-2020-5902 about two weeks ago.

Currently, they are now running 14.1.2.6.

It appears that the developers are having random issues authenticating to the appliances.

Updating to the latest version of the PowerShell module does not appear to have fixed the issue.

 

Here are a sequence of events where it works, and then it does not work:

 

PS C:\WINDOWS\system32> $result = New-F5Session -LTMName '10.175.102.253' -LTMCredentials $mycreds -Verbose

VERBOSE: POST https://10.175.102.253/mgmt/shared/authn/login with -1-byte payload

VERBOSE: received 834-byte response of content type application/json; charset=UTF-8

VERBOSE: GET https://10.175.102.253/mgmt/tm/sys/version/ with 0-byte payload

VERBOSE: received 427-byte response of content type application/json; charset=UTF-8

PS C:\WINDOWS\system32>

PS C:\WINDOWS\system32>

PS C:\WINDOWS\system32>

PS C:\WINDOWS\system32> $result = New-F5Session -LTMName '10.175.102.253' -LTMCredentials $mycreds -Verbose

VERBOSE: POST https://10.175.102.253/mgmt/shared/authn/login with -1-byte payload

VERBOSE: GET https://10.175.102.253/mgmt/tm/ltm/ with 0-byte payload

VERBOSE: The version must be prior to 11.6 since we failed to retrieve an auth token.

VERBOSE: GET https://10.175.102.253/mgmt/tm/sys/version/ with 0-byte payload

Invoke-F5RestMethod : "401 F5 Authorization Required: Authorization failed: user=https://localhost/mgmt/shared/authz/users/s-f5-Apex-SvcAcct resource=/mgmt/tm/sys/version verb=GET

uri:http://localhost:8100/mgmt/tm/sys/version/ referrer:10.125.81.226 sender:10.125.81.226

At C:\Program Files\WindowsPowerShell\Modules\F5-LTM\1.4.297\Public\New-F5Session.ps1:96 char:13

+   $JSON = Invoke-F5RestMethod -Method Get -Uri $VersionURL -F5Sessi ...

+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  + CategoryInfo     : NotSpecified: (:) [Write-Error], WriteErrorException

  + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-F5RestMethod

 

So not sure if this is an issue with the PowerShell module, or at the f5.

I'm taking a stab here, as there appears to be other instances with other client libraries that "401 F5 Authorization Required: Authorization failed" has occurred.

 

Thank you