Changeset 2475
- Timestamp:
- 09/23/08 19:31:02 (3 months ago)
- Location:
- trunk/otis
- Files:
-
- 2 added
- 11 modified
- 7 moved
-
.externalToolBuilders (added)
-
.externalToolBuilders/ant build.launch (added)
-
.project (modified) (1 diff)
-
build.xml (modified) (6 diffs)
-
config/AuthenticatedSessionResponse.fmt (moved) (moved from trunk/otis/config/AuthenticatedSessionResponse.xml) (1 prop)
-
config/GET_AttributeResponse.fmt (moved) (moved from trunk/otis/config/GET_AttributeResponse.xml) (1 prop)
-
config/GET_AuthEntityResponse.fmt (moved) (moved from trunk/otis/config/GET_AuthEntityResponse.xml) (1 prop)
-
config/GET_EntityResponse.fmt (moved) (moved from trunk/otis/config/GET_EntityResponse.xml) (1 prop)
-
config/GET_PropertiesResponse.fmt (moved) (moved from trunk/otis/config/GET_PropertiesResponse.xml) (1 prop)
-
config/GET_RoleResponse.fmt (moved) (moved from trunk/otis/config/GET_RoleResponse.xml) (1 prop)
-
config/PUT_ContextChangesRequest.fmt (moved) (moved from trunk/otis/config/PUT_ContextChangesRequest.xml) (1 prop)
-
config/otis-config.client.local.xml (modified) (1 diff)
-
config/otis-config.client.remote.xml (modified) (2 diffs)
-
config/otis-config.server.xml (modified) (4 diffs)
-
config/web.xml (modified) (1 diff)
-
lib/higgins-idas-cp-rest-xml_1.0.0.jar (modified) (previous)
-
otis.war.targets.xml (modified) (1 diff)
-
src/org/bandit/otis/test/TestUtil.java (modified) (2 diffs)
-
src/org/bandit/otis/test/junit/AuthSessionBaseTest.java (modified) (1 diff)
-
src/org/bandit/otis/test/junit/AuthSessionTest.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/otis/.project
r1491 r2475 11 11 </arguments> 12 12 </buildCommand> 13 <buildCommand> 14 <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> 15 <arguments> 16 <dictionary> 17 <key>LaunchConfigHandle</key> 18 <value><project>/.externalToolBuilders/ant build.launch</value> 19 </dictionary> 20 </arguments> 21 </buildCommand> 13 22 </buildSpec> 14 23 <natures> -
trunk/otis/build.xml
r2473 r2475 29 29 <property name="testtar.file" value="${test.name.prefix}-${project.version}.tar"/> 30 30 <property name="srctar.file" value="otis-src-${project.version}.tar"/> 31 <property name="outconfigrootdir" value="${builddir}/config" /> 32 <property name="warconfigdir" value="${outconfigrootdir}/war"/> 33 <property name="sdkconfigdir" value="${outconfigrootdir}/sdk"/> 31 34 32 35 <import file="otis.war.targets.xml"/> … … 44 47 <mkdir dir="${builddir}"/> 45 48 <mkdir dir="${builddir}/classes"/> 46 <mkdir dir="${builddir}/config"/> 49 <mkdir dir="${outconfigrootdir}"/> 50 <mkdir dir="${warconfigdir}"/> 51 <mkdir dir="${sdkconfigdir}"/> 47 52 <mkdir dir="${builddir}/lib"/> 48 53 <mkdir dir="${builddir}/doc"/> … … 78 83 </target> 79 84 80 <target name="test" depends="testwar,compile"> 85 <target name="testprep" depends="testwar"> 86 <copy file="${builddir}/${testwar.file}" tofile="${builddir}/${test.name.prefix}.war" /> 87 88 <concat destfile="${outconfigrootdir}/filter.properties"> 89 OTIS.ENDPOINT=http://127.0.0.1:9997/otis-test/ 90 REST.CP.TEMPLATE.DIR=build/config/sdk 91 LDAP.SERVER.ADDR=ldap://localhost:50389 92 </concat> 93 <antcall target="-copy.sdkconfigs" /> 94 <copy file="${configdir}/otis.ks" todir="${sdkconfigdir}" preservelastmodified="true"/> 95 <copy file="${configdir}/TreeData.xml" todir="${outconfigrootdir}" /> 96 </target> 97 98 <target name="test" depends="testprep"> 81 99 <mkdir dir="${junit.output.dir}"/> 82 <copy file="${builddir}/${testwar.file}" tofile="${builddir}/${test.name.prefix}.war" />83 100 <junit fork="yes" printsummary="withOutAndErr"> 84 101 <formatter type="xml"/> … … 106 123 </target> 107 124 108 <target name="null" />109 110 125 <target name="jar" depends="compile"> 111 126 <jar … … 113 128 basedir="${builddir}/classes" 114 129 filesonly="false" 115 excludes="org/bandit/otis/server org/bandit/otis/server/*.class**/*.jar,**/*.tar,**/*.zip">130 excludes="org/bandit/otis/server,org/bandit/otis/server/*.class,**/*.jar,**/*.tar,**/*.zip"> 116 131 </jar> 117 132 </target> 118 133 119 <target name="-copy.configs"> 120 <copy file="${configdir}/web.xml" todir="${builddir}/config" overwrite="true" /> 121 <copy file="${configdir}/otis-config.client.local.xml" todir="${builddir}/config" overwrite="true" /> 122 <copy file="${configdir}/otis-config.client.remote.xml" todir="${builddir}/config" overwrite="true" /> 123 <copy file="${configdir}/otis-config.server.xml" todir="${builddir}/config" overwrite="true" /> 134 <fileset id="sdkconfigfiles" dir="${configdir}" 135 includes=" otis-config.client.local.xml, 136 otis-config.client.remote.xml, 137 otis-config.client.am.xml, 138 otis-config.client.rolemanager.xml, 139 otis-config.client.idm.xml, 140 keysign.xml, 141 PUT_ContextChangesRequest.fmt, 142 assertion.xml 143 "/> 144 <target name="-copy.sdkconfigs" depends="-init"> 145 <condition property="sdk.filter.properties.match"> 146 <filesmatch 147 file1="${outconfigrootdir}/filter.properties" 148 file2="${sdkconfigdir}/filter.properties" /> 149 </condition> 150 <antcall target="-update.sdkconfigs" /> 151 <copy todir="${sdkconfigdir}"> 152 <fileset refid="sdkconfigfiles" /> 153 <filterset> 154 <filtersfile file="${sdkconfigdir}/filter.properties"/> 155 </filterset> 156 </copy> 157 </target> 158 <target name="-update.sdkconfigs" unless="sdk.filter.properties.match" > 159 <delete > 160 <fileset dir="${sdkconfigdir}" includes="**/*"/> 161 </delete> 162 <copy file="${outconfigrootdir}/filter.properties" todir="${sdkconfigdir}" /> 163 </target> 164 165 <fileset id="warconfigfiles" dir="${configdir}" 166 includes=" web.xml, 167 otis-config.client.local.xml, 168 otis-config.server.xml, 169 AuthenticatedSessionResponse.fmt, 170 GET_AttributeResponse.fmt, 171 GET_AuthEntityResponse.fmt, 172 GET_EntityResponse.fmt, 173 GET_PropertiesResponse.fmt, 174 GET_RoleResponse.fmt 175 "/> 176 <target name="-copy.warconfigs" depends="-init"> 177 <condition property="war.filter.properties.match"> 178 <filesmatch 179 file1="${outconfigrootdir}/filter.properties" 180 file2="${warconfigdir}/filter.properties" /> 181 </condition> 182 <antcall target="-update.warconfigs" /> 183 <copy todir="${warconfigdir}"> 184 <fileset refid="warconfigfiles" /> 185 <filterset> 186 <filtersfile file="${warconfigdir}/filter.properties"/> 187 </filterset> 188 </copy> 189 </target> 190 <target name="-update.warconfigs" unless="war.filter.properties.match" > 191 <delete > 192 <fileset dir="${warconfigdir}" includes="**/*"/> 193 </delete> 194 <copy file="${outconfigrootdir}/filter.properties" todir="${warconfigdir}" /> 124 195 </target> 125 196 … … 127 198 <war 128 199 destfile="${builddir}/${project.war.file}" 129 webxml="${builddir}/config/w eb.xml"130 duplicate="preserve" >131 132 <fileset dir="${configdir}" excludes="web.xml otis-config.client.local.xml otis-config.client.remote.xml otis-config.server.xml log4j.properties"/> 133 <fileset dir="${builddir}/config " excludes="web.xml" />200 webxml="${builddir}/config/war/web.xml" 201 duplicate="preserve" 202 update="true"> 203 204 <fileset dir="${builddir}/config/war" excludes="web.xml,filter.properties" /> 134 205 135 206 <!-- Classes --> -
trunk/otis/config/AuthenticatedSessionResponse.fmt
-
trunk/otis/config/GET_AttributeResponse.fmt
-
trunk/otis/config/GET_AuthEntityResponse.fmt
-
trunk/otis/config/GET_EntityResponse.fmt
-
trunk/otis/config/GET_PropertiesResponse.fmt
-
trunk/otis/config/GET_RoleResponse.fmt
-
trunk/otis/config/PUT_ContextChangesRequest.fmt
-
trunk/otis/config/otis-config.client.local.xml
r2441 r2475 163 163 <Setting Name="ConnectionType" Type="xsd:string">LDAP</Setting> 164 164 <Setting Name="AddressList" Type="htf:list"> 165 <Setting Name="Address" Type="xsd:string">@ {ldap.server.addr}</Setting>165 <Setting Name="Address" Type="xsd:string">@LDAP.SERVER.ADDR@</Setting> 166 166 </Setting> 167 167 <Setting Name="jndiProvider" Type="xsd:string">com.sun.jndi.ldap.LdapCtxFactory</Setting> -
trunk/otis/config/otis-config.client.remote.xml
r2441 r2475 29 29 30 30 <Setting Name="otisEndpoint" Type="htf:remoteEndPointHandler"> 31 @ {otis.endpoint}31 @OTIS.ENDPOINT@ 32 32 </Setting> 33 33 … … 77 77 <Setting Name="DefaultContextUri" Type="xsd:anyURI">urn:RESTfulContext</Setting> 78 78 </Setting> 79 <Setting Name="templateDir" Type="xsd:string">@ {rest.cp.template.dir}</Setting>79 <Setting Name="templateDir" Type="xsd:string">@REST.CP.TEMPLATE.DIR@</Setting> 80 80 <!-- Uncomment this setting to get audit logging for this context provider 81 81 <Setting Name="AuditRecordClass" Type="xsd:string">org.bandit.otis.impl.OtisAuditRecord</Setting> -
trunk/otis/config/otis-config.server.xml
r2462 r2475 31 31 <!-- Allow communications over an insecure channel (like HTTP) --> 32 32 33 <Setting Name="AllowInsecureChannel" Type="xsd:boolean">@ {allow.insecure.channel}</Setting>33 <Setting Name="AllowInsecureChannel" Type="xsd:boolean">@ALLOW.INSECURE.CHANNEL@</Setting> 34 34 35 35 <!-- Sanitize strings to prevent cross-site scripting? If this is false, portions of strings will … … 547 547 <Setting Name="Noun8" Type="xsd:string">Properties/*</Setting> 548 548 </Setting> 549 <Setting Name="POST_TemplateFile" Type="xsd:string">AuthenticatedSessionResponse. xml</Setting>550 <Setting Name="PUT_TemplateFile" Type="xsd:string">AuthenticatedSessionResponse. xml</Setting>551 <Setting Name="GET_TemplateFile" Type="xsd:string">GET_AuthEntityResponse. xml</Setting>552 <Setting Name="GET_PropertiesTemplateFile" Type="xsd:string">GET_PropertiesResponse. xml</Setting>553 <Setting Name="SessionSecretBitSize" Type="xsd:int">@ {session.secret.bitsize}</Setting>549 <Setting Name="POST_TemplateFile" Type="xsd:string">AuthenticatedSessionResponse.fmt</Setting> 550 <Setting Name="PUT_TemplateFile" Type="xsd:string">AuthenticatedSessionResponse.fmt</Setting> 551 <Setting Name="GET_TemplateFile" Type="xsd:string">GET_AuthEntityResponse.fmt</Setting> 552 <Setting Name="GET_PropertiesTemplateFile" Type="xsd:string">GET_PropertiesResponse.fmt</Setting> 553 <Setting Name="SessionSecretBitSize" Type="xsd:int">@SESSION.SECRET.BITSIZE@</Setting> 554 554 </Setting> 555 555 … … 568 568 <Setting Name="Noun10" Type="xsd:string">DeprovisionRole/*</Setting> 569 569 </Setting> 570 <Setting Name="GET_TemplateFile" Type="xsd:string">GET_RoleResponse. xml</Setting>570 <Setting Name="GET_TemplateFile" Type="xsd:string">GET_RoleResponse.fmt</Setting> 571 571 </Setting> 572 572 … … 583 583 <Setting Name="Noun8" Type="xsd:string">Entity/*/Attribute/*</Setting> 584 584 </Setting> 585 <Setting Name="POST_TemplateFile" Type="xsd:string">POST_EntityResponse. xml</Setting>586 <Setting Name="GET_EntityTemplateFile" Type="xsd:string">GET_EntityResponse. xml</Setting>587 <Setting Name="GET_AttributeTemplateFile" Type="xsd:string">GET_AttributeResponse. xml</Setting>585 <Setting Name="POST_TemplateFile" Type="xsd:string">POST_EntityResponse.fmt</Setting> 586 <Setting Name="GET_EntityTemplateFile" Type="xsd:string">GET_EntityResponse.fmt</Setting> 587 <Setting Name="GET_AttributeTemplateFile" Type="xsd:string">GET_AttributeResponse.fmt</Setting> 588 588 <Setting Name="EntityIDPolicy" Type="htf:jscriptexec"> <![CDATA[ 589 589 entityIDOk = ""; -
trunk/otis/config/web.xml
r2441 r2475 20 20 <context-param> 21 21 <param-name>org.bandit.otis.server.conf.dir</param-name> 22 <param-value>@ {server.conf.dir}</param-value>22 <param-value>@SERVER.CONF.DIR@</param-value> 23 23 <description> 24 24 The OTIS configuration directory -
trunk/otis/otis.war.targets.xml
r2474 r2475 17 17 <import file="build.xml"/> 18 18 19 <target name="war" depends="-copy.configs"> 19 <target name="war"> 20 <concat destfile="${outconfigrootdir}/filter.properties"> 21 SERVER.CONF.DIR=otis 22 LDAP.SERVER.ADDR=ldap://example.org:389 23 SESSION.SECRET.BITSIZE=1024 24 ALLOW.INSECURE.CHANNEL=false 25 </concat> 20 26 <property name="project.war.file" value="otis-${project.version}.war" /> 21 <replace file="${builddir}/config/web.xml" token="@{server.conf.dir}" value="otis/"/> 22 <replace file="${builddir}/config/otis-config.client.local.xml" token="@{ldap.server.addr}" value="ldap://example.org:389"/> 23 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{otis.endpoint}" value="https://example.org/otis"/> 24 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{rest.cp.template.dir}" value="./config/"/> 25 <replace file="${builddir}/config/otis-config.server.xml" token="@{session.secret.bitsize}" value="1024"/> 26 <replace file="${builddir}/config/otis-config.server.xml" token="@{allow.insecure.channel}" value="false"/> 27 27 <antcall target="-copy.warconfigs" /> 28 28 <antcall target="-warbuilder" /> 29 29 </target> 30 30 31 <target name="wagwar" depends="-copy.configs"> 31 <target name="wagwar"> 32 <concat destfile="${outconfigrootdir}/filter.properties"> 33 SERVER.CONF.DIR=/usr/share/java/otis-config 34 LDAP.SERVER.ADDR=ldap://wag.bandit-project.org:389 35 SESSION.SECRET.BITSIZE=1024 36 ALLOW.INSECURE.CHANNEL=false 37 </concat> 32 38 <property name="project.war.file" value="otis.war" /> 33 <replace file="${builddir}/config/web.xml" token="@{server.conf.dir}" value="/usr/share/java/otis-config"/> 34 <replace file="${builddir}/config/otis-config.client.local.xml" token="@{ldap.server.addr}" value="ldap://wag.bandit-project.org:389"/> 35 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{otis.endpoint}" value="https://wag.bandit-project.org/otis"/> 36 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{rest.cp.template.dir}" value="./config/"/> 37 <replace file="${builddir}/config/otis-config.server.xml" token="@{session.secret.bitsize}" value="1024"/> 38 <replace file="${builddir}/config/otis-config.server.xml" token="@{allow.insecure.channel}" value="false"/> 39 39 <antcall target="-copy.warconfigs" /> 40 40 <antcall target="-warbuilder" /> 41 41 </target> 42 42 43 <target name="testwar" depends="-copy.configs"> 43 <target name="testwar"> 44 <concat destfile="${outconfigrootdir}/filter.properties"> 45 SERVER.CONF.DIR=otis-test 46 LDAP.SERVER.ADDR=ldap://localhost:50389 47 SESSION.SECRET.BITSIZE=0 48 ALLOW.INSECURE.CHANNEL=true 49 </concat> 44 50 <property name="project.war.file" value="otis-test-${project.version}.war" /> 45 <replace file="${builddir}/config/web.xml" token="@{server.conf.dir}" value="otis-test/"/> 46 <replace file="${builddir}/config/otis-config.client.local.xml" token="@{ldap.server.addr}" value="ldap://localhost:50389"/> 47 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{otis.endpoint}" value="http://localhost:9997/otis-test"/> 48 <replace file="${builddir}/config/otis-config.client.remote.xml" token="@{rest.cp.template.dir}" value="otis-test/"/> 49 <replace file="${builddir}/config/otis-config.server.xml" token="@{session.secret.bitsize}" value="0"/> 50 <replace file="${builddir}/config/otis-config.server.xml" token="@{allow.insecure.channel}" value="true"/> 51 51 <antcall target="-copy.warconfigs" /> 52 52 <antcall target="-warbuilder" /> 53 53 </target> -
trunk/otis/src/org/bandit/otis/test/TestUtil.java
r2470 r2475 16 16 ConfigurationHandler handler = new ConfigurationHandler(); 17 17 18 handler.setConfigurationBase(" otis-test/");18 handler.setConfigurationBase("build/config/sdk/"); 19 19 handler.setFileName(configFile); 20 20 handler.configure(null); … … 22 22 Map<String, Object> rVal = handler.getSettings(); 23 23 if (rVal == null) { 24 System.out.println("failed to get config of: otis-test/" + configFile);24 System.out.println("failed to get config of: build/config/sdk/" + configFile); 25 25 } 26 26 -
trunk/otis/src/org/bandit/otis/test/junit/AuthSessionBaseTest.java
r2470 r2475 64 64 65 65 String[] args = 66 {"-outputFile= otis-test/TreeData.xml", "-nogui"};66 {"-outputFile=build/config/TreeData.xml", "-nogui"}; 67 67 ldapSrv = new RawLdap(); 68 68 ldapSrv.startMain(ldapSrv, args); -
trunk/otis/src/org/bandit/otis/test/junit/AuthSessionTest.java
r2470 r2475 140 140 DocumentBuilder db; 141 141 DocumentBuilderFactory dbf; 142 File file = new File(" otis-test/assertion.xml");142 File file = new File("build/config/sdk/assertion.xml"); 143 143 144 144 dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance();