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

Updated guidance based on experience #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/samples/Experian/CrossCoreIntegrationApi/CrossCoreIntegrationApi/bin/Debug/netcoreapp3.1/CrossCoreIntegrationApi.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Experian/CrossCoreIntegrationApi/CrossCoreIntegrationApi",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/samples/Experian/CrossCoreIntegrationApi/CrossCoreIntegrationApi/CrossCoreIntegrationApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/samples/Experian/CrossCoreIntegrationApi/CrossCoreIntegrationApi/CrossCoreIntegrationApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/samples/Experian/CrossCoreIntegrationApi/CrossCoreIntegrationApi/CrossCoreIntegrationApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
4 changes: 2 additions & 2 deletions samples/OnFido-Combined/Policies/TrustFrameworkBase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@
<Item Key="UserMessageIfOldPasswordUsed">Looks like you used an old password</Item>

<Item Key="ProviderName">https://sts.windows.net/</Item>
<Item Key="METADATA">https://login.microsoftonline.com/{tenant}/.well-known/openid-configuration</Item>
<Item Key="authorization_endpoint">https://login.microsoftonline.com/{tenant}/oauth2/token</Item>
<Item Key="METADATA">https://login.microsoftonline.com/{your_tenantId}/.well-known/openid-configuration</Item>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are special identifiers {tenant}, you shouldn't actually need to populate these at all.

<Item Key="authorization_endpoint">https://login.microsoftonline.com/{your_tenantId}/oauth2/token</Item>
<Item Key="response_types">id_token</Item>
<Item Key="response_mode">query</Item>
<Item Key="scope">email openid</Item>
Expand Down
31 changes: 21 additions & 10 deletions samples/OnFido-Combined/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Deploy the provided API code to an Azure service. The code can be
published from Visual Studio, following
these [instructions](https://docs.microsoft.com/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019).

Set-up CORS, add Allowed Origin `https://{your_tenant_name}.b2clogin.com`

Note the URL of the deployed service. We will need this later to
configure this later to configure Azure AD with the required settings.

Expand All @@ -72,6 +74,11 @@ account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart
Find the UI files from the **UI** folder and store them into your blob
container.

Set-up CORS

- Allowed Origin: `https://{your_tenant_name}.b2clogin.com`
- Allowed Methods: `GET` and `PUT`

#### Update UI Files

In the UI Files, go to the folder **ocean\_blue**
Expand All @@ -86,7 +93,13 @@ intermediate API app service.

### Azure AD B2C Configuration

#### Replace the configuration values
#### Register Identity Experience Framework applications
Follow [this documentation](https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started?tabs=applications#register-identity-experience-framework-applications) to create the 2 App Registrations `IdentityExperienceFramework` and `ProxyIdentityExperienceFramework`.

Note down the Application IDs of both app registrations.


#### Update the Policy files, replace the configuration values

In the provided custom policies, find the following placeholders and
replace with the corresponding values from your instance
Expand All @@ -97,26 +110,24 @@ Placeholder| Replace with | Example
-----------|--------------|--------------
{your_tenant_name}|Your tenant short name|“yourtenant” from yourtenant.onmicrosoft.com
{your_tenantId}|Tenant Id of your B2C tenant|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_IdentityExperienceFramework_appid}|App Id of the IdentityExperienceFramework app configured in your B2C tenant|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_ ProxyIdentityExperienceFramework _appid}|App Id of the ProxyIdentityExperienceFramework app configured in your B2C tenant|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_IdentityExperienceFramework_appid}|App Id of the IdentityExperienceFramework app configured in your B2C tenant, created in the previous step|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_ ProxyIdentityExperienceFramework _appid}|App Id of the ProxyIdentityExperienceFramework app configured in your B2C tenant, created in the previous step|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_extensions_appid}|App Id of your tenant’s storage application|01234567-89ab-cdef-0123-456789abcdef
{your_tenant_extensions_app_objectid}|Object Id of your tenant’s storage application|01234567-89ab-cdef-0123-456789abcdef
{your_app_insights_instrumentation_key}|Instrumentation key of your app insights instance*|01234567-89ab-cdef-0123-456789abcdef
{your_ui_file_base_url}|URL of where your UI “ocean_blue”, “dist” and “assets” folders are located|https://yourstorage.blob.core.windows.net/UI/
{your_app_service_url}|URL of your app service|https://yourapp.azurewebsites.net

\*App insights can be in a different tenant. This step is optional.
Remove the corresponding TechnicalProfiles and OrechestrationSteps if
Remove the corresponding TechnicalProfiles and OrchestrationSteps if
not needed

#### Configure the B2C Policy
#### Upload and test the custom B2C policies

Follow [this
documentation](https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started?tabs=applications#custom-policy-starter-pack)  to
configure the policy for the B2C tenant. The provided policies will need
to be updated to relate to your specific tenant.
Upload and test the policies according to the instructions in [this
documentation.](https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started?tabs=applications#custom-policy-starter-pack)  Use the policy files in this package instead of the ones mentioned in the documentation.

### Notes

This sample policy is based on [LocalAccounts starter
pack](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/LocalAccounts)
pack](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/LocalAccounts)