Commit f13f03e0 authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Adding SLCS endpoints to Yadis document.

parent 2b40621f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,4 +43,4 @@ dashboard.service.app.home=/usr/local/tomcat/webapps/esgf-dashboard
# node manager
node.peer.group=esgf-test
# short lived certificate server
esg.security.slcs.endpoint=slcs.ceda.ac.uk
short.lived.certificate.server=my.esgf.node
+6 −1
Original line number Diff line number Diff line
@@ -18,9 +18,14 @@ RUN cd /usr/local/tomcat/webapps/esgf-idp/ && \
    rm esgf-idp.war && \
    chown -R tomcat:tomcat /usr/local/tomcat/webapps/esgf-idp

# Override Tomcat startup to wait for Postgred connection to be ready
# Override Tomcat startup to wait for Postgres connection to be ready
COPY scripts/wait_for_postgres.sh /usr/local/bin/wait_for_postgres.sh
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY scripts/process_esgf_config_archive.sh /usr/local/bin/process_esgf_config_archive.sh
COPY conf/supervisord.tomcat.conf /etc/supervisor/conf.d/supervisord.tomcat.conf

# FIXME: override Yadis configuration file to serve SLCS endpoints
# remove this override when change is entered into ESGF official war file
COPY conf/yadis-config.xml /usr/local/tomcat/webapps/esgf-idp/WEB-INF/classes/esg/idp/config/yadis-config.xml

ENTRYPOINT /usr/local/bin/docker-entrypoint.sh
+40 −0
Original line number Diff line number Diff line
<!-- Spring configuration file for ESGF Yadis discovery service -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd">
                               
    
    <!-- Configurable properties -->
	<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<!-- <property name="location" value="classpath:esg/idp/config/application.properties" /> -->
		<property name="location" value="file:///esg/config/esgf.properties" />
	</bean>
    
    <!-- Yadis -->
 	<context:component-scan base-package="esg.idp.yadis"/>
 	
 	<!-- URL-controller mappings -->
	<bean id="openidYadisMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="order" value="1" />
		<property name="mappings">
			<props>				
				<prop key="*">yadisController</prop>
			</props>
		</property>
	</bean>
	
	<!-- additional endpoints discovered by Yadis service -->
	<util:map id="yadisEndpoints">
        <entry key="http://specs.openid.net/auth/2.0/server" value="${idp.service.endpoint}"/>
        <entry key="urn:esg:security:oauth:endpoint:authorize" value="https://${short.lived.certificate.server}/esgf-slcs/oauth/authorize"/>
        <entry key="urn:esg:security:oauth:endpoint:access" value="https://${short.lived.certificate.server}/esgf-slcs/oauth/access_token"/>
        <entry key="urn:esg:security:oauth:endpoint:resource" value="https://${short.lived.certificate.server}/esgf-slcs/oauth/certificate"/>
    	<entry key="urn:esg:security:myproxy-service" value="socket://${myproxy.endpoint}:${myproxy.port}"/>
    	<entry key="urn:esg:security:attribute-service" value="${idp.security.attribute.service.endpoint}"/>
	</util:map>

</beans>