Skip to content

Commit 1fd0e06

Browse files
author
Dev Agent Amelia
committed
chore: release v0.5.0 — enterprise auth (client-credentials, managed-identity, Entra JWT)
- Add client credentials auth provider (CI/CD, Docker, unattended) - Add managed identity auth provider (Azure App Service, Container Apps) - Add Entra JWT inbound validator for HTTP hosted mode - Add authMethod config option + ENTRA_* / MCP_PUBLIC_URL env vars - Add authentication docs section with hosted/local/service-principal guides - Add Mermaid sequence diagram (hosted.md) via CDN head_custom.html - Update README, CHANGELOG, roadmap, index, getting-started - Extract install-helpers.ts to keep install.ts under size limit - Delete Dockerfile; gitignore dev configs (eslint, jest, tsconfig)
1 parent 2015ac5 commit 1fd0e06

43 files changed

Lines changed: 2013 additions & 146 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@ coverage/
1313
test-output.txt
1414
*.local
1515

16+
# Jekyll local dev
17+
docs/Gemfile.lock
18+
docs/_site/
19+
docs/_config_local.yml
20+
21+
# Dev tooling (not needed by npm consumers)
22+
eslint.config.js
23+
jest.config.js
24+
tsconfig.json
25+
Dockerfile
26+
27+
# Build / publish artifacts
28+
*.tgz
29+
*.zip
30+
.webappignore
31+
32+
# Private planning docs
33+
ROADMAP-AUTH-METHODS.md
34+
1635
# Windows
1736
Thumbs.db
1837
Desktop.ini
@@ -29,6 +48,7 @@ debug/
2948
!assets/logo.webp
3049

3150
# Private planning & internal artifacts (security/privacy)
51+
workdoc/
3252
_bmad/
3353
_bmad-output/
3454
.codex/

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) — [Semantic V
55

66
---
77

8+
## [0.5.0] — 2026-03-24
9+
10+
### Added
11+
12+
- **Client Credentials auth** — App Registration-based service identity for unattended scenarios: CI/CD pipelines, Docker, Azure services. Configured via `authMethod: "client-credentials"` plus `tenantId`, `clientId`, and `clientSecret` (or `AZURE_CLIENT_SECRET` env var — recommended over config file).
13+
- **Managed Identity auth** — zero-secret outbound auth for Azure-hosted deployments (App Service, Container Apps, Azure VMs). Supports both system-assigned and user-assigned identities (`managedIdentityClientId`). Configured via `authMethod: "managed-identity"`.
14+
- **Entra JWT inbound validation** — when the server runs in HTTP transport mode, bearer tokens are validated against Entra ID JWKS. Implements RFC 9728 `/.well-known/oauth-protected-resource` for automatic MCP client discovery. Validation covers RS256 signature, issuer (`login.microsoftonline.com/{tenantId}/v2.0`), audience (bare GUID), required scope, `exp`/`nbf`, and 30-second clock skew. JWKS is cached with automatic rotation on `kid` miss.
15+
- **`authMethod` config option** — selects the auth provider: `"device-code"` (default, unchanged behavior), `"client-credentials"`, or `"managed-identity"`. Also available as the `AUTH_METHOD` environment variable.
16+
- **New environment variables**`AUTH_METHOD`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_MANAGED_IDENTITY_CLIENT_ID` map to their config equivalents. Documented in `config.example.jsonc`.
17+
18+
### Documentation
19+
20+
- New `/authentication` section with one page per method: Device Code, Client Credentials, Managed Identity. Includes Azure platform setup steps, Dataverse App User registration, environment variable reference, and a sequence diagram for the hosted flow.
21+
22+
### Internal
23+
24+
- **`src/auth/auth-provider.interface.ts`**`AuthProvider` contract; all providers implement `getToken(resource): Promise<string>`.
25+
- **`src/auth/auth-provider.factory.ts`** — Reads `authMethod` from config/env and instantiates the correct provider. Adding a new method requires no changes outside the factory.
26+
- **`src/auth/client-credentials-auth-provider.ts`** — MSAL confidential client flow (client_credentials grant) with in-memory token cache.
27+
- **`src/auth/managed-identity-auth-provider.ts`** — Azure IMDS token endpoint (`169.254.169.254`); falls back to `DefaultAzureCredential`-style resolution for user-assigned identities.
28+
- **`src/auth/entra-jwt-validator.ts`** — HTTP middleware; validates inbound Bearer tokens for the HTTP server.
29+
- **`src/auth/crypto-utils.ts`** — JWKS fetch + caching utilities extracted into a shared module.
30+
31+
---
32+
833
## [0.4.7] — 2026-03-08
934

1035
### Fixed

Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**The most complete MCP server for Microsoft Dataverse.**
88

9-
73 tools · 4 resources · 10 guided workflows · Zero config auth
9+
73 tools · 4 resources · 10 guided workflows · Three auth modes
1010

1111
[![npm](https://img.shields.io/npm/v/mcp-dataverse)](https://www.npmjs.com/package/mcp-dataverse)
1212
[![npm downloads](https://img.shields.io/npm/dm/mcp-dataverse)](https://www.npmjs.com/package/mcp-dataverse)
@@ -25,7 +25,7 @@
2525

2626
AI agents hallucinate schema, guess column names, and build broken OData queries. This server gives them **real-time access** to your Dataverse environment — schema, records, metadata, solutions — through the [Model Context Protocol](https://modelcontextprotocol.io).
2727

28-
- **No Azure AD app registration** — device code flow, zero pre-configuration
28+
- **Three auth modes** — device code (local), client credentials (CI/CD), managed identity (Azure-hosted)
2929
- **Works with any MCP client** — VS Code, Claude, Cursor, Windsurf, Gemini, Codex CLI
3030
- **Atomic tools** — each tool does one thing well; the AI picks the right one
3131
- **Structured outputs** — every response returns `{summary, data, suggestions}`
@@ -48,31 +48,45 @@ The interactive wizard configures your environment, registers the server in VS C
4848

4949
## Authentication
5050

51-
**No PAC CLI, no app registration, no client secret.** Uses Microsoft's device code flow (MSAL):
51+
Three modes — choose based on where the server runs:
5252

53-
1. **First tool call** → a sign-in code appears in the MCP Output panel (`View → Output → MCP`)
54-
2. Open `https://microsoft.com/devicelogin` → enter the code → sign in with your work account
55-
3. **Done.** Token is cached encrypted — all future starts are silent
53+
| Mode | When to use |
54+
|:-----|:------------|
55+
| **Device Code** (default) | Local development — interactive Microsoft login, token cached on disk |
56+
| **Client Credentials** | Unattended: CI/CD, Docker, Azure services — `authMethod: "client-credentials"` + App Registration |
57+
| **Managed Identity** | Azure-hosted (App Service, Container Apps) — zero secrets, `authMethod: "managed-identity"` |
5658

57-
Re-authenticate after ~90 days of inactivity: `npx mcp-dataverse-auth`
59+
**Device code quick start:** authentication triggers on the first tool call.
60+
61+
1. Open `View → Output → MCP` — a sign-in code appears
62+
2. Go to `https://microsoft.com/devicelogin`, enter the code, sign in with your work account
63+
3. Token is cached encrypted — all future starts are silent
64+
65+
For client credentials and managed identity setup, see [Authentication docs](https://codeurali.github.io/mcp-dataverse/authentication).
5866

5967
---
6068

6169
## Capabilities
6270

63-
| Category | Count | Description |
71+
| Category | Count | Description |
6472
| ----------------------- | ----- | -------------------------------------------------------------- |
65-
| **Metadata** | 8 | Tables, schema, relationships, option sets, entity keys |
66-
| **Query** | 3 | OData, FetchXML, paginated retrieval |
67-
| **CRUD** | 6 | Get, create, update, delete, upsert, assign |
68-
| **Actions & Functions** | 6 | Bound/unbound Dataverse actions and functions |
69-
| **Batch** | 1 | Up to 1000 operations atomically |
70-
| **Solutions** | 3 | List solutions, components, publish customizations |
71-
| **Search** | 1 | Full-text Relevance Search |
72-
| **Users & Teams** | 3 | Users, roles, teams |
73-
| **Files** | 2 | Upload/download file and image columns |
74-
| **+ more** || Audit, trace logs, delta tracking, impersonation, annotations… |
75-
| **Assistance** | 4 | Tool router, workflow guide |
73+
| **Metadata** | 9 | Tables, schema, relationships, option sets, entity keys |
74+
| **Query** | 3 | OData, FetchXML, paginated retrieval |
75+
| **CRUD** | 6 | Get, create, update, delete, upsert, assign |
76+
| **Relations** | 4 | Associate, associate bulk, disassociate, query associations |
77+
| **Actions & Functions** | 6 | Bound/unbound Dataverse actions and functions |
78+
| **Batch** | 1 | Up to 1000 operations atomically |
79+
| **Solutions** | 2 | Publish customizations, create sitemap |
80+
| **Search** | 1 | Full-text Relevance Search |
81+
| **Users & Teams** | 4 | Users, roles, teams, role assignment |
82+
| **RBAC** | 7 | Role privileges: list, assign, remove, add, replace, get, team |
83+
| **Files** | 2 | Upload/download file and image columns |
84+
| **Audit & Trace** | 3 | Audit log, plugin trace logs, workflow trace logs |
85+
| **Annotations** | 2 | Notes and file attachments |
86+
| **Customization** | 4 | Custom actions, plugins, env variables, connection references |
87+
| **Attributes** | 5 | Create, update, delete columns; lookup and multi-select types |
88+
| **Assistance** | 2 | Tool router, tool tags |
89+
| **+ more** || Delta sync, impersonation, views, business units, duplicate detection |
7690

7791
[→ Full Capabilities Reference](https://codeurali.github.io/mcp-dataverse/capabilities)
7892

@@ -126,7 +140,8 @@ MCP Dataverse is designed to be comprehensive, but most AI models work best with
126140
| Version | Feature | Status |
127141
| ------- | ------- | ------ |
128142
| **v0.4** | HTTP transport + attribute management + schema consistency | ✅ Released |
129-
| **v0.5** | Enterprise auth (Client Credentials, Managed Identity) + MCP Prompts | 🔴 Planned |
143+
| **v0.5** | Enterprise auth (Client Credentials, Managed Identity, Entra JWT) | ✅ Released |
144+
| **v0.6** | MCP Prompts + ERD generator + API snippet generator | 🔜 Planned |
130145

131146
[→ Full Roadmap](https://codeurali.github.io/mcp-dataverse/roadmap)
132147

config.example.jsonc

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
{
22
"environmentUrl": "https://yourorg.crm.dynamics.com",
33
"requestTimeoutMs": 30000,
4-
"maxRetries": 3
4+
"maxRetries": 3,
55
}
66

7-
// HTTP transport mode (optional — uncomment to use)
7+
// ── Auth methods ──────────────────────────────────────────────────────────────
8+
//
9+
// Default (device-code) — interactive Microsoft login, token cached on disk.
10+
// No extra fields needed.
11+
//
12+
// Client Credentials — Azure AD App Registration for CI/CD and unattended scenarios.
13+
// {
14+
// "environmentUrl": "https://yourorg.crm.dynamics.com",
15+
// "authMethod": "client-credentials",
16+
// "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
17+
// "clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
18+
// "clientSecret": "your-client-secret" // prefer AZURE_CLIENT_SECRET env var
19+
// }
20+
//
21+
// Managed Identity — zero-secret auth for Azure-hosted deployments.
22+
// System-assigned:
23+
// {
24+
// "environmentUrl": "https://yourorg.crm.dynamics.com",
25+
// "authMethod": "managed-identity"
26+
// }
27+
// User-assigned:
28+
// {
29+
// "environmentUrl": "https://yourorg.crm.dynamics.com",
30+
// "authMethod": "managed-identity",
31+
// "managedIdentityClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
32+
// }
33+
//
34+
// ── HTTP transport mode (optional — uncomment to use) ─────────────────────────
835
// {
936
// "environmentUrl": "https://yourorg.crm.dynamics.com",
1037
// "requestTimeoutMs": 30000,
@@ -13,8 +40,16 @@
1340
// "httpPort": 3000
1441
// }
1542
//
16-
// Matching environment variables:
17-
// MCP_TRANSPORT=http
18-
// MCP_HTTP_PORT=3000
19-
// MCP_HTTP_SECRET=your-bearer-token (optional: enables Authorization header check)
20-
// MCP_HTTP_JSON_RESPONSE=true (default: true; set to false for SSE streaming)
43+
// ── Environment variable reference ───────────────────────────────────────────
44+
// DATAVERSE_ENV_URL environmentUrl
45+
// AUTH_METHOD authMethod (device-code | client-credentials | managed-identity)
46+
// AZURE_TENANT_ID tenantId
47+
// AZURE_CLIENT_ID clientId
48+
// AZURE_CLIENT_SECRET clientSecret (recommended over config file)
49+
// AZURE_MANAGED_IDENTITY_CLIENT_ID managedIdentityClientId
50+
// REQUEST_TIMEOUT_MS requestTimeoutMs
51+
// MAX_RETRIES maxRetries
52+
// MCP_TRANSPORT http | stdio
53+
// MCP_HTTP_PORT httpPort
54+
// MCP_HTTP_SECRET bearer token for HTTP transport (optional)
55+
// MCP_HTTP_JSON_RESPONSE true | false (default: true)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import{a}from"./chunk-M5UROAVJ.js";import"./chunk-RYRO3QPE.js";import"./chunk-KJ3HM2VM.js";export{a as createAuthProvider};

dist/auth-provider.factory-MSMLSOX3.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/chunk-24RDOMG4.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

dist/chunk-KJ3HM2VM.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)