Uploaded image for project: 'apiman (API Management)'
  1. apiman (API Management)
  2. APIMAN-831

Support for property placeholders in configuration elements of plans, policies, applications and services

XMLWordPrintable

      It should be great if Apiman can support property placeholders for configuration elements within Apiman. The property placeholders should be evaluated at runtime based on JVM system properties.

      This way we can support the following scenario:

      1. Environment specific configuration is replaced by property placeholders
      2. The property placeholders are mapped to JVM system properties at deploy time
      3. The property placeholders are evaluated at runtime

      This is particularly usefull when Apiman is distributed as a preconfigured application which can be the case when creating a custom Docker image which extends the default Apiman Docker image.
      This way Apiman can be preconfigured with published plans, policies and services without the need to configure environment specific things like hostname and TCP/IP port.

      This is the case for example when configuring the realm of the Keycloak OAuth policy. The realm needs to contain the complete URL of the Keycloak server otherwise you could end up with error's like:

      {
        "type": "Authentication",
        "failureCode": 11004,
        "responseCode": 401,
        "message": "Token audience doesn't match domain. Token issuer is http://192.168.99.100:8080/auth/realms/apiman, but URL from configuration is http://localhost:8080/auth/realms/apiman",
        "headers": {}
      }
      

      I would like to suggest the following behavior:

      • Property placeholders within published entities (plans,policies,applications,services) are evaluated upon publication to the gateway and are reevaluated upon gateway reboot.
      • Property placeholders within published entities are evaluated in the management UI / REST API when viewing the details of published entities as long as the JVM system properties are set. Otherwise they are shown as is.
      • Property placeholders within unpublished entities are not evaluated in the mangement UI / REST API, but are shown as is.

              ewittman@redhat.com Eric Wittmann
              ton@finalist.nl Ton Swieb (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: