Class ControlPanelSecurityPaths
java.lang.Object
io.micronaut.controlpanel.core.security.ControlPanelSecurityPaths
Shared route prefixes owned by the control panel itself.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFilter pattern for the control panel path, including the server context path.static final StringFilter pattern for every route nested underCONTROL_PANEL_FILTER_PATTERN, which includes the helper controllers listed byhelperPaths().static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringName of the custom request header the control panel UI sends with its own fetch/XHR calls.static final StringExpected value ofREQUESTED_WITH_HEADERfor control panel UI requests. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisWriteRequest(String controlPanelPath, io.micronaut.http.HttpRequest<?> request) Determines whether a request targets a control-panel-owned write operation.
-
Field Details
-
CONTROL_PANEL
- See Also:
-
CONTROL_PANEL_FILTER_PATTERN
Filter pattern for the control panel path, including the server context path. Filters using it setappendContextPath = false: the context path is part of the pattern, joined the way the router joins it, because Micronaut skips prepending it to a pattern that merely starts with the same characters (context/app, control panel path/application). The pattern is rooted with/so that a path configured without a leading slash also matches; the Ant matcher ignores the empty segments this leaves for the other configurations.- See Also:
-
CONTROL_PANEL_SUBPATHS_FILTER_PATTERN
Filter pattern for every route nested underCONTROL_PANEL_FILTER_PATTERN, which includes the helper controllers listed byhelperPaths().- See Also:
-
CACHE_PATH
- See Also:
-
DATASOURCE_PATH
- See Also:
-
HIBERNATE_PATH
- See Also:
-
KAFKA_PATH
- See Also:
-
LOGGERS_PATH
- See Also:
-
OBJECT_STORAGE_PATH
- See Also:
-
APPLICATION_PATH
- See Also:
-
CACHE
- See Also:
-
DATASOURCE
- See Also:
-
HIBERNATE
- See Also:
-
KAFKA
- See Also:
-
LOGGERS
- See Also:
-
OBJECT_STORAGE
- See Also:
-
APPLICATION
- See Also:
-
REQUESTED_WITH_HEADER
Name of the custom request header the control panel UI sends with its own fetch/XHR calls. A cross-site form or navigation cannot set a custom header, so requiring it blocks cross-site write requests.- See Also:
-
REQUESTED_WITH_VALUE
Expected value ofREQUESTED_WITH_HEADERfor control panel UI requests.- See Also:
-
-
Method Details
-
helperPaths
-
isWriteRequest
public static boolean isWriteRequest(String controlPanelPath, io.micronaut.http.HttpRequest<?> request) Determines whether a request targets a control-panel-owned write operation.- Parameters:
controlPanelPath- the resolved control panel path, including any application context pathrequest- the HTTP request- Returns:
- true if the request mutates application/runtime state
-