/
MapperParser.java
392 lines (351 loc) · 23.9 KB
/
MapperParser.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
383
384
385
386
387
388
389
390
391
392
/*
* JBoss, Home of Professional Open Source.
* Copyright 2015 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wildfly.extension.elytron;
import static org.jboss.as.controller.PersistentResourceXMLDescription.decorator;
import static org.jboss.as.controller.parsing.ParseUtils.requireAttributes;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_EVIDENCE_DECODER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_PERMISSION_MAPPER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_PRINCIPAL_DECODER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_PRINCIPAL_TRANSFORMER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_REALM_MAPPER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_ROLE_DECODER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.CUSTOM_ROLE_MAPPER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.EVIDENCE_DECODER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.FROM;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.PRINCIPAL_DECODER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.PRINCIPAL_TRANSFORMER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.REALM_MAPPING;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.ROLE_MAPPER;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.ROLE_MAPPING;
import static org.wildfly.extension.elytron.ElytronDescriptionConstants.TO;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.jboss.as.controller.AttributeDefinition;
import org.jboss.as.controller.AttributeMarshallers;
import org.jboss.as.controller.AttributeParsers;
import org.jboss.as.controller.MapAttributeDefinition;
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.PersistentResourceXMLDescription;
import org.jboss.as.controller.parsing.ParseUtils;
import org.jboss.dmr.ModelNode;
import org.jboss.staxmapper.XMLExtendedStreamReader;
import java.util.Iterator;
/**
* XML handling for the <mappers /> element.
*
* @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
* @author Tomaz Cerar
*/
class MapperParser {
enum Version {
VERSION_1_0,
VERSION_1_1,
VERSION_3_0, // permission-sets in permission-mappings and constant-permission-mappers
VERSION_4_0, // mapped-role-mappers
CURRENT // x500-subject-evidence-decoder, x509-subject-alt-name-evidence-decoder, custom-evidence-decoder, aggregate-evidence-decoder
}
private final Version version;
private PersistentResourceXMLDescription simpleMapperParser = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getSimplePermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.MAPPING_MODE)
.addAttribute(PermissionMapperDefinitions.PERMISSION_MAPPINGS)
.build();
private PersistentResourceXMLDescription simpleMapperParser_1_0 = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getSimplePermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.MAPPING_MODE)
.addAttribute(PermissionMapperDefinitions.PERMISSION_MAPPINGS_1_0)
.build();
private PersistentResourceXMLDescription simpleMapperParser_1_1 = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getSimplePermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.MAPPING_MODE)
.addAttribute(PermissionMapperDefinitions.PERMISSION_MAPPINGS_1_1)
.build();
private PersistentResourceXMLDescription logicalPermissionMapper = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getLogicalPermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.LOGICAL_OPERATION)
.addAttribute(PermissionMapperDefinitions.LEFT)
.addAttribute(PermissionMapperDefinitions.RIGHT)
.build();
private PersistentResourceXMLDescription constantPermissionMapper = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getConstantPermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.PERMISSIONS)
.addAttribute(PermissionMapperDefinitions.PERMISSION_SETS)
.build();
private PersistentResourceXMLDescription constantPermissionMapper_1_0 = PersistentResourceXMLDescription.builder(PermissionMapperDefinitions.getConstantPermissionMapper().getPathElement())
.addAttribute(PermissionMapperDefinitions.PERMISSIONS)
.build();
private PersistentResourceXMLDescription aggregatePrincipalDecoderParser = PersistentResourceXMLDescription.builder(PrincipalDecoderDefinitions.getAggregatePrincipalDecoderDefinition().getPathElement())
.addAttribute(PrincipalDecoderDefinitions.getAggregatePrincipalDecoderDefinition().getReferencesAttribute(), new AttributeParsers.NamedStringListParser(PRINCIPAL_DECODER), new AttributeMarshallers.NamedStringListMarshaller(PRINCIPAL_DECODER))
.build();
private PersistentResourceXMLDescription concatenatingPrincipalDecoderParser = PersistentResourceXMLDescription.builder(PrincipalDecoderDefinitions.getConcatenatingPrincipalDecoder().getPathElement())
.addAttribute(PrincipalDecoderDefinitions.JOINER)
.addAttribute(PrincipalDecoderDefinitions.PRINCIPAL_DECODERS)
.build();
private PersistentResourceXMLDescription constantPrincipalDecoderParser = PersistentResourceXMLDescription.builder(PrincipalDecoderDefinitions.getConstantPrincipalDecoder().getPathElement())
.addAttribute(PrincipalDecoderDefinitions.CONSTANT)
.build();
private PersistentResourceXMLDescription x500AttributePrincipalDecoderParser = PersistentResourceXMLDescription.builder(PrincipalDecoderDefinitions.getX500AttributePrincipalDecoder().getPathElement())
.addAttribute(PrincipalDecoderDefinitions.OID)
.addAttribute(PrincipalDecoderDefinitions.ATTRIBUTE_NAME)
.addAttribute(PrincipalDecoderDefinitions.JOINER)
.addAttribute(PrincipalDecoderDefinitions.START_SEGMENT)
.addAttribute(PrincipalDecoderDefinitions.MAXIMUM_SEGMENTS)
.addAttribute(PrincipalDecoderDefinitions.REVERSE)
.addAttribute(PrincipalDecoderDefinitions.CONVERT)
.addAttribute(PrincipalDecoderDefinitions.REQUIRED_OIDS)
.addAttribute(PrincipalDecoderDefinitions.REQUIRED_ATTRIBUTES)
.build();
private PersistentResourceXMLDescription aggregatePrincipalTransformerParser = PersistentResourceXMLDescription.builder(PrincipalTransformerDefinitions.getAggregatePrincipalTransformerDefinition().getPathElement())
.addAttribute(PrincipalTransformerDefinitions.getAggregatePrincipalTransformerDefinition().getReferencesAttribute(), new AttributeParsers.NamedStringListParser(PRINCIPAL_TRANSFORMER), new AttributeMarshallers.NamedStringListMarshaller(PRINCIPAL_TRANSFORMER))
.build();
private PersistentResourceXMLDescription chainedPrincipalTransformersParser = PersistentResourceXMLDescription.builder(PrincipalTransformerDefinitions.getChainedPrincipalTransformerDefinition().getPathElement())
.addAttribute(PrincipalTransformerDefinitions.getChainedPrincipalTransformerDefinition().getReferencesAttribute(), new AttributeParsers.NamedStringListParser(PRINCIPAL_TRANSFORMER), new AttributeMarshallers.NamedStringListMarshaller(PRINCIPAL_TRANSFORMER))
.build();
private PersistentResourceXMLDescription constantPrincipalTransformersParser = PersistentResourceXMLDescription.builder(PrincipalTransformerDefinitions.getConstantPrincipalTransformerDefinition().getPathElement())
.addAttribute(PrincipalTransformerDefinitions.CONSTANT)
.build();
private PersistentResourceXMLDescription regexPrincipalTransformerParser = PersistentResourceXMLDescription.builder(PrincipalTransformerDefinitions.getRegexPrincipalTransformerDefinition().getPathElement())
.addAttribute(RegexAttributeDefinitions.PATTERN)
.addAttribute(PrincipalTransformerDefinitions.REPLACEMENT)
.addAttribute(PrincipalTransformerDefinitions.REPLACE_ALL)
.build();
private PersistentResourceXMLDescription regexValidatingTransformerParser = PersistentResourceXMLDescription.builder(PrincipalTransformerDefinitions.getRegexValidatingPrincipalTransformerDefinition().getPathElement())
.addAttribute(RegexAttributeDefinitions.PATTERN)
.addAttribute(PrincipalTransformerDefinitions.MATCH)
.build();
private PersistentResourceXMLDescription constantRealmMapperParser = PersistentResourceXMLDescription.builder(RealmMapperDefinitions.getConstantRealmMapper().getPathElement())
.addAttribute(RealmMapperDefinitions.REALM_NAME)
.build();
private PersistentResourceXMLDescription simpleRegexRealmMapperParser = PersistentResourceXMLDescription.builder(RealmMapperDefinitions.getSimpleRegexRealmMapperDefinition().getPathElement())
.addAttribute(RegexAttributeDefinitions.PATTERN_CAPTURE_GROUP)
.addAttribute(RealmMapperDefinitions.DELEGATE_REALM_MAPPER)
.build();
private PersistentResourceXMLDescription mappedRegexRealmMapperParser = PersistentResourceXMLDescription.builder(RealmMapperDefinitions.getMappedRegexRealmMapper().getPathElement())
.addAttribute(RegexAttributeDefinitions.PATTERN_CAPTURE_GROUP)
.addAttribute(RealmMapperDefinitions.DELEGATE_REALM_MAPPER)
.addAttribute(RealmMapperDefinitions.REALM_REALM_MAP, new AttributeParsers.PropertiesParser(null, REALM_MAPPING, false) {
public void parseSingleElement(MapAttributeDefinition attribute, XMLExtendedStreamReader reader, ModelNode operation) throws XMLStreamException {
final String[] array = requireAttributes(reader, FROM, TO);
attribute.parseAndAddParameterElement(array[0], array[1], operation, reader);
ParseUtils.requireNoContent(reader);
}
}, new AttributeMarshallers.MapAttributeMarshaller(null, null, false) {
@Override
public void marshallSingleElement(AttributeDefinition attribute, ModelNode property, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
writer.writeEmptyElement(REALM_MAPPING);
writer.writeAttribute(FROM, property.asProperty().getName());
writer.writeAttribute(TO, property.asProperty().getValue().asString());
}
})
.build();
private PersistentResourceXMLDescription simpleRoleDecoderParser = PersistentResourceXMLDescription.builder(RoleDecoderDefinitions.getSimpleRoleDecoderDefinition().getPathElement())
.addAttribute(RoleDecoderDefinitions.ATTRIBUTE)
.build();
private PersistentResourceXMLDescription mappedRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getMappedRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.KEEP_MAPPED)
.addAttribute(RoleMapperDefinitions.KEEP_NON_MAPPED)
.addAttribute(RoleMapperDefinitions.ROLE_MAPPING_MAP, new AttributeParsers.MapParser(null, ROLE_MAPPING, false) {
@Override
public void parseSingleElement(MapAttributeDefinition attribute, XMLExtendedStreamReader reader, ModelNode operation) throws XMLStreamException {
final String[] array = requireAttributes(reader, FROM, TO);
ModelNode paramVal = operation.get(attribute.getName()).get(array[0]).setEmptyList();
for (String role : array[1].split("\\s+")) {
paramVal.add(role);
}
ParseUtils.requireNoContent(reader);
}
}
, new AttributeMarshallers.MapAttributeMarshaller(null, null, false) {
@Override
public void marshallSingleElement(AttributeDefinition attribute, ModelNode property, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
writer.writeEmptyElement(ROLE_MAPPING);
writer.writeAttribute(FROM, property.asProperty().getName());
StringBuilder sb = new StringBuilder();
Iterator<ModelNode> iter = property.asProperty().getValue().asList().iterator();
while (iter.hasNext()) {
sb.append(iter.next().asString());
if (iter.hasNext()) sb.append(' ');
}
writer.writeAttribute(TO, sb.toString());
}
})
.build();
private PersistentResourceXMLDescription regexRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getRegexRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.REGEX)
.addAttribute(RoleMapperDefinitions.REPLACEMENT)
.addAttribute(RoleMapperDefinitions.KEEP_NON_MAPPED)
.build();
private PersistentResourceXMLDescription addPrefixRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getAddPrefixRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.PREFIX)
.build();
private PersistentResourceXMLDescription addSuffixRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getAddSuffixRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.SUFFIX)
.build();
private PersistentResourceXMLDescription aggregateRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getAggregateRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.getAggregateRoleMapperDefinition().getReferencesAttribute(), new AttributeParsers.NamedStringListParser(ROLE_MAPPER), new AttributeMarshallers.NamedStringListMarshaller(ROLE_MAPPER))
.build();
private PersistentResourceXMLDescription constantRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getConstantRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.ROLES)
.build();
private PersistentResourceXMLDescription logicalRoleMapperParser = PersistentResourceXMLDescription.builder(RoleMapperDefinitions.getLogicalRoleMapperDefinition().getPathElement())
.addAttribute(RoleMapperDefinitions.LOGICAL_OPERATION)
.addAttribute(RoleMapperDefinitions.LEFT)
.addAttribute(RoleMapperDefinitions.RIGHT)
.build();
private PersistentResourceXMLDescription x500SubjectEvidenceDecoderParser = PersistentResourceXMLDescription.builder(EvidenceDecoderDefinitions.getX500SubjectEvidenceDecoderDefinition().getPathElement())
.build();
private PersistentResourceXMLDescription x509SubjectAltNameEvidenceDecoder = PersistentResourceXMLDescription.builder(EvidenceDecoderDefinitions.getX509SubjectAltNameEvidenceDecoderDefinition().getPathElement())
.addAttribute(EvidenceDecoderDefinitions.ALT_NAME_TYPE)
.addAttribute(EvidenceDecoderDefinitions.SEGMENT)
.build();
private PersistentResourceXMLDescription aggregateEvidenceDecoderParser = PersistentResourceXMLDescription.builder(EvidenceDecoderDefinitions.getAggregateEvidenceDecoderDefinition().getPathElement())
.addAttribute(EvidenceDecoderDefinitions.getAggregateEvidenceDecoderDefinition().getReferencesAttribute(), new AttributeParsers.NamedStringListParser(EVIDENCE_DECODER), new AttributeMarshallers.NamedStringListMarshaller(EVIDENCE_DECODER))
.build();
MapperParser(Version version) {
this.version = version;
}
MapperParser() {
this.version = Version.CURRENT;
}
//1.0 version of parser is different at simple mapperParser
private PersistentResourceXMLDescription getSimpleMapperParser() {
if (version.equals(Version.VERSION_1_0)) {
return simpleMapperParser_1_0;
} else if (version.equals(Version.VERSION_1_1)) {
return simpleMapperParser_1_1;
}
return simpleMapperParser;
}
private PersistentResourceXMLDescription getConstantPermissionMapperParser() {
if (version.equals(Version.VERSION_1_0) || version.equals(Version.VERSION_1_1)) {
return constantPermissionMapper_1_0;
} else {
return constantPermissionMapper;
}
}
static PersistentResourceXMLDescription getCustomComponentParser(String componentType) {
return PersistentResourceXMLDescription.builder(PathElement.pathElement(componentType))
.setUseElementsForGroups(false)
.addAttribute(ClassLoadingAttributeDefinitions.MODULE)
.addAttribute(ClassLoadingAttributeDefinitions.CLASS_NAME)
.addAttribute(CustomComponentDefinition.CONFIGURATION)
.build();
}
private PersistentResourceXMLDescription getParser_1_0_to_3_0() {
return decorator(ElytronDescriptionConstants.MAPPERS)
.addChild(getCustomComponentParser(CUSTOM_PERMISSION_MAPPER))
.addChild(logicalPermissionMapper)
.addChild(getSimpleMapperParser())
.addChild(getConstantPermissionMapperParser())
.addChild(aggregatePrincipalDecoderParser)
.addChild(concatenatingPrincipalDecoderParser)
.addChild(constantPrincipalDecoderParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_DECODER))
.addChild(x500AttributePrincipalDecoderParser)
.addChild(aggregatePrincipalTransformerParser)
.addChild(chainedPrincipalTransformersParser)
.addChild(constantPrincipalTransformersParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_TRANSFORMER))
.addChild(regexPrincipalTransformerParser)
.addChild(regexValidatingTransformerParser)
.addChild(constantRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_REALM_MAPPER))
.addChild(simpleRegexRealmMapperParser)
.addChild(mappedRegexRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_DECODER))
.addChild(simpleRoleDecoderParser)
.addChild(addPrefixRoleMapperParser)
.addChild(addSuffixRoleMapperParser)
.addChild(aggregateRoleMapperParser)
.addChild(constantRoleMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_MAPPER))
.addChild(logicalRoleMapperParser)
.addChild(mappedRoleMapperParser)
.build();
}
private PersistentResourceXMLDescription getParser_4_0() {
return decorator(ElytronDescriptionConstants.MAPPERS)
.addChild(getCustomComponentParser(CUSTOM_PERMISSION_MAPPER))
.addChild(logicalPermissionMapper)
.addChild(getSimpleMapperParser())
.addChild(getConstantPermissionMapperParser())
.addChild(aggregatePrincipalDecoderParser)
.addChild(concatenatingPrincipalDecoderParser)
.addChild(constantPrincipalDecoderParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_DECODER))
.addChild(x500AttributePrincipalDecoderParser)
.addChild(aggregatePrincipalTransformerParser)
.addChild(chainedPrincipalTransformersParser)
.addChild(constantPrincipalTransformersParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_TRANSFORMER))
.addChild(regexPrincipalTransformerParser)
.addChild(regexValidatingTransformerParser)
.addChild(constantRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_REALM_MAPPER))
.addChild(simpleRegexRealmMapperParser)
.addChild(mappedRegexRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_DECODER))
.addChild(simpleRoleDecoderParser)
.addChild(addPrefixRoleMapperParser)
.addChild(addSuffixRoleMapperParser)
.addChild(aggregateRoleMapperParser)
.addChild(constantRoleMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_MAPPER))
.addChild(logicalRoleMapperParser)
.addChild(mappedRoleMapperParser) // new
.build();
}
public PersistentResourceXMLDescription getParser() {
if (version.equals(Version.VERSION_1_0) || version.equals(Version.VERSION_1_1) || version.equals(Version.VERSION_3_0)) {
return getParser_1_0_to_3_0();
}
if (version.equals(Version.VERSION_4_0)) {
return getParser_4_0();
}
return decorator(ElytronDescriptionConstants.MAPPERS)
.addChild(getCustomComponentParser(CUSTOM_PERMISSION_MAPPER))
.addChild(logicalPermissionMapper)
.addChild(getSimpleMapperParser())
.addChild(getConstantPermissionMapperParser())
.addChild(aggregatePrincipalDecoderParser)
.addChild(concatenatingPrincipalDecoderParser)
.addChild(constantPrincipalDecoderParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_DECODER))
.addChild(x500AttributePrincipalDecoderParser)
.addChild(aggregatePrincipalTransformerParser)
.addChild(chainedPrincipalTransformersParser)
.addChild(constantPrincipalTransformersParser)
.addChild(getCustomComponentParser(CUSTOM_PRINCIPAL_TRANSFORMER))
.addChild(regexPrincipalTransformerParser)
.addChild(regexValidatingTransformerParser)
.addChild(constantRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_REALM_MAPPER))
.addChild(simpleRegexRealmMapperParser)
.addChild(mappedRegexRealmMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_DECODER))
.addChild(simpleRoleDecoderParser)
.addChild(addPrefixRoleMapperParser)
.addChild(addSuffixRoleMapperParser)
.addChild(aggregateRoleMapperParser)
.addChild(constantRoleMapperParser)
.addChild(getCustomComponentParser(CUSTOM_ROLE_MAPPER))
.addChild(logicalRoleMapperParser)
.addChild(mappedRoleMapperParser)
.addChild(x500SubjectEvidenceDecoderParser) // new
.addChild(x509SubjectAltNameEvidenceDecoder) // new
.addChild(getCustomComponentParser(CUSTOM_EVIDENCE_DECODER)) // new
.addChild(aggregateEvidenceDecoderParser) // new
.addChild(regexRoleMapperParser) // new
.build();
}
}