From: <shi...@us...> - 2011-03-25 11:57:57
|
Revision: 9541 http://unicore.svn.sourceforge.net/unicore/?rev=9541&view=rev Author: shiraz_79 Date: 2011-03-25 11:57:50 +0000 (Fri, 25 Mar 2011) Log Message: ----------- sync. with latest u/x authz settings, fixing the rp document Modified Paths: -------------- CommonInformationService/cis-core/trunk/src/main/conf/cis.config CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/CIS.java CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceHomeImpl.java CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceImpl.java Added Paths: ----------- CommonInformationService/cis-core/trunk/src/main/conf/simpleuudb CommonInformationService/cis-core/trunk/src/main/conf/xacml2.config CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/ CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/01coreServices.xml CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/99finalDeny.xml Modified: CommonInformationService/cis-core/trunk/src/main/conf/cis.config =================================================================== --- CommonInformationService/cis-core/trunk/src/main/conf/cis.config 2011-03-25 11:02:18 UTC (rev 9540) +++ CommonInformationService/cis-core/trunk/src/main/conf/cis.config 2011-03-25 11:57:50 UTC (rev 9541) @@ -104,14 +104,19 @@ # # the XACML config file which contains the list of security policy files # -uas.security.accesscontrol.pdp.config=src/main/conf/xacml.config +uas.security.accesscontrol.pdp.config=src/main/conf/xacml2.config # # The XACML PDP implementation class # -uas.security.accesscontrol.pdp=eu.unicore.uas.security.pdp.localsun.LocalSunPDP +uas.security.accesscontrol.pdp=eu.unicore.uas.pdp.local.LocalHerasafPDP # +# Require digital signatures on important messages +# +uas.security.signatures=false + +# # Authorisation attribute source configuration # # UNICORE maps the identity of the Grid user (e.g. @@ -145,6 +150,15 @@ # Grid component ID used when querying XUUDB uas.security.attributes.XUUDB.xuudbGCID=CIS +# +# configuration of the 'FILE' attribute source +# +uas.security.attributes.FILE.class=eu.unicore.uas.security.file.FileAttributeSource +# path to the mapfile +uas.security.attributes.FILE.file=src/main/conf/simpleuudb +# how to match entries: strict or regexp +uas.security.attributes.FILE.matching=strict + ########################################################################## ################## Common Information Provider (CIP) Settings ############ ########################################################################## Added: CommonInformationService/cis-core/trunk/src/main/conf/simpleuudb =================================================================== --- CommonInformationService/cis-core/trunk/src/main/conf/simpleuudb (rev 0) +++ CommonInformationService/cis-core/trunk/src/main/conf/simpleuudb 2011-03-25 11:57:50 UTC (rev 9541) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +The format is as follows: + +<fileAttributeSource> + <entry key="USER DN"> + <attribute name="role"> + <value>user</value> + </attribute> + <attribute name="xlogin"> + <value>unixuser</value> + <value>nobody</value> + ... + </attribute> + ... + </entry> + ... +</fileAttributeSource> + +If matching mode is set in attribute source configuration to 'regexp' then you can use Java regular expressions +as <entry>'s 'key' values. + +You can use the following attributes: + +xlogin, role, group, supplementaryGroups, addOsGroups and queue. + +Attributes with those names (case insensitive) are handled as special UNICORE attributes +(e.g. xlogin is used to provide available local OS user names for the client). Others are +ignored. +--> + + +<fileAttributeSource> + + <entry key="EMAILADDRESS=uni...@li..., C=DE, O=unicore.eu, OU=Testing, CN=UNICORE demo user"> + <attribute name="role"> + <value>user</value> + </attribute> + <attribute name="xlogin"> + <value>${USER_NAME}</value> + </attribute> + </entry> + +</fileAttributeSource> \ No newline at end of file Added: CommonInformationService/cis-core/trunk/src/main/conf/xacml2.config =================================================================== --- CommonInformationService/cis-core/trunk/src/main/conf/xacml2.config (rev 0) +++ CommonInformationService/cis-core/trunk/src/main/conf/xacml2.config 2011-03-25 11:57:50 UTC (rev 9541) @@ -0,0 +1,12 @@ +# +# config file for the XACML2.0 policy decision point +# + +# The directory where XACML 2.0 policy files are stored +localpdp.directory=src/main/conf/xacml2Policies + +# Wildcard expression to select actual policy files from the directory defined above +localpdp.filesWildcard=*.xml + +# Combining algorithm for the policies. You can use the full XACML id or its last part. +localpdp.combiningAlg=first-applicable Added: CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/01coreServices.xml =================================================================== --- CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/01coreServices.xml (rev 0) +++ CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/01coreServices.xml 2011-03-25 11:57:50 UTC (rev 9541) @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Policy xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os http://docs.oasis-open.org/xacml/access_control-xacml-2.0-policy-schema-os.xsd" PolicyId="unicorePolicy:01coreServices" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"> + <Description> + This is the default access control policy for UNICORE/X CIS. + + There are the following rules (the first applicable rule takes effect): + + - Admins (i.e. users with XUUDB role "admin") are granted full access. + - The TargetSystemFactory is accessible for all authorized users + - Read access to the CIS properties and listing information, which is allowed for all the authenticated users + </Description> + <Target/> + + <Rule RuleId="Permit:Admin" Effect="Permit"> + <Description> Role "admin" may do anything. </Description> + <Target/> + <Condition> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only"> + <SubjectAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#string" AttributeId="role"/> + </Apply> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue> + </Apply> + </Condition> + </Rule> + + <Rule RuleId="Deny:DestroyDefaultCIS" Effect="Deny"> + <Description> forbid Destroy() and SetTerminationTime() on the default CIS + </Description> + <Target> + <Resources> + <Resource> + <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">cis_registry</AttributeValue> + <ResourceAttributeDesignator AttributeId="urn:unicore:wsresource" DataType="http://www.w3.org/2001/XMLSchema#string"/> + </ResourceMatch> + <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">CISRegistry</AttributeValue> + <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI" MustBePresent="true"/> + </ResourceMatch> + </Resource> + </Resources> + <Actions> + <Action> + <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Destroy</AttributeValue> + <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> + </ActionMatch> + </Action> + <Action> + <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SetTerminationTime</AttributeValue> + <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> + </ActionMatch> + </Action> + </Actions> + </Target> + </Rule> + + <Rule RuleId="Permit:Service_read-access" Effect="Permit"> + <Description> Read Access to the properties of the CISRegistry, + is granted for authenticated users, i.e. users with a valid certificate + regardless of the possesed role (or even without a role when user is not in XUUDB) + </Description> + <Target> + <Resources> + <Resource> + <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">CISRegistry</AttributeValue> + <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI" MustBePresent="true"/> + </ResourceMatch> + </Resource> + </Resources> + </Target> + <Condition> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in"> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only"> + <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> + </Apply> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GetResourcePropertyDocument</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GetResourceProperty</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">QueryResourceProperties</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GetResults</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">listAllCIP</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">listAllInformation</AttributeValue> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">FullTextSearch</AttributeValue> + </Apply> + </Apply> + </Condition> + </Rule> +</Policy> Property changes on: CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/01coreServices.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/99finalDeny.xml =================================================================== --- CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/99finalDeny.xml (rev 0) +++ CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/99finalDeny.xml 2011-03-25 11:57:50 UTC (rev 9541) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Policy xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os http://docs.oasis-open.org/xacml/access_control-xacml-2.0-policy-schema-os.xsd" + PolicyId="unicorePolicy:99coreServices" + RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"> + + <Description> + The final Deny rule - used as fall through + </Description> + + <Target /> + <Rule RuleId="FinalRule" Effect="Deny" /> +</Policy> \ No newline at end of file Property changes on: CommonInformationService/cis-core/trunk/src/main/conf/xacml2Policies/99finalDeny.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/CIS.java =================================================================== --- CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/CIS.java 2011-03-25 11:02:18 UTC (rev 9540) +++ CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/CIS.java 2011-03-25 11:57:50 UTC (rev 9541) @@ -38,7 +38,6 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -47,10 +46,6 @@ import java.util.Properties; import java.util.concurrent.TimeUnit; -import javax.management.MBeanServer; -import javax.management.ObjectName; -import javax.print.ServiceUI; - import org.apache.log4j.Logger; import org.mortbay.jetty.webapp.WebAppContext; import org.springframework.context.ApplicationContext; @@ -74,6 +69,9 @@ private static Logger logger = CISLogUtil.getLogger(CISLogUtil.CIS, CIS.class); + public static final String VERSION = CIS.class.getPackage() + .getImplementationVersion(); + private static final String DEFAULT_CIS_CONFIG_PROPERTIES_PATH = "src/main/conf/cis.config"; // Google maps based properties @@ -115,19 +113,6 @@ public static final String CIS_LOCATION_LONGITUDE = "cis.location.longitude"; public static final String CIS_LOCATION_LATITUDE = "cis.location.latitude"; - // XUUDB related properties -// public static final String CIS_AUTHORISE = "cis.authorise"; -// public static final String CIS_XUUDB_HOST = "cis.xuudb.host"; -// public static final String CIS_XUUDB_PORT = "cis.xuudb.port"; -// public static final String CIS_XUUDB_GCID = "cis.xuudb.gcid"; -// public static final String CIS_AUTHORISER_CLASS = "cis.security.authoriser"; -// public static final String CIS_ACCESSCONTROL_PDP = "cis.security.accesscontrol.pdp"; -// public static final String CIS_ACCESSCONTROL_PDP_CONFIG = "cis.security.accesscontrol.pdp.config"; - - // XACML config property - // public static final String CIS_XACML_CONFIG = - // UASSecurityProperties.UAS_CHECKACCESS_PDPCONFIG; - private static ArrayList<Observer> obs = new ArrayList<Observer>(); /** @@ -165,12 +150,10 @@ private static ApplicationContext ctx = null; + // private WebServer server = null; private JettyServer server = null; - private static CIS cis = null; - private static ISecurityProperties securityProps = null; - private final String propertiesFile; public CIS(String propertiesFile) { @@ -254,21 +237,10 @@ } public static void setProperty(Object key, Object value) { - // buildProperty(DEFAULT_CIS_CONFIG_PROPERTIES_PATH); properties.put(key, value); } - // private void deployDefault() throws Exception { - // deployServices(new ByteArrayInputStream(WSRFCONFIG.getBytes())); - // } - // - // private void deployServices(InputStream is) throws Exception { - // - // new ServiceConfigReader().configureServices(is); - // - // } - public static final String writeHeader() { String lineSep = System.getProperty("line.separator"); @@ -296,76 +268,6 @@ * * @throws Exception */ - // private List<Runnable> deployServices() throws Exception { - // - // List<Runnable> tasks = null; - // String wsrfConfigFile = getProperty(WSRFLITE_CONFIG); - // File file = new File(wsrfConfigFile); - // if (wsrfConfigFile != null) { - // System.out.println("Reading WSRFlite configuration from " - // + wsrfConfigFile); - // tasks = deployServices(file); - // } else { - // System.out - // .println("Deploying default atomic services to WSRFlite."); - // deployDefault(); - // } - // - // // copy properties to WSRFlite kernel properties (so properties can be - // // set - // // in either uas.config or wsrflite.xml) - // for (Entry<Object, Object> o : properties.entrySet()) { - // String key = String.valueOf(o.getKey()); - // Kernel.getKernel().setProperty(key, String.valueOf(o.getValue())); - // } - // - // if (getBooleanProperty(CIS_AUTHORISE, false)) { - // loadAccessControlProperties(); - // addDefaultSecurityHandlers(); - // // add access control checker - // XFireKernel.getInvoker().setAccessControlChecker( - // new AccessControl()); - // } - // - // // configure the default authentication check policy - // registerDefaultAuthNStrategies(); - // return tasks; - // - // } - - // private List<Runnable> deployServices(File f) throws Exception { - // ServiceConfigReader c = new ServiceConfigReader(f, 3000); - // c.configureServices(); - // return c.getInitTasks(); - // } - - // private void registerDefaultAuthNStrategies() { - // SecurityManager.registerAuthNCheckingStrategies(new DSignAuthNCheck()); - // } - - // /** - // * starts the Unicore/X server (asynchronously, i.e. this method returns - // * immediately) - // */ - // public void start() throws Exception { - // Thread t = new Thread(new Runnable() { - // public void run() { - // try { - // startSynchronous(); - // } catch (Exception e) { - // LogUtil.logException("Error during server start.", e, - // logger); - // // make sure this ends up on the console - // System.err.println("ERROR DURING SERVER STARTUP!"); - // e.printStackTrace(); - // System.exit(1); - // } - // } - // }); - // t.setName("UNICORE/X CIS-Startup"); - // t.start(); - // } - /** * Starting the server * @@ -388,49 +290,18 @@ kernel.startSynchronous(propertiesFile); runStartupCode(); - // printInfo(); } + + + public static final String getHeader() { + return "CIS Version " + getVersion(); + } + + public static final String getVersion() { + String ver = VERSION != null ? VERSION : "DEVELOPMENT"; + return ver; + } - // public void _startSynchronous() { - // ctx = new FileSystemXmlApplicationContext( - // CIS.getProperty(CIS.CIS_SPRINGBEANS_PATH)); - // - // try { - // - // long start = System.currentTimeMillis(); - // String header = writeHeader(); - // System.out.println(header); - // logger.info(header); - // List<Runnable> tasks = deployServices(); - // JettyServer server = null; - // if (CIS.getProperty(CIS.CIS_WEBGUI_PORT) == null) { - // WebAppContext webapp = new WebAppContext(CIS.getProperty( - // CIS.CIS_WEBAPP_PATH, "./webapp"), "/"); - // server = new JettyServer(webapp); - // } else { - // server = new JettyServer(); - // } - // - // runStartupCode(); - // for (Runnable r : tasks) { - // r.run(); - // } - // startLogConfigWatcher(); - // server.start(); - // addShutDownHook(); - // logger.info("Startup time: " + (System.currentTimeMillis() - start) - // + " ms."); - // logger.info("***** CIS Web services container started. *****"); - // System.out - // .println("***** CIS Web services container started. *****"); - // System.out.println("Send TERM signal to shutdown gracefully."); - // notifyInitDone(); - // } catch (Exception e) { - // LogUtil.logException("Error during startup", e); - // } - // - // } - /** * Starts a CIS's Web GUI server on a different port, using plain HTTP, and * on the same JVM @@ -440,8 +311,6 @@ */ public void startWebGUISynchronous() { - // ctx = new FileSystemXmlApplicationContext( - // CIS.getProperty(CIS.CIS_SPRINGBEANS_PATH)); try { long start = System.currentTimeMillis(); @@ -481,7 +350,7 @@ CIS.setProperty(CIS.CIS_WEBGUI_URL, webUrl); Kernel.getKernel().setProperty(Kernel.WSRF_BASEURL,webUrl); Kernel.getKernel().setProperty(ISecurityProperties.WSRF_SSL, "false"); - Kernel.getKernel().setProperty(ISecurityProperties.WSRF_SSL_CLIENTAUTH, "false"); + Kernel.getKernel().setProperty(ISecurityProperties.WSRF_SSL_CLIENTAUTH, "false"); } private void addShutDownHook() { @@ -524,32 +393,12 @@ if (CIS.getProperty(CIS_WEBGUI_PORT) == null) { cis.startSynchronous(); } else { - cis.startSynchronous(); cis.startWebGUISynchronous(); + cis.startSynchronous(); } } -// private void loadAccessControlProperties() { -// try { -// logger.info("xuudb properties has been added"); -// UAS.getProperties().setProperty( -// ISecurityProperties.UAS_CHECKACCESS, "true"); -// // UAS.getProperties().setProperty(UASSecurityProperties.UAS_AUTHORISER, -// // getProperty(CIS_AUTHORISER_CLASS)); -// UAS.getProperties().setProperty( -// ISecurityProperties.UAS_CHECKACCESS_PDP, -// getProperty(CIS_ACCESSCONTROL_PDP)); -// UAS.getProperties().setProperty( -// ISecurityProperties.UAS_CHECKACCESS_PDPCONFIG, -// getProperty(CIS_ACCESSCONTROL_PDP_CONFIG)); -// } catch (Exception e) { -// CISLogUtil.logException("Error loading access control properties", -// e); -// } -// -// } - /** * Returning single application context * @@ -592,106 +441,13 @@ } } - /** - * add a JMX MBean under the given name - * - * @param mbean - * @param name - */ - public static void addMBean(Object mbean, String name) { - try { - MBeanServer mbs = null; - // Get the platform MBeanServer - mbs = ManagementFactory.getPlatformMBeanServer(); - ObjectName adminName = null; - // Uniquely identify the MBeans and register them with the platform - // MBeanServer - adminName = new ObjectName("CIS:name=" + name); - mbs.registerMBean(mbean, adminName); - } catch (Exception ex) { - logger.error("Error registering mbean.", ex); - } - } - - // add standard security handlers - // these are OK for both WSRF and plain web services - // @SuppressWarnings("unchecked") - // private void addDefaultSecurityHandlers() { - // XFire xfire = XFireFactory.newInstance().getXFire(); - // List s = xfire.getInHandlers(); - // logger.debug("Configuring default security handler chain."); - // UASDSigDecider2 uasDecider = new UASDSigDecider2(true); - // s.add(new DSigParseInHandler(uasDecider)); - // s.add(createAuthInHandler()); - // // null argument means that it is required that body is signed. - // s.add(new DSigSecurityInHandler(null)); - // s.add(new ETDInHandler(new UASSelfCallChecker(), true)); - // // add PlainWSAuthZHandler by default to support access control on - // // non-UAS WSRF services - // // and plain web services - // // s.add(new PlainWSAuthZHandler()); - // - // List out = xfire.getOutHandlers(); - // IAuthenticationConfiguration a = CIS.getSecurityProperties(); - // DSigOutHandler o1 = new DSigOutHandler(a, uasDecider); - // out.add(o1); - // - // } - - // public static ISecurityProperties getSecurityProperties() { - // if (securityProperties == null) { - // securityProperties = new UASSecurityProperties(); - // Kernel.getKernel().setSecurityProperties(securityProperties); - // } - // return securityProperties; - // } - - // public static void setSecurityProperties(ISecurityProperties sec) { - // securityProperties = sec; - // } - - // private AuthInHandler createAuthInHandler() { - // String verifyConsignorP = UAS - // .getProperty(ISecurityProperties.UAS_CHECK_CONSIGNOR_SIGNATURE); - // boolean verifyConsignor = Boolean.parseBoolean(verifyConsignorP); - // X509Certificate gatewayCert = null; - // if (verifyConsignor) { - // // gatewayCert = SecurityManager.getGatewayCert(); - // if (gatewayCert == null) { - // logger.error("Can't retrieve gateway certificate, required" - // + "for gateway assertion verification."); - // } - // } else { - // logger.info("IMPORTANT! Gateway assertions verification is turned OFF." - // + " This is OK only if your UNICORE/X installation is protected " - // + - // "by a firewall, and the only way of accessing it is through the gateway." - // + " If this is not true then you SHOULD turn on the gateway assertion " - // + "verification to prevent unauthorized access."); - // } - // // always use consigner info but verify signature only if configured to - // // do so - // if (!verifyConsignor) - // gatewayCert = null; - // return new AuthInHandler(true, true, false, gatewayCert); - // } - + /** notifying all the observers of this class */ private void notifyInitDone() { for (Observer o : obs) o.update(null, "started"); } - // /** - // * add an observer to be notified when the UAS startup has finished - // * - // * @param o - // * - observer - // */ - // public void addObserver(Observer o) { - // obs.add(o); - // } - /** * sets up a watchdog that checks for changes to the log4j configuration * file, and re-configures log4j if that file has changed Modified: CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceHomeImpl.java =================================================================== --- CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceHomeImpl.java 2011-03-25 11:02:18 UTC (rev 9540) +++ CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceHomeImpl.java 2011-03-25 11:57:50 UTC (rev 9541) @@ -35,18 +35,12 @@ package de.fzj.unicore.cis.impl.registry; -import de.fzj.unicore.uas.impl.UASWSResourceHomeImpl; -import de.fzj.unicore.wsrflite.xmlbeans.impl.WSResourceImpl; +import de.fzj.unicore.wsrflite.Resource; +import de.fzj.unicore.wsrflite.xmlbeans.impl.WSResourceHomeImpl; -public class RegistryServiceHomeImpl extends UASWSResourceHomeImpl { - private RegistryServiceImpl registry = null; - +public class RegistryServiceHomeImpl extends WSResourceHomeImpl { @Override - protected WSResourceImpl doCreateInstance() { -// if (registry == null) { - registry = new RegistryServiceImpl(); -// } - return registry; - + protected Resource doCreateInstance() { + return new RegistryServiceImpl(); } } Modified: CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceImpl.java =================================================================== --- CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceImpl.java 2011-03-25 11:02:18 UTC (rev 9540) +++ CommonInformationService/cis-core/trunk/src/main/java/de/fzj/unicore/cis/impl/registry/RegistryServiceImpl.java 2011-03-25 11:57:50 UTC (rev 9541) @@ -54,6 +54,7 @@ import de.fzj.unicore.cis.rp.CIPListRP; import de.fzj.unicore.cis.rp.ContactRP; import de.fzj.unicore.cis.rp.LocationRP; +import de.fzj.unicore.cis.rp.WebURLRP; import de.fzj.unicore.cis.util.CISLogUtil; import de.fzj.unicore.cisprovider.impl.UrlExtractor; import de.fzj.unicore.uas.impl.UASWSResourceImpl; @@ -83,6 +84,7 @@ import eu.unicore.unicore6.cis.messages.ListAllInformationResponseDocument.ListAllInformationResponse; import eu.unicore.unicore6.cis.messages.QueryResponseDocument.QueryResponse; import eu.unicore.unicore6.cis.messages.RegisterResponseDocument.RegisterResponse; +import eu.unicore.unicore6.cis.model.CISPropertiesDocument; import eu.unicore.unicore6.cis.model.ContactDocument; import eu.unicore.unicore6.cis.model.LocationDocument; import eu.unicore.unicore6.cis.model.CISPropertiesDocument.CISProperties; @@ -111,7 +113,7 @@ throws Exception { super.initialise(serviceName, initParams); - // client = getClient(); +// client = getClient(); client = (Client) initParams.get(INITPARAM_CLIENT); populateProperties(initParams); @@ -132,16 +134,10 @@ properties.put(RPCIPLIST, new CIPListRP(cipDao)); if (CIS.getProperty(CIS.CIS_WEBGUI_PORT) != null) { - properties.put(RPWEBURL, new ResourceProperty<XmlString>(null) { - - @Override - public XmlObject[] getXml() { - WebURLDocument webUrl = WebURLDocument.Factory.newInstance(); - webUrl.setWebURL(CIS.getProperty(CIS.CIS_WEBGUI_URL)); - return new XmlObject[] { webUrl }; - } - - }); + properties + .put(RPWEBURL, + new WebURLRP((String) initParams + .get(INIT_WEB_URL))); } } @@ -232,7 +228,7 @@ @Override public QName getResourcePropertyDocumentQName() { - return CISProperties.type.getDocumentElementName(); + return CISPropertiesDocument.type.getDocumentElementName(); } public ListAllCIPResponseDocument listAllCIP(ListAllCIPRequestDocument req) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |