/
CasConfigurationProperties.java
382 lines (327 loc) · 12.7 KB
/
CasConfigurationProperties.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
package org.apereo.cas.configuration;
import org.apereo.cas.configuration.model.core.CasJavaClientProperties;
import org.apereo.cas.configuration.model.core.CasServerHostProperties;
import org.apereo.cas.configuration.model.core.CasServerProperties;
import org.apereo.cas.configuration.model.core.audit.AuditProperties;
import org.apereo.cas.configuration.model.core.authentication.AuthenticationProperties;
import org.apereo.cas.configuration.model.core.authentication.HttpClientProperties;
import org.apereo.cas.configuration.model.core.authentication.PersonDirectoryPrincipalResolverProperties;
import org.apereo.cas.configuration.model.core.config.cloud.SpringCloudConfigurationProperties;
import org.apereo.cas.configuration.model.core.config.standalone.StandaloneConfigurationProperties;
import org.apereo.cas.configuration.model.core.events.EventsProperties;
import org.apereo.cas.configuration.model.core.logging.LoggingProperties;
import org.apereo.cas.configuration.model.core.logout.LogoutProperties;
import org.apereo.cas.configuration.model.core.monitor.MonitorProperties;
import org.apereo.cas.configuration.model.core.rest.RestProperties;
import org.apereo.cas.configuration.model.core.services.ServiceRegistryProperties;
import org.apereo.cas.configuration.model.core.slo.SingleLogOutProperties;
import org.apereo.cas.configuration.model.core.sso.SingleSignOnProperties;
import org.apereo.cas.configuration.model.core.util.TicketProperties;
import org.apereo.cas.configuration.model.core.web.LocaleProperties;
import org.apereo.cas.configuration.model.core.web.MessageBundleProperties;
import org.apereo.cas.configuration.model.core.web.flow.WebflowProperties;
import org.apereo.cas.configuration.model.core.web.security.HttpRequestProperties;
import org.apereo.cas.configuration.model.core.web.view.ViewProperties;
import org.apereo.cas.configuration.model.support.acme.AcmeProperties;
import org.apereo.cas.configuration.model.support.analytics.GoogleAnalyticsProperties;
import org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyProperties;
import org.apereo.cas.configuration.model.support.aws.AmazonSecurityTokenServiceProperties;
import org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties;
import org.apereo.cas.configuration.model.support.clearpass.ClearpassProperties;
import org.apereo.cas.configuration.model.support.consent.ConsentProperties;
import org.apereo.cas.configuration.model.support.cookie.TicketGrantingCookieProperties;
import org.apereo.cas.configuration.model.support.cookie.WarningCookieProperties;
import org.apereo.cas.configuration.model.support.custom.CasCustomProperties;
import org.apereo.cas.configuration.model.support.firebase.GoogleFirebaseCloudMessagingProperties;
import org.apereo.cas.configuration.model.support.geo.googlemaps.GoogleMapsProperties;
import org.apereo.cas.configuration.model.support.geo.maxmind.MaxmindProperties;
import org.apereo.cas.configuration.model.support.interrupt.InterruptProperties;
import org.apereo.cas.configuration.model.support.jpa.DatabaseProperties;
import org.apereo.cas.configuration.model.support.replication.SessionReplicationProperties;
import org.apereo.cas.configuration.model.support.saml.SamlCoreProperties;
import org.apereo.cas.configuration.model.support.saml.googleapps.GoogleAppsProperties;
import org.apereo.cas.configuration.model.support.saml.mdui.SamlMetadataUIProperties;
import org.apereo.cas.configuration.model.support.saml.sps.SamlServiceProviderProperties;
import org.apereo.cas.configuration.model.support.scim.ScimProperties;
import org.apereo.cas.configuration.model.support.sms.SmsProvidersProperties;
import org.apereo.cas.configuration.model.support.themes.ThemeProperties;
import com.fasterxml.jackson.annotation.JsonFilter;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import java.io.Serializable;
import java.time.Clock;
import java.time.Instant;
/**
* This is {@link CasConfigurationProperties}.
*
* @author Misagh Moayyed
* @since 5.0.0
*/
@ConfigurationProperties(value = "cas")
@Getter
@Setter
@Accessors(chain = true)
@JsonFilter("CasConfigurationProperties")
public class CasConfigurationProperties implements Serializable {
/**
* Prefix used for all CAS-specific settings.
*/
public static final String PREFIX = "cas";
private static final long serialVersionUID = -8620267783496071683L;
/**
* Timestamp that indicates the initialization time.
*/
private long initializationTime = Instant.now(Clock.systemUTC()).toEpochMilli();
/**
* Logging functionality.
*/
@NestedConfigurationProperty
private LoggingProperties logging = new LoggingProperties();
/**
* Interrupt/notification functionality.
*/
@NestedConfigurationProperty
private InterruptProperties interrupt = new InterruptProperties();
/**
* Attribute consent functionality.
*/
@NestedConfigurationProperty
private ConsentProperties consent = new ConsentProperties();
/**
* ACME functionality.
*/
@NestedConfigurationProperty
private AcmeProperties acme = new AcmeProperties();
/**
* SCIM functionality.
*/
@NestedConfigurationProperty
private ScimProperties scim = new ScimProperties();
/**
* General settings for authentication.
*/
@NestedConfigurationProperty
private AuthenticationProperties authn = new AuthenticationProperties();
/**
* Authentication audit functionality.
*/
@NestedConfigurationProperty
private AuditProperties audit = new AuditProperties();
/**
* Http client and outgoing connections settings.
*/
@NestedConfigurationProperty
private HttpClientProperties httpClient = new HttpClientProperties();
/**
* Person directory and principal resolution functionality.
*/
@NestedConfigurationProperty
private PersonDirectoryPrincipalResolverProperties personDirectory = new PersonDirectoryPrincipalResolverProperties();
/**
* Authentication events functionality.
*/
@NestedConfigurationProperty
private EventsProperties events = new EventsProperties();
/**
* Monitoring functionality.
*/
@NestedConfigurationProperty
private MonitorProperties monitor = new MonitorProperties();
/**
* Settings that define this CAS host.
*/
@NestedConfigurationProperty
private CasServerHostProperties host = new CasServerHostProperties();
/**
* Logout functionality.
*/
@NestedConfigurationProperty
private LogoutProperties logout = new LogoutProperties();
/**
* REST API functionality.
*/
@NestedConfigurationProperty
private RestProperties rest = new RestProperties();
/**
* Settings that define this CAS server instance.
*/
@NestedConfigurationProperty
private CasServerProperties server = new CasServerProperties();
/**
* Settings that configure the Java CAS client instance used internally for validation ops, etc.
*/
@NestedConfigurationProperty
private CasJavaClientProperties client = new CasJavaClientProperties();
/**
* Service registry functionality.
*/
@NestedConfigurationProperty
private ServiceRegistryProperties serviceRegistry = new ServiceRegistryProperties();
/**
* SLO functionality.
*/
@NestedConfigurationProperty
private SingleLogOutProperties slo = new SingleLogOutProperties();
/**
* SSO functionality.
*/
@NestedConfigurationProperty
private SingleSignOnProperties sso = new SingleSignOnProperties();
/**
* Ticketing functionality.
*/
@NestedConfigurationProperty
private TicketProperties ticket = new TicketProperties();
/**
* Message bundles and internationalization functionality.
*/
@NestedConfigurationProperty
private MessageBundleProperties messageBundle = new MessageBundleProperties();
/**
* Settings that control filtering of the incoming http requests.
*/
@NestedConfigurationProperty
private HttpRequestProperties httpWebRequest = new HttpRequestProperties();
/**
* Views and UI functionality.
*/
@NestedConfigurationProperty
private ViewProperties view = new ViewProperties();
/**
* Google Analytics functionality.
*/
@NestedConfigurationProperty
private GoogleAnalyticsProperties googleAnalytics = new GoogleAnalyticsProperties();
/**
* Google Firebase Cloud Messaging functionality.
*/
@NestedConfigurationProperty
private GoogleFirebaseCloudMessagingProperties googleFirebaseMessaging = new GoogleFirebaseCloudMessagingProperties();
/**
* Google reCAPTCHA settings.
*/
@NestedConfigurationProperty
private GoogleRecaptchaProperties googleRecaptcha = new GoogleRecaptchaProperties();
/**
* SMS and Text messaging settings.
*/
@NestedConfigurationProperty
private SmsProvidersProperties smsProvider = new SmsProvidersProperties();
/**
* AUP settings.
*/
@NestedConfigurationProperty
private AcceptableUsagePolicyProperties acceptableUsagePolicy = new AcceptableUsagePolicyProperties();
/**
* Clearpass settings.
*/
@NestedConfigurationProperty
private ClearpassProperties clearpass = new ClearpassProperties();
/**
* Ticket-granting cookie settings.
*/
@NestedConfigurationProperty
private TicketGrantingCookieProperties tgc = new TicketGrantingCookieProperties();
/**
* Warning cookie settings.
*/
@NestedConfigurationProperty
private WarningCookieProperties warningCookie = new WarningCookieProperties();
/**
* SAML SP integration settings.
*/
@NestedConfigurationProperty
private SamlServiceProviderProperties samlSp = new SamlServiceProviderProperties();
/**
* MaxMind settings.
*/
@NestedConfigurationProperty
private MaxmindProperties maxmind = new MaxmindProperties();
/**
* Google Maps settings.
*/
@NestedConfigurationProperty
private GoogleMapsProperties googleMaps = new GoogleMapsProperties();
/**
* General database and hibernate settings.
*/
@NestedConfigurationProperty
private DatabaseProperties jdbc = new DatabaseProperties();
/**
* Google Apps integration settings.
*/
@NestedConfigurationProperty
private GoogleAppsProperties googleApps = new GoogleAppsProperties();
/**
* Integration settings for amazon sts.
*/
@NestedConfigurationProperty
private AmazonSecurityTokenServiceProperties amazonSts = new AmazonSecurityTokenServiceProperties();
/**
* SAML Metadata UI settings and parsing.
*/
@NestedConfigurationProperty
private SamlMetadataUIProperties samlMetadataUi = new SamlMetadataUIProperties();
/**
* SAML Core functionality and settings.
*/
@NestedConfigurationProperty
private SamlCoreProperties samlCore = new SamlCoreProperties();
/**
* UI and theme settings.
*/
@NestedConfigurationProperty
private ThemeProperties theme = new ThemeProperties();
/**
* Locale and internationalization settings.
*/
@NestedConfigurationProperty
private LocaleProperties locale = new LocaleProperties();
/**
* Spring Webflow functionality.
*/
@NestedConfigurationProperty
private WebflowProperties webflow = new WebflowProperties();
/**
* Custom properties.
*/
@NestedConfigurationProperty
private CasCustomProperties custom = new CasCustomProperties();
/**
* Standalone configuration settings.
*/
@NestedConfigurationProperty
private StandaloneConfigurationProperties standalone = new StandaloneConfigurationProperties();
/**
* Spring cloud configuration settings.
*/
@NestedConfigurationProperty
private SpringCloudConfigurationProperties spring = new SpringCloudConfigurationProperties();
/**
* Session replication properties.
*/
@NestedConfigurationProperty
private SessionReplicationProperties sessionReplication = new SessionReplicationProperties();
/**
* Hold configuration settings in a parent
* field mainly used for serialization.
*
* @return the serializable
*/
public Serializable withHolder() {
return new Holder(this);
}
@RequiredArgsConstructor
@Getter
private static class Holder implements Serializable {
private static final long serialVersionUID = -3129941286238115568L;
/**
* Reference to configuration settings.
*/
private final CasConfigurationProperties cas;
}
}