diff --git a/.classpath b/.classpath
index ce2d0c9..de7a716 100644
--- a/.classpath
+++ b/.classpath
@@ -23,9 +23,9 @@
-
+
-
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 45a6e0e..443e085 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
index a1f6907..4f92af5 100644
--- a/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/pom.xml b/pom.xml
index b5be0ae..3b44b00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,8 +9,7 @@
org.gcube.applicationsupportlayer
aslcore
- 4.4.0-SNAPSHOT
-
+ 4.5.0-SNAPSHOT
Application Support Layer Core
Library supporting dissemination of gCube content with OAI-ORE
@@ -40,11 +39,7 @@
-->
-
- org.gcube.dvos
- usermanagement-stub
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
+
net.sf.ehcache
@@ -71,14 +66,7 @@
1.6.4
test
-
+
org.gcube.resources
registry-publisher
@@ -97,14 +85,7 @@ should be removed after release 3.2.0
kxml2
2.3.0
-
+
diff --git a/src/main/java/org/gcube/application/framework/core/security/LDAPAuthenticationModule.java b/src/main/java/org/gcube/application/framework/core/security/LDAPAuthenticationModule.java
index 22d707a..22e1acc 100644
--- a/src/main/java/org/gcube/application/framework/core/security/LDAPAuthenticationModule.java
+++ b/src/main/java/org/gcube/application/framework/core/security/LDAPAuthenticationModule.java
@@ -37,122 +37,21 @@ public class LDAPAuthenticationModule {
- public boolean checkAuthentication(String username, String password) throws Exception {
-
- logger.debug("The new security model should be integrated in ASL");
- return true;
-
-
-/*
- logger.info("beginning authentication for " + username);
-
+ public boolean checkAuthentication(String username, String password) {
+ logger.info("beginning authentication for " + username);
LoginContext loginContext;
-
// Create the LoginContext
try {
loginContext = new LoginContext(contextName, new JaasCallbackHandler(username, password));
+ loginContext.login();
+ return true;
} catch (SecurityException e) {
logger.error("Exception:", e);
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- logger.info("Getting credential from VOMS");
- if (cred == null) {
- logger.info("The credential does NOT exist");
- throw new Exception("key4", e);
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
-
+ return false;
} catch (LoginException e) {
logger.error("Exception:", e);
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- logger.info("Getting credential from VOMS");
- if (cred == null) {
- logger.info("The credential does NOT exist");
- throw new Exception("key4", e);
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
-
+ return false;
}
-
- // Attempt login
- try {
- loginContext.login();
- } catch (FailedLoginException e) {
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- // throw new Exception("key4", e);
- if (cred == null) {
- logger.error("Exception:", e);
- logger.info("The credential is NULL!!!!!!!!!!!!");
- return false;
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
- } catch (AccountExpiredException e) {
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- // throw new Exception("key4", e);
- if (cred == null) {
- logger.error("Exception:", e);
- logger.info("The credential is NULL!!!!!!!!!!!!");
- return false;
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
- } catch (CredentialExpiredException e) {
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- // throw new Exception("key4", e);
- if (cred == null) {
- logger.error("Exception:", e);
- logger.info("The credential is NULL!!!!!!!!!!!!");
- return false;
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
- } catch (Exception e) {
- // Check user's credential
- ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-
- // throw new Exception("key4", e);
- if (cred == null) {
- logger.error("Exception:", e);
- logger.info("The credential is NULL!!!!!!!!!!!!");
- return false;
- } else {
- logger.info("The credential is OK!!!!!!!!!!!!");
- return true;
- }
- }
- logger.info("ASL returning value true");
- return true;
-
- // Check user's credential
-// ExtendedGSSCredential cred = UserCredential.getPlainCredential(username, password);
-//
-// logger.info("Getting credential from VOMS");
-// if (cred == null) {
-// logger.info("The credential does NOT exist");
-// return false;
-// } else {
-// logger.info("The credential is OK!!!!!!!!!!!!");
-// return true;
-// }
-
-*/
}
diff --git a/src/main/java/org/gcube/application/framework/core/util/GenericResource.java b/src/main/java/org/gcube/application/framework/core/util/GenericResource.java
index 1ee2971..2689e7f 100644
--- a/src/main/java/org/gcube/application/framework/core/util/GenericResource.java
+++ b/src/main/java/org/gcube/application/framework/core/util/GenericResource.java
@@ -176,8 +176,10 @@ public class GenericResource implements GenericResourceInfoI {
while (iter.hasNext()) {
org.gcube.common.resources.gcore.GenericResource collection = iter.next().getValue();
Element body = collection.profile().body();
- if(body.getElementsByTagName("type").getLength()>0) //means opensearch collection
+ if(body.getElementsByTagName("type").getLength()>0){ //means opensearch collection
+ logger.debug("Filtering opensearch collection with ID: "+collection.id()+" Type: "+collection.type());
iter.remove();
+ }
}
logger.debug("# of Tree Collections found: "+ pairs.size());
return pairs;
@@ -210,8 +212,10 @@ public class GenericResource implements GenericResourceInfoI {
while (iter.hasNext()) {
org.gcube.common.resources.gcore.GenericResource collection = iter.next().getValue();
Element body = collection.profile().body();
- if(body.getElementsByTagName("type").getLength()==0)
+ if(body.getElementsByTagName("type").getLength()==0){
+ logger.debug("Removing non-opensearch collection: "+collection.id()+" Type: "+collection.type());
iter.remove();
+ }
}
logger.debug("# of Opensearch Collections found: "+ pairs.size());
} catch (Exception e) {