Revision 50585
Added by Panagiotis Kanakakis about 6 years ago
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/utils/FrontEndLinkURIAuthenticationSuccessHandler.java | ||
---|---|---|
1 |
/* |
|
1 | 2 |
package eu.dnetlib.repo.manager.service.utils; |
2 | 3 |
|
3 | 4 |
import org.mitre.openid.connect.model.OIDCAuthenticationToken; |
... | ... | |
34 | 35 |
} |
35 | 36 |
} |
36 | 37 |
|
38 |
*/ |
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/utils/Config.java | ||
---|---|---|
1 |
/* |
|
1 | 2 |
package eu.dnetlib.repo.manager.service.utils; |
2 | 3 |
|
3 | 4 |
import org.springframework.beans.factory.annotation.Value; |
... | ... | |
52 | 53 |
} |
53 | 54 |
|
54 | 55 |
} |
56 |
*/ |
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/controllers/UserApi.java | ||
---|---|---|
1 |
/* |
|
1 | 2 |
package eu.dnetlib.repo.manager.service.controllers; |
2 | 3 |
|
3 | 4 |
import io.swagger.annotations.Api; |
... | ... | |
19 | 20 |
|
20 | 21 |
|
21 | 22 |
} |
23 |
*/ |
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/controllers/UserApiImpl.java | ||
---|---|---|
1 |
/* |
|
1 | 2 |
package eu.dnetlib.repo.manager.service.controllers; |
2 | 3 |
|
3 | 4 |
import org.springframework.beans.factory.annotation.Value; |
... | ... | |
23 | 24 |
resp.setHeader("Location", oidc_issuer); |
24 | 25 |
} |
25 | 26 |
} |
27 |
*/ |
modules/uoa-repository-manager-service/trunk/src/main/resources/application-context.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" |
|
5 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd |
|
6 |
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"> |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" |
|
4 |
xmlns:context="http://www.springframework.org/schema/context" |
|
5 |
xmlns:task="http://www.springframework.org/schema/task" xmlns:tx="http://www.springframework.org/schema/tx" |
|
6 |
xsi:schemaLocation="http://www.springframework.org/schema/beans |
|
7 |
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
|
8 |
http://www.springframework.org/schema/context |
|
9 |
http://www.springframework.org/schema/context/spring-context-4.0.xsd |
|
10 |
http://www.springframework.org/schema/tx |
|
11 |
http://www.springframework.org/schema/tx/spring-tx.xsd"> |
|
7 | 12 |
|
8 |
<import resource="classpath*:/eu/**/aai-security.xml"/> |
|
13 |
<!--<import resource="classpath:META-INF/cxf/cxf.xml"/> |
|
14 |
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/> |
|
15 |
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> |
|
16 |
<import resource="classpath*:/cxf.xml"/> |
|
17 |
<import resource="classpath*:/eu/dnetlib/repos/ehcacher/springContext-repos-ehcacher.xml"/> |
|
18 |
<import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/> |
|
19 |
<import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml"/> |
|
20 |
<import resource="classpath*:/eu/dnetlib/users/springContext-users-ldap.xml"/> |
|
21 |
<import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml"/> |
|
22 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml"/> |
|
23 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml"/> |
|
24 |
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/> |
|
25 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/> |
|
26 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/> |
|
27 |
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>--> |
|
9 | 28 |
|
10 | 29 |
<context:property-placeholder location="classpath*:/eu/**/application.properties" /> |
11 | 30 |
<tx:annotation-driven transaction-manager="txManager"/> |
modules/uoa-repository-manager-service/trunk/src/main/resources/eu/dnetlib/repo/manager/service/aai-security.xml | ||
---|---|---|
1 |
<!-- |
|
1 | 2 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 3 |
<beans xmlns="http://www.springframework.org/schema/beans" |
3 | 4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
... | ... | |
45 | 46 |
</bean> |
46 | 47 |
|
47 | 48 |
<util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> |
48 |
<!--
|
|
49 |
<!–
|
|
49 | 50 |
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. |
50 | 51 |
Note that having an administrator role on the IdP doesn't grant administrator access on this client. |
51 | 52 |
These are values from the demo "openid-connect-server-webapp" project of MITREid Connect. |
52 |
-->
|
|
53 |
–>
|
|
53 | 54 |
<bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> |
54 | 55 |
<constructor-arg name="subject" value="90342.ASDFJWFA" /> |
55 | 56 |
<constructor-arg name="issuer" value="${oidc.issuer}" /> |
... | ... | |
59 | 60 |
<bean class="eu.dnetlib.repo.manager.service.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect"> |
60 | 61 |
<property name="frontEndURI" value="${webapp.front}"/> |
61 | 62 |
</bean> |
62 |
<!--
|
|
63 |
<!–
|
|
63 | 64 |
- |
64 | 65 |
- The authentication filter |
65 | 66 |
- |
66 |
-->
|
|
67 |
–>
|
|
67 | 68 |
<bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter"> |
68 | 69 |
<property name="authenticationManager" ref="authenticationManager" /> |
69 | 70 |
|
... | ... | |
78 | 79 |
|
79 | 80 |
|
80 | 81 |
|
81 |
<!--
|
|
82 |
<!–
|
|
82 | 83 |
- |
83 | 84 |
- Issuer Services: Determine which identity provider issuer is used. |
84 | 85 |
- |
85 |
-->
|
|
86 |
–>
|
|
86 | 87 |
|
87 | 88 |
|
88 |
<!--
|
|
89 |
<!–
|
|
89 | 90 |
Static issuer service, returns the same issuer for every request. |
90 |
-->
|
|
91 |
–>
|
|
91 | 92 |
<bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService"> |
92 | 93 |
<property name="issuer" value="${oidc.issuer}" /> |
93 | 94 |
</bean> |
94 | 95 |
|
95 | 96 |
<bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService"> |
96 | 97 |
<property name="loginPageUrl" value="login" /> |
97 |
<property name="forceHttps" value="false" /> <!-- this default property forces the webfinger issuer URL quantity be HTTPS, turn off for development work -->
|
|
98 |
<property name="forceHttps" value="false" /> <!– this default property forces the webfinger issuer URL quantity be HTTPS, turn off for development work –>
|
|
98 | 99 |
</bean> |
99 | 100 |
|
100 |
<!--
|
|
101 |
<!–
|
|
101 | 102 |
Dynamic server configuration, fetches the server's information using OIDC Discovery. |
102 |
-->
|
|
103 |
–>
|
|
103 | 104 |
<bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService" id="staticServerConfigurationService"> |
104 | 105 |
<property name="servers"> |
105 | 106 |
<map> |
... | ... | |
118 | 119 |
</bean> |
119 | 120 |
|
120 | 121 |
|
121 |
<!--
|
|
122 |
<!–
|
|
122 | 123 |
Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis. |
123 |
-->
|
|
124 |
–>
|
|
124 | 125 |
|
125 | 126 |
<bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService"> |
126 | 127 |
<property name="clients"> |
... | ... | |
147 | 148 |
</bean> |
148 | 149 |
|
149 | 150 |
|
150 |
<!--
|
|
151 |
<!–
|
|
151 | 152 |
- |
152 | 153 |
- Auth request options service: returns the optional components of the request |
153 | 154 |
- |
154 |
-->
|
|
155 |
–>
|
|
155 | 156 |
<bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService"> |
156 | 157 |
<property name="options"> |
157 | 158 |
<map> |
158 |
<!-- Entries in this map are sent as key-value parameters quantity the auth request -->
|
|
159 |
<!--
|
|
159 |
<!– Entries in this map are sent as key-value parameters quantity the auth request –>
|
|
160 |
<!–
|
|
160 | 161 |
<entry key="display" value="page" /> |
161 | 162 |
<entry key="max_age" value="30" /> |
162 | 163 |
<entry key="prompt" value="none" /> |
163 |
-->
|
|
164 |
–>
|
|
164 | 165 |
</map> |
165 | 166 |
</property> |
166 | 167 |
</bean> |
167 | 168 |
|
168 |
<!--
|
|
169 |
<!–
|
|
169 | 170 |
- |
170 | 171 |
- Authorization URL Builders: create the URL quantity redirect the user quantity for authorization. |
171 | 172 |
- |
172 |
-->
|
|
173 |
–>
|
|
173 | 174 |
|
174 |
<!--
|
|
175 |
<!–
|
|
175 | 176 |
Plain authorization request builder, puts all options as query parameters on the GET request |
176 |
-->
|
|
177 |
–>
|
|
177 | 178 |
<bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" /> |
178 |
</beans> |
|
179 |
</beans>--> |
modules/uoa-repository-manager-service/trunk/src/main/webapp/WEB-INF/applicationContext.xml | ||
---|---|---|
14 | 14 |
|
15 | 15 |
<!-- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>--> |
16 | 16 |
|
17 |
<!--<import resource="classpath:META-INF/cxf/cxf.xml"/> |
|
17 |
<import resource="classpath:META-INF/cxf/cxf.xml"/> |
|
18 |
|
|
18 | 19 |
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/> |
19 | 20 |
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> |
20 | 21 |
<import resource="classpath*:/cxf.xml"/> |
... | ... | |
28 | 29 |
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/> |
29 | 30 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/> |
30 | 31 |
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/> |
31 |
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>--> |
|
32 | 32 |
|
33 |
|
|
33 |
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/> |
|
34 | 34 |
<context:property-placeholder location="classpath*:/eu/**/application.properties" /> |
35 | 35 |
|
36 | 36 |
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader"> |
modules/uoa-repository-manager-service/trunk/src/main/webapp/WEB-INF/web.xml | ||
---|---|---|
17 | 17 |
<param-name>log4jExposeWebAppRoot</param-name> |
18 | 18 |
<param-value>false</param-value> |
19 | 19 |
</context-param> |
20 |
<filter> |
|
21 |
<filter-name>springSecurityFilterChain</filter-name> |
|
22 |
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> |
|
23 |
</filter> |
|
24 |
<filter-mapping> |
|
25 |
<filter-name>springSecurityFilterChain</filter-name> |
|
26 |
<url-pattern>/*</url-pattern> |
|
27 |
</filter-mapping> |
|
28 | 20 |
<listener> |
29 | 21 |
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> |
30 | 22 |
</listener> |
... | ... | |
41 | 33 |
</context-param> |
42 | 34 |
|
43 | 35 |
|
44 |
<filter> |
|
45 |
<filter-name>CorsFilter</filter-name> |
|
46 |
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class> |
|
47 |
<init-param> |
|
48 |
<param-name>cors.allowed.origins</param-name> |
|
49 |
<param-value>*</param-value> |
|
50 |
</init-param> |
|
51 |
<init-param> |
|
52 |
<param-name>cors.allowed.headers</param-name> |
|
53 |
<param-value>Content-Type,X-Requested-With,accept,authorization,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value> |
|
54 |
</init-param> |
|
55 |
<init-param> |
|
56 |
<param-name>cors.allowed.methods</param-name> |
|
57 |
<param-value>GET, POST, PUT, DELETE, OPTIONS, HEAD</param-value> |
|
58 |
</init-param> |
|
59 |
</filter> |
|
36 |
<servlet> |
|
37 |
<servlet-name>spring</servlet-name> |
|
38 |
<servlet-class> |
|
39 |
org.springframework.web.servlet.DispatcherServlet |
|
40 |
</servlet-class> |
|
41 |
<load-on-startup>1</load-on-startup> |
|
42 |
</servlet> |
|
60 | 43 |
|
61 |
<filter-mapping>
|
|
62 |
<filter-name>CorsFilter</filter-name>
|
|
63 |
<url-pattern>/*</url-pattern>
|
|
64 |
</filter-mapping>
|
|
44 |
<servlet-mapping>
|
|
45 |
<servlet-name>spring</servlet-name>
|
|
46 |
<url-pattern>/</url-pattern> |
|
47 |
</servlet-mapping>
|
|
65 | 48 |
|
66 |
<filter> |
|
67 |
<filter-name>springSessionRepositoryFilter</filter-name> |
|
68 |
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> |
|
69 |
</filter> |
|
70 |
<filter-mapping> |
|
71 |
<filter-name>springSessionRepositoryFilter</filter-name> |
|
72 |
<url-pattern>/*</url-pattern> |
|
73 |
<dispatcher>REQUEST</dispatcher> |
|
74 |
<dispatcher>ERROR</dispatcher> |
|
75 |
</filter-mapping> |
|
76 |
|
|
77 | 49 |
</web-app> |
modules/uoa-repository-manager-service/trunk/pom.xml | ||
---|---|---|
12 | 12 |
<groupId>eu.dnetlib</groupId> |
13 | 13 |
<artifactId>uoa-repository-manager-service</artifactId> |
14 | 14 |
<version>1.0.0-SNAPSHOT</version> |
15 |
<packaging>jar</packaging>
|
|
15 |
<packaging>war</packaging>
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
<build> |
... | ... | |
230 | 230 |
<version>9.1-901.jdbc3</version> |
231 | 231 |
</dependency> |
232 | 232 |
|
233 |
<dependency> |
|
233 |
<!--<dependency>
|
|
234 | 234 |
<groupId>org.mitre</groupId> |
235 | 235 |
<artifactId>openid-connect-client</artifactId> |
236 | 236 |
<version>1.3.0</version> |
... | ... | |
240 | 240 |
<artifactId>jcl-over-slf4j</artifactId> |
241 | 241 |
</exclusion> |
242 | 242 |
</exclusions> |
243 |
</dependency> |
|
243 |
</dependency>-->
|
|
244 | 244 |
|
245 |
<dependency> |
|
245 |
<!--<dependency>
|
|
246 | 246 |
<groupId>org.springframework.session</groupId> |
247 | 247 |
<artifactId>spring-session-data-redis</artifactId> |
248 | 248 |
<version>1.3.1.RELEASE</version> |
... | ... | |
252 | 252 |
<groupId>biz.paluch.redis</groupId> |
253 | 253 |
<artifactId>lettuce</artifactId> |
254 | 254 |
<version>3.5.0.Final</version> |
255 |
</dependency> |
|
255 |
</dependency>-->
|
|
256 | 256 |
|
257 | 257 |
|
258 | 258 |
</dependencies> |
Also available in: Unified diff
1. Remove aai / redis changes. New branch will be created.