Skip to main content

FAPI-RW-ID2-USER-REJECTS-AUTHENTICATION

NameUser Consent Flow Failure
CategoryINFOSEC
Execution MethodAUTOMATED (FAPI BASELINE)
DescriptionThis test requires the user to reject the authentication, for example by pressing the 'cancel' button on the login screen. It verifies the error is correctly notified back to the relying party.
Preconditions
Steps

These steps are conducted using the first Client registered to the Holder and occur using Client 1’s MTLS certificate.

  1. Retrieve Discovery Document and parse required endpoints
  2. Retrieve JWKS Key Set using jwks_uri attribute
  3. Validate JWKS keys are valid JSON, contain the required fields and are correctly encoded using unpadded base64url
  4. Verify all JWKS keys contain kids
  5. Verify all JWKS keys do not contain any private or symmetric keys
  6. Verify all JWKS keys are of at least 2048 bit in length
  7. Verify JWKS contains at least one key with alg of PS256 or ES256
  8. Create authorisation request with content of (roughly) similar to:

  9. { "aud": "https://localmachine:8103/local-conformance-holder", "scope": "openid profile bank:accounts.basic:read bank:accounts.detail:read", "claims": { "sharing_duration": 7776000, "id_token": { "acr": { "value": "urn:cds.au:cdr:2", "essential": true } } }, "iss": "4unxLnjKSMQCTRYU1X1Bed", "response_type": "code id_token", "redirect_uri": "https://localhost.emobix.co.uk:8443/test/a/wikkitgate/callback", "state": "LwI4CZHGDm", "exp": 1603332124, "nonce": "vVqWbuseiL", "client_id": "4unxLnjKSMQCTRYU1X1Bed" }
  10. Sign the authorisation request using PS256
  11. Create a client assertion containing iss, sub, jti, iat, exp, and aud
  12. Sign the client assertion using PS256
  13. Dispatch the authorisation request (8) using the client assertion (10) to the pushed_authorisation_request_endpoint specified within the discovery document
  14. Verify that the PAR endpoint returns HTTP Status 201 with a valid request_uri returned
  15. Verify that the content of the request uri meets entropy of at least 128-bits
  16. Initiate a browser initiation to the authorise endpoint specifying:
    • request_uri retrieved in (12)
    • client_id matching the iss of the authorisation request
    • redirect_uri matching the authorisation request
    • scope specifying scopes matching the authorisation request
    • response_type of code id_token
  17. Deliberately fail out of browser consent initiation (i.e., force an error)
  18. Receive redirect request at the redirect_uri specified and extract the fragment content and verify the following:
    • error is not present in the url query string (but is present in the fragment)
  19. Verify that the fragment does not contain code
  20. Verify that the fragment contains:
    • error_description
    • state
    • error
    • error_uri
  21. Verify that the fragment contains state and this matches the request object specified in (7)
  22. Verify that the error attribute is set to access_denied
Inputs
Expected ResultsWhen a Consumer fails consent flow the recipient is appropriately informed