Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2308 - branches/as/src/org/perfsonar/service/commons/authn

Subject: perfsonar development work

List archive

perfsonar: r2308 - branches/as/src/org/perfsonar/service/commons/authn


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2308 - branches/as/src/org/perfsonar/service/commons/authn
  • Date: Wed, 28 Mar 2007 10:29:43 -0400

Author: rodriguez
Date: 2007-03-28 10:29:43 -0400 (Wed, 28 Mar 2007)
New Revision: 2308

Modified:

branches/as/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java

branches/as/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
Log:
AADispatchSOAPProtocol updated. At this time, it's not check the
Authorization Service. The result depends on the value of
'service.authn.response' is 'true' or 'false' in service.properties

Modified:
branches/as/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
===================================================================
---
branches/as/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-03-28 13:50:23 UTC (rev 2307)
+++
branches/as/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-03-28 14:29:43 UTC (rev 2308)
@@ -1,7 +1,9 @@
package org.perfsonar.service.commons.authn;

+import org.perfsonar.service.commons.exceptions.SystemException;
+
public class AADispatchProtocolFactory {
- public static AADispatchProtocol getDefaultAADispatchProtocol() {
+ public static AADispatchProtocol getDefaultAADispatchProtocol()
throws SystemException {
return new AADispatchSOAPProtocol();
}
}

Modified:
branches/as/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
===================================================================
---
branches/as/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-03-28 13:50:23 UTC (rev 2307)
+++
branches/as/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-03-28 14:29:43 UTC (rev 2308)
@@ -1,12 +1,50 @@
package org.perfsonar.service.commons.authn;

+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
+import org.perfsonar.commons.auxiliary.ComponentNames;
+import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.SystemException;
+
public class AADispatchSOAPProtocol implements AADispatchProtocol {
+ private final String AUTHN_DECISION = "service.authn.response";
+ private LoggerComponent logger;
+ private ConfigurationComponent config;
+ private boolean isAuthorized=false;

+ public AADispatchSOAPProtocol() throws SystemException {
+ try {
+ logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
+ .getComponent(ComponentNames.LOGGER);
+ } catch (SystemException e) {
+ String m = "AADispatchSOAPProtocol: Can't obtain
Logger component ";
+ throw new SystemException(m);
+ }
+ try {
+ config = (ConfigurationComponent)
AuxiliaryComponentManager
+
.getInstance().getComponent(ComponentNames.CONFIG);
+ } catch (SystemException e) {
+
+ String m = "AADispatchSOAPProtocol: Can't obtain
Config component ";
+ logger.error(m);
+ throw new SystemException(m);
+ }
+ try {
+ Boolean
b=Boolean.valueOf(config.getProperty(AUTHN_DECISION));
+ isAuthorized=b.booleanValue();
+ } catch (Exception e) {
+ isAuthorized=false;
+ }
+ }
+
public AuthNResponse getAuthorizationService(String nameService,
AuthNRequest req) {
// TODO Make a real response
AuthNResponse resp=new AuthNResponse();
- resp.setStatus(AuthNResponse.NOT_AUTHORIZED);
+ if (!isAuthorized)
+ resp.setStatus(AuthNResponse.NOT_AUTHORIZED);
+ else
+ resp.setStatus(AuthNResponse.AUTHORIZED);
return resp;
}




  • perfsonar: r2308 - branches/as/src/org/perfsonar/service/commons/authn, svnlog, 03/28/2007

Archive powered by MHonArc 2.6.16.

Top of Page