6. Security

accessControl

Blocks requests whose origin TCP/IP address (hostname or IP address) is not allowed to access the requested resource.

Can be used in:

serviceProxy, api, stompProxy, swaggerProxy, if, registration, wsStompReassembler, interceptor, bean, internalProxy, transport and soapProxy

Syntax

<accessControl file="path" />

Sample

The following example shows how to configure access control globally. Every request will be checked against the rules of the access control. The accessControl is placed into the transport of the beans configuration.

<router>
  <transport coreThreadPoolSize="20">
	<ruleMatching />
	<dispatching />

	<accessControl file="resources/acl/acl.xml" />

	<userFeature />
	<httpClient />

  </transport>

  <serviceProxy>
	[...]
  </serviceProxy>
</router>

Attributes

NameRequiredDefaultDescriptionExample
useXForwardedForAsClientAddr false false
whether to use the last value of the last "X-Forwarded-For" header instead of the remote IP address -
file true - Location of the ACL file. acl/acl.xml

See also