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

Allow JSON config to inline policy configuration

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.3.1.Final
    • Gateway
    • None

      Configuration File Format should allow policy configuration to be inlined as native JSON when possible (that is when the policy configuration is actually json.

      E.g. instead of

      "apiPolicies": [{
                 "policyJsonConfig": "{ \"responseCode\" : \"403\", \"ipList\" : [ \"1.2.3.4\" ] }",
                 "policyImpl": "plugin:io.apiman.plugins:apiman-plugins-url-whitelist-policy:1.3.1.Final:war/io.apiman.gateway.engine.policies.IPWhitelistPolicy" 
             }]
      

      Allow this

      "apiPolicies": [{
                 policyConfig: {
                      "responseCode": "403",
                      "ipList": [ "1.2.3.4"] 
                 }
                 "policyImpl": "plugin:io.apiman.plugins:apiman-plugins-url-whitelist-policy:1.3.1.Final:war/io.apiman.gateway.engine.policies.IPWhitelistPolicy" 
             }]
      

      This didn't matter much in previous versions of Apiman since the user was unlikely to be writing the policy configuration manually. However with the introduction of headless gateway the situation has changed.

            msavy_jira Marc Savy (Inactive)
            jcechace@redhat.com Jakub Čecháček
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: