UNPKG

@fntio/infra-client

Version:

Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.

2 lines (1 loc) • 5.75 kB
import{a as P,b as O}from"./chunk-LZGCHP4J.js";import"./chunk-252EGHSF.js";import{a as k}from"./chunk-SFL4IAVC.js";import{c as C}from"./chunk-AHQHRRHN.js";import{a as I}from"./chunk-DEPFCVZL.js";import"./chunk-GK2T2SMO.js";import"./chunk-Y6FHN4DA.js";import"./chunk-TOO3FEYQ.js";import"./chunk-6CP7VLN2.js";import"./chunk-KRQ75YR4.js";import"./chunk-64ITJKG6.js";import"./chunk-IKK5DQ3Z.js";import"./chunk-LEEL6MDA.js";import"./chunk-HUXCPIDO.js";import{a as f}from"./chunk-XPF5YBGU.js";import"./chunk-XUEIITMC.js";import"./chunk-Z2HQA5DO.js";import{a as S,b as R,c as g,d as b,e as y,f as v,g as E,h as T}from"./chunk-B6V6MXM2.js";import"./chunk-QAZJZDEE.js";import"./chunk-2DD7CZB4.js";import"./chunk-J7PZFXOE.js";import"./chunk-BG475WXG.js";import"./chunk-YGAHR42T.js";import{a as N}from"./chunk-NTF5XIGH.js";import"./chunk-Z3HRRJWO.js";import"./chunk-3PQNISIL.js";import"./chunk-SH2F2DCQ.js";import"./chunk-V32HQ2F2.js";import"./chunk-BADG46IJ.js";import"./chunk-Q736XS6E.js";import"./chunk-TVCLJWZS.js";import"./chunk-WM5A6BAU.js";import"./chunk-JNANYFF2.js";import"./chunk-YMC4QOLO.js";import"./chunk-6NTXC6VK.js";import"./chunk-6HVGPPAG.js";import"./chunk-XOFD5DNL.js";import"./chunk-PU4UT4HF.js";import"./chunk-Y2PHG5VS.js";import{a as A}from"./chunk-SYLZLLGS.js";import"./chunk-IVXFG5AJ.js";import"./chunk-2SO4BVIT.js";import{a as u}from"./chunk-2BNLISUN.js";import"./chunk-T5HLFYHP.js";import{c as d}from"./chunk-KCJ5HNXP.js";import"./chunk-3SC2PPSK.js";import"./chunk-B67EMZ2H.js";import"./chunk-MID2IYAR.js";import"./chunk-6GDWMGWO.js";import"./chunk-7A4HO4AV.js";import"./chunk-ZRDXKVPG.js";import{g as o}from"./chunk-FYA6QUPZ.js";import{a as l,b as p}from"./chunk-WFIHWVQO.js";var s="448210007710",e="990144552201",c={[s]:"Acme Production",[e]:"Acme Staging"},_={[`${s}#AdminAccess`]:"#3e63dd",[`${e}#DeployRole`]:"#e5484d",[`${e}#ReadOnly`]:"#30a46c"},U=[{userId:"u-ada",email:"ada@acme.com",admin:!0,pendingInvite:!1,lastSeenAt:"2026-08-26T09:12:00Z",roles:[{accountNumber:s,roleName:"AdminAccess",direct:!0,groups:[]},{accountNumber:e,roleName:"DeployRole",direct:!0,groups:["Platform team"]},{accountNumber:e,roleName:"ReadOnly",direct:!1,groups:["Platform team"]}],resources:[]},{userId:"u-grace",email:"grace@acme.com",admin:!1,pendingInvite:!0,roles:[{accountNumber:e,roleName:"DeployRole",direct:!1,groups:["Platform team"]}],resources:[{resourceId:"r-payments",name:"payments-db",accountNumber:e,direct:!0,groups:[]}]},{userId:"u-tom",email:"tom@acme.com",admin:!1,pendingInvite:!1,lastSeenAt:"2026-08-20T15:40:00Z",roles:[],resources:[]}],w=[{groupId:"g-platform",name:"Platform team",description:"Deploy + read access to staging.",roles:[{accountNumber:e,roleName:"DeployRole"},{accountNumber:e,roleName:"ReadOnly"}],resources:[{resourceId:"r-payments",name:"payments-db"}],members:[{userId:"u-ada",email:"ada@acme.com"},{userId:"u-grace",email:"grace@acme.com"}],createdAt:"2026-07-01T10:00:00Z",createdBy:"ada@acme.com"}];function L(t){let a=new Map;for(let m of t)for(let n of m.members){let i=a.get(n.userId)??[];i.push(m),a.set(n.userId,i)}return a}var M=[{clientId:"7f2ab1c9d4e5f60718293a4b5c6d7e8f",name:"github-actions-deploy",createdAt:"2026-07-15T08:00:00Z",createdBy:"ada@acme.com",lastUsedAt:"2026-08-27T06:30:00Z",scopes:["aws"],roles:[{accountNumber:e,roleName:"DeployRole",grantedBy:"ada@acme.com"}]},{clientId:"11aa22bb33cc44dd55ee66ff77889900",name:"nightly-report",createdAt:"2026-08-01T08:00:00Z",createdBy:"ada@acme.com",scopes:["admin.write.all"],roles:[],previous:{clientId:"00998877ffee66dd55cc44bb33aa2211",rotatedAt:"2026-08-25T12:00:00Z"}},{clientId:"5e6d7c8b9a0f1e2d3c4b5a6978immense",name:"vm-provisioner",createdAt:"2026-10-19T08:00:00Z",createdBy:"ada@acme.com",lastUsedAt:"2026-10-20T07:45:00Z",scopes:["aws","network"],roles:[{accountNumber:e,roleName:"VmBuilder",grantedBy:"ada@acme.com"}]}];var B=1440*60*1e3,r=t=>new Date(Date.now()+t*B).toISOString(),x=[{tokenId:"tok-deploy",name:"ci-deploy",description:"Deploys the staging stack from the nightly pipeline.",scopes:["aws"],roles:[{accountNumber:e,roleName:"DeployRole"}],createdAt:r(-20),expiresAt:r(40),lastUsedAt:r(-.2)},{tokenId:"tok-devbox",name:"remote-devbox",description:"Enrolls my remote development machine and shares its preview port.",scopes:["network","shares"],createdAt:r(-25),expiresAt:r(5),lastUsedAt:r(-3)},{tokenId:"tok-cli",name:"laptop-cli",scopes:["api","aws"],createdAt:r(-2),expiresAt:r(88)}],h=[...x.map(t=>p(l({},t),{ownerId:"u-ada",ownerEmail:"ada@acme.com"})),{tokenId:"tok-report",name:"weekly-report",scopes:["api"],createdAt:r(-60),expiresAt:r(-1),lastUsedAt:r(-8),ownerId:"u-tom",ownerEmail:"tom@acme.com"}],Z={token:x[2],secret:["icpat","tok-cli","example-secret-not-real"].join("_")},$=[{accountNumber:s,name:c[s],roles:[{role:"ReadOnly",roleArn:`arn:aws:iam::${s}:role/ReadOnly`}]},{accountNumber:e,name:c[e],roles:[{role:"DeployRole",roleArn:`arn:aws:iam::${e}:role/DeployRole`},{role:"ReadOnly",roleArn:`arn:aws:iam::${e}:role/ReadOnly`}]}];var D={jobId:"preview",kind:"accessReport",status:"failed",requestedBy:"preview",startedAt:"2026-01-01T00:00:00.000Z",error:"The access report is not available in a preview."};function G(t,a,m={}){return[{provide:P,useValue:v({users:t,groups:a,error:m.error??""},{groupsOf:()=>L(a)})},{provide:u,useValue:{listServiceUsers:()=>o(M),listUserResourceGrants:()=>o([])}},{provide:A,useValue:{listAll:()=>o(C)}},{provide:k,useValue:{accessReport:()=>o(new Blob),startAccessReport:()=>o(D),accessReportJob:()=>o(D)}},{provide:N,useValue:{list:()=>o(a)}},{provide:f,useValue:S(c)},{provide:I,useValue:R(_)},{provide:d,useValue:g()},b(m.queryParams),T({all:h}),...m.tokens?[E()]:[]]}function le(){return{component:O,providers:[...G(U,w),y()]}}export{le as load};