Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-14839

'OAuth2 Access Token Modification Script' httpClient.send does not route via configured proxy


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: oauth2, scripting
    • Labels:


      Bug description

      The sample 'OAuth2 Access Token Modification Script' contains code to call out to an external service:

      //Obtain additional values by performing a REST call to an external service
      try {
       Response response = httpClient.send(new Request()
       .modifyHeaders({ headers -> headers.put("Content-Type", "application/json;charset=UTF-8") })
      // .setEntity('foo=bar&hello=world')) 


      This does not appear to work via a configured proxy using the instructions as: https://backstage.forgerock.com/docs/am/6.5/install-guide/#JVM-proxy-server


      How to reproduce the issue

      1). Set up AM 7.0 master for customisable access token use-case

      2). Adjust the script to call to an available resource

      3). Set up the proxy configuration using the AM docs to point to an available proxy server

      4). Test the use-case and note that the call to the external service goes directly and not via the proxy (monitor the access log of the proxy server and the resource server to verify)

      Expected behaviour
      Call to external service should be routed via the proxy
      Current behaviour
      Call to external service is sent directly




            • Assignee:
              andy.itter Andy Itter
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: