1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.auth;
20
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.Map;
24 import org.apache.syncope.common.lib.to.AuthModuleTO;
25 import org.apache.syncope.common.lib.types.SAML2BindingType;
26
27 public class SAML2IdPAuthModuleConf extends Pac4jAuthModuleConf implements AuthModuleConf {
28
29 private static final long serialVersionUID = -471527731042579422L;
30
31
32
33
34
35
36 protected String userIdAttribute;
37
38
39
40
41
42 protected SAML2BindingType destinationBinding = SAML2BindingType.REDIRECT;
43
44
45
46
47 protected String keystorePassword;
48
49
50
51
52 protected String protectedKeyPassword;
53
54
55
56
57 protected String identityProviderMetadataPath;
58
59
60
61
62
63
64 protected String nameIdPolicyAllowCreate = "undefined";
65
66
67
68
69
70
71
72 protected String maximumAuthenticationLifetime = "PT3600S";
73
74
75
76
77
78
79 protected String acceptedSkew = "PT300S";
80
81
82
83
84 protected String serviceProviderEntityId;
85
86
87
88
89 protected boolean forceAuth;
90
91
92
93
94 protected boolean passive;
95
96
97
98
99 protected final List<String> authnContextClassRefs = new ArrayList<>(0);
100
101
102
103
104
105
106
107
108
109 protected String authnContextComparisonType = "exact";
110
111
112
113
114 protected String keystoreAlias;
115
116
117
118
119 protected String nameIdPolicyFormat;
120
121
122
123
124 protected boolean wantsAssertionsSigned;
125
126
127
128
129
130
131
132
133 protected int attributeConsumingServiceIndex;
134
135
136
137
138
139 protected int assertionConsumerServiceIndex = -1;
140
141
142
143
144
145 protected boolean useNameQualifier = true;
146
147
148
149
150 protected boolean signServiceProviderMetadata;
151
152
153
154
155 protected boolean signAuthnRequest;
156
157
158
159
160 protected boolean signServiceProviderLogoutRequest;
161
162
163
164
165 protected final List<String> blockedSignatureSigningAlgorithms = new ArrayList<>(0);
166
167
168
169
170 protected final List<String> signatureAlgorithms = new ArrayList<>(0);
171
172
173
174
175 protected final List<String> signatureReferenceDigestMethods = new ArrayList<>(0);
176
177
178
179
180 protected String signatureCanonicalizationAlgorithm;
181
182
183
184
185
186
187 protected String providerName;
188
189 public String getUserIdAttribute() {
190 return userIdAttribute;
191 }
192
193 public void setUserIdAttribute(final String userIdAttribute) {
194 this.userIdAttribute = userIdAttribute;
195 }
196
197 public SAML2BindingType getDestinationBinding() {
198 return destinationBinding;
199 }
200
201 public void setDestinationBinding(final SAML2BindingType destinationBinding) {
202 this.destinationBinding = destinationBinding;
203 }
204
205 public String getKeystorePassword() {
206 return keystorePassword;
207 }
208
209 public void setKeystorePassword(final String keystorePassword) {
210 this.keystorePassword = keystorePassword;
211 }
212
213 public String getPrivateKeyPassword() {
214 return protectedKeyPassword;
215 }
216
217 public void setPrivateKeyPassword(final String protectedKeyPassword) {
218 this.protectedKeyPassword = protectedKeyPassword;
219 }
220
221 public String getIdentityProviderMetadataPath() {
222 return identityProviderMetadataPath;
223 }
224
225 public void setIdentityProviderMetadataPath(final String identityProviderMetadataPath) {
226 this.identityProviderMetadataPath = identityProviderMetadataPath;
227 }
228
229 public String getMaximumAuthenticationLifetime() {
230 return maximumAuthenticationLifetime;
231 }
232
233 public void setMaximumAuthenticationLifetime(final String maximumAuthenticationLifetime) {
234 this.maximumAuthenticationLifetime = maximumAuthenticationLifetime;
235 }
236
237 public String getAcceptedSkew() {
238 return acceptedSkew;
239 }
240
241 public void setAcceptedSkew(final String acceptedSkew) {
242 this.acceptedSkew = acceptedSkew;
243 }
244
245 public String getServiceProviderEntityId() {
246 return serviceProviderEntityId;
247 }
248
249 public void setServiceProviderEntityId(final String serviceProviderEntityId) {
250 this.serviceProviderEntityId = serviceProviderEntityId;
251 }
252
253 public boolean isForceAuth() {
254 return forceAuth;
255 }
256
257 public void setForceAuth(final boolean forceAuth) {
258 this.forceAuth = forceAuth;
259 }
260
261 public boolean isPassive() {
262 return passive;
263 }
264
265 public void setPassive(final boolean passive) {
266 this.passive = passive;
267 }
268
269 public String getNameIdPolicyAllowCreate() {
270 return nameIdPolicyAllowCreate;
271 }
272
273 public void setNameIdPolicyAllowCreate(final String nameIdPolicyAllowCreate) {
274 this.nameIdPolicyAllowCreate = nameIdPolicyAllowCreate;
275 }
276
277 public List<String> getAuthnContextClassRefs() {
278 return authnContextClassRefs;
279 }
280
281 public String getAuthnContextComparisonType() {
282 return authnContextComparisonType;
283 }
284
285 public void setAuthnContextComparisonType(final String authnContextComparisonType) {
286 this.authnContextComparisonType = authnContextComparisonType;
287 }
288
289 public String getKeystoreAlias() {
290 return keystoreAlias;
291 }
292
293 public void setKeystoreAlias(final String keystoreAlias) {
294 this.keystoreAlias = keystoreAlias;
295 }
296
297 public String getNameIdPolicyFormat() {
298 return nameIdPolicyFormat;
299 }
300
301 public void setNameIdPolicyFormat(final String nameIdPolicyFormat) {
302 this.nameIdPolicyFormat = nameIdPolicyFormat;
303 }
304
305 public boolean isWantsAssertionsSigned() {
306 return wantsAssertionsSigned;
307 }
308
309 public void setWantsAssertionsSigned(final boolean wantsAssertionsSigned) {
310 this.wantsAssertionsSigned = wantsAssertionsSigned;
311 }
312
313 public int getAttributeConsumingServiceIndex() {
314 return attributeConsumingServiceIndex;
315 }
316
317 public void setAttributeConsumingServiceIndex(final int attributeConsumingServiceIndex) {
318 this.attributeConsumingServiceIndex = attributeConsumingServiceIndex;
319 }
320
321 public int getAssertionConsumerServiceIndex() {
322 return assertionConsumerServiceIndex;
323 }
324
325 public void setAssertionConsumerServiceIndex(final int assertionConsumerServiceIndex) {
326 this.assertionConsumerServiceIndex = assertionConsumerServiceIndex;
327 }
328
329 public boolean isUseNameQualifier() {
330 return useNameQualifier;
331 }
332
333 public void setUseNameQualifier(final boolean useNameQualifier) {
334 this.useNameQualifier = useNameQualifier;
335 }
336
337 public boolean isSignServiceProviderMetadata() {
338 return signServiceProviderMetadata;
339 }
340
341 public void setSignServiceProviderMetadata(final boolean signServiceProviderMetadata) {
342 this.signServiceProviderMetadata = signServiceProviderMetadata;
343 }
344
345 public boolean isSignAuthnRequest() {
346 return signAuthnRequest;
347 }
348
349 public void setSignAuthnRequest(final boolean signAuthnRequest) {
350 this.signAuthnRequest = signAuthnRequest;
351 }
352
353 public boolean isSignServiceProviderLogoutRequest() {
354 return signServiceProviderLogoutRequest;
355 }
356
357 public void setSignServiceProviderLogoutRequest(final boolean signServiceProviderLogoutRequest) {
358 this.signServiceProviderLogoutRequest = signServiceProviderLogoutRequest;
359 }
360
361 public List<String> getBlockedSignatureSigningAlgorithms() {
362 return blockedSignatureSigningAlgorithms;
363 }
364
365 public List<String> getSignatureAlgorithms() {
366 return signatureAlgorithms;
367 }
368
369 public List<String> getSignatureReferenceDigestMethods() {
370 return signatureReferenceDigestMethods;
371 }
372
373 public String getSignatureCanonicalizationAlgorithm() {
374 return signatureCanonicalizationAlgorithm;
375 }
376
377 public void setSignatureCanonicalizationAlgorithm(final String signatureCanonicalizationAlgorithm) {
378 this.signatureCanonicalizationAlgorithm = signatureCanonicalizationAlgorithm;
379 }
380
381 public String getProviderName() {
382 return providerName;
383 }
384
385 public void setProviderName(final String providerName) {
386 this.providerName = providerName;
387 }
388
389 @Override
390 public Map<String, Object> map(final AuthModuleTO authModule, final Mapper mapper) {
391 return mapper.map(authModule, this);
392 }
393 }