@ionite/ecv 0.0.23-beta.20260729.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{$ as _,A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,O as N,P as O,Q as P,R as Q,S as R,T as S,U as T,V as U,W as V,X as W,Y as X,Z as Y,_ as Z,aa as $,b as a,ba as aa,c as b,ca as ba,d as c,da as ca,e as d,ea as da,f as e,fa as ea,g as f,ga as fa,h as g,ha as ga,i as h,ia as ha,j as i,ja as ia,k as j,ka as ja,l as k,la as ka,m as l,ma as la,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./shared/ecv-rcmx1a2s.js";export{a as waitForReady,R as validateWorkload,ia as validateVaultWebSocketTransport,ga as validateValidatorParity,ea as validateTenantLifecycle,ba as validateTenant,Q as validateSsoIdTokenVerification,aa as validateSecretsHardening,N as validateSSO,_ as validateRedisStores,M as validateProtocolSurface,Y as validatePerformanceTuning,K as validateOtel,I as validateLfvDelivery,G as validateIamDelta,D as validateIAM,v as validateCapabilities,x as validateCIAM,q as validateAuthz,f as stopEcvServer,e as startEcvServer,b as startAppUnderTest,j as skipTest,c as setVaultRedisUrl,i as runTest,g as resolveBaseUrl,la as printReport,d as getVaultRedisUrl,u as getTenantAuthToken,T as fetchCapabilitiezManifest,ja as defineECVTests,ka as defineDiscoveredECVSuite,S as createWorkloadTests,p as createWorkloadScopeTests,ha as createVaultWebSocketTransportTests,fa as createValidatorParityTests,ca as createTenantTests,da as createTenantLifecycleTests,P as createSsoIdTokenVerificationTests,$ as createSecretsHardeningTests,O as createSSOTests,Z as createRedisStoreTests,L as createProtocolSurfaceTests,X as createPerformanceTuningTests,J as createOtelTests,o as createOaaProjectionTests,H as createLfvCallbackTests,F as createIamDeltaPatchTests,E as createIAMTests,C as createHarnessSelfTests,h as createFetcher,W as createDiscoveredECVTests,B as createConfigRetryTests,z as createConfigLifecycleTests,A as createConfigBoundaryTests,w as createCapabilityTests,y as createCIAMTests,n as createAuthzClosureTests,U as capabilitySkipReason,V as buildEcvCatalog,m as assertValid,l as assertEqual,k as assert,t as ION_TENANT_SCOPE,r as ION_IAM_SCOPES,s as ION_CAPABILITIEZ_SCOPE};
package/dist/runner.js ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env bun
2
+ import{E as W,H as y,J as D,O as V,S as x,Z as M,a as E,ca as _,ha as A,k as H,r as N,y as O}from"./shared/ecv-rcmx1a2s.js";import{ionite as S,openbaoVault as C,vaultConfig as P}from"@ionite/server";import{createValidators as f}from"@ionite/valibot";function L(G,F,Q){return{suite:G,passed:!0,tests:[H(F,Q)],duration:0,summary:{total:1,passed:0,failed:0,skipped:1}}}async function Y(G,F,Q){console.log(`\uD83D\uDCDD Running ${F} validation tests...`);try{let K=await Q();return console.log(` ${K.passed?"✅":"❌"} ${G}: ${K.summary.passed}/${K.summary.total} passed
3
+ `),K}catch(K){return console.error(` ❌ ${G} tests failed: ${K instanceof Error?K.message:String(K)}
4
+ `),{suite:G,passed:!1,tests:[{name:`${G} Test Execution`,passed:!1,error:K instanceof Error?K.message:String(K),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}}}}function m(G){let F=C({url:process.env.ION_VAULT_URL,token:process.env.ION_VAULT_TOKEN});return S(P({vault:F,path:G}),{validators:f()})}function k(){let G=process.env.TEST_BASE_URL,F=process.env.ION_VAULT_URL,Q=process.env.ION_VAULT_TOKEN,K=process.env.ION_VAULT_PATH,X=process.env.RESULTS_CALLBACK_URL;if(!G)throw Error("TEST_BASE_URL environment variable is required");if(!F)throw Error("ION_VAULT_URL environment variable is required");if(!Q)throw Error("ION_VAULT_TOKEN environment variable is required");if(!K)throw Error("ION_VAULT_PATH environment variable is required");if(!X)throw Error("RESULTS_CALLBACK_URL environment variable is required");return{baseUrl:G,vaultUrl:F,vaultToken:Q,vaultPath:K,callbackUrl:X}}function p(G){return{baseUrl:G,loginPath:process.env.TEST_SSO_LOGIN_PATH,callbackPath:process.env.TEST_SSO_CALLBACK_PATH,userPath:process.env.TEST_SSO_USER_PATH,logoutPath:process.env.TEST_SSO_LOGOUT_PATH,backChannelLogoutPath:process.env.TEST_SSO_BACKCHANNEL_LOGOUT_PATH}}function R(G,F){return{baseUrl:G,ion:F,scimPath:process.env.TEST_IAM_SCIM_PATH,groupsInboundPath:process.env.TEST_IAM_GROUPS_INBOUND_PATH}}function U(G){return{baseUrl:G,validatePath:process.env.TEST_WORKLOAD_VALIDATE_PATH,jwksPath:process.env.TEST_WORKLOAD_JWKS_PATH}}function c(G){return{baseUrl:G,customerPath:process.env.TEST_CIAM_CUSTOMER_PATH,magicLinkPath:process.env.TEST_CIAM_MAGIC_LINK_PATH,magicLinkLoginPath:process.env.TEST_CIAM_MAGIC_LINK_LOGIN_PATH,logoutPath:process.env.TEST_CIAM_LOGOUT_PATH,backChannelLogoutPath:process.env.TEST_CIAM_BACKCHANNEL_LOGOUT_PATH}}function d(G){let F=process.env.TEST_TENANT_COMPANY_ID?{id:process.env.TEST_TENANT_APP_ID||process.env.TEST_TENANT_COMPANY_ID,companyId:process.env.TEST_TENANT_COMPANY_ID,companyName:process.env.TEST_TENANT_COMPANY_NAME||"Test Company",environmentType:process.env.TEST_TENANT_ENVIRONMENT_TYPE||"POC",email:process.env.TEST_TENANT_EMAIL||"test@example.com",callbackUrl:process.env.TEST_TENANT_CALLBACK_URL,configLocator:{path:process.env.TEST_TENANT_CONFIG_LOCATOR_PATH||"/ecv/test-config",...process.env.TEST_TENANT_CONFIG_LOCATOR_SOURCE?{source:process.env.TEST_TENANT_CONFIG_LOCATOR_SOURCE}:{},...process.env.TEST_TENANT_CONFIG_LOCATOR_TTL?{ttl:Number(process.env.TEST_TENANT_CONFIG_LOCATOR_TTL)}:{}}}:void 0;return{baseUrl:G,tenantPath:process.env.TEST_TENANT_PATH,testTenantData:F}}async function b(G,F){let Q=await fetch(G,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...F,timestamp:F.timestamp.toISOString()})});if(!Q.ok){let K=await Q.text().catch(()=>"Unknown error");throw Error(`Failed to post results to callback URL: ${Q.status} ${Q.statusText} - ${K}`)}}async function v(){let G=performance.now();try{console.log(`\uD83D\uDE80 Starting Enterprise Control Validation Test Runner...
5
+ `);let{baseUrl:F,vaultUrl:Q,vaultToken:K,vaultPath:X,callbackUrl:j}=k();console.log("\uD83D\uDCCB Configuration:"),console.log(` Base URL: ${F}`),console.log(` Vault URL: ${Q}`),console.log(` Vault Path: ${X}`),console.log(` Callback URL: ${j}
6
+ `),process.env.ION_VAULT_URL=Q,process.env.ION_VAULT_TOKEN=K,process.env.ION_VAULT_PATH=X,console.log("\uD83D\uDD27 Initializing Ionite instance...");let Z=null;try{Z=m(X),await Z.ready(30000),console.log(`✅ Ionite initialized
7
+ `)}catch(B){console.warn(`⚠️ Failed to initialize Ionite: ${B instanceof Error?B.message:String(B)}`),console.warn(` Some tests (IAM) may be skipped
8
+ `)}let w=p(F),h=R(F,()=>Z),T=U(F),I=d(F),g=c(F),J=[];console.log(`\uD83E\uDDEA Running validation tests...
9
+ `),console.log("\uD83D\uDCDD Running SSO validation tests...");try{let B=await V(w);J.push(B),console.log(` ${B.passed?"✅":"❌"} SSO: ${B.summary.passed}/${B.summary.total} passed
10
+ `)}catch(B){console.error(` ❌ SSO tests failed: ${B instanceof Error?B.message:String(B)}
11
+ `),J.push({suite:"SSO",passed:!1,tests:[{name:"SSO Test Execution",passed:!1,error:B instanceof Error?B.message:String(B),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}})}console.log("\uD83D\uDCDD Running IAM validation tests...");try{let B=await W(h);J.push(B),console.log(` ${B.passed?"✅":"❌"} IAM: ${B.summary.passed}/${B.summary.total} passed
12
+ `)}catch(B){console.error(` ❌ IAM tests failed: ${B instanceof Error?B.message:String(B)}
13
+ `),J.push({suite:"IAM",passed:!1,tests:[{name:"IAM Test Execution",passed:!1,error:B instanceof Error?B.message:String(B),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}})}console.log("\uD83D\uDCDD Running Workload validation tests...");try{let B=await x(T);J.push(B),console.log(` ${B.passed?"✅":"❌"} Workload: ${B.summary.passed}/${B.summary.total} passed
14
+ `)}catch(B){console.error(` ❌ Workload tests failed: ${B instanceof Error?B.message:String(B)}
15
+ `),J.push({suite:"Workload",passed:!1,tests:[{name:"Workload Test Execution",passed:!1,error:B instanceof Error?B.message:String(B),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}})}console.log("\uD83D\uDCDD Running Tenant validation tests...");try{let B=await _(I);J.push(B),console.log(` ${B.passed?"✅":"❌"} Tenant: ${B.summary.passed}/${B.summary.total} passed
16
+ `)}catch(B){console.error(` ❌ Tenant tests failed: ${B instanceof Error?B.message:String(B)}
17
+ `),J.push({suite:"Tenant",passed:!1,tests:[{name:"Tenant Test Execution",passed:!1,error:B instanceof Error?B.message:String(B),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}})}console.log("\uD83D\uDCDD Running CIAM validation tests...");try{let B=await O(g);J.push(B),console.log(` ${B.passed?"✅":"❌"} CIAM: ${B.summary.passed}/${B.summary.total} passed
18
+ `)}catch(B){console.error(` ❌ CIAM tests failed: ${B instanceof Error?B.message:String(B)}
19
+ `),J.push({suite:"CIAM",passed:!1,tests:[{name:"CIAM Test Execution",passed:!1,error:B instanceof Error?B.message:String(B),duration:0}],duration:0,summary:{total:1,passed:0,failed:1,skipped:0}})}J.push(await Y("Authz","Authz",()=>N())),J.push(await Y("IAM Delta","IAM Delta",()=>y())),J.push(await Y("LFV","LFV",()=>D())),J.push(await Y("Validator parity","Validator parity",()=>A())),J.push(await Y("Performance tuning","Performance tuning",()=>M()));let q="requires the ECV mock-server harness (capabilitiez token broker / Veza receiver); run via defineDiscoveredECVSuite or defineECVTests";J.push(L("Capabilities","Capability catalog",q)),J.push(L("Workload scopes","Workload scope authorization",q));let z=performance.now()-G,$={timestamp:new Date,baseUrl:F,passed:J.every((B)=>B.passed),suites:J,duration:z};console.log("\uD83D\uDCCA Test Summary:"),console.log(` Total Suites: ${J.length}`),console.log(` Passed: ${J.filter((B)=>B.passed).length}`),console.log(` Failed: ${J.filter((B)=>!B.passed).length}`),console.log(` Duration: ${z.toFixed(2)}ms`),console.log(` Overall: ${$.passed?"✅ PASSED":"❌ FAILED"}
20
+ `),console.log("\uD83D\uDCE4 Posting results to callback URL..."),await b(j,$),console.log(`✅ Results posted successfully
21
+ `),process.exit($.passed?0:1)}catch(F){if(console.error(`
22
+ ❌ Fatal error:`,F instanceof Error?F.message:String(F)),F instanceof Error&&F.stack)console.error(F.stack);process.exit(1)}}if(E.main==E.module)v();