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

Add Instructions for setting up Azure components #3

Open
3 tasks
BrennanConroy opened this issue Nov 13, 2023 · 4 comments
Open
3 tasks

Add Instructions for setting up Azure components #3

BrennanConroy opened this issue Nov 13, 2023 · 4 comments

Comments

@BrennanConroy
Copy link
Contributor

BrennanConroy commented Nov 13, 2023

There are currently 3 Azure components in use that need to be setup

  • ServiceBus
  • Azure Monitor
  • Entra

We should add instructions on how to set all of these up both in the portal and in the application code/config.

Entra:
In portal create scopes: basket, orders, webhooks
In portal authorize Client application
In portal add redirect url: https://localhost:7298/signin-oidc
Find and replace <tenant id> in app
Find and replace <client id> in app
Create client secret in portal, copy value to <client secret> in app

Service Bus:
Modify "eventBus": <namespace> in eShop.AppHost appsettings.json
In the portal add topic "eshop_event_bus" when running locally
In the portal add "Azure Service Bus Data Owner" role to the identity that is creating the subscriptions

@spboyer
Copy link

spboyer commented May 3, 2024

  • Need better instructions for Entra
  • appsettings for eshop should use inheritance so there is one place for tenant id and client id settings.

@cedrox
Copy link

cedrox commented Jun 9, 2024

Hello, any help to explain how to properly setup entra would be great.
Thanks

@HelgiBergmann
Copy link

HelgiBergmann commented Jul 21, 2024

Hello, any help to explain how to properly setup entra would be great. Thanks
@cedrox @spboyer
Sure, I can guide you through the process of setting up your application in Microsoft Entra. Here are the steps:

Create Scopes:

  • Go to the Microsoft Entra admin center.
  • Navigate to Identity > Applications > App registrations.
  • Select your application.
  • Go to Expose an API and click on Add a scope.
  • Define the scopes for basket, orders, and webhooks.

Authorize Client Application:

  • In the same App registrations section, select your client application.
  • Go to API permissions and click on Add a permission.
  • Select My APIs and choose the API you registered.
  • Select the appropriate permissions (delegated or application) for your client application.

Add Redirect URL:

  • In your client application’s registration, go to Authentication.
  • Under Redirect URIs, add https://localhost:7298/signin-oidc.
  • Replace Tenant ID and Client ID:
  • In your application code, find the placeholders for and .
  • Replace them with the actual Tenant ID and Client ID from your app registration.

Create Client Secret:

  • In the Certificates & secrets section of your client application, click on New client secret.
  • Enter a description and expiration period, then click Add.
  • Copy the value of the client secret and replace in your application code.

Event bus:

  • Create Service Bus with Standart subscription (with basic you are not able to create topics)
  • Add topic "eshop_event_bus"
  • In the portal add "Azure Service Bus Data Owner" role to the identity that is creating the subscriptions

@HelgiBergmann
Copy link

Service Bus: Modify "eventBus": <namespace> in eShop.AppHost appsettings.json In the portal add topic "eshop_event_bus" when running locally In the portal add "Azure Service Bus Data Owner" role to the identity that is creating the subscriptions

@BrennanConroy I've tried to add role to identity, but when I was choosing the Managed Identity the list was empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants