SOS Interceptor Integration
This topic describes how to integrate an SOS Interceptor into con.terra's security.manager v3.1.1. The integration requires an already installed and configured instance running on a tomcat servlet engine. It is divided into 14 steps.
Requirements
- Installed and configured security.manager v3.1.1
We assume that you installed the security.manager to a directory which is referred here as ${secman}
. That directory includes the folder webapps containing administration
, gateway
and wss
.
- Working maven and java enviroment set-up
Integration
- Integrate the new interceptor by building from source (direct downloadable jar)
- Checkout and build tag 2.0.11 and latest version of the sensor web branch of the security API into the same super directory.
- Run the following script: update_2.0.11.sh
It copies the sos interceptor code from the newer API to the 2.0.11er version.
- Fix Imports within the sos interceptor packages
org.n52.security.enforcement.interceptors.sos.*
, e.g. in eclipse perform the step organize imports in each class with problems. Select org.n52.security.enforcement.artifact.Transferable
if asked.
- Within the Webapps
adminstration
, gateway
and wss
backup and exchange the 52n-security-service-2.0.11.jar
with the new one.
- Download the SOS module description which is needed later on:
- In the
SOS-module.xml
check if following properties are present in the
template file (if not, add them as new property elements): <Property name="sessionService" idRef="sessionService" />
<Property name="capabilitiesFileName" idRef="defaultCapabilitiesFile" />
- Copy downloaded
SOS-module.xml
to ${secman}/webapp/wss/WEB-INF/classes/enforcementpoint-modules
- Open
${secman}/webapp/wss/WEB-INF/classes/security-config.xml
and add following module entry to <Service id="WSS">
<Entry name="SOS" value="SOS-module.xml"/>
- Open
${secman}/webapp/wss/WEB-INF/classes/spring-db-config.xml
, under <bean id="enforcementPointManagementService"> ... <property name="moduleNames">
add <value>SOS</value>
- Open
${secman}/webapp/administration/WEB-INF/classes/spring-pep-service-config.xml
, under <util:set id="secModules">
and <util:set id="allModules">
add <value>SOS</value>
- Open
${secman}/administration/WEB-INF/classes/security-config.xml
, and under <Property name="policyFinderModules"><Set><Entry><Object class="[...]"><Property name="childPolicyFinderModules"><List>
add
<Entry>
<Object class="org.n52.security.service.pdp.xacml.policyfinder.SimplePermissionsPolicyFinderModule">
<Property name="provider">
<Object class="org.n52.security.service.pdp.simplepermission.SimplePermissionFileProvider" initMethod="init">
<Property name="path" value="permissions.xml" />
</Object>
</Property>
</Object>
</Entry>
The path
can be adjusted as you like. If the security manager is enabled within your tomcat set-up, please make sure that the security manager webapps are allowed to read and write from/to this directory!
- Copy your
permission.xml
to ${secman}/administration/WEB-INF/classes/
(or to that path you have configured one step earlier)
- Change
SubjectDomain
attribute value to urn:conterra:names:sdi-suite:policy:attribute:role
(Please note that this domain requires roles instead of user names to be configured in the permissions.xml
).
- Test the setup.
Make sure to create the enforcement endpoint in the administration
webapp that is referenced in the permissions.xml
.