Uploaded image for project: 'Identity Gateway'
  1. Identity Gateway
  2. OPENIG-1437

Properties Location Not reading environment variable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.0
    • Component/s: None
    • Labels:
    • Environment:
      Windows
    • Sprint:
      OpenIG Sprint 93 (last dev)

      Description

      I'm using OpenIG 5.0.0-SNAPSHOT, and have found that this does not parse the environment variable OPENIG_BASE correctly. The snippet below causes the following error: java.io.FileNotFoundException: ${env['OPENIG_BASE']}\config\properties.json (The system cannot find the path specified)

      "properties": {
        "$location": "file:${env['OPENIG_BASE']}/config/properties.json"
      },
      

      I would expect the property to be expanded correctly, but can't seem to figure out how to do it... I've been looking at the docs at https://forgerock.org/openig/doc/bootstrap/reference/index.html#expressions-conf

      It does work correctly if I use the full path without the embedded variable:

      "properties": {
        "$location": "file:C:/Users/foobar/AppData/Roaming/OpenIG/config/properties.json"
      },
      

      Unfortunately, I need to be able to specify this generically, and a Windows environment is not guaranteed, so I can't use %appdata%. Also, I know that the variable exists--I use it in other parts of the configuration.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                laurent.vaills Laurent Vaills
                Reporter:
                jerrobertson Jeremy Robertson [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: