Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DCA_VAULT_ADDRESS=0x155eC4256cC6f11f3d4C21Af28a2a1CC31f730d1
PHASE2_EVIDENCE_ENABLED=false
DB_GATEWAY_URL=
DB_GATEWAY_SERVICE_TOKEN=
DB_GATEWAY_TENANT_ID=panorama-default
DB_GATEWAY_TENANT_ID=panorama
DB_GATEWAY_TIMEOUT_MS=5000

# Comma-separated wallet addresses allowed to perform Phase 2 admin-wide evidence exports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,42 @@ describe("user identity evidence source disclosure minimisation", () => {
);
}
});

it("uses panorama as the default tenant for user-estate export", async () => {
delete process.env.DB_GATEWAY_TENANT_ID;

const originalFetch = global.fetch;
const observedTenants: string[] = [];

global.fetch = vi.fn(async (_input, init) => {
const headers = new Headers(init?.headers);
observedTenants.push(headers.get("X-Tenant-Id") ?? "");

return new Response(
JSON.stringify({
data: [],
}),
{
status: 200,
headers: {
"Content-Type": "application/json",
},
}
);
}) as typeof fetch;

try {
await exportUserIdentityEvidenceAdmin();
} finally {
global.fetch = originalFetch;
}

expect(observedTenants).toHaveLength(3);
expect(observedTenants).toEqual([
"panorama",
"panorama",
"panorama",
]);
});

});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createHash } from "crypto";

const DEFAULT_TENANT_ID = "panorama-default";
const DEFAULT_TENANT_ID = "panorama";
const PAGE_SIZE = 1000;

interface UserProfileRecord {
Expand Down
Loading