Skip to content

Repository files navigation

Filter Development Kit (FDK)

The Filter Development Kit is a Java framework that extends Axway API Gateway with capabilities the platform does not provide out of the box: calling policies from scripts, resolving selectors cleanly, sharing code between scripts, exposing Java methods as selectors, creating fully packaged custom filters with a Policy Studio UI, and hot-reloading code changes without a gateway restart.

A Docker-based playground is provided so you can have a working gateway, an IDE, and all FDK features running in a single container within minutes. See Getting Started.


What problem does it solve?

Pain pointFDK solution
Scripts cannot call other policiesAdvanced Script Filter / Script Context
Scripts cannot resolve selectors properlyResource binding with type coercion
Scripts cannot access KPS or caches with proper referencesKPS and Cache resources
Code is duplicated across scripts (copy/paste)Groovy resource reflection + export
JUEL's built-in reflection resolver can call Java methods at invocation time, but the message is not part of the JUEL context — it is designed for self-contained objects, with no type coercion and no message accessExtension Context pre-registers functions at configuration time; the message is injected directly from the resolver context, and parameter type coercion is handled automatically — no glue filters needed to convert arguments before the call
Custom filters require complex GUI maintenanceJava Quick Filters (generated from annotations)
Adding a library causes dependency conflictsChild-first ClassLoader
Testing requires a gateway restartDynamic Compiler

Feature overview

FeatureWhat it doesRequires typesetStandalone
Script ContextAdds resource binding to the standard Groovy script filterNo
Script ExtensionsAdds Java-backed top-level functions to any scriptNo
Advanced Script FilterEnhanced script filter with full resource and reflection APIYes
Extension ContextExposes Java methods as API Gateway selectorsYes
Extension InterfaceShares a Java interface between FDK and custom filtersYes
Child-first ClassLoaderIsolates conflicting third-party librariesYes
Java Quick FiltersGenerates complete Policy Studio filters from annotated JavaNo¹ (own typeset)Yes
Dynamic CompilerCompiles Java on deploy; no restart neededYes

¹ Quick Filter archives embed their own typesets and are imported independently, but filter-devkit-runtime must be installed in the gateway ext/lib.


Choosing your installation mode

Do you want to create a new filter that appears in the Policy Studio palette?
├─ Yes → Java Quick Filters (docs/QuickFilters.md)
│ Each filter archive is self-contained; no other installation needed.
│
└─ No → Do you want the full feature set (Extension Context global namespace,
Extension Interface, child-first ClassLoader, Advanced Script Filter)?
├─ Yes → Full install: deploy runtime jars + import typeset
│ → docs/BuildAndInstall.md, then docs/Architecture.md (§ Installation modes)
│
└─ No → Script-only install: deploy runtime jars, no typeset import
Gives you: Script Context, Script Extensions
→ docs/GettingStarted.md (§ Manual install)

Documentation map

DocumentRead it when…
Getting StartedYou want a working example as fast as possible
ArchitectureYou want to understand how the pieces fit together
ConceptsYou want the mental model before diving into features
Scripting GuideYou are enhancing scripts (calling policies, resolving selectors, sharing code)
Java ExtensionsYou are exposing Java methods to selectors or custom filters
Java Quick FiltersYou are building a new filter with a Policy Studio UI
Dynamic CompilerYou want faster iteration without gateway restarts
Build & InstallYou are setting up the build from source
MigrationYou are migrating from a legacy FDK release
ReferenceYou need the full annotation and runtime API

Prerequisites

  • JDK 11
  • API Gateway and Policy Studio 7.7.20260228
  • Gradle (wrapper included)
  • git

The codebase has been tested from version 20220530 (JDK 8) through 20260228 (JDK 11). Always use artifacts built for the API Gateway version you are targeting — bytecode differences between releases can trigger MethodNotFoundException. If no matching branch exists, open an issue or submit a pull request.

Note: The FDK runtime contains no code specific to either Entity Store variant (one log directive in AbstractScriptProcessor aside), so YAML should work at runtime — it has simply not been tested. Typeset generation targets the XML Entity Store tooling; YAML tooling support is not currently planned.


Available plugins

PluginDescriptionTypeset required
Extended Eval SelectorSelector evaluation with native CircuitAbortException propagationYes (own typeset)
OAuth 2.0 extended Token serviceToken exchange, assertion and client_assertion grant supportYes (own typeset)
OAuth 2.0 extended Authorize serviceBuilt-in PKCE supportYes (own typeset)
HTTP SignatureGeneration and validation per draft-cavage-http-signatures-12Yes (own typeset)
JAXRS supportJAX-RS web service behaviour in Groovy scriptsNo (extension loading)
Circuit LoopControlled iteration within policy executionYes (own typeset)
Script ExtensionsBuilt-in script extension moduleNo (extension loading)
Certificate ManagerCertificate manipulation and JWKS export (work in progress)No (extension loading)

Known limitations and TODO

AreaLimitationStatus
Docker playgroundNo gateway configuration is provided out of the box. The user must create an XML configuration and import typesets manually before policies can run. Automation of this step is under investigation.In progress
Entity StoreThe FDK runtime contains no code specific to either Entity Store variant (one log directive in AbstractScriptProcessor aside), so YAML should work at runtime — it has simply not been tested. Typeset generation targets the XML Entity Store tooling; YAML tooling support is not currently planned.Not planned
Quick Filter UINo sub-dialogs in generated filter UIs. Complex multi-panel configurations requiring sub-dialogs (such as the Resources tab) cannot be expressed with the current xmlui code generator.Not planned
Certificate Manager pluginCertificate manipulation and JWKS export for OpenID/OAuth services.In progress

About

API Gateway components for implementing filters and advanced scripting

Resources

Stars

5 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages