diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6ebcd92 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: java +jdk: + - openjdk6 + - openjdk7 + - oraclejdk7 + - oraclejdk8 +os: + - linux + - osx + +notifications: + slack: + secure: NEqqRKfphFroJt3420x+ojawfPQqQFk4mw17z4/RwpGxlR3kftW17s198TCFVyiBn0OF55BA6w7s/JL4PqG5BCH10B8/+ulbKrQh3LNSr3cQxvPs4AhI+BIq4pvK01sLS/wNxCzj0LI1mOg7L8BnJlioOJyHHBCeadqxdyPf5Uk= + diff --git a/README.md b/README.md index ed97830..b762ba0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -VOMS Clients -============ +# VOMS Clients + +[![Build Status](https://travis-ci.org/italiangrid/voms-clients.svg)](https://travis-ci.org/italiangrid/voms-clients) Command-line clients for Virtual Organization Membership Service (VOMS), i.e.: @@ -16,9 +17,18 @@ Build packages with: mvn package ``` +## Build + +You will need maven and Java >= 6. +To build the clients, type: + + mvn package + +To build RPM packages, see instructions in the `package/rpm` directory. + ## Install -The last stable build can be downloaded [here][voms-clients-tarball]. +A tarball containing the clients can be found in the `target` directory under the source tree. Untar the tarball to a directory of your choice. You may want to add the bin directory to your path to be able to directly call voms-proxy-* from you shell @@ -29,9 +39,15 @@ export PATH=$PATH:/bin ### Install from RPMs packages +RPMs for the latest stable release can be found on the EMI repository: + +- [CentOS/SL 6](http://emisoft.web.cern.ch/emisoft/dist/EMI/3/sl6/x86_64/updates/repoview/voms-clients3.html) +- [CentOS/SL 5](http://emisoft.web.cern.ch/emisoft/dist/EMI/3/sl5/x86_64/updates/repoview/voms-clients3.html) + RPMs for the latest development build can be found at the following URLs: -- [SL5 package][voms-clients-rpm-sl5]. -- [SL6 package][voms-clients-rpm-sl6]. + +- [CentOS/SL 6](http://radiohead.cnaf.infn.it:9999/job/voms-clients-rpm_develop_SL6/lastSuccessfulBuild) +- [CentOS/SL 5](http://radiohead.cnaf.infn.it:9999/job/voms-clients-rpm_develop_SL5/lastSuccessfulBuild) ## Quickstart @@ -156,8 +172,3 @@ The `voms-proxy-destroy` command erases an existing proxy from the system. Its b $ voms-proxy-destroy ``` More information can be found in the `voms-proxy-destroy` man page. - - -[voms-clients-tarball]: http://radiohead.cnaf.infn.it:9999/view/VOMS/job/voms-clients_master/lastSuccessfulBuild/org.italiangrid$voms-clients/artifact/org.italiangrid/voms-clients/3.0.4/voms-clients-3.0.4.tar.gz -[voms-clients-rpm-sl5]: http://radiohead.cnaf.infn.it:9999/view/VOMS/job/voms-clients-rpm_master_SL5/lastSuccessfulBuild/artifact/rpmbuild/RPMS/noarch/voms-clients3-3.0.4-1.sl5.noarch.rpm -[voms-clients-rpm-sl6]: http://radiohead.cnaf.infn.it:9999/view/VOMS/job/voms-clients-rpm_master_SL6/lastSuccessfulBuild/artifact/rpmbuild/RPMS/noarch/voms-clients3-3.0.4-1.sl6.noarch.rpm diff --git a/man/README.md b/man/README.md index 57e24da..adb3008 100644 --- a/man/README.md +++ b/man/README.md @@ -1,4 +1,6 @@ -The man page source is in [AsciiDoc](http://www.methods.co.nz/asciidoc/). To generate roff formatted man pages uses +The man page source is in [AsciiDoc](http://www.methods.co.nz/asciidoc/). + +To generate roff formatted man pages uses ```bash -a2x --doctype manpage --format manpage voms-proxy-init.1.txt +a2x -L --doctype manpage --format manpage voms-proxy-init.1.txt ``` \ No newline at end of file diff --git a/man/voms-proxy-info.1.txt b/man/voms-proxy-info.1.txt index 6cb53f9..4971778 100644 --- a/man/voms-proxy-info.1.txt +++ b/man/voms-proxy-info.1.txt @@ -178,4 +178,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/man/vomses.5 b/man/vomses.5 index 1f86899..6f6cb3e 100644 --- a/man/vomses.5 +++ b/man/vomses.5 @@ -1,13 +1,13 @@ '\" t .\" Title: vomses .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 11/20/2012 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 05/28/2014 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "VOMSES" "5" "11/20/2012" "\ \&" "\ \&" +.TH "VOMSES" "5" "05/28/2014" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,20 +38,20 @@ vomses \- The VOMS server contact table .sp This manual page describes the format of \fIvomses\fR files\&. \fIvomses\fR files contain contact information for VOMS servers and are typically organized in the \fB/etc/vomses\fR directory\&. A \fIvomses\fR file is a simple text file which contains one or more lines formatted as follows: .sp -"vo_name" "hostname" "port" "server DN" "alias" +"alias" "hostname" "port" "server DN" "vo_name" .sp Where: .sp -\fBvo_name\fR: the name of the VO served by the VOMS server +\fBalias\fR: an alias that can be used for this VOMS server (this is typically identical to the vo_name) .sp \fBhostname\fR: the hostname where the VOMS server is running .sp +\fBvo_name\fR: the name of the VO served by the VOMS server +.sp \fBport\fR: the port where the VOMS server is listening for incoming requests .sp \fBserver DN\fR: the certificate subject of the VOMS server .sp -\fBalias\fR: an alias that can be used for this VOMS server (this is typically identical to the vo_name) -.sp System wide VOMSES configuration is maintained in the \fB/etc/vomses\fR file or directory\&. If \fB/etc/vomses\fR is a directory, all the files contained in such directory are parsed looking for VOMS contact information\&. .sp A user can define its custom \fBvomses\fR configuration in the \fB~/\&.glite/vomses\fR file or directory, which will be parsed in the same way as just described\&. diff --git a/man/vomses.5.txt b/man/vomses.5.txt index 1bf5ac0..2b5e3cb 100644 --- a/man/vomses.5.txt +++ b/man/vomses.5.txt @@ -18,20 +18,20 @@ This manual page describes the format of _vomses_ files. _vomses_ files contain contact information for VOMS servers and are typically organized in the */etc/vomses* directory. A _vomses_ file is a simple text file which contains one or more lines formatted as follows: -"vo_name" "hostname" "port" "server DN" "alias" +"alias" "hostname" "port" "server DN" "vo_name" Where: -*vo_name*: the name of the VO served by the VOMS server +*alias*: an alias that can be used for this VOMS server (this is typically identical to the vo_name) *hostname*: the hostname where the VOMS server is running +*vo_name*: the name of the VO served by the VOMS server + *port*: the port where the VOMS server is listening for incoming requests *server DN*: the certificate subject of the VOMS server -*alias*: an alias that can be used for this VOMS server (this is typically identical to the vo_name) - System wide VOMSES configuration is maintained in the */etc/vomses* file or directory. If */etc/vomses* is a directory, all the files contained in such directory are parsed looking for VOMS contact information. diff --git a/package/rpm/.gitignore b/package/rpm/.gitignore new file mode 100644 index 0000000..be88e52 --- /dev/null +++ b/package/rpm/.gitignore @@ -0,0 +1,2 @@ +rpmbuild +*.spec diff --git a/package/rpm/README.md b/package/rpm/README.md new file mode 100644 index 0000000..49c6952 --- /dev/null +++ b/package/rpm/README.md @@ -0,0 +1,13 @@ +# RPM packaging for VOMS command-line clients + +Spec file and rpmbuild preparation and calls for building rpms out of the VOMS commmand-line clients code. + +## Usage + +To build packages, run: + + ./build-rpm.sh + +To cleanup, run: + + ./clean.sh diff --git a/package/rpm/build-rpm.sh b/package/rpm/build-rpm.sh new file mode 100755 index 0000000..ffe3bc2 --- /dev/null +++ b/package/rpm/build-rpm.sh @@ -0,0 +1,48 @@ +#!/bin/bash +set -ex +name=voms-clients + +base_dir=../../ +source_dir=sources +rpmbuild_dir=$(pwd)/rpmbuild + +# spec file and its source +spec_src=${name}.spec.in +spec=${name}3.spec + +# determine the pom version and the rpm version +pom_version=$(grep "" ${base_dir}/pom.xml | head -1 | sed -e 's///g' -e 's/<\/version>//g' -e "s/[ \t]*//g") +rpm_version=$(grep "Version:" ${spec_src} | sed -e "s/Version://g" -e "s/[ \t]*//g") + +# Cleanup +./clean.sh + +## Prepare spec file +sed -e "s#@@POM_VERSION@@#$pom_version#g" ${spec_src} > ${spec} + +## setup RPM build dir structure +mkdir -p ${rpmbuild_dir}/BUILD \ + ${rpmbuild_dir}/RPMS \ + ${rpmbuild_dir}/SOURCES \ + ${rpmbuild_dir}/SPECS \ + ${rpmbuild_dir}/SRPMS + +## Prepare sources +## We cannot use tar --transform as the tar version in SL5 does not support it +source_tmp_dir=$(mktemp -d /tmp/voms-client-rpm.XXXXX) + +mkdir -p ${source_tmp_dir}/${name} +cp -r ${base_dir} ${source_tmp_dir}/${name} +pushd ${source_tmp_dir} +tar cvzf ${rpmbuild_dir}/SOURCES/${name}3-${rpm_version}.tar.gz --exclude="${name}/package/*" --exclude="${name}/package" --exclude="${name}/target" . +popd + +rm -rf ${soruce_tmp_dir} + +## Build RPMs +if [ -z "${dist}" ]; then + rpmbuild --nodeps -v -ba ${spec} --define "_topdir ${rpmbuild_dir}" +else + rpmbuild --nodeps -v -ba ${spec} --define "_topdir ${rpmbuild_dir}" --define "dist ${dist}" +fi + diff --git a/package/rpm/clean.sh b/package/rpm/clean.sh new file mode 100755 index 0000000..ac46495 --- /dev/null +++ b/package/rpm/clean.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +rm -rf rpmbuild +rm -f *.spec diff --git a/package/rpm/voms-clients.spec.in b/package/rpm/voms-clients.spec.in new file mode 100644 index 0000000..bcf5cef --- /dev/null +++ b/package/rpm/voms-clients.spec.in @@ -0,0 +1,187 @@ +%global pom_version @@POM_VERSION@@ +%global jar_names voms-clients bcprov-1.46 bcmail-1.46 canl voms-api-java3 commons-io + +%global orig_name voms-clients +%global _varlib /var/lib + +Name: voms-clients3 +Version: 3.0.5 +Release: 1%{?dist} +Summary: The Virtual Organisation Membership Service command line clients + +Group: Applications/Internet +License: ASL 2.0 +URL: https://github.com/andreaceccanti/voms-clients +Source: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +BuildRequires: apache-maven +BuildRequires: jpackage-utils +BuildRequires: java-1.6.0-openjdk-devel + +Requires: java-1.6.0-openjdk +Requires: voms-api-java3 >= 3.0.3 +Requires: jakarta-commons-io + +Requires: jpackage-utils + +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +Provides: voms-clients = %{version} +Conflicts: voms-clients <= 2.0.11-1 + + +%description +The Virtual Organization Membership Service (VOMS) is an attribute authority +which serves as central repository for VO user authorization information, +providing support for sorting users into group hierarchies, keeping track of +their roles and other attributes in order to issue trusted attribute +certificates and SAML assertions used in the Grid environment for +authorization purposes. + +This package provides the command line clients for VOMS, voms-proxy-init, +voms-proxy-destroy and voms-proxy-info. + +%prep +%setup -q -n voms-clients + +%build +mvn -DskipTests -U -Dvoms-clients.libs=%{_varlib}/%{name}/lib clean package + +%install +rm -rf $RPM_BUILD_ROOT + +install -dm 755 $RPM_BUILD_ROOT%{_javadir} +install -dm 755 $RPM_BUILD_ROOT%{_varlib}/%{name}/lib + +# Install all files but jar dependencies (these will be taken from the OS) +tar -C $RPM_BUILD_ROOT/usr -xvzf target/%{orig_name}.tar.gz --strip 1 --exclude '*.jar' + +# But install the voms-clients jar as well +tar -C $RPM_BUILD_ROOT/usr -xvzf target/%{orig_name}.tar.gz --strip 1 '%{orig_name}/share/java/%{orig_name}-%{pom_version}.jar' + +# And the commons-cli, as the version on SL5 is buggy +tar -C $RPM_BUILD_ROOT/%{_varlib}/%{name}/lib -xvzf target/%{orig_name}.tar.gz --strip 3 --wildcards '%{orig_name}/share/java/commons-cli-*.jar' + +ln -s %{orig_name}-%{pom_version}.jar $RPM_BUILD_ROOT%{_javadir}/%{orig_name}.jar +ln -s %{orig_name}-%{pom_version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar + +# Rename to voms-proxy-*3 to avoid clashes with old C clients +mv $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-init $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-init3 +mv $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-info $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-info3 +mv $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-destroy $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-destroy3 + +# Rename manpages +mv $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-init.1 $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-init3.1 +mv $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-info.1 $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-info3.1 +mv $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-destroy.1 $RPM_BUILD_ROOT/%{_mandir}/man1/voms-proxy-destroy3.1 + +# Needed by alternatives. See http://fedoraproject.org/wiki/Packaging:Alternatives +touch $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-init +touch $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-info +touch $RPM_BUILD_ROOT/%{_bindir}/voms-proxy-destroy + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) + +%ghost %{_bindir}/voms-proxy-init +%ghost %{_bindir}/voms-proxy-info +%ghost %{_bindir}/voms-proxy-destroy + +%{_bindir}/voms-proxy-init3 +%{_bindir}/voms-proxy-info3 +%{_bindir}/voms-proxy-destroy3 + +%{_mandir}/man1/voms-proxy-init3.1.gz +%{_mandir}/man1/voms-proxy-info3.1.gz +%{_mandir}/man1/voms-proxy-destroy3.1.gz +%{_mandir}/man5/vomses.5.gz +%{_mandir}/man5/vomsdir.5.gz + +%{_javadir}/%{orig_name}-%{pom_version}.jar +%{_javadir}/%{name}.jar +%{_javadir}/%{orig_name}.jar + +%dir %{_varlib}/%{name}/lib +%{_varlib}/%{name}/lib/*.jar + +%pre + +if [ $1 -eq 2 ] ; then + ## Package upgrade, cleanup embedded dependencies + if [ -d "%{_varlib}/%{name}/lib" ]; then + rm -f %{_varlib}/%{name}/lib/*.jar + fi + + ## Remove scripts if not managed with alternatives (pre v. 3.0.5) + for c in voms-proxy-init voms-proxy-info voms-proxy-destroy; do + if [[ -x %{_bindir}/$c && ! -L %{_bindir}/$c ]]; then + rm -f %{_bindir}/$c + fi + done +fi + +%preun + +if [ $1 -eq 0 ] ; then + rm -f %{_varlib}/%{name}/lib/*.jar + rm -rf %{_varlib}/%{name} +fi + +%post + +jar_names="voms-clients bcprov-1.46 bcmail-1.46 canl voms-api-java3 commons-io" + +for jarname in ${jar_names}; do + [ -f %{_javadir}/$jarname.jar ] || ( echo "$jarname not found in %{_javadir}" && exit 1 ) + ln -fs %{_javadir}/$jarname.jar %{_varlib}/%{name}/lib +done + +%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-init \ + voms-proxy-init %{_bindir}/voms-proxy-init3 90 \ + --slave %{_mandir}/man1/voms-proxy-init.1.gz voms-proxy-init-man %{_mandir}/man1/voms-proxy-init3.1.gz + +%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-info \ + voms-proxy-info %{_bindir}/voms-proxy-info3 90 \ + --slave %{_mandir}/man1/voms-proxy-info.1.gz voms-proxy-info-man %{_mandir}/man1/voms-proxy-info3.1.gz + +%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-destroy \ + voms-proxy-destroy %{_bindir}/voms-proxy-destroy3 90 \ + --slave %{_mandir}/man1/voms-proxy-destroy.1.gz voms-proxy-destroy-man %{_mandir}/man1/voms-proxy-destroy3.1.gz + +%postun + +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove voms-proxy-init %{_bindir}/voms-proxy-init3 + %{_sbindir}/update-alternatives --remove voms-proxy-info %{_bindir}/voms-proxy-info3 + %{_sbindir}/update-alternatives --remove voms-proxy-destroy %{_bindir}/voms-proxy-destroy3 +fi + +%changelog + +* Mon Jan 27 2014 Andrea Ceccanti - 3.0.5-1 +- Fix for https://issues.infn.it/jira/browse/VOMS-495. New packaging installable + together with with voms-clients 2.x package. + +* Thu Sep 26 2013 Andrea Ceccanti - 3.0.4-1 +- Fix for https://issues.infn.it/jira/browse/VOMS-423 +- Move to VOMS Java APIs v. 3.0.2 + +* Thu Jul 11 2013 Andrea Ceccanti - 3.0.3-1 +- Fix for https://issues.infn.it/jira/browse/VOMS-361 + +* Tue Jul 2 2013 Valerio Venturi - 3.0.2-1 +- Fix for https://issues.infn.it/jira/browse/VOMS-307 +- Fix for https://issues.infn.it/jira/browse/VOMS-296 + +* Thu Apr 11 2013 Andrea Ceccanti - 3.0.1-1 +- Fix for https://issues.infn.it/browse/VOMS-256 + +* Wed Nov 14 2012 Valerio Venturi - 3.0.0-1 +- New version of VOMS command line clients diff --git a/pom.xml b/pom.xml index 365cc5d..d765eea 100644 --- a/pom.xml +++ b/pom.xml @@ -3,24 +3,51 @@ 4.0.0 org.italiangrid voms-clients - 3.0.4 + 3.0.5 voms-clients + VOMS service command-line clients + + https://github.com/italiangrid/voms-clients + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + https://github.com/italiangrid/voms-clients + scm:git:git://github.com/italiangrid/voms-clients.git + scm:git:ssh://git@github.com:italiangrid/voms-clients.git + UTF-8 UTF-8 - + + 3.1 + 1.9.0 + 2.2.2 + 2.2.1 + 2.4.1 + 2.8.2 + 2.5 + 2.9.1 + 1.5 + 1.6.3 + + 4.10 2.0.1 1.2 - 3.0.2 + 3.0.4 - - 4.10 - + @@ -33,6 +60,15 @@ Developer + + vventuri + Valerio Venturi + valerio.venturi@cnaf.infn.it + INFN CNAF + + Developer + + dandreotti Daniele Andreotti @@ -45,7 +81,6 @@ - src/main/resources @@ -55,10 +90,43 @@ + + com.mycila.maven-license-plugin + maven-license-plugin + ${plugin.license.version} + +
src/license/license.txt
+ + .travis.yml + **/*.md + **/*.sh + man/*.1 + man/*.5 + man/*.txt + AUTHORS + LICENSE + .gitignore + src/test/resources/** + src/config/** + + true + true +
+ + + check-headers + verify + + check + + + +
+ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + ${plugin.compiler.version} 1.6 1.6 @@ -68,7 +136,7 @@ maven-assembly-plugin - 2.3 + ${plugin.assembly.version} ${project.name} false @@ -87,8 +155,53 @@ -
+ + org.apache.maven.plugins + maven-javadoc-plugin + ${plugin.javadoc.version} + + ${project.build.directory}/javadoc + ${project.reporting.outputDirectory}/javadoc + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + ${plugin.source.version} + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-release-plugin + ${plugin.release.version} + + forked-path + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + +
@@ -98,7 +211,6 @@ ${junit.version} test - commons-cli commons-cli @@ -115,4 +227,92 @@ ${voms-api-java.version} + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${plugin.gpg.version} + + ${env.GPG_PASSPHRASE} + + + + sign-artifacts + verify + + sign + + + + + + + + + + local-staging + + true + + + + + cnaf-releases + CNAF releases + http://radiohead.cnaf.infn.it:8081/nexus/content/repositories/cnaf-releases/ + + + + cnaf-snapshots + CNAF snapshots + http://radiohead.cnaf.infn.it:8081/nexus/content/repositories/cnaf-snapshots/ + + + + + + + central-staging + + + ossrh + Maven central snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + + ossrh + Maven central releases + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${plugin.nexus-staging.version} + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + diff --git a/src/license/license.txt b/src/license/license.txt new file mode 100644 index 0000000..95882da --- /dev/null +++ b/src/license/license.txt @@ -0,0 +1,13 @@ +Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/src/main/assemblies/assembly.xml b/src/main/assemblies/assembly.xml index 8401ca8..42c46e9 100644 --- a/src/main/assemblies/assembly.xml +++ b/src/main/assemblies/assembly.xml @@ -1,4 +1,21 @@ + > vomsCommandsMap = commandsParser + .parseCommands(params.getVomsCommands()); + + for (String voOrAlias: vomsCommandsMap.keySet()){ + if (sis.getVOMSServerInfo(voOrAlias).isEmpty()){ + + String msg = String.format("VOMS server for VO %s is not known! " + + "Check your vomses configuration.", voOrAlias); + throw new VOMSError(msg); + } + } + } + + private VOMSServerInfoStore initServerInfoStore(ProxyInitParams params){ + + VOMSServerInfoStore sis = null; + + if (params.getVomsCommands() != null && !params.getVomsCommands().isEmpty()){ + sis = new DefaultVOMSServerInfoStore.Builder() + .lookupStrategy(getVOMSESLookupStrategyFromParams(params)) + .storeListener(serverInfoStoreListener) + .build(); + } + + return sis; + } + private void directorySanityChecks(String dirPath, String preambleMessage){ File f = new File(dirPath); @@ -208,9 +265,14 @@ private void initCertChainValidator(ProxyInitParams params){ directorySanityChecks(trustAnchorsDir, "Invalid trust anchors location"); - certChainValidator = CertificateValidatorBuilder.buildCertificateValidator(trustAnchorsDir, - certChainValidationErrorListener, storeUpdateListener); - + CertificateValidatorBuilder builder = new CertificateValidatorBuilder(); + + certChainValidator = builder + .trustAnchorsDir(trustAnchorsDir) + .storeUpdateListener(storeUpdateListener) + .lazyAnchorsLoading(true) + .validationErrorListener(certChainValidationErrorListener) + .build(); } } @@ -425,7 +487,8 @@ protected VOMSESLookupStrategy getVOMSESLookupStrategyFromParams(ProxyInitParams } protected List getAttributeCertificates( - ProxyInitParams params, X509Credential cred) { + ProxyInitParams params, X509Credential cred, + VOMSServerInfoStore serverInfoStore) { List vomsCommands = params.getVomsCommands(); @@ -447,10 +510,11 @@ protected List getAttributeCertificates( .lifetime(params.getAcLifetimeInSeconds()) .build(); - VOMSACService acService = new DefaultVOMSACService.Builder(certChainValidator) - .requestListener(requestListener) + VOMSACService acService = new DefaultVOMSACService + .Builder(certChainValidator) + .requestListener(requestListener) + .serverInfoStore(serverInfoStore) .vomsesLookupStrategy(getVOMSESLookupStrategyFromParams(params)) - .serverInfoStoreListener(serverInfoStoreListener) .protocolListener(protocolListener) .connectTimeout((int)TimeUnit.SECONDS.toMillis(params.getTimeoutInSeconds())) .readTimeout((int)TimeUnit.SECONDS.toMillis(params.getTimeoutInSeconds())) @@ -472,8 +536,9 @@ protected List getAttributeCertificates( private LoadCredentialsStrategy strategyFromParams(ProxyInitParams params){ - if (params.isNoRegen()) - return new LoadProxyCredential(loadCredentialsEventListener); + if (params.isNoRegen()){ + return new LoadProxyCredential(loadCredentialsEventListener, params.getCertFile()); + } if (params.getCertFile()!=null && params.getKeyFile() == null) return new LoadUserCredential(loadCredentialsEventListener, params.getCertFile()); diff --git a/src/main/java/org/italiangrid/voms/clients/impl/InitListenerAdapter.java b/src/main/java/org/italiangrid/voms/clients/impl/InitListenerAdapter.java index 5d1d9d1..313d1da 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/InitListenerAdapter.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/InitListenerAdapter.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import org.italiangrid.voms.ac.ValidationResultListener; @@ -10,15 +25,24 @@ import eu.emi.security.authn.x509.StoreUpdateListener; import eu.emi.security.authn.x509.ValidationErrorListener; +/** + * An adapter for CANL and VOMS API event listeners. + * + * @author andreaceccanti + * + */ public interface InitListenerAdapter extends ValidationResultListener, - ProxyCreationListener, - VOMSRequestListener, - VOMSServerInfoStoreListener, - LoadCredentialsEventListener, - ValidationErrorListener, - VOMSTrustStoreStatusListener, - VOMSProtocolListener, - StoreUpdateListener - { + ProxyCreationListener, VOMSRequestListener, VOMSServerInfoStoreListener, + LoadCredentialsEventListener, ValidationErrorListener, + VOMSTrustStoreStatusListener, VOMSProtocolListener, StoreUpdateListener { + + /** + * Returns true if a validation error was raised by + * {@link ValidationErrorListener} or {@link ValidationResultListener}. + * + * @return true if validation errors were raised, + * false otherwise + */ + public boolean hadValidationErrors(); } diff --git a/src/main/java/org/italiangrid/voms/clients/impl/LoadProxyCredential.java b/src/main/java/org/italiangrid/voms/clients/impl/LoadProxyCredential.java index e97835b..1473d8d 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/LoadProxyCredential.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/LoadProxyCredential.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import org.bouncycastle.openssl.PasswordFinder; diff --git a/src/main/java/org/italiangrid/voms/clients/impl/LoadUserCredential.java b/src/main/java/org/italiangrid/voms/clients/impl/LoadUserCredential.java index ed63b84..674000a 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/LoadUserCredential.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/LoadUserCredential.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import org.bouncycastle.openssl.PasswordFinder; diff --git a/src/main/java/org/italiangrid/voms/clients/impl/ProxyCreationListener.java b/src/main/java/org/italiangrid/voms/clients/impl/ProxyCreationListener.java index a5d86ce..02ee61b 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/ProxyCreationListener.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/ProxyCreationListener.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import java.util.List; diff --git a/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerAdapter.java b/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerAdapter.java index efc526b..cc24ea5 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerAdapter.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerAdapter.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; /** diff --git a/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerHelper.java b/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerHelper.java index 9c932c4..92ef7d8 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerHelper.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/ProxyDestroyListenerHelper.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import org.italiangrid.voms.clients.util.MessageLogger; diff --git a/src/main/java/org/italiangrid/voms/clients/impl/ProxyInfoListenerHelper.java b/src/main/java/org/italiangrid/voms/clients/impl/ProxyInfoListenerHelper.java index c939bd3..6b0b2c6 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/ProxyInfoListenerHelper.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/ProxyInfoListenerHelper.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import org.italiangrid.voms.clients.util.MessageLogger; diff --git a/src/main/java/org/italiangrid/voms/clients/impl/ProxyInitListenerHelper.java b/src/main/java/org/italiangrid/voms/clients/impl/ProxyInitListenerHelper.java index 91c352e..1d39056 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/ProxyInitListenerHelper.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/ProxyInitListenerHelper.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.impl; import java.io.File; @@ -44,6 +59,8 @@ public enum WARNING_POLICY { WARNING_POLICY warningPolicy = WARNING_POLICY.printWarnings; + private boolean hadValidationErrors = false; + public ProxyInitListenerHelper(MessageLogger logger) { this.logger = logger; } @@ -86,6 +103,7 @@ public void notifyVOMSRequestSuccess(VOMSACRequest request, public void notifyValidationResult(VOMSValidationResult result) { if (!result.isValid()) { + hadValidationErrors = true; logger.error("\nWARNING: VOMS AC validation for VO %s failed for the following reasons:\n", result.getAttributes().getVO()); for (VOMSValidationErrorMessage m : result.getValidationErrors()) logger.error(" %s\n", m.getMessage()); @@ -109,6 +127,7 @@ public void proxyCreated(String proxyPath, ProxyCertificate cert, List w @Override public boolean onValidationError(ValidationError error) { + hadValidationErrors = true; logger.warning("Certificate validation error: %s\n", error.getMessage()); return false; } @@ -258,4 +277,11 @@ public void notifyReceivedResponse(VOMSResponse r) { logger.trace(r.getXMLAsString()); } } + + @Override + public boolean hadValidationErrors() { + return hadValidationErrors; + } + + } diff --git a/src/main/java/org/italiangrid/voms/clients/impl/package-info.java b/src/main/java/org/italiangrid/voms/clients/impl/package-info.java index adcb75d..007b7f7 100644 --- a/src/main/java/org/italiangrid/voms/clients/impl/package-info.java +++ b/src/main/java/org/italiangrid/voms/clients/impl/package-info.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * */ diff --git a/src/main/java/org/italiangrid/voms/clients/options/CLIOption.java b/src/main/java/org/italiangrid/voms/clients/options/CLIOption.java index 6860f08..3520fb1 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/CLIOption.java +++ b/src/main/java/org/italiangrid/voms/clients/options/CLIOption.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/options/CLIOptionsBundle.java b/src/main/java/org/italiangrid/voms/clients/options/CLIOptionsBundle.java index c137baa..5def2f1 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/CLIOptionsBundle.java +++ b/src/main/java/org/italiangrid/voms/clients/options/CLIOptionsBundle.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import java.util.MissingResourceException; diff --git a/src/main/java/org/italiangrid/voms/clients/options/CommonOptions.java b/src/main/java/org/italiangrid/voms/clients/options/CommonOptions.java index be5cd15..ab92b8f 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/CommonOptions.java +++ b/src/main/java/org/italiangrid/voms/clients/options/CommonOptions.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/options/ProxyDestroyOptions.java b/src/main/java/org/italiangrid/voms/clients/options/ProxyDestroyOptions.java index 2c6ccc2..bcc0af5 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/ProxyDestroyOptions.java +++ b/src/main/java/org/italiangrid/voms/clients/options/ProxyDestroyOptions.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/options/ProxyInfoOptions.java b/src/main/java/org/italiangrid/voms/clients/options/ProxyInfoOptions.java index ffba288..89bea30 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/ProxyInfoOptions.java +++ b/src/main/java/org/italiangrid/voms/clients/options/ProxyInfoOptions.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/options/ProxyInitOptions.java b/src/main/java/org/italiangrid/voms/clients/options/ProxyInitOptions.java index 0ac42d9..13f3497 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/ProxyInitOptions.java +++ b/src/main/java/org/italiangrid/voms/clients/options/ProxyInitOptions.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/options/VOMSCLIOptionBuilder.java b/src/main/java/org/italiangrid/voms/clients/options/VOMSCLIOptionBuilder.java index 5e8fbe8..652f572 100644 --- a/src/main/java/org/italiangrid/voms/clients/options/VOMSCLIOptionBuilder.java +++ b/src/main/java/org/italiangrid/voms/clients/options/VOMSCLIOptionBuilder.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.options; import org.apache.commons.cli.Option; diff --git a/src/main/java/org/italiangrid/voms/clients/package-info.java b/src/main/java/org/italiangrid/voms/clients/package-info.java index 3a85b04..ef25557 100644 --- a/src/main/java/org/italiangrid/voms/clients/package-info.java +++ b/src/main/java/org/italiangrid/voms/clients/package-info.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * */ diff --git a/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInfoStrategy.java b/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInfoStrategy.java index 4372731..b4cece9 100644 --- a/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInfoStrategy.java +++ b/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInfoStrategy.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.strategies; import org.italiangrid.voms.clients.ProxyInfoParams; diff --git a/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInitStrategy.java b/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInitStrategy.java index 561a98b..05e3e93 100644 --- a/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInitStrategy.java +++ b/src/main/java/org/italiangrid/voms/clients/strategies/ProxyInitStrategy.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.strategies; import org.italiangrid.voms.clients.ProxyInitParams; diff --git a/src/main/java/org/italiangrid/voms/clients/strategies/VOMSCommandsParsingStrategy.java b/src/main/java/org/italiangrid/voms/clients/strategies/VOMSCommandsParsingStrategy.java index 527bb42..1973372 100644 --- a/src/main/java/org/italiangrid/voms/clients/strategies/VOMSCommandsParsingStrategy.java +++ b/src/main/java/org/italiangrid/voms/clients/strategies/VOMSCommandsParsingStrategy.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.strategies; import java.util.List; diff --git a/src/main/java/org/italiangrid/voms/clients/strategies/package-info.java b/src/main/java/org/italiangrid/voms/clients/strategies/package-info.java index 20028fe..c199288 100644 --- a/src/main/java/org/italiangrid/voms/clients/strategies/package-info.java +++ b/src/main/java/org/italiangrid/voms/clients/strategies/package-info.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * */ diff --git a/src/main/java/org/italiangrid/voms/clients/util/ConsolePasswordFinder.java b/src/main/java/org/italiangrid/voms/clients/util/ConsolePasswordFinder.java index 704d32a..d3784e5 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/ConsolePasswordFinder.java +++ b/src/main/java/org/italiangrid/voms/clients/util/ConsolePasswordFinder.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.Console; diff --git a/src/main/java/org/italiangrid/voms/clients/util/EffectiveUserIdProvider.java b/src/main/java/org/italiangrid/voms/clients/util/EffectiveUserIdProvider.java index 1d88a58..b6bd515 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/EffectiveUserIdProvider.java +++ b/src/main/java/org/italiangrid/voms/clients/util/EffectiveUserIdProvider.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.BufferedReader; diff --git a/src/main/java/org/italiangrid/voms/clients/util/InputStreamPasswordFinder.java b/src/main/java/org/italiangrid/voms/clients/util/InputStreamPasswordFinder.java index ed873f8..db5cedf 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/InputStreamPasswordFinder.java +++ b/src/main/java/org/italiangrid/voms/clients/util/InputStreamPasswordFinder.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.BufferedReader; diff --git a/src/main/java/org/italiangrid/voms/clients/util/MessageLogger.java b/src/main/java/org/italiangrid/voms/clients/util/MessageLogger.java index acc3c64..3bc443f 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/MessageLogger.java +++ b/src/main/java/org/italiangrid/voms/clients/util/MessageLogger.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.PrintStream; diff --git a/src/main/java/org/italiangrid/voms/clients/util/OpensslNameUtilities.java b/src/main/java/org/italiangrid/voms/clients/util/OpensslNameUtilities.java index 9f86800..877ba66 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/OpensslNameUtilities.java +++ b/src/main/java/org/italiangrid/voms/clients/util/OpensslNameUtilities.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import javax.security.auth.x500.X500Principal; diff --git a/src/main/java/org/italiangrid/voms/clients/util/OptionsFileLoader.java b/src/main/java/org/italiangrid/voms/clients/util/OptionsFileLoader.java index 9e89342..fa088a4 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/OptionsFileLoader.java +++ b/src/main/java/org/italiangrid/voms/clients/util/OptionsFileLoader.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.File; @@ -21,13 +36,11 @@ public class OptionsFileLoader { /** - * Load options from a file, adding them to an array of arguments. + * Load options from a file * - * @param oldArgs - * the arguments array * @param optionFileName * the file containing the options - * @return an arguments array containing also the new options + * @return a list of options */ public static List loadOptions(String optionFileName) { diff --git a/src/main/java/org/italiangrid/voms/clients/util/PasswordFinders.java b/src/main/java/org/italiangrid/voms/clients/util/PasswordFinders.java index bf08c29..6d66c5b 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/PasswordFinders.java +++ b/src/main/java/org/italiangrid/voms/clients/util/PasswordFinders.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.io.InputStream; diff --git a/src/main/java/org/italiangrid/voms/clients/util/TimeUtils.java b/src/main/java/org/italiangrid/voms/clients/util/TimeUtils.java index 367f4db..d121f82 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/TimeUtils.java +++ b/src/main/java/org/italiangrid/voms/clients/util/TimeUtils.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import java.text.ParseException; diff --git a/src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java b/src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java index 396c780..1c6a8ed 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java +++ b/src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import org.apache.commons.cli.HelpFormatter; diff --git a/src/main/java/org/italiangrid/voms/clients/util/VOMSAttributesPrinter.java b/src/main/java/org/italiangrid/voms/clients/util/VOMSAttributesPrinter.java index 880c35c..da62350 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/VOMSAttributesPrinter.java +++ b/src/main/java/org/italiangrid/voms/clients/util/VOMSAttributesPrinter.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import org.italiangrid.voms.VOMSAttribute; diff --git a/src/main/java/org/italiangrid/voms/clients/util/VOMSProxyPathBuilder.java b/src/main/java/org/italiangrid/voms/clients/util/VOMSProxyPathBuilder.java index 771440f..3bf7043 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/VOMSProxyPathBuilder.java +++ b/src/main/java/org/italiangrid/voms/clients/util/VOMSProxyPathBuilder.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients.util; import org.italiangrid.voms.credential.ProxyNamingPolicy; diff --git a/src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java b/src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java index 465498f..2f918c6 100644 --- a/src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java +++ b/src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * */ diff --git a/src/main/resources/org/italiangrid/voms/clients/options/commonOptions.properties b/src/main/resources/org/italiangrid/voms/clients/options/commonOptions.properties index 6d53a7e..7f2a55b 100644 --- a/src/main/resources/org/italiangrid/voms/clients/options/commonOptions.properties +++ b/src/main/resources/org/italiangrid/voms/clients/options/commonOptions.properties @@ -1,3 +1,19 @@ +# +# Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ## The debug option debug.description = Enables extra debug output diff --git a/src/main/resources/org/italiangrid/voms/clients/options/proxyDestroyOptions.properties b/src/main/resources/org/italiangrid/voms/clients/options/proxyDestroyOptions.properties index c45b558..db36a4a 100644 --- a/src/main/resources/org/italiangrid/voms/clients/options/proxyDestroyOptions.properties +++ b/src/main/resources/org/italiangrid/voms/clients/options/proxyDestroyOptions.properties @@ -1,3 +1,19 @@ +# +# Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ## The conf option conf.opt = c conf.description = Loads options from file diff --git a/src/main/resources/org/italiangrid/voms/clients/options/proxyInfoOptions.properties b/src/main/resources/org/italiangrid/voms/clients/options/proxyInfoOptions.properties index 8d8d7d8..e2c180a 100644 --- a/src/main/resources/org/italiangrid/voms/clients/options/proxyInfoOptions.properties +++ b/src/main/resources/org/italiangrid/voms/clients/options/proxyInfoOptions.properties @@ -1,3 +1,19 @@ +# +# Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ## The acexists option acexists.description = Returns 0 if AC exists corresponding to voname, 1 otherwise acexists.hasArg = true diff --git a/src/main/resources/org/italiangrid/voms/clients/options/proxyInitOptions.properties b/src/main/resources/org/italiangrid/voms/clients/options/proxyInitOptions.properties index a6da214..8340cd6 100644 --- a/src/main/resources/org/italiangrid/voms/clients/options/proxyInitOptions.properties +++ b/src/main/resources/org/italiangrid/voms/clients/options/proxyInitOptions.properties @@ -1,3 +1,19 @@ +# +# Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ## The bits option bits.opt = b bits.description = Number of bits in key {512|1024|2048|4096} diff --git a/src/main/resources/version.properties b/src/main/resources/version.properties index e5683df..a3ee8a8 100644 --- a/src/main/resources/version.properties +++ b/src/main/resources/version.properties @@ -1 +1,17 @@ +# +# Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + version=${project.version} \ No newline at end of file diff --git a/src/test/java/org/italiangrid/voms/clients/DefaultProxyDestroyBehaviourTest.java b/src/test/java/org/italiangrid/voms/clients/DefaultProxyDestroyBehaviourTest.java index 5023acb..2634e4a 100644 --- a/src/test/java/org/italiangrid/voms/clients/DefaultProxyDestroyBehaviourTest.java +++ b/src/test/java/org/italiangrid/voms/clients/DefaultProxyDestroyBehaviourTest.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients; import static org.junit.Assert.*; diff --git a/src/test/java/org/italiangrid/voms/clients/TestSimpleDateFormat.java b/src/test/java/org/italiangrid/voms/clients/TestSimpleDateFormat.java index 6a30ac1..d788e31 100644 --- a/src/test/java/org/italiangrid/voms/clients/TestSimpleDateFormat.java +++ b/src/test/java/org/italiangrid/voms/clients/TestSimpleDateFormat.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients; import java.text.ParseException; diff --git a/src/test/java/org/italiangrid/voms/clients/TestVOMSCommandsParser.java b/src/test/java/org/italiangrid/voms/clients/TestVOMSCommandsParser.java index dbca9b7..0b717dc 100644 --- a/src/test/java/org/italiangrid/voms/clients/TestVOMSCommandsParser.java +++ b/src/test/java/org/italiangrid/voms/clients/TestVOMSCommandsParser.java @@ -1,3 +1,18 @@ +/** + * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.italiangrid.voms.clients; import java.util.Arrays;