Class IntrospectableSettings
Introspectable converter.
Reflective method dispatch via Introspectable is off by default on security grounds —
unless explicitly allow-listed, invoking arbitrary public methods on a response object via a URL query
parameter is a dangerous capability to expose over the wire. A consumer opts in explicitly by
registering an IntrospectableSettings bean (built with allow(...) or IntrospectableSettings.Builder.allowAll()) in the resource's bean store. When no such bean is present,
Introspectable resolves the default (deny-all) and every MethodNotAllowlistedException).
Example - allow-listing specific methods:
Example - trusted resource, pre-10.0 behavior:
Never call allowAll() on a resource whose response objects expose
methods you wouldn't want an arbitrary caller to invoke — allow-list the specific methods instead.
See Also:
- Since:
- 10.0.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntrospectableSettingsThe default (deny-all) settings used when no bean is registered. -
Method Summary
-
Field Details
-
DEFAULT
The default (deny-all) settings used when no bean is registered.
-
-
Method Details
-
create
Builder creator.- Returns:
- A new builder (deny-all).
-
asFilter
Returns the effective allow-list filter for these settings.- Returns:
- A filter that returns
true for methods that may be invoked. Nevernull — returnsfalse for every method when nothing has been allow-listed (the default).
-