Class WebUiSession.WebUiSessionAccessControl
java.lang.Object
com.inductiveautomation.ignition.gateway.dataroutes.AbstractAccessControlStrategy
com.inductiveautomation.ignition.gateway.dataroutes.AbstractGatewayAccessControlStrategy
com.inductiveautomation.ignition.gateway.web.session.WebUiSession.WebUiSessionAccessControl
- All Implemented Interfaces:
AccessControlStrategy
- Direct Known Subclasses:
WebUiSession.CsrfWebUiSessionAccessControl
- Enclosing interface:
- WebUiSession
public static class WebUiSession.WebUiSessionAccessControl
extends AbstractGatewayAccessControlStrategy
An
AbstractGatewayAccessControlStrategy where auth context such as user information and granted
security levels are derived from Web UI session cookies.
Note: by default, this strategy can only be mounted with Routes which use a safe HTTP method such as GET, HEAD,
or OPTIONS. This strategy does not offer CSRF protections. Use the WebUiSession.CsrfWebUiSessionAccessControl
strategy if you need to protect a Route which uses an unsafe HTTP method so that you can get CSRF protections.
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.gateway.dataroutes.AbstractGatewayAccessControlStrategy
permissionTypeFields inherited from class com.inductiveautomation.ignition.gateway.dataroutes.AbstractAccessControlStrategy
EMPTY_SECURITY_LEVELSFields inherited from interface com.inductiveautomation.ignition.gateway.dataroutes.AccessControlStrategy
OPEN_ROUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActor(RequestContext request) If the request is authenticated with a web ui session, this will return the username of the associatedWebAuthUserprotected com.google.common.collect.ImmutableCollection<SecurityLevelConfig>getSecurityLevels(RequestContext request) static Optional<WebAuthUser>getWebAuthUser(RequestContext request) voidvalidate(RouteMounterContext routeMounterContext) Only safe HTTP methods are allowed by default since it is usually the intention that unsafe HTTP methods are used for state changing operations and this strategy does not offer any CSRF protectionsMethods inherited from class com.inductiveautomation.ignition.gateway.dataroutes.AbstractGatewayAccessControlStrategy
getRequiredPermissions, toStringMethods inherited from class com.inductiveautomation.ignition.gateway.dataroutes.AbstractAccessControlStrategy
canAccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.gateway.dataroutes.AccessControlStrategy
getWwwAuthenticateHeader
-
Constructor Details
-
WebUiSessionAccessControl
-
-
Method Details
-
getSecurityLevels
protected com.google.common.collect.ImmutableCollection<SecurityLevelConfig> getSecurityLevels(RequestContext request) - Specified by:
getSecurityLevelsin classAbstractAccessControlStrategy- Returns:
- The security levels associated with the request.
-
getActor
If the request is authenticated with a web ui session, this will return the username of the associatedWebAuthUser -
getWebAuthUser
-
validate
public void validate(RouteMounterContext routeMounterContext) throws RouteMounterValidationException Only safe HTTP methods are allowed by default since it is usually the intention that unsafe HTTP methods are used for state changing operations and this strategy does not offer any CSRF protections- Parameters:
routeMounterContext- theRouteMounterContextto validate- Throws:
RouteMounterValidationException- if validation fails
-