-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathTP_SA_metadata_AllowGenerationOfClaimsWithNullValues.xml
251 lines (235 loc) · 11.4 KB
/
TP_SA_metadata_AllowGenerationOfClaimsWithNullValues.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" PolicySchemaVersion="0.3.0.0"
TenantId="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_TP_SA_metadata_AllowGenerationOfClaimsWithNullValues"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_TP_SA_metadata_AllowGenerationOfClaimsWithNullValues">
<BasePolicy>
<TenantId>yourtenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId>
</BasePolicy>
<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="scenario">
<DisplayName>Select whether to allow generation off claims with Null values</DisplayName>
<DataType>string</DataType>
<UserInputType>DropdownSingleSelect</UserInputType>
<Restriction>
<Enumeration Text="Allow" Value="Allow" SelectByDefault="true" />
<Enumeration Text="Don't allow" Value="DoNotAllow" />
</Restriction>
</ClaimType>
<ClaimType Id="string1">
<DisplayName>String1</DisplayName>
<DataType>string</DataType>
<UserInputType>TextBox</UserInputType>
</ClaimType>
<ClaimType Id="string1Exists">
<DisplayName>String 1 exists</DisplayName>
<DataType>boolean</DataType>
<UserInputType>Readonly</UserInputType>
</ClaimType>
<ClaimType Id="string2">
<DisplayName>String2</DisplayName>
<DataType>string</DataType>
<UserInputType>TextBox</UserInputType>
</ClaimType>
<ClaimType Id="string2Exists">
<DisplayName>String 2 exists</DisplayName>
<DataType>boolean</DataType>
<UserInputType>Readonly</UserInputType>
</ClaimType>
<ClaimType Id="string3">
<DisplayName>String3</DisplayName>
<DataType>string</DataType>
<UserInputType>CheckboxMultiSelect</UserInputType>
<Restriction>
<Enumeration Text="One" Value="One" />
<Enumeration Text="Two" Value="Two" />
<Enumeration Text="Three" Value="Three" />
</Restriction>
</ClaimType>
<ClaimType Id="string3Exists">
<DisplayName>String 3 exists</DisplayName>
<DataType>boolean</DataType>
<UserInputType>Readonly</UserInputType>
</ClaimType>
<ClaimType Id="technicalProfileName">
<DisplayName>Technical profile name</DisplayName>
<DataType>string</DataType>
<UserHelpText>Add help text here</UserHelpText>
<UserInputType>Readonly</UserInputType>
</ClaimType>
</ClaimsSchema>
<ClaimsTransformations>
<ClaimsTransformation Id="DoesString1Exist" TransformationMethod="DoesClaimExist">
<InputClaims>
<InputClaim ClaimTypeReferenceId="string1" TransformationClaimType="inputClaim" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="string1Exists" TransformationClaimType="outputClaim" />
</OutputClaims>
</ClaimsTransformation>
<ClaimsTransformation Id="DoesString2Exist" TransformationMethod="DoesClaimExist">
<InputClaims>
<InputClaim ClaimTypeReferenceId="string2" TransformationClaimType="inputClaim" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="string2Exists" TransformationClaimType="outputClaim" />
</OutputClaims>
</ClaimsTransformation>
<ClaimsTransformation Id="DoesString3Exist" TransformationMethod="DoesClaimExist">
<InputClaims>
<InputClaim ClaimTypeReferenceId="string3" TransformationClaimType="inputClaim" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="string3Exists" TransformationClaimType="outputClaim" />
</OutputClaims>
</ClaimsTransformation>
</ClaimsTransformations>
</BuildingBlocks>
<ClaimsProviders>
<ClaimsProvider>
<DisplayName>Local Account</DisplayName>
<TechnicalProfiles>
<!--Welcome technical profile (first page)-->
<TechnicalProfile Id="WelcomeTechnicalProfile">
<DisplayName>Unit test</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
</Metadata>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="scenario" Required="true" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
<!--Experimental technical profile (second page)-->
<TechnicalProfile Id="ExperimentalTechnicalProfile_DoNotAllow">
<DisplayName>Unit test</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="technicalProfileName" DefaultValue="ExperimentalTechnicalProfile_DoNotAllow" AlwaysUseDefaultValue="true" />
<InputClaim ClaimTypeReferenceId="string1" DefaultValue="123" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="technicalProfileName" />
<OutputClaim ClaimTypeReferenceId="string1" />
<OutputClaim ClaimTypeReferenceId="string2" />
<OutputClaim ClaimTypeReferenceId="string3" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
<!--Experimental technical profile (second page)-->
<TechnicalProfile Id="ExperimentalTechnicalProfile_Allow">
<DisplayName>Unit test</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
<Item Key="AllowGenerationOfClaimsWithNullValues">true</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="technicalProfileName" DefaultValue="ExperimentalTechnicalProfile_Allow" AlwaysUseDefaultValue="true" />
<InputClaim ClaimTypeReferenceId="string1" DefaultValue="123" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="technicalProfileName" />
<OutputClaim ClaimTypeReferenceId="string1" />
<OutputClaim ClaimTypeReferenceId="string2" />
<OutputClaim ClaimTypeReferenceId="string3" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
<!--Result technical profile (last page)-->
<TechnicalProfile Id="ResultTechnicalProfile">
<DisplayName>Unit test</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
</Metadata>
<InputClaimsTransformations>
<InputClaimsTransformation ReferenceId="DoesString1Exist" />
<InputClaimsTransformation ReferenceId="DoesString2Exist" />
<InputClaimsTransformation ReferenceId="DoesString3Exist" />
</InputClaimsTransformations>
<InputClaims>
<InputClaim ClaimTypeReferenceId="string1Exists" />
<InputClaim ClaimTypeReferenceId="string2Exists" />
<InputClaim ClaimTypeReferenceId="string3Exists" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="string1Exists" />
<OutputClaim ClaimTypeReferenceId="string2Exists" />
<OutputClaim ClaimTypeReferenceId="string3Exists" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
</ClaimsProviders>
<UserJourneys>
<UserJourney Id="UnitTestJourney">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="WelcomeTechnicalProfile" TechnicalProfileReferenceId="WelcomeTechnicalProfile" />
</ClaimsExchanges>
</OrchestrationStep>
<!-- Experimental technical profile with default configuration-->
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimEquals" ExecuteActionsIf="false">
<Value>scenario</Value>
<Value>Allow</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="ExperimentalTechnicalProfile_Allow" TechnicalProfileReferenceId="ExperimentalTechnicalProfile_Allow" />
</ClaimsExchanges>
</OrchestrationStep>
<!-- Sign-up blocking page-->
<OrchestrationStep Order="3" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimEquals" ExecuteActionsIf="false">
<Value>scenario</Value>
<Value>DoNotAllow</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="ExperimentalTechnicalProfile_DoNotAllow" TechnicalProfileReferenceId="ExperimentalTechnicalProfile_DoNotAllow" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="4" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="ResultTechnicalProfile" TechnicalProfileReferenceId="ResultTechnicalProfile" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="5" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
</OrchestrationSteps>
</UserJourney>
</UserJourneys>
<RelyingParty>
<DefaultUserJourney ReferenceId="UnitTestJourney" />
<TechnicalProfile Id="PolicyProfile">
<DisplayName>PolicyProfile</DisplayName>
<Protocol Name="OpenIdConnect" />
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub" DefaultValue="1234" />
<OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />
<!-- Unit test claims-->
<OutputClaim ClaimTypeReferenceId="scenario" />
<OutputClaim ClaimTypeReferenceId="string1" />
<OutputClaim ClaimTypeReferenceId="string1Exists" />
<OutputClaim ClaimTypeReferenceId="string2" />
<OutputClaim ClaimTypeReferenceId="string2Exists" />
<OutputClaim ClaimTypeReferenceId="string3" />
<OutputClaim ClaimTypeReferenceId="string3Exists" />
</OutputClaims>
<SubjectNamingInfo ClaimType="sub" />
</TechnicalProfile>
</RelyingParty>
</TrustFrameworkPolicy>