Prerequisites
- .NET 10 SDK (see
global.json) - Node.js 20 or later with npm (the repository root is an npm workspace)
- Azure CLI, signed in to the publisher tenant (local debugging uses the Azure dev resources); Bicep for deployment
- Azure Functions Core Tools and Azurite, for the Worker
- An Entra ID test tenant with an app registration for the API
1. Build the solution
src/Signsync.Api/openapi/Signsync.Api.json.
2. Configure the hosts against Azure dev
Local debugging uses the Azure dev resources (Cosmos DBuw-cosmos-signsync-weu-dev, database signatures), not emulators. The hosts sign in to Cosmos DB with your own Entra identity through DefaultAzureCredential; the account has key authentication disabled, so there is no connection string.
-
Sign in to the publisher tenant with the Azure CLI:
-
Get Cosmos DB data access on dev (Cosmos DB Built-in Data Contributor). Without this role, every Cosmos DB request from your machine fails with 403. Get your object ID first:
Add the object ID to
developerPrincipalIdsininfra/parameters/main.dev.parameters.json, then runinfra/deployment-dev.sh(orinfra/deployment-dev.ps1). The script runs a what-if first and applies the role assignment with the rest of the dev infrastructure (Developer data access). Infrastructure is deployed only through these scripts, so don’t deploy the Bicep modules on their own withaz deployment group create. -
Copy the Development settings. They already point at dev; real settings files are gitignored.
-
Set the dev app registrations (
AzureAd:*) in user secrets: see Entra app registrations. Put any client secret or certificate in user secrets, never in a file.
AzureWebJobsStorage (UseDevelopmentStorage=true); start it with azurite before func host start. In VS Code, start azurite and then the Signsync: back ends launch configuration.
Production
Local debugging never targets prod. Prod Cosmos DB (uw-cosmos-signsync-weu) holds customer data, and only the managed identities of the two prod App Service apps have data access to it:
- Don’t point local settings or user secrets at the prod account, and don’t run
cosmos-access.bicepagainst it: either would bypass the rule that no developer identity reads prod customer data (README §15.1). - Investigate prod issues from telemetry in Application Insights
uw-appi-signsync-weuand Log Analyticsuw-log-signsync-weu. Logs contain object IDs only, never tokens or rendered signatures. - To reproduce a prod problem, recreate the data in dev and debug there.
3. Run the hosts
Check that both are up:
4. Call the API
Importpostman/signsync-api.postman_collection.json and the signsync-local environment (see Postman). Set accessToken in the environment to a bearer token for your test tenant, then run the requests.