| <?xml version="1.0"?> |
| <!DOCTYPE project [ |
| <!-- |
| |
| Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml"> |
| <!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml"> |
| <!ENTITY commonRun SYSTEM "file:./../../../config/run.xml"> |
| <!ENTITY commonSecurity SYSTEM "file:./../common.xml"> |
| <!-- <!ENTITY testProperties SYSTEM "./build.properties"> --> |
| ]> |
| |
| <!-- This version only tests that the auth.conf file is not |
| changed at startup. Issue: 3033. If changed to test an |
| end to end scenario, please change this message. --> |
| <project name="security-authConf" basedir="." default="usage"> |
| |
| &commonSetup; |
| &commonBuild; |
| &commonRun; |
| &commonSecurity; |
| <!-- &testProperties; --> |
| |
| <property name="provider.jar" |
| value="${env.S1AS_HOME}/lib/test-jmac-provider.jar"/> |
| |
| <target name="all" depends="init-common"> |
| <!-- stop server --> |
| <antcall target="stopDomain"/> |
| <sleep seconds="15"/> |
| |
| <!-- add auth.conf file and provider jar --> |
| <copy file="conffile/auth.conf" |
| todir="${admin.domain.dir}/${admin.domain}/config"/> |
| <antcall target="build-provider-jar"/> |
| |
| <!-- start server --> |
| <antcall target="startDomain"/> |
| |
| <!-- quick diff of auth conf file --> |
| <length file="conffile/auth.conf" property="length.original"/> |
| <length file="${admin.domain.dir}/${admin.domain}/config/auth.conf" |
| property="length.new"/> |
| <echo message="original auth.conf length: ${length.original}"/> |
| <echo message="new auth.conf length: ${length.new}"/> |
| <!-- i don't know how to report failure without ending test run. TBD! --> |
| <fail> |
| <condition> |
| <not> |
| <length file="${admin.domain.dir}/${admin.domain}/config/auth.conf" |
| when="equal" |
| length="${length.original}"/> |
| </not> |
| </condition> |
| </fail> |
| <echo message="files are of same length. OK"/> |
| |
| <!-- stop server, clean up, and restart --> |
| <antcall target="stopDomain"/> |
| <sleep seconds="15"/> |
| <delete file="${admin.domain.dir}/${admin.domain}/config/auth.conf"/> |
| <delete file="${provider.jar}"/> |
| <antcall target="startDomain"/> |
| </target> |
| |
| <!-- build and copy the provider jar file to GF/lib --> |
| <target name="build-provider-jar" depends="clean"> |
| <antcall target="compile-common"> |
| <param name="src" value="provider"/> |
| </antcall> |
| <jar destfile="${provider.jar}" basedir="${build.classes.dir}"/> |
| </target> |
| |
| <target name="clean" depends="init-common"> |
| <delete dir="${build.classes.dir}"/> |
| <delete dir="${assemble.dir}"/> |
| </target> |
| |
| </project> |