Fix URL
All checks were successful
Client Tech / build-deploy (push) Successful in 13s

This commit is contained in:
Grae Jones
2026-03-21 21:12:50 -07:00
parent f38a239b9d
commit afccd716f9
5 changed files with 39 additions and 36 deletions

BIN
Client-Tech/Tech.zip Normal file

Binary file not shown.

View File

@@ -1,25 +1,28 @@
/** /**
* authConfig.js Tech Client (Staff Plane) * authConfig.js - Tech Client (Staff Plane)
* *
* ┌─────────────────────────────────────────────────────────────────────────┐ * APP REGISTRATION MAP (positivespend tenant: f56a3c51-9b5c-4356-920f-b4dcf932a96b)
* │ PRODUCTION MIGRATION — only these values change at handoff: │ * -------------------------------------------------------------------------
* │ │ * Tech SPA (this app) 846a3677-9135-4ba6-b7f5-933dcce126be
* STAFF_AUTHORITY → 'https://login.microsoftonline.com/{ORG_TENANT}' │ * - Platform: SPA
* STAFF_TENANT_ID → new company org tenant ID │ * - Redirect URI: <Tech deployment origin> - must be registered in portal,
* STAFF_CLIENT_ID → staff app registration in org tenant │ * matches window.location.origin at runtime.
* * - API permissions: api://af95fa13-.../access_as_user (delegated)
* │ No other code changes required anywhere. │
* └─────────────────────────────────────────────────────────────────────────┘
* *
* DEV NOTE: Staff currently authenticate against the CIAM tenant (same as * Management Staff API af95fa13-2ef4-4911-b137-7acc6a784cfa
* clients) because no org tenant exists yet. The login screen looks identical * - Exposes scope: access_as_user
* to the client login — this is cosmetic only. API isolation is enforced by * - App roles: Staff.Admin, Staff.Tech
* audience: staff tokens are rejected by Gateway, client tokens by Management. * - Management validates JWTs issued for this audience
*
* FLOW: MSAL authenticates as 846a3677, acquires a token scoped to
* api://af95fa13-.../access_as_user, sends as Bearer to Management API.
* Management validates: issuer = login.microsoftonline.com/f56a3c51/v2.0,
* audience = af95fa13 or api://af95fa13, roles = Staff.Admin | Staff.Tech.
*/ */
// ── Staff Identity Config ───────────────────────────────────────────────────── // ── Staff Identity Config ─────────────────────────────────────────────────────
const STAFF_TENANT_ID = '0be4c23a-6941-4bdb-b397-a4faf88de4b3'; const STAFF_TENANT_ID = 'f56a3c51-9b5c-4356-920f-b4dcf932a96b';
const STAFF_CLIENT_ID = '846a3677-9135-4ba6-b7f5-933dcce126be'; const STAFF_CLIENT_ID = '846a3677-9135-4ba6-b7f5-933dcce126be';
// PROD: swap to → 'https://login.microsoftonline.com/' + STAFF_TENANT_ID // PROD: swap to → 'https://login.microsoftonline.com/' + STAFF_TENANT_ID
@@ -56,13 +59,13 @@ export const msalConfig = {
}; };
export const loginRequest = { export const loginRequest = {
scopes: ["api://4e4d69c3-558a-4a27-a689-17bd397175e5/access_as_user"] scopes: ["api://af95fa13-2ef4-4911-b137-7acc6a784cfa/access_as_user"]
}; };
// ── API Endpoints ───────────────────────────────────────────────────────────── // ── API Endpoints ─────────────────────────────────────────────────────────────
export const API_BASE = 'https://adpapi.usimdev.com'; // Gateway API export const API_BASE = 'https://portal.positivespend.com'; // Gateway API
export const MGMT_BASE = 'https://adpmgmt.usimdev.com'; // Management API export const MGMT_BASE = 'https://mgmt.positivespend.com'; // Management API
// Legacy — kept for backward compatibility with apiClient.js // Legacy — kept for backward compatibility with apiClient.js
export const SESSION_ENDPOINT = `${API_BASE}/api/auth/session`; export const SESSION_ENDPOINT = `${API_BASE}/api/auth/session`;

View File

@@ -18,7 +18,7 @@ const DEFAULTS = {
clientId: '330518338348-a1qto1jug5tmpc6565059apsggsfg12i.apps.googleusercontent.com', clientId: '330518338348-a1qto1jug5tmpc6565059apsggsfg12i.apps.googleusercontent.com',
clientSecret: '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', clientSecret: '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',
scope: 'https://www.googleapis.com/auth/adwords', scope: 'https://www.googleapis.com/auth/adwords',
containerApp: 'usim-adp-googleapi', containerApp: 'adp-googleapi',
resourceGroup: 'RG-GraeJones' resourceGroup: 'RG-GraeJones'
}; };

View File

@@ -2,29 +2,29 @@ import React, { useState, useCallback } from 'react';
import { useAuth } from '../auth/AuthProvider'; import { useAuth } from '../auth/AuthProvider';
import { API_BASE } from '../auth/authConfig'; import { API_BASE } from '../auth/authConfig';
const HELP_BASE = 'https://adpmgmt.usimdev.com/api/help'; const HELP_BASE = 'https://mgmt.positivespend.com/api/help';
// ─── Service definitions ────────────────────────────────────────────────────── // ─── Service definitions ──────────────────────────────────────────────────────
const SERVICE_META = { const SERVICE_META = {
gateway: { gateway: {
label: 'Gateway API', sub: 'adsapi.usimdev.com', tier: 'public', color: '#0066cc', label: 'Gateway API', sub: 'portal.positivespend.com', tier: 'public', color: '#0066cc',
mode: 'direct', url: `${API_BASE}/api/test/ping`, mode: 'direct', url: `${API_BASE}/api/test/ping`,
tech: '.NET 8 · Azure Container Apps · SQL Server', tech: '.NET 8 · Azure Container Apps · SQL Server',
}, },
management: { management: {
label: 'Management API', sub: 'adpmgmt.usimdev.com', tier: 'public', color: '#0ea5e9', label: 'Management API', sub: 'mgmt.positivespend.com', tier: 'public', color: '#0ea5e9',
mode: 'direct', url: 'https://adpmgmt.usimdev.com/health', mode: 'direct', url: 'https://mgmt.positivespend.com/health',
tech: '.NET 8 · Azure Container Apps · SQL Server', tech: '.NET 8 · Azure Container Apps · SQL Server',
}, },
tech: { tech: {
label: 'Tech (TestAPI)', sub: 'adptestapi.usimdev.com', tier: 'public', color: '#64748b', label: 'Tech (TestAPI)', sub: 'tech.positivespend.com', tier: 'public', color: '#64748b',
mode: 'none', mode: 'none',
tech: 'React · MSAL · Azure Container Apps', tech: 'React · MSAL · Azure Container Apps',
}, },
registration: { registration: {
label: 'Registration', sub: 'adpregapi.usimdev.com', tier: 'registration', color: '#f97316', label: 'Registration', sub: 'regapi.positivespend.com', tier: 'registration', color: '#f97316',
mode: 'direct', url: 'https://adpregapi.usimdev.com/api/health', mode: 'direct', url: 'https://regapi.positivespend.com/api/health',
tech: 'Azure Functions · .NET 8', tech: 'Azure Functions · .NET 8',
}, },
creative: { creative: {

View File

@@ -502,7 +502,7 @@ export const servicesByProvider = {
sample: {}, sample: {},
endpoint: '/api/health', endpoint: '/api/health',
method: 'GET', method: 'GET',
baseUrl: 'https://adpregapi.usimdev.com' baseUrl: 'https://regapi.positivespend.com'
}, },
// ── Admin ops below route through Management proxy (/api/registration/*). // ── Admin ops below route through Management proxy (/api/registration/*).
// Management validates the Entra JWT, then forwards to Registration Function // Management validates the Entra JWT, then forwards to Registration Function
@@ -515,7 +515,7 @@ export const servicesByProvider = {
sample: {}, sample: {},
endpoint: '/api/registration/pending', endpoint: '/api/registration/pending',
method: 'GET', method: 'GET',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'GetById', id: 'GetById',
@@ -525,7 +525,7 @@ export const servicesByProvider = {
sample: { registrationId: 'reg-001' }, sample: { registrationId: 'reg-001' },
endpoint: '/api/registration/{registrationId}', endpoint: '/api/registration/{registrationId}',
method: 'GET', method: 'GET',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'Reject', id: 'Reject',
@@ -535,7 +535,7 @@ export const servicesByProvider = {
sample: { registrationId: 'reg-001', reason: 'Incomplete information' }, sample: { registrationId: 'reg-001', reason: 'Incomplete information' },
endpoint: '/api/registration/{registrationId}/reject', endpoint: '/api/registration/{registrationId}/reject',
method: 'POST', method: 'POST',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'Complete', id: 'Complete',
@@ -545,7 +545,7 @@ export const servicesByProvider = {
sample: { registrationId: 'reg-001', platformClientId: 'ADP-TestBusiness-0001' }, sample: { registrationId: 'reg-001', platformClientId: 'ADP-TestBusiness-0001' },
endpoint: '/api/registration/{registrationId}/complete', endpoint: '/api/registration/{registrationId}/complete',
method: 'POST', method: 'POST',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
// Register — still hits Registration Function directly (CIAM JWT, not staff plane) // Register — still hits Registration Function directly (CIAM JWT, not staff plane)
{ {
@@ -564,7 +564,7 @@ export const servicesByProvider = {
}, },
endpoint: '/api/registration/register', endpoint: '/api/registration/register',
method: 'POST', method: 'POST',
baseUrl: 'https://adpregapi.usimdev.com' baseUrl: 'https://regapi.positivespend.com'
} }
], ],
management: [ management: [
@@ -576,7 +576,7 @@ export const servicesByProvider = {
sample: {}, sample: {},
endpoint: '/health', endpoint: '/health',
method: 'GET', method: 'GET',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'HelpGet', id: 'HelpGet',
@@ -586,7 +586,7 @@ export const servicesByProvider = {
sample: { key: 'client.wizard.budget' }, sample: { key: 'client.wizard.budget' },
endpoint: '/api/help/{key}', endpoint: '/api/help/{key}',
method: 'GET', method: 'GET',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'DocumentList', id: 'DocumentList',
@@ -596,7 +596,7 @@ export const servicesByProvider = {
sample: {}, sample: {},
endpoint: '/api/documents', endpoint: '/api/documents',
method: 'GET', method: 'GET',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
}, },
{ {
id: 'DocumentDelete', id: 'DocumentDelete',
@@ -606,7 +606,7 @@ export const servicesByProvider = {
sample: { docId: 1 }, sample: { docId: 1 },
endpoint: '/api/documents/{docId}', endpoint: '/api/documents/{docId}',
method: 'DELETE', method: 'DELETE',
baseUrl: 'https://adpmgmt.usimdev.com' baseUrl: 'https://mgmt.positivespend.com'
} }
] ]
}; };