Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added kmsi persisted claim in jwt #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions policies/kmsi-claim-jwt/policy/KMSIJWTExtension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?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_CR_Context"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_CR_Context">

<BasePolicy>
<TenantId>yourtenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId>
</BasePolicy>

<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="ContextKMSI">
<DisplayName>{Context:KMSI}</DisplayName>
<DataType>string</DataType>
</ClaimType>
</ClaimsSchema>
</BuildingBlocks>

<ClaimsProviders>
<ClaimsProvider>
<DisplayName>Unit tests</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="KMSITokenTechnicalProfile">
<DisplayName>Pass the KMIS value</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="ContextKMSI" AlwaysUseDefaultValue="true" DefaultValue="{CONTEXT:KMSI}" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="ContextKMSI" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD-KMSI" />
</TechnicalProfile>
<TechnicalProfile Id="SM-AAD-KMSI">
<DisplayName>Session Mananagement Provider</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.SSO.DefaultSSOSessionProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<PersistedClaims>
<PersistedClaim ClaimTypeReferenceId="ContextKMSI" />
</PersistedClaims>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
</ClaimsProviders>

<UserJourneys>
<UserJourney Id="UnitTestJourney">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="KMSITokenTechnicalProfile" TechnicalProfileReferenceId="KMSITokenTechnicalProfile" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" 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="ContextBuildNumber" />
<OutputClaim ClaimTypeReferenceId="ContextCorrelationId" />
<OutputClaim ClaimTypeReferenceId="ContextDateTimeInUtc" />
<OutputClaim ClaimTypeReferenceId="ContextDeploymentMode" />
<OutputClaim ClaimTypeReferenceId="ContextIPAddress" />
<OutputClaim ClaimTypeReferenceId="ContextHostName" />
<OutputClaim ClaimTypeReferenceId="ContextKMSI" PartnerClaimType="kmsi"/>
</OutputClaims>
<SubjectNamingInfo ClaimType="sub" />
</TechnicalProfile>
</RelyingParty>
</TrustFrameworkPolicy>