-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1791333
Showing
9 changed files
with
30,792 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 GitHub, Inc. and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# GitHub Action for deploying TrustFramework policies | ||
|
||
Use this GitHub Action to deploy a TrustFramework Policy into your Azure Active Directory B2C tenant using the [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/api/resources/trustframeworkpolicy?view=graph-rest-beta). If the policy does not yet exist, it will be created. If the policy already exists, it will be replaced. | ||
|
||
For more information on TrustFramework Policies and the Identity Experience Framework, see the [Azure AD B2C documentation](https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-overview). | ||
|
||
To authenticate to the Microsoft Graph, you will need to obtain client application credentials using [these instructions](https://docs.microsoft.com/en-us/azure/active-directory-b2c/microsoft-graph-get-started). | ||
|
||
## Sample workflow to deploy TrustFramework policies | ||
|
||
```yaml | ||
on: push | ||
|
||
env: | ||
clientId: 00000000-0000-0000-0000-000000000000 | ||
tenant: my-tenant.onmicrosoft.com | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: 'Upload TrustFrameworkBase Policy' | ||
uses: azure-ad-b2c/deploy-trustframework-policy@v1 | ||
with: | ||
file: "./Policies/TrustFrameworkBase.xml" | ||
policy: B2C_1A_TrustFrameworkBase | ||
tenant: ${{ env.tenant }} | ||
clientId: ${{ env.clientId }} | ||
clientSecret: ${{ secrets.clientSecret }} | ||
|
||
- name: Upload TrustFrameworkExtensions Policy | ||
uses: azure-ad-b2c/deploy-trustframework-policy@v1 | ||
with: | ||
file: "./Policies/TrustFrameworkExtensions.xml" | ||
policy: B2C_1A_TrustFrameworkExtensions | ||
tenant: ${{ env.tenant }} | ||
clientId: ${{ env.clientId }} | ||
clientSecret: ${{ secrets.clientSecret }} | ||
|
||
- name: Upload SignUpOrSignin Policy | ||
uses: azure-ad-b2c/deploy-trustframework-policy@v1 | ||
with: | ||
file: "./Policies/SignUpOrSignin.xml" | ||
policy: B2C_1A_SignUpOrSignin | ||
tenant: ${{ env.tenant }} | ||
clientId: ${{ env.clientId }} | ||
clientSecret: ${{ secrets.clientSecret }} | ||
``` | ||
## Community Help and Support | ||
Use [Stack Overflow](https://stackoverflow.com/questions/tagged/azure-ad-b2c) to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [azure-ad-b2c]. | ||
If you find a bug in the sample, please raise the issue on [GitHub Issues](https://github.com/azure-ad-b2c/deploy-trustframework-policy/issues). | ||
To provide product feedback, visit the Azure AD B2C [feedback page](https://feedback.azure.com/forums/169401-azure-active-directory?category_id=160596). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Deploy Azure AD B2C TrustFramework Policy' | ||
description: 'A GitHub Action for deploying TrustFramework policies using the Microsoft Graph' | ||
author: 'Adam Stoffel' | ||
branding: | ||
icon: 'code' | ||
color: 'blue' | ||
inputs: | ||
file: | ||
description: 'The path to the TrustFramework Policy XML file to upload' | ||
required: true | ||
policy: | ||
description: 'The TrustFramework Policy name' | ||
required: true | ||
tenant: | ||
description: 'The full Azure AD B2C tenant name (e.g.: mytenant.onmicrosoft.com) or GUID' | ||
required: true | ||
clientId: | ||
description: 'The Client ID for a service principal which will be used to authenticate to the Microsoft Graph' | ||
required: true | ||
clientSecret: | ||
description: 'The Client Secret for a service principal which will be used to authenticate to the Microsoft Graph' | ||
required: true | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Oops, something went wrong.