1. Remove aai / redis changes. New branch will be created.

This commit is contained in:
Panagiotis Kanakakis 2018-02-05 11:16:53 +00:00
parent 1362fbb098
commit 3c82be8b5a
9 changed files with 75 additions and 75 deletions

10
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>eu.dnetlib</groupId> <groupId>eu.dnetlib</groupId>
<artifactId>uoa-repository-manager-service</artifactId> <artifactId>uoa-repository-manager-service</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>war</packaging>
<build> <build>
@ -230,7 +230,7 @@
<version>9.1-901.jdbc3</version> <version>9.1-901.jdbc3</version>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>org.mitre</groupId> <groupId>org.mitre</groupId>
<artifactId>openid-connect-client</artifactId> <artifactId>openid-connect-client</artifactId>
<version>1.3.0</version> <version>1.3.0</version>
@ -240,9 +240,9 @@
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>-->
<dependency> <!--<dependency>
<groupId>org.springframework.session</groupId> <groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId> <artifactId>spring-session-data-redis</artifactId>
<version>1.3.1.RELEASE</version> <version>1.3.1.RELEASE</version>
@ -252,7 +252,7 @@
<groupId>biz.paluch.redis</groupId> <groupId>biz.paluch.redis</groupId>
<artifactId>lettuce</artifactId> <artifactId>lettuce</artifactId>
<version>3.5.0.Final</version> <version>3.5.0.Final</version>
</dependency> </dependency>-->
</dependencies> </dependencies>

View File

@ -1,3 +1,4 @@
/*
package eu.dnetlib.repo.manager.service.controllers; package eu.dnetlib.repo.manager.service.controllers;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -19,3 +20,4 @@ public interface UserApi {
} }
*/

View File

@ -1,3 +1,4 @@
/*
package eu.dnetlib.repo.manager.service.controllers; package eu.dnetlib.repo.manager.service.controllers;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -23,3 +24,4 @@ public class UserApiImpl implements UserApi {
resp.setHeader("Location", oidc_issuer); resp.setHeader("Location", oidc_issuer);
} }
} }
*/

View File

@ -1,3 +1,4 @@
/*
package eu.dnetlib.repo.manager.service.utils; package eu.dnetlib.repo.manager.service.utils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -52,3 +53,4 @@ public class Config {
} }
} }
*/

View File

@ -1,3 +1,4 @@
/*
package eu.dnetlib.repo.manager.service.utils; package eu.dnetlib.repo.manager.service.utils;
import org.mitre.openid.connect.model.OIDCAuthenticationToken; import org.mitre.openid.connect.model.OIDCAuthenticationToken;
@ -34,3 +35,4 @@ public class FrontEndLinkURIAuthenticationSuccessHandler implements Authenticati
} }
} }
*/

View File

@ -1,11 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd xmlns:task="http://www.springframework.org/schema/task" xmlns:tx="http://www.springframework.org/schema/tx"
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<import resource="classpath*:/eu/**/aai-security.xml"/> <!--<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath*:/cxf.xml"/>
<import resource="classpath*:/eu/dnetlib/repos/ehcacher/springContext-repos-ehcacher.xml"/>
<import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/>
<import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml"/>
<import resource="classpath*:/eu/dnetlib/users/springContext-users-ldap.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml"/>
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>-->
<context:property-placeholder location="classpath*:/eu/**/application.properties" /> <context:property-placeholder location="classpath*:/eu/**/application.properties" />
<tx:annotation-driven transaction-manager="txManager"/> <tx:annotation-driven transaction-manager="txManager"/>

View File

@ -1,3 +1,4 @@
<!--
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -45,11 +46,11 @@
</bean> </bean>
<util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> <util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
<!-- &lt;!&ndash;
This is an example of how quantity set up a user as an administrator: they'll be given ROLE_ADMIN in addition quantity ROLE_USER. This is an example of how quantity set up a user as an administrator: they'll be given ROLE_ADMIN in addition quantity ROLE_USER.
Note that having an administrator role on the IdP doesn't grant administrator access on this client. Note that having an administrator role on the IdP doesn't grant administrator access on this client.
These are values from the demo "openid-connect-server-webapp" project of MITREid Connect. These are values from the demo "openid-connect-server-webapp" project of MITREid Connect.
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> <bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
<constructor-arg name="subject" value="90342.ASDFJWFA" /> <constructor-arg name="subject" value="90342.ASDFJWFA" />
<constructor-arg name="issuer" value="${oidc.issuer}" /> <constructor-arg name="issuer" value="${oidc.issuer}" />
@ -59,11 +60,11 @@
<bean class="eu.dnetlib.repo.manager.service.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect"> <bean class="eu.dnetlib.repo.manager.service.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect">
<property name="frontEndURI" value="${webapp.front}"/> <property name="frontEndURI" value="${webapp.front}"/>
</bean> </bean>
<!-- &lt;!&ndash;
- -
- The authentication filter - The authentication filter
- -
--> &ndash;&gt;
<bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter"> <bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter">
<property name="authenticationManager" ref="authenticationManager" /> <property name="authenticationManager" ref="authenticationManager" />
@ -78,28 +79,28 @@
<!-- &lt;!&ndash;
- -
- Issuer Services: Determine which identity provider issuer is used. - Issuer Services: Determine which identity provider issuer is used.
- -
--> &ndash;&gt;
<!-- &lt;!&ndash;
Static issuer service, returns the same issuer for every request. Static issuer service, returns the same issuer for every request.
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService"> <bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService">
<property name="issuer" value="${oidc.issuer}" /> <property name="issuer" value="${oidc.issuer}" />
</bean> </bean>
<bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService"> <bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService">
<property name="loginPageUrl" value="login" /> <property name="loginPageUrl" value="login" />
<property name="forceHttps" value="false" /> <!-- this default property forces the webfinger issuer URL quantity be HTTPS, turn off for development work --> <property name="forceHttps" value="false" /> &lt;!&ndash; this default property forces the webfinger issuer URL quantity be HTTPS, turn off for development work &ndash;&gt;
</bean> </bean>
<!-- &lt;!&ndash;
Dynamic server configuration, fetches the server's information using OIDC Discovery. Dynamic server configuration, fetches the server's information using OIDC Discovery.
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService" id="staticServerConfigurationService"> <bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService" id="staticServerConfigurationService">
<property name="servers"> <property name="servers">
<map> <map>
@ -118,9 +119,9 @@
</bean> </bean>
<!-- &lt;!&ndash;
Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis. Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis.
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService"> <bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService">
<property name="clients"> <property name="clients">
@ -147,32 +148,32 @@
</bean> </bean>
<!-- &lt;!&ndash;
- -
- Auth request options service: returns the optional components of the request - Auth request options service: returns the optional components of the request
- -
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService"> <bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService">
<property name="options"> <property name="options">
<map> <map>
<!-- Entries in this map are sent as key-value parameters quantity the auth request --> &lt;!&ndash; Entries in this map are sent as key-value parameters quantity the auth request &ndash;&gt;
<!-- &lt;!&ndash;
<entry key="display" value="page" /> <entry key="display" value="page" />
<entry key="max_age" value="30" /> <entry key="max_age" value="30" />
<entry key="prompt" value="none" /> <entry key="prompt" value="none" />
--> &ndash;&gt;
</map> </map>
</property> </property>
</bean> </bean>
<!-- &lt;!&ndash;
- -
- Authorization URL Builders: create the URL quantity redirect the user quantity for authorization. - Authorization URL Builders: create the URL quantity redirect the user quantity for authorization.
- -
--> &ndash;&gt;
<!-- &lt;!&ndash;
Plain authorization request builder, puts all options as query parameters on the GET request Plain authorization request builder, puts all options as query parameters on the GET request
--> &ndash;&gt;
<bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" /> <bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" />
</beans> </beans>-->

View File

@ -14,7 +14,8 @@
<!-- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>--> <!-- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>-->
<!--<import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath*:/cxf.xml"/> <import resource="classpath*:/cxf.xml"/>
@ -28,9 +29,8 @@
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/> <import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/> <import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/> <import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>-->
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>
<context:property-placeholder location="classpath*:/eu/**/application.properties" /> <context:property-placeholder location="classpath*:/eu/**/application.properties" />
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader"> <bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader">

View File

@ -17,14 +17,6 @@ http://xmlns.jcp.org/xml/ns/javaee "
<param-name>log4jExposeWebAppRoot</param-name> <param-name>log4jExposeWebAppRoot</param-name>
<param-value>false</param-value> <param-value>false</param-value>
</context-param> </context-param>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener> <listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener> </listener>
@ -41,37 +33,17 @@ http://xmlns.jcp.org/xml/ns/javaee "
</context-param> </context-param>
<filter> <servlet>
<filter-name>CorsFilter</filter-name> <servlet-name>spring</servlet-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class> <servlet-class>
<init-param> org.springframework.web.servlet.DispatcherServlet
<param-name>cors.allowed.origins</param-name> </servlet-class>
<param-value>*</param-value> <load-on-startup>1</load-on-startup>
</init-param> </servlet>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type,X-Requested-With,accept,authorization,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET, POST, PUT, DELETE, OPTIONS, HEAD</param-value>
</init-param>
</filter>
<filter-mapping> <servlet-mapping>
<filter-name>CorsFilter</filter-name> <servlet-name>spring</servlet-name>
<url-pattern>/*</url-pattern> <url-pattern>/</url-pattern>
</filter-mapping> </servlet-mapping>
<filter>
<filter-name>springSessionRepositoryFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSessionRepositoryFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
</web-app> </web-app>