Skip to content

Correct password grant request gets throttled following an incorrect one #716

@akulyakhtin

Description

@akulyakhtin

The scenario is as follows:

  1. Client uses MSAL to obtain an access token using ROPC public flow. It passes a correct username and an incorrect password.

  2. Because the client is federated, MSAL eventually calls WSTrustRequest.execute(), passing username/password.

  3. WSTrustRequest.execute() makes a SOAP request call to our server. It uses HttpHelper to send the request. The server sees an incorrect password and responds with HTTP response 500. (This might be an incorrect action on the server side but the issue concerns MSAL and not the server)

  4. MSAL in HttpHelper.processThrottlingInstructions() sees response 500, creates request thumbprint and stores the thumbptint in ThrottlingCache and indicates that a request with the same thumbprint can only be performed after ThrottlingCache.DEFAULT_THROTTLING_TIME which is 120 sec.

  5. Immediately after that the client issues another ROPC request, this time with the correct password.

  6. This new ROPC request also results in the call to WSTrustRequest.execute() and MSAL then wants to make a call to the server using HttpHelper.

  7. However, HttpServer.checkForThrottling() sees that the thumbprint of the new request is the same as that of the previous request made by WSTrustRequest.execute() (because urls are the same) and throws MsalThrottlingException and the correct request does not get sent.

We think it's a bug because in this scenario an earlier incorrect request prevents a successful execution of a later correct request .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestRequest for new functionalityWork-around ProvidedIssue has a known work-around, which could one day be integrated into MSAL Javapublic-clientFor questions/issues related to public client apps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions