This commit is contained in:
Lucio Lelii 2016-09-30 09:20:29 +00:00
parent 44968e867a
commit 0d7dbe67a5
8 changed files with 66 additions and 57 deletions

View File

@ -1 +0,0 @@

View File

@ -1,6 +1 @@
gCube System - License ${gcube.license}
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

View File

@ -1 +0,0 @@
* Lucio Lelii (lucio.lelii@isti.cnr.it), CNR, Italy

View File

@ -1,38 +1,59 @@
The gCube System - ${name} The gCube System - ${name}
---------------------- --------------------------------------------------
This work has been partially supported by the following European projects: DILIGENT (FP6-2003-IST-2), D4Science (FP7-INFRA-2007-1.2.2),
D4Science-II (FP7-INFRA-2008-1.2.2), iMarine (FP7-INFRASTRUCTURES-2011-2), and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil).
Authors
-------
* Lucio Lelii (lucio.lelii@isti.cnr.it), CNR, Italy
Version and Release Date
------------------------
${version}
Description
-----------
${description} ${description}
${gcube.description}
${gcube.funding}
Version
--------------------------------------------------
${version} (${buildDate})
Please see the file named "changelog.xml" in this directory for the release notes.
Authors
--------------------------------------------------
* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy
Maintainers
--------------------------------------------------
* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy
Download information Download information
-------------------- --------------------------------------------------
Source code is available from SVN: Source code is available from SVN:
${scm.url} ${scm.url}
Binaries can be downloaded from: Binaries can be downloaded from the gCube website:
${gcube.website}
Installation
--------------------------------------------------
Installation documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}
Documentation Documentation
------------- --------------------------------------------------
Documentation is available on-line from the Projects Documentation Wiki:
https://gcube.wiki.gcube-system.org/gcube/index.php/.... Documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}
Support
--------------------------------------------------
Bugs and support requests can be reported in the gCube issue tracking tool:
${gcube.issueTracking}
Licensing Licensing
--------- --------------------------------------------------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory. This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

View File

@ -2,4 +2,7 @@
<Changeset component="authorization-client-1.0.0" date="2015-05-18"> <Changeset component="authorization-client-1.0.0" date="2015-05-18">
<Change>First Release</Change> <Change>First Release</Change>
</Changeset> </Changeset>
<Changeset component="authorization-client-2.0.0" date="2016-09-30">
<Change>moving to auth2</Change>
</Changeset>
</ReleaseNotes> </ReleaseNotes>

View File

@ -15,8 +15,6 @@
<includes> <includes>
<include>README</include> <include>README</include>
<include>LICENSE</include> <include>LICENSE</include>
<include>INSTALL</include>
<include>MAINTAINERS</include>
<include>changelog.xml</include> <include>changelog.xml</include>
</includes> </includes>
<fileMode>755</fileMode> <fileMode>755</fileMode>
@ -33,10 +31,5 @@
<source>target/${build.finalName}.jar</source> <source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory> <outputDirectory>/${artifactId}</outputDirectory>
</file> </file>
<file>
<source>${distroDirectory}/svnpath.txt</source>
<outputDirectory>/${artifactId}</outputDirectory>
<filtered>true</filtered>
</file>
</files> </files>
</assembly> </assembly>

View File

@ -1 +0,0 @@
${scm.url}

View File

@ -20,28 +20,28 @@ public class CallTest {
@Test @Test
public void resolveNodeToken() throws Exception{ public void resolveNodeToken() throws Exception{
System.out.println(resolveToken("46311827-6000-480a-8f75-01b7943d490b")); //81caac0f-8a0d-4923-9312-7ff0eb3f2d5e|98187548")); System.out.println(resolveToken("36501a0d-a205-4bf1-87ad-4c7185faa0d6")); //81caac0f-8a0d-4923-9312-7ff0eb3f2d5e|98187548"));
} }
@Test @Test
public void requestNodeToken() throws Exception { public void requestNodeToken() throws Exception {
String token = authorizationService().requestActivation(new ContainerInfo("ckan-d-d4s.d4science.org",80), "/gcube/devNext/NextNext"); String token = authorizationService().requestActivation(new ContainerInfo("node11.d.d4science.research-infrastructures.eu",8080), "/gcube/devNext/NextNext");
System.out.println(token); System.out.println(token);
} }
@Test @Test
public void addPolicy() throws Exception { public void addPolicy() throws Exception {
SecurityTokenProvider.instance.set(requestTestToken("/gcube/devsec/devVRE")); SecurityTokenProvider.instance.set(requestTestToken("/gcube/devNext/NextNext"));
List<Policy> policies = new ArrayList<Policy>(); List<Policy> policies = new ArrayList<Policy>();
policies.add(new User2ServicePolicy("/gcube/devsec/devVRE", new ServiceAccess(), Users.one("lucio.lelii"), Action.ACCESS )); policies.add(new User2ServicePolicy("/gcube/devNext/NextNext", new ServiceAccess(), Users.one("lucio.lelii"), Action.ACCESS ));
authorizationService().addPolicies(policies); authorizationService().addPolicies(policies);
} }
@Test @Test
public void getPolicies() throws Exception{ public void getPolicies() throws Exception{
SecurityTokenProvider.instance.set(requestTestToken("/gcube/devNext")); SecurityTokenProvider.instance.set(requestTestToken("/gcube/devNext/NextNext"));
List<Policy> policies = authorizationService().getPolicies("/gcube/devNext"); List<Policy> policies = authorizationService().getPolicies("/gcube/devsec/devVRE");
System.out.println(policies); System.out.println(policies);
} }
@ -57,7 +57,7 @@ public class CallTest {
@Test @Test
public void createKey() throws Exception { public void createKey() throws Exception {
String token = requestTestToken("/gcube/devNext"); String token = requestTestToken("/gcube/devNext/NextNext");
SecurityTokenProvider.instance.set(token); SecurityTokenProvider.instance.set(token);
String key = authorizationService().generateApiKey("TEST"); String key = authorizationService().generateApiKey("TEST");
System.out.println("key : "+key); System.out.println("key : "+key);
@ -75,7 +75,7 @@ public class CallTest {
@Test @Test
public void createTestToken() throws Exception { public void createTestToken() throws Exception {
System.out.println(requestTestToken("/gcube/devNext")); System.out.println(requestTestToken("/gcube/devNext/NextNext"));
} }
private String requestTestToken(String context) throws Exception{ private String requestTestToken(String context) throws Exception{