Last active
June 3, 2019 19:19
-
-
Save rbrayb/1fab43d6d9ab77fbcd1dd82b8305ebf3 to your computer and use it in GitHub Desktop.
Custom B2C policy for "Pwned passwords"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ClaimsProvider> | |
| <DisplayName>REST APIs</DisplayName> | |
| <TechnicalProfiles> | |
| <!-- Custom Restful service --> | |
| <TechnicalProfile Id="REST-API-PwnedPassword"> | |
| <DisplayName>Validate user's password</DisplayName> | |
| <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> | |
| <Metadata> | |
| <Item Key="ServiceUrl">https://mywebapplication.azurewebsites.net/api/Identity/CheckPassword</Item> | |
| <Item Key="AuthenticationType">None</Item> | |
| <Item Key="SendClaimsIn">QueryString</Item> | |
| <Item Key="AllowInsecureAuthInProduction">true</Item> | |
| </Metadata> | |
| <InputClaims> | |
| <InputClaim ClaimTypeReferenceId="NewPassword" PartnerClaimType="password" /> | |
| </InputClaims> | |
| <OutputClaims> | |
| <OutputClaim ClaimTypeReferenceId="pwnedPasswordResult" /> | |
| </OutputClaims> | |
| <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" /> | |
| </TechnicalProfile> | |
| <!-- Change LocalAccountSignUpWithLogonEmail technical profile to support your validation technical profile --> | |
| <TechnicalProfile Id="LocalAccountSignUpWithLogonEmail"> | |
| <OutputClaims> | |
| <OutputClaim ClaimTypeReferenceId="newPassword" PartnerClaimType="newPassword" /> | |
| </OutputClaims> | |
| <ValidationTechnicalProfiles> | |
| <ValidationTechnicalProfile ReferenceId="REST-API-PwnedPassword" /> | |
| </ValidationTechnicalProfiles> | |
| </TechnicalProfile> | |
| </TechnicalProfiles> | |
| </ClaimsProvider> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/the-new-control-plane/validating-the-user-password-selection-in-azure-ad-b2c-by-invoking-troy-hunts-pwned-passwords-fbb044b26698