--- title: "Binding rules" slug: "oapps-iga-binding-rules-8-2-3" updated: 2026-10-20T11:53:23Z published: 2026-10-20T11:53:23Z canonical: "docs.onespan.com/oapps-iga-binding-rules-8-2-3" excludeFromSearch: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Binding rules Shielding Tool rules files support the following binding-related options: | Option | Description | | --- | --- | | `bind` | Select classes or members to include in the binding process. | | `unbind` | Select classes or members to exclude from binding (i.e., leave their values in the app code). | | `untouchable` | Alias of `unbind`. | | `bindingStyle` | Define a binding configuration to use in conjunction with `bind`. | | `bindingCache` | Specify the percentage of pull bindings to keep in a Least Recently Used cache. | Note that you would rarely need to include a specific value in the binding process, as App Shielding will most likely bind the value regardless. If you are using reflection, however, the affected classes and members could cause issues and should be manually marked as `untouchable` or `unbind`. Binding can also affect performance, especially for classes and methods that are frequently called during runtime. If performance becomes an issue, consider excluding heavily used classes/methods from the binding process. ### Examples The following example excludes binding in `MyClass`: ```plaintext unbind class com.example.MyClass; ``` The following example excludes binding in any class under the `com.example` package: ```plaintext unbind class com.example.*; ``` The following example excludes binding in any class that implements `MyInterface`: ```plaintext unbind class * implements com.example.MyInterface; ``` The following example excludes binding in any class that extends `MyBaseClass`: ```plaintext unbind class * extends com.example.MyBaseClass; ``` The following example excludes binding to the `myField` field under `MyClass`: ```plaintext match class com.example.MyClass {    unbind java.lang.String myField; } ``` The following example excludes binding in any static constructor (i.e., `clinit`): ```plaintext match * {    unbind method ; } ``` The following example excludes binding in any constructor: ```plaintext match * {    unbind ;    unbind (...); } ``` ### Binding Styles The `bindingStyle` option is used to configure a set of binding rules to apply with `bind`. The syntax looks like the following: ```plaintext bindingStyle my-rules {    ... } bind:my-rules *; ``` In the above example, the binding style has a custom name of `my-rules` and is applied to all classes and methods (`*`). Styles can also be applied to more specific selectors (e.g., `bind:my-rules com.example.*;`). Currently, binding styles are only used to disable push bindings. For example: ```plaintext bindingStyle no-push-bindings {    push {        max 0    } } bind:no-push-bindings *; ``` This might speed up application launch time at the cost of security degradation and should only be used if the application launch is extremely slow. ### Least Recently Used Cache To further improve performance, you can use the `bindingCache` option to specify which percentage of pull bindings to store in a Least Recently Used (LRU) cache. For example: ```plaintext bindingCache { max-size 4% } ``` Without an LRU cache in place, every retrieval of a pull binding value requires a call to a native method. This is more secure but comes with a performance cost. With the LRU cache enabled, the most recently used strings are stored on the Java side after their initial retrieval, reducing the number of native calls. A good cache size depends on the application and how it uses strings, but 4% is a good starting point. If you integrate a debug version of App Shielding (using the `--debug` command line option), you can monitor the cache activity in the logs and adjust the max-size based on your findings. A cache log looks like the following example: ```plaintext 03-10 12:57:53.033 26159 26184 D ShieldSDK: Pull bindings LruCache[maxSize=185,hits=416,misses=110,hitRate=79%] ``` The logs contain the following information: | Configuration options | | --- | | Data | Description | | `maxSize` | The size of the cache, which depends on the number of pull bindings and the configured `max-size` percentage. | | `hits` | The number of strings found in the cache. | | `misses` | The number of times the cache needed to ask the native code for a string. | | `hitRate` | The percentage of calls that were `hits`. This should be neither too high (i.e., too much is being cached) nor too low (i.e., there is no performance gain). |