@felloh-org/lambda-wrapper 1.11.101 → 1.11.103
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/109.index.js +1 -0
- package/dist/526.index.js +1 -0
- package/dist/563.index.js +1 -0
- package/dist/610.index.js +1 -0
- package/dist/787.index.js +1 -0
- package/dist/789.index.js +1 -0
- package/dist/791.index.js +1 -0
- package/dist/819.index.js +1 -0
- package/dist/897.index.js +1 -0
- package/dist/assets-manifest.json +13 -0
- package/dist/index.js +2 -1
- package/dist/index.js.LICENSE.txt +167 -0
- package/package.json +6 -1
- package/stats.json +1 -0
- package/webpack.config.js +16 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=109,exports.ids=[109],exports.modules={65109:(e,r,o)=>{o.r(r),o.d(r,{fromProcess:()=>d});var s=o(3054),t=o(18112),i=o(35317),n=o(39023);const c=async(e,r)=>{const o=r[e];if(!r[e])throw new t.C1(`Profile ${e} could not be found in shared credentials file.`);{const r=o.credential_process;if(void 0===r)throw new t.C1(`Profile ${e} did not contain credential_process.`);{const o=(0,n.promisify)(i.exec);try{const{stdout:s}=await o(r);let t;try{t=JSON.parse(s.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const o=new Date;if(new Date(r.Expiration)<o)throw Error(`Profile ${e} credential_process returned expired credentials.`)}return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope}}})(e,t)}catch(e){throw new t.C1(e.message)}}}},d=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-process","fromProcess");const r=await(0,s.YU)(e);return c((0,s.Bz)(e),r)}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=526,exports.ids=[526],exports.modules={39526:(e,t,r)=>{r.d(t,{CreateTokenCommand:()=>Ze,SSOOIDCClient:()=>de});var o=r(81095),n=r(39359),i=r(48377),s=r(30499),a=r(11487),c=r(63847),d=r(70649),p=r(99389),u=r(1018),l=r(77940),h=r(45685),m=r(47135);const g=async(e,t,r)=>({operation:(0,m.u)(t).operation,region:await(0,m.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const x=e=>{const t=[];switch(e.operation){case"CreateToken":case"RegisterClient":case"StartDeviceAuthorization":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},S={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},y="3.577.0";var f=r(38257),E=r(94041),v=r(91701),w=r(51881),I=r(37778),b=r(7809),P=r(3323),k=r(82641),O=r(94572),C=r(33197),_=r(66652),$=r(23875);const D="required",R="fn",T="argv",A="ref",j=!0,z="isSet",U="booleanEquals",q="error",N="endpoint",V="tree",G="PartitionResult",F="getAttr",H={[D]:!1,type:"String"},M={[D]:!0,default:!1,type:"Boolean"},B={[A]:"Endpoint"},J={[R]:U,[T]:[{[A]:"UseFIPS"},!0]},Z={[R]:U,[T]:[{[A]:"UseDualStack"},!0]},L={},W={[R]:F,[T]:[{[A]:G},"supportsFIPS"]},K={[A]:G},Y={[R]:U,[T]:[!0,{[R]:F,[T]:[K,"supportsDualStack"]}]},Q=[J],X=[Z],ee=[{[A]:"Region"}],te={version:"1.0",parameters:{Region:H,UseDualStack:M,UseFIPS:M,Endpoint:H},rules:[{conditions:[{[R]:z,[T]:[B]}],rules:[{conditions:Q,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:q},{conditions:X,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:q},{endpoint:{url:B,properties:L,headers:L},type:N}],type:V},{conditions:[{[R]:z,[T]:ee}],rules:[{conditions:[{[R]:"aws.partition",[T]:ee,assign:G}],rules:[{conditions:[J,Z],rules:[{conditions:[{[R]:U,[T]:[j,W]},Y],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:L,headers:L},type:N}],type:V},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:q}],type:V},{conditions:Q,rules:[{conditions:[{[R]:U,[T]:[W,j]}],rules:[{conditions:[{[R]:"stringEquals",[T]:[{[R]:F,[T]:[K,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:L,headers:L},type:N},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:L,headers:L},type:N}],type:V},{error:"FIPS is enabled but this partition does not support FIPS",type:q}],type:V},{conditions:X,rules:[{conditions:[Y],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:L,headers:L},type:N}],type:V},{error:"DualStack is enabled but this partition does not support DualStack",type:q}],type:V},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:L,headers:L},type:N}],type:V}],type:V},{error:"Invalid Configuration: Missing Region",type:q}]},re=(e,t={})=>(0,$.sO)(te,{endpointParams:e,logger:t.logger});$.mw.aws=_.UF;var oe=r(66702),ne=r(65606);const ie=e=>{(0,l.emitWarningIfUnsupportedVersion)(ne.version);const t=(0,oe.I)(e),r=()=>t().then(l.loadConfigsForDefaultMode),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??O.E,base64Encoder:e?.base64Encoder??O.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??re,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??x,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new h.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.NoAuthSigner}],logger:e?.logger??new l.NoOpLogger,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??k.D,utf8Decoder:e?.utf8Decoder??C.ar,utf8Encoder:e?.utf8Encoder??C.Pq}))(e);return(0,h.emitWarningIfUnsupportedVersion)(ne.version),{...o,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??b.n,credentialDefaultProvider:e?.credentialDefaultProvider??f.v6,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,E.mJ)({serviceId:o.serviceId,clientVersion:y}),maxAttempts:e?.maxAttempts??(0,w.Z)(u.qs),region:e?.region??(0,w.Z)(a.GG,a.zH),requestHandler:I.$c.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,w.Z)({...u.kN,default:async()=>(await r()).retryMode||P.L0}),sha256:e?.sha256??v.V.bind(null,"sha256"),streamCollector:e?.streamCollector??I.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,w.Z)(a.e$),useFipsEndpoint:e?.useFipsEndpoint??(0,w.Z)(a.Ko)}};var se=r(56928),ae=r(3608);const ce=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex((t=>t.schemeId===e.schemeId));-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){o=e},credentials:()=>o}};class de extends l.Client{constructor(...[e]){const t=ie(e||{}),r=(m=t,{...m,useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"});var m;const g=(0,a.TD)(r),x=(0,p.Co)(g),S=(0,u.$z)(x),y=(0,o.OV)(S),f=(0,s.Dc)(y);var E;const v=((e,t)=>{const r={...(0,se.Rq)(e),...(0,l.getDefaultExtensionConfiguration)(e),...(0,ae.getHttpHandlerExtensionConfiguration)(e),...ce(e)};return t.forEach((e=>e.configure(r))),{...e,...(0,se.$3)(r),...(0,l.resolveDefaultRuntimeConfig)(r),...(0,ae.resolveHttpHandlerRuntimeConfig)(r),...(o=r,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})((E=f,{...(0,h.resolveAwsSdkSigV4Config)(E)}),e?.extensions||[]);super(v),this.config=v,this.middlewareStack.use((0,u.ey)(this.config)),this.middlewareStack.use((0,d.vK)(this.config)),this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,n.Y7)(this.config)),this.middlewareStack.use((0,i.n4)(this.config)),this.middlewareStack.use((0,s.sM)(this.config)),this.middlewareStack.use((0,c.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,c.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return g}getIdentityProviderConfigProvider(){return async e=>new c.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}}var pe=r(1208);class ue extends l.ServiceException{constructor(e){super(e),Object.setPrototypeOf(this,ue.prototype)}}class le extends ue{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,le.prototype),this.error=e.error,this.error_description=e.error_description}}class he extends ue{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,he.prototype),this.error=e.error,this.error_description=e.error_description}}class me extends ue{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,me.prototype),this.error=e.error,this.error_description=e.error_description}}class ge extends ue{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,ge.prototype),this.error=e.error,this.error_description=e.error_description}}class xe extends ue{constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,xe.prototype),this.error=e.error,this.error_description=e.error_description}}class Se extends ue{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,Se.prototype),this.error=e.error,this.error_description=e.error_description}}class ye extends ue{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,ye.prototype),this.error=e.error,this.error_description=e.error_description}}class fe extends ue{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,fe.prototype),this.error=e.error,this.error_description=e.error_description}}class Ee extends ue{constructor(e){super({name:"SlowDownException",$fault:"client",...e}),this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,Ee.prototype),this.error=e.error,this.error_description=e.error_description}}class ve extends ue{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,ve.prototype),this.error=e.error,this.error_description=e.error_description}}class we extends ue{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,we.prototype),this.error=e.error,this.error_description=e.error_description}}class Ie extends ue{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e}),this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Ie.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class be extends ue{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e}),this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,be.prototype),this.error=e.error,this.error_description=e.error_description}}class Pe extends ue{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e}),this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Pe.prototype),this.error=e.error,this.error_description=e.error_description}}const ke=e=>({...e,...e.clientSecret&&{clientSecret:l.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:l.SENSITIVE_STRING},...e.codeVerifier&&{codeVerifier:l.SENSITIVE_STRING}}),Oe=e=>({...e,...e.accessToken&&{accessToken:l.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:l.SENSITIVE_STRING},...e.idToken&&{idToken:l.SENSITIVE_STRING}}),Ce=async(e,t)=>{const r=(0,c.requestBuilder)(e,t);let o;return r.bp("/token"),o=JSON.stringify((0,l.take)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,l._json)(e)})),r.m("POST").h({"content-type":"application/json"}).b(o),r.build()},_e=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return $e(e,t);const r=(0,l.map)({$metadata:Je(e)}),o=(0,l.expectNonNull)((0,l.expectObject)(await(0,h.parseJsonBody)(e.body,t)),"body"),n=(0,l.take)(o,{accessToken:l.expectString,expiresIn:l.expectInt32,idToken:l.expectString,refreshToken:l.expectString,tokenType:l.expectString});return Object.assign(r,n),r},$e=async(e,t)=>{const r={...e,body:await(0,h.parseJsonErrorBody)(e.body,t)},o=(0,h.loadRestJsonErrorCode)(e,r.body);switch(o){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Re(r,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Te(r,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Ae(r,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await je(r,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await ze(r,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await qe(r,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Ve(r,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Fe(r,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await He(r,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Me(r,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Be(r,t);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Ge(r,t);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Ue(r,t);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Ne(r,t);default:const n=r.body;return De({output:e,parsedBody:n,errorCode:o})}},De=(0,l.withBaseException)(ue),Re=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new le({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Te=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new he({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Ae=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new me({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},je=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new ge({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},ze=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new xe({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Ue=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new be({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},qe=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new Se({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Ne=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new Pe({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Ve=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new ye({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Ge=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{endpoint:l.expectString,error:l.expectString,error_description:l.expectString,region:l.expectString});Object.assign(r,n);const i=new Ie({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Fe=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new fe({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},He=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new Ee({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Me=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new ve({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Be=async(e,t)=>{const r=(0,l.map)({}),o=e.body,n=(0,l.take)(o,{error:l.expectString,error_description:l.expectString});Object.assign(r,n);const i=new we({$metadata:Je(e),...r});return(0,l.decorateServiceException)(i,e.body)},Je=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});class Ze extends(l.Command.classBuilder().ep({...S}).m((function(e,t,r,o){return[(0,pe.TM)(r,this.serialize,this.deserialize),(0,p.rD)(r,e.getEndpointParameterInstructions())]})).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(ke,Oe).ser(Ce).de(_e).build()){}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=563,exports.ids=[563],exports.modules={62563:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>q,SSOClient:()=>ze});var o=s(99389),n=s(1208),r=s(77940);const i={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class a extends r.ServiceException{constructor(e){super(e),Object.setPrototypeOf(this,a.prototype)}}class c extends a{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,c.prototype)}}class d extends a{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,d.prototype)}}class u extends a{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,u.prototype)}}class p extends a{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,p.prototype)}}const l=e=>({...e,...e.accessToken&&{accessToken:r.SENSITIVE_STRING}}),h=e=>({...e,...e.secretAccessKey&&{secretAccessKey:r.SENSITIVE_STRING},...e.sessionToken&&{sessionToken:r.SENSITIVE_STRING}}),m=e=>({...e,...e.roleCredentials&&{roleCredentials:h(e.roleCredentials)}});var g=s(45685),y=s(63847);const S=async(e,t)=>{const s=(0,y.requestBuilder)(e,t),o=(0,r.map)({},k,{[N]:e[R]});s.bp("/federation/credentials");const n=(0,r.map)({[O]:[,(0,r.expectNonNull)(e[D],"roleName")],[A]:[,(0,r.expectNonNull)(e[C],"accountId")]});return s.m("GET").h(o).q(n).b(undefined),s.build()},f=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const s=(0,r.map)({$metadata:I(e)}),o=(0,r.expectNonNull)((0,r.expectObject)(await(0,g.parseJsonBody)(e.body,t)),"body"),n=(0,r.take)(o,{roleCredentials:r._json});return Object.assign(s,n),s},v=async(e,t)=>{const s={...e,body:await(0,g.parseJsonErrorBody)(e.body,t)},o=(0,g.loadRestJsonErrorCode)(e,s.body);switch(o){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await P(s,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await E(s,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await b(s,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await w(s,t);default:const n=s.body;return x({output:e,parsedBody:n,errorCode:o})}},x=(0,r.withBaseException)(a),P=async(e,t)=>{const s=(0,r.map)({}),o=e.body,n=(0,r.take)(o,{message:r.expectString});Object.assign(s,n);const i=new c({$metadata:I(e),...s});return(0,r.decorateServiceException)(i,e.body)},E=async(e,t)=>{const s=(0,r.map)({}),o=e.body,n=(0,r.take)(o,{message:r.expectString});Object.assign(s,n);const i=new d({$metadata:I(e),...s});return(0,r.decorateServiceException)(i,e.body)},b=async(e,t)=>{const s=(0,r.map)({}),o=e.body,n=(0,r.take)(o,{message:r.expectString});Object.assign(s,n);const i=new u({$metadata:I(e),...s});return(0,r.decorateServiceException)(i,e.body)},w=async(e,t)=>{const s=(0,r.map)({}),o=e.body,n=(0,r.take)(o,{message:r.expectString});Object.assign(s,n);const i=new p({$metadata:I(e),...s});return(0,r.decorateServiceException)(i,e.body)},I=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),k=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),C="accountId",R="accessToken",A="account_id",D="roleName",O="role_name",N="x-amz-sso_bearer_token";class q extends(r.Command.classBuilder().ep({...i}).m((function(e,t,s,r){return[(0,n.TM)(s,this.serialize,this.deserialize),(0,o.rD)(s,e.getEndpointParameterInstructions())]})).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(l,m).ser(S).de(f).build()){}var z=s(81095),F=s(39359),T=s(48377),$=s(30499),H=s(11487),U=s(70649),j=s(1018),M=s(47135);const V=async(e,t,s)=>({operation:(0,M.u)(t).operation,region:await(0,M.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const G=e=>{const t=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},B="3.577.0";var _=s(94041),L=s(91701),Z=s(51881),J=s(37778),K=s(7809),W=s(3323),Y=s(82641),Q=s(94572),X=s(33197),ee=s(66652),te=s(23875);const se="required",oe="fn",ne="argv",re="ref",ie=!0,ae="isSet",ce="booleanEquals",de="error",ue="endpoint",pe="tree",le="PartitionResult",he="getAttr",me={[se]:!1,type:"String"},ge={[se]:!0,default:!1,type:"Boolean"},ye={[re]:"Endpoint"},Se={[oe]:ce,[ne]:[{[re]:"UseFIPS"},!0]},fe={[oe]:ce,[ne]:[{[re]:"UseDualStack"},!0]},ve={},xe={[oe]:he,[ne]:[{[re]:le},"supportsFIPS"]},Pe={[re]:le},Ee={[oe]:ce,[ne]:[!0,{[oe]:he,[ne]:[Pe,"supportsDualStack"]}]},be=[Se],we=[fe],Ie=[{[re]:"Region"}],ke={version:"1.0",parameters:{Region:me,UseDualStack:ge,UseFIPS:ge,Endpoint:me},rules:[{conditions:[{[oe]:ae,[ne]:[ye]}],rules:[{conditions:be,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:de},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:de},{endpoint:{url:ye,properties:ve,headers:ve},type:ue}],type:pe},{conditions:[{[oe]:ae,[ne]:Ie}],rules:[{conditions:[{[oe]:"aws.partition",[ne]:Ie,assign:le}],rules:[{conditions:[Se,fe],rules:[{conditions:[{[oe]:ce,[ne]:[ie,xe]},Ee],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ve,headers:ve},type:ue}],type:pe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:de}],type:pe},{conditions:be,rules:[{conditions:[{[oe]:ce,[ne]:[xe,ie]}],rules:[{conditions:[{[oe]:"stringEquals",[ne]:[{[oe]:he,[ne]:[Pe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:ve,headers:ve},type:ue},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ve,headers:ve},type:ue}],type:pe},{error:"FIPS is enabled but this partition does not support FIPS",type:de}],type:pe},{conditions:we,rules:[{conditions:[Ee],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ve,headers:ve},type:ue}],type:pe},{error:"DualStack is enabled but this partition does not support DualStack",type:de}],type:pe},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:ve,headers:ve},type:ue}],type:pe}],type:pe},{error:"Invalid Configuration: Missing Region",type:de}]},Ce=(e,t={})=>(0,te.sO)(ke,{endpointParams:e,logger:t.logger});te.mw.aws=ee.UF;var Re=s(66702),Ae=s(65606);const De=e=>{(0,r.emitWarningIfUnsupportedVersion)(Ae.version);const t=(0,Re.I)(e),s=()=>t().then(r.loadConfigsForDefaultMode),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Q.E,base64Encoder:e?.base64Encoder??Q.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ce,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??G,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new g.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new y.NoAuthSigner}],logger:e?.logger??new r.NoOpLogger,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Y.D,utf8Decoder:e?.utf8Decoder??X.ar,utf8Encoder:e?.utf8Encoder??X.Pq}))(e);return(0,g.emitWarningIfUnsupportedVersion)(Ae.version),{...o,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??K.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,_.mJ)({serviceId:o.serviceId,clientVersion:B}),maxAttempts:e?.maxAttempts??(0,Z.Z)(j.qs),region:e?.region??(0,Z.Z)(H.GG,H.zH),requestHandler:J.$c.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,Z.Z)({...j.kN,default:async()=>(await s()).retryMode||W.L0}),sha256:e?.sha256??L.V.bind(null,"sha256"),streamCollector:e?.streamCollector??J.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Z.Z)(H.e$),useFipsEndpoint:e?.useFipsEndpoint??(0,Z.Z)(H.Ko)}};var Oe=s(56928),Ne=s(3608);const qe=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){o=e},credentials:()=>o}};class ze extends r.Client{constructor(...[e]){const t=De(e||{}),s=(n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"});var n;const i=(0,H.TD)(s),a=(0,o.Co)(i),c=(0,j.$z)(a),d=(0,z.OV)(c),u=(0,$.Dc)(d);var p;const l=((e,t)=>{const s={...(0,Oe.Rq)(e),...(0,r.getDefaultExtensionConfiguration)(e),...(0,Ne.getHttpHandlerExtensionConfiguration)(e),...qe(e)};return t.forEach((e=>e.configure(s))),{...e,...(0,Oe.$3)(s),...(0,r.resolveDefaultRuntimeConfig)(s),...(0,Ne.resolveHttpHandlerRuntimeConfig)(s),...(o=s,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})((p=u,{...(0,g.resolveAwsSdkSigV4Config)(p)}),e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use((0,j.ey)(this.config)),this.middlewareStack.use((0,U.vK)(this.config)),this.middlewareStack.use((0,z.TC)(this.config)),this.middlewareStack.use((0,F.Y7)(this.config)),this.middlewareStack.use((0,T.n4)(this.config)),this.middlewareStack.use((0,$.sM)(this.config)),this.middlewareStack.use((0,y.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,y.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return V}getIdentityProviderConfigProvider(){return async e=>new y.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=610,exports.ids=[610],exports.modules={23610:(e,t,n)=>{n.d(t,{fromHttp:()=>l});var r=n(37778),o=n(18112),s=n(91943),a=n.n(s);var i=n(3608),c=n(77940),d=n(18669),h=n(96763);var p=n(65606),u=n(96763);const l=e=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http","fromHttp");const n=e.awsContainerCredentialsRelativeUri??p.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,s=e.awsContainerCredentialsFullUri??p.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,l=e.awsContainerAuthorizationToken??p.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,T=e.awsContainerAuthorizationTokenFile??p.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE;if(n&&s&&(u.warn("AWS SDK HTTP credentials provider:","you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),u.warn("awsContainerCredentialsFullUri will take precedence.")),l&&T&&(u.warn("AWS SDK HTTP credentials provider:","you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),u.warn("awsContainerAuthorizationToken will take precedence.")),s)t=s;else{if(!n)throw new o.C1("No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.");t=`http://169.254.170.2${n}`}const w=new URL(t);(e=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),n=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&n(t[1])&&n(t[2])&&n(t[3])&&4===t.length)return}throw new o.C1("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]")}})(w);const C=new r.$c({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return A=async()=>{const e=function(e){return new i.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,n])=>(e[t]=n,e)),{}),fragment:e.hash})}(w);l?e.headers.Authorization=l:T&&(e.headers.Authorization=(await a().readFile(T)).toString());try{return async function(e){const t=e?.headers["content-type"]??e?.headers["Content-Type"]??"";t.includes("json")||h.warn("HTTP credential provider response header content-type was not application/json. Observed: "+t+".");const n=(0,d.c9)(e.body),r=await n.transformToString();if(200===e.statusCode){const e=JSON.parse(r);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new o.C1("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }");return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:(0,c.parseRfc3339DateTime)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(e){}throw Object.assign(new o.C1(`Server responded with status: ${e.statusCode}`),{Code:t.Code,Message:t.Message})}throw new o.C1(`Server responded with status: ${e.statusCode}`)}((await C.handle(e)).response)}catch(e){throw new o.C1(String(e))}},m=e.maxRetries??3,f=e.timeout??1e3,async()=>{for(let e=0;e<m;++e)try{return await A()}catch(e){await new Promise((e=>setTimeout(e,f)))}return await A()};var A,m,f}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=787,exports.ids=[787],exports.modules={18787:(e,t,n)=>{n.d(t,{getDefaultRoleAssumer:()=>hn,getDefaultRoleAssumerWithWebIdentity:()=>mn});var o=n(99389),s=n(1208),r=n(77940);const i={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class a extends r.ServiceException{constructor(e){super(e),Object.setPrototypeOf(this,a.prototype)}}class c extends a{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,c.prototype)}}class d extends a{constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,d.prototype)}}class l extends a{constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,l.prototype)}}class u extends a{constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,u.prototype)}}class p extends a{constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,p.prototype)}}class h extends a{constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,h.prototype)}}class m extends a{constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,m.prototype)}}class g extends a{constructor(e){super({name:"InvalidAuthorizationMessageException",$fault:"client",...e}),this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,g.prototype)}}const f=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:r.SENSITIVE_STRING}}),y=e=>({...e,...e.Credentials&&{Credentials:f(e.Credentials)}}),S=e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:r.SENSITIVE_STRING}}),P=e=>({...e,...e.Credentials&&{Credentials:f(e.Credentials)}});var x=n(45685),E=n(3608);const v=async(e,t)=>{const n=re;let o;return o=Ne({...W(e,t),[ae]:de,[Ke]:ie}),se(t,n,"/",void 0,o)},w=async(e,t)=>{const n=re;let o;return o=Ne({...j(e,t),[ae]:pe,[Ke]:ie}),se(t,n,"/",void 0,o)},I=async(e,t)=>{if(e.statusCode>=300)return A(e,t);const n=await(0,x.parseXmlBody)(e.body,t);let o={};o=L(n.AssumeRoleResult,t);return{$metadata:ne(e),...o}},b=async(e,t)=>{if(e.statusCode>=300)return A(e,t);const n=await(0,x.parseXmlBody)(e.body,t);let o={};o=G(n.AssumeRoleWithWebIdentityResult,t);return{$metadata:ne(e),...o}},A=async(e,t)=>{const n={...e,body:await(0,x.parseXmlErrorBody)(e.body,t)},o=Ve(e,n.body);switch(o){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await C(n,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await $(n,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await O(n,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await z(n,t);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await k(n,t);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await T(n,t);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await R(n,t);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await D(n,t);default:const s=n.body;return oe({output:e,parsedBody:s.Error,errorCode:o})}},C=async(e,t)=>{const n=e.body,o=Z(n.Error,t),s=new c({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},R=async(e,t)=>{const n=e.body,o=_(n.Error,t),s=new m({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},k=async(e,t)=>{const n=e.body,o=X(n.Error,t),s=new p({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},D=async(e,t)=>{const n=e.body,o=J(n.Error,t),s=new g({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},T=async(e,t)=>{const n=e.body,o=Y(n.Error,t),s=new h({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},$=async(e,t)=>{const n=e.body,o=Q(n.Error,t),s=new d({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},O=async(e,t)=>{const n=e.body,o=ee(n.Error,t),s=new l({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},z=async(e,t)=>{const n=e.body,o=te(n.Error,t),s=new u({$metadata:ne(e),...o});return(0,r.decorateServiceException)(s,n)},W=(e,t)=>{const n={};if(null!=e[Re]&&(n[Re]=e[Re]),null!=e[ke]&&(n[ke]=e[ke]),null!=e[ve]){const o=H(e[ve],t);0===e[ve]?.length&&(n.PolicyArns=[]),Object.entries(o).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}if(null!=e[Ee]&&(n[Ee]=e[Ee]),null!=e[ye]&&(n[ye]=e[ye]),null!=e[We]){const o=N(e[We],t);0===e[We]?.length&&(n.Tags=[]),Object.entries(o).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}if(null!=e[He]){const o=U(e[He],t);0===e[He]?.length&&(n.TransitiveTagKeys=[]),Object.entries(o).forEach((([e,t])=>{n[`TransitiveTagKeys.${e}`]=t}))}if(null!=e[Pe]&&(n[Pe]=e[Pe]),null!=e[Oe]&&(n[Oe]=e[Oe]),null!=e[je]&&(n[je]=e[je]),null!=e[$e]&&(n[$e]=e[$e]),null!=e[Ie]){const o=M(e[Ie],t);0===e[Ie]?.length&&(n.ProvidedContexts=[]),Object.entries(o).forEach((([e,t])=>{n[`ProvidedContexts.${e}`]=t}))}return n},j=(e,t)=>{const n={};if(null!=e[Re]&&(n[Re]=e[Re]),null!=e[ke]&&(n[ke]=e[ke]),null!=e[Me]&&(n[Me]=e[Me]),null!=e[be]&&(n[be]=e[be]),null!=e[ve]){const o=H(e[ve],t);0===e[ve]?.length&&(n.PolicyArns=[]),Object.entries(o).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}return null!=e[Ee]&&(n[Ee]=e[Ee]),null!=e[ye]&&(n[ye]=e[ye]),n},H=(e,t)=>{const n={};let o=1;for(const s of e){if(null===s)continue;const e=K(s,t);Object.entries(e).forEach((([e,t])=>{n[`member.${o}.${e}`]=t})),o++}return n},K=(e,t)=>{const n={};return null!=e[Fe]&&(n[Fe]=e[Fe]),n},q=(e,t)=>{const n={};return null!=e[we]&&(n[we]=e[we]),null!=e[fe]&&(n[fe]=e[fe]),n},M=(e,t)=>{const n={};let o=1;for(const t of e){if(null===t)continue;const e=q(t);Object.entries(e).forEach((([e,t])=>{n[`member.${o}.${e}`]=t})),o++}return n},F=(e,t)=>{const n={};return null!=e[xe]&&(n[xe]=e[xe]),null!=e[qe]&&(n[qe]=e[qe]),n},U=(e,t)=>{const n={};let o=1;for(const t of e)null!==t&&(n[`member.${o}`]=t,o++);return n},N=(e,t)=>{const n={};let o=1;for(const t of e){if(null===t)continue;const e=F(t);Object.entries(e).forEach((([e,t])=>{n[`member.${o}.${e}`]=t})),o++}return n},V=(e,t)=>{const n={};return null!=e[le]&&(n[le]=(0,r.expectString)(e[le])),null!=e[he]&&(n[he]=(0,r.expectString)(e[he])),n},L=(e,t)=>{const n={};return null!=e[ge]&&(n[ge]=B(e[ge],t)),null!=e[ue]&&(n[ue]=V(e[ue])),null!=e[Ae]&&(n[Ae]=(0,r.strictParseInt32)(e[Ae])),null!=e[$e]&&(n[$e]=(0,r.expectString)(e[$e])),n},G=(e,t)=>{const n={};return null!=e[ge]&&(n[ge]=B(e[ge],t)),null!=e[Te]&&(n[Te]=(0,r.expectString)(e[Te])),null!=e[ue]&&(n[ue]=V(e[ue])),null!=e[Ae]&&(n[Ae]=(0,r.strictParseInt32)(e[Ae])),null!=e[Ce]&&(n[Ce]=(0,r.expectString)(e[Ce])),null!=e[me]&&(n[me]=(0,r.expectString)(e[me])),null!=e[$e]&&(n[$e]=(0,r.expectString)(e[$e])),n},B=(e,t)=>{const n={};return null!=e[ce]&&(n[ce]=(0,r.expectString)(e[ce])),null!=e[De]&&(n[De]=(0,r.expectString)(e[De])),null!=e[ze]&&(n[ze]=(0,r.expectString)(e[ze])),null!=e[Se]&&(n[Se]=(0,r.expectNonNull)((0,r.parseRfc3339DateTimeWithOffset)(e[Se]))),n},Z=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},_=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},X=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},J=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},Y=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},Q=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},ee=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},te=(e,t)=>{const n={};return null!=e[Ue]&&(n[Ue]=(0,r.expectString)(e[Ue])),n},ne=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),oe=(0,r.withBaseException)(a),se=async(e,t,n,o,s)=>{const{hostname:r,protocol:i="https",port:a,path:c}=await e.endpoint(),d={protocol:i,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==o&&(d.hostname=o),void 0!==s&&(d.body=s),new E.HttpRequest(d)},re={"content-type":"application/x-www-form-urlencoded"},ie="2011-06-15",ae="Action",ce="AccessKeyId",de="AssumeRole",le="AssumedRoleId",ue="AssumedRoleUser",pe="AssumeRoleWithWebIdentity",he="Arn",me="Audience",ge="Credentials",fe="ContextAssertion",ye="DurationSeconds",Se="Expiration",Pe="ExternalId",xe="Key",Ee="Policy",ve="PolicyArns",we="ProviderArn",Ie="ProvidedContexts",be="ProviderId",Ae="PackedPolicySize",Ce="Provider",Re="RoleArn",ke="RoleSessionName",De="SecretAccessKey",Te="SubjectFromWebIdentityToken",$e="SourceIdentity",Oe="SerialNumber",ze="SessionToken",We="Tags",je="TokenCode",He="TransitiveTagKeys",Ke="Version",qe="Value",Me="WebIdentityToken",Fe="arn",Ue="message",Ne=e=>Object.entries(e).map((([e,t])=>(0,r.extendedEncodeURIComponent)(e)+"="+(0,r.extendedEncodeURIComponent)(t))).join("&"),Ve=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class Le extends(r.Command.classBuilder().ep({...i}).m((function(e,t,n,r){return[(0,s.TM)(n,this.serialize,this.deserialize),(0,o.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,y).ser(v).de(I).build()){}class Ge extends(r.Command.classBuilder().ep({...i}).m((function(e,t,n,r){return[(0,s.TM)(n,this.serialize,this.deserialize),(0,o.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(S,P).ser(w).de(b).build()){}const Be="us-east-1",Ze=async(e,t,n)=>{const o="function"==typeof e?await e():e,s="function"==typeof t?await t():t;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (provider)`,`${s} (parent client)`,`${Be} (STS default)`),o??s??Be},_e=(e,t)=>{let n,o;return async(s,r)=>{if(o=s,!n){const{logger:s=e?.parentClientConfig?.logger,region:r,requestHandler:i=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a}=e,c=await Ze(r,e?.parentClientConfig?.region,a);n=new t({credentialDefaultProvider:()=>async()=>o,region:c,requestHandler:i,logger:s})}const{Credentials:i}=await n.send(new Le(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);return{accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,credentialScope:i.CredentialScope}}},Xe=(e,t)=>{let n;return async o=>{if(!n){const{logger:o=e?.parentClientConfig?.logger,region:s,requestHandler:r=e?.parentClientConfig?.requestHandler,credentialProviderLogger:i}=e,a=await Ze(s,e?.parentClientConfig?.region,i);n=new t({region:a,requestHandler:r,logger:o})}const{Credentials:s}=await n.send(new Ge(o));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${o.RoleArn}`);return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,credentialScope:s.CredentialScope}}};var Je=n(81095),Ye=n(39359),Qe=n(48377),et=n(30499),tt=n(11487),nt=n(63847),ot=n(70649),st=n(1018),rt=n(47135);const it=async(e,t,n)=>({operation:(0,rt.u)(t).operation,region:await(0,rt.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const at=e=>{const t=[];switch(e.operation){case"AssumeRoleWithSAML":case"AssumeRoleWithWebIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},ct=e=>{const t=(n=e,{...n,stsClientCtor:un});var n;return{...(0,x.resolveAwsSdkSigV4Config)(t)}},dt="3.577.0";var lt=n(38257),ut=n(94041),pt=n(91701),ht=n(51881),mt=n(37778),gt=n(7809),ft=n(3323),yt=n(82641),St=n(94572),Pt=n(33197),xt=n(66652),Et=n(23875);const vt="required",wt="type",It="fn",bt="argv",At="ref",Ct=!1,Rt=!0,kt="booleanEquals",Dt="stringEquals",Tt="sigv4",$t="us-east-1",Ot="endpoint",zt="https://sts.{Region}.{PartitionResult#dnsSuffix}",Wt="tree",jt="error",Ht="getAttr",Kt={[vt]:!1,[wt]:"String"},qt={[vt]:!0,default:!1,[wt]:"Boolean"},Mt={[At]:"Endpoint"},Ft={[It]:"isSet",[bt]:[{[At]:"Region"}]},Ut={[At]:"Region"},Nt={[It]:"aws.partition",[bt]:[Ut],assign:"PartitionResult"},Vt={[At]:"UseFIPS"},Lt={[At]:"UseDualStack"},Gt={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Tt,signingName:"sts",signingRegion:$t}]},headers:{}},Bt={},Zt={conditions:[{[It]:Dt,[bt]:[Ut,"aws-global"]}],[Ot]:Gt,[wt]:Ot},_t={[It]:kt,[bt]:[Vt,!0]},Xt={[It]:kt,[bt]:[Lt,!0]},Jt={[It]:Ht,[bt]:[{[At]:"PartitionResult"},"supportsFIPS"]},Yt={[At]:"PartitionResult"},Qt={[It]:kt,[bt]:[!0,{[It]:Ht,[bt]:[Yt,"supportsDualStack"]}]},en=[{[It]:"isSet",[bt]:[Mt]}],tn=[_t],nn=[Xt],on={version:"1.0",parameters:{Region:Kt,UseDualStack:qt,UseFIPS:qt,Endpoint:Kt,UseGlobalEndpoint:qt},rules:[{conditions:[{[It]:kt,[bt]:[{[At]:"UseGlobalEndpoint"},Rt]},{[It]:"not",[bt]:en},Ft,Nt,{[It]:kt,[bt]:[Vt,Ct]},{[It]:kt,[bt]:[Lt,Ct]}],rules:[{conditions:[{[It]:Dt,[bt]:[Ut,"ap-northeast-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"ap-south-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"ap-southeast-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"ap-southeast-2"]}],endpoint:Gt,[wt]:Ot},Zt,{conditions:[{[It]:Dt,[bt]:[Ut,"ca-central-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"eu-central-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"eu-north-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"eu-west-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"eu-west-2"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"eu-west-3"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"sa-east-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,$t]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"us-east-2"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"us-west-1"]}],endpoint:Gt,[wt]:Ot},{conditions:[{[It]:Dt,[bt]:[Ut,"us-west-2"]}],endpoint:Gt,[wt]:Ot},{endpoint:{url:zt,properties:{authSchemes:[{name:Tt,signingName:"sts",signingRegion:"{Region}"}]},headers:Bt},[wt]:Ot}],[wt]:Wt},{conditions:en,rules:[{conditions:tn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[wt]:jt},{conditions:nn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[wt]:jt},{endpoint:{url:Mt,properties:Bt,headers:Bt},[wt]:Ot}],[wt]:Wt},{conditions:[Ft],rules:[{conditions:[Nt],rules:[{conditions:[_t,Xt],rules:[{conditions:[{[It]:kt,[bt]:[Rt,Jt]},Qt],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Bt,headers:Bt},[wt]:Ot}],[wt]:Wt},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[wt]:jt}],[wt]:Wt},{conditions:tn,rules:[{conditions:[{[It]:kt,[bt]:[Jt,Rt]}],rules:[{conditions:[{[It]:Dt,[bt]:[{[It]:Ht,[bt]:[Yt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Bt,headers:Bt},[wt]:Ot},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Bt,headers:Bt},[wt]:Ot}],[wt]:Wt},{error:"FIPS is enabled but this partition does not support FIPS",[wt]:jt}],[wt]:Wt},{conditions:nn,rules:[{conditions:[Qt],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Bt,headers:Bt},[wt]:Ot}],[wt]:Wt},{error:"DualStack is enabled but this partition does not support DualStack",[wt]:jt}],[wt]:Wt},Zt,{endpoint:{url:zt,properties:Bt,headers:Bt},[wt]:Ot}],[wt]:Wt}],[wt]:Wt},{error:"Invalid Configuration: Missing Region",[wt]:jt}]},sn=(e,t={})=>(0,Et.sO)(on,{endpointParams:e,logger:t.logger});Et.mw.aws=xt.UF;var rn=n(66702),an=n(65606);const cn=e=>{(0,r.emitWarningIfUnsupportedVersion)(an.version);const t=(0,rn.I)(e),n=()=>t().then(r.loadConfigsForDefaultMode),o=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??St.E,base64Encoder:e?.base64Encoder??St.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??sn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??at,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new x.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new nt.NoAuthSigner}],logger:e?.logger??new r.NoOpLogger,serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??yt.D,utf8Decoder:e?.utf8Decoder??Pt.ar,utf8Encoder:e?.utf8Encoder??Pt.Pq}))(e);return(0,x.emitWarningIfUnsupportedVersion)(an.version),{...o,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??gt.n,credentialDefaultProvider:e?.credentialDefaultProvider??lt.v6,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ut.mJ)({serviceId:o.serviceId,clientVersion:dt}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await(0,lt.v6)(e?.__config||{})()),signer:new x.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new nt.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,ht.Z)(st.qs),region:e?.region??(0,ht.Z)(tt.GG,tt.zH),requestHandler:mt.$c.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,ht.Z)({...st.kN,default:async()=>(await n()).retryMode||ft.L0}),sha256:e?.sha256??pt.V.bind(null,"sha256"),streamCollector:e?.streamCollector??mt.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ht.Z)(tt.e$),useFipsEndpoint:e?.useFipsEndpoint??(0,ht.Z)(tt.Ko)}};var dn=n(56928);const ln=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){o=e},credentials:()=>o}};class un extends r.Client{constructor(...[e]){const t=cn(e||{}),n=(s=t,{...s,useDualstackEndpoint:s.useDualstackEndpoint??!1,useFipsEndpoint:s.useFipsEndpoint??!1,useGlobalEndpoint:s.useGlobalEndpoint??!1,defaultSigningName:"sts"});var s;const i=(0,tt.TD)(n),a=(0,o.Co)(i),c=(0,st.$z)(a),d=(0,Je.OV)(c),l=(0,et.Dc)(d),u=((e,t)=>{const n={...(0,dn.Rq)(e),...(0,r.getDefaultExtensionConfiguration)(e),...(0,E.getHttpHandlerExtensionConfiguration)(e),...ln(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,dn.$3)(n),...(0,r.resolveDefaultRuntimeConfig)(n),...(0,E.resolveHttpHandlerRuntimeConfig)(n),...(o=n,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})(ct(l),e?.extensions||[]);super(u),this.config=u,this.middlewareStack.use((0,st.ey)(this.config)),this.middlewareStack.use((0,ot.vK)(this.config)),this.middlewareStack.use((0,Je.TC)(this.config)),this.middlewareStack.use((0,Ye.Y7)(this.config)),this.middlewareStack.use((0,Qe.n4)(this.config)),this.middlewareStack.use((0,et.sM)(this.config)),this.middlewareStack.use((0,nt.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,nt.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return it}getIdentityProviderConfigProvider(){return async e=>new nt.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}}const pn=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,hn=(e={},t)=>_e(e,pn(un,t)),mn=(e={},t)=>Xe(e,pn(un,t))}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=789,exports.ids=[789],exports.modules={82789:(e,n,t)=>{t.d(n,{fromIni:()=>f});var o=t(3054),r=t(18112);const s=e=>"string"==typeof e.source_profile&&void 0===e.credential_source,i=e=>"string"==typeof e.credential_source&&void 0===e.source_profile,a=async(e,n,s,i={})=>{s.logger?.debug("@aws-sdk/credential-provider-ini","resolveAssumeRoleCredentials (STS)");const a=n[e];if(!s.roleAssumer){const{getDefaultRoleAssumer:e}=await t.e(787).then(t.bind(t,18787));s.roleAssumer=e({...s.clientConfig,credentialProviderLogger:s.logger,parentClientConfig:s?.parentClientConfig},s.clientPlugins)}const{source_profile:d}=a;if(d&&d in i)throw new r.C1(`Detected a cycle attempting to resolve credentials for profile ${(0,o.Bz)(s)}. Profiles visited: `+Object.keys(i).join(", "),!1);const l=d?c(d,n,s,{...i,[d]:!0}):(await((e,n)=>{const o={EcsContainer:e=>t.e(897).then(t.bind(t,47897)).then((({fromContainerMetadata:n})=>n(e))),Ec2InstanceMetadata:e=>t.e(897).then(t.bind(t,47897)).then((({fromInstanceMetadata:n})=>n(e))),Environment:e=>Promise.resolve().then(t.bind(t,80904)).then((({fromEnv:n})=>n(e)))};if(e in o)return o[e];throw new r.C1(`Unsupported credential source in profile ${n}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`)})(a.credential_source,e)(s))(),f={RoleArn:a.role_arn,RoleSessionName:a.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:a.external_id,DurationSeconds:parseInt(a.duration_seconds||"3600",10)},{mfa_serial:_}=a;if(_){if(!s.mfaCodeProvider)throw new r.C1(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,!1);f.SerialNumber=_,f.TokenCode=await s.mfaCodeProvider(_)}const g=await l;return s.roleAssumer(g,f)},d=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1,l=(e,n)=>(n?.logger?.debug("@aws-sdk/credential-provider-ini","resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,credentialScope:e.aws_credential_scope})),c=async(e,n,o,c={})=>{const f=n[e];if(Object.keys(c).length>0&&d(f))return l(f,o);if(_=f,Boolean(_)&&"object"==typeof _&&"string"==typeof _.role_arn&&["undefined","string"].indexOf(typeof _.role_session_name)>-1&&["undefined","string"].indexOf(typeof _.external_id)>-1&&["undefined","string"].indexOf(typeof _.mfa_serial)>-1&&(s(_)||i(_)))return a(e,n,o,c);var _;if(d(f))return l(f,o);if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.web_identity_token_file&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1)(f))return(async(e,n)=>t.e(819).then(t.bind(t,57819)).then((({fromTokenFile:t})=>t({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:n.roleAssumerWithWebIdentity,logger:n.logger,parentClientConfig:n.parentClientConfig})())))(f,o);if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(f))return(async(e,n)=>t.e(109).then(t.bind(t,65109)).then((({fromProcess:t})=>t({...e,profile:n})())))(o,e);if((e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name))(f))return await(async(e,n={})=>{const{fromSSO:o}=await t.e(791).then(t.bind(t,19791));return o({profile:e,logger:n.logger})()})(e,o);throw new r.C1(`Profile ${e} could not be found or parsed in shared credentials file.`)},f=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini","fromIni");const n=await(0,o.YU)(e);return c((0,o.Bz)(e),n,e)}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=791,exports.ids=[791],exports.modules={19791:(e,s,o)=>{o.d(s,{fromSSO:()=>S});var n=o(18112),t=o(3054);const i="To refresh this SSO session run 'aws sso login' with the corresponding profile.",r={},a=async(e,s)=>{const{CreateTokenCommand:n}=await o.e(526).then(o.bind(o,39526)),t=await(async e=>{const{SSOOIDCClient:s}=await o.e(526).then(o.bind(o,39526));if(r[e])return r[e];const n=new s({region:e});return r[e]=n,n})(s);return t.send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},c=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new n.Jh(`Token is expired. ${i}`,!1)},l=(e,s,o=!1)=>{if(void 0===s)throw new n.Jh(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${i}`,!1)};var w=o(79896);const{writeFile:f}=w.promises,d=new Date(0),h=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers","fromSso");const s=await(0,t.YU)(e),o=(0,t.Bz)(e),r=s[o];if(!r)throw new n.Jh(`Profile '${o}' could not be found in shared credentials file.`,!1);if(!r.sso_session)throw new n.Jh(`Profile '${o}' is missing required property 'sso_session'.`);const w=r.sso_session,h=(await(0,t.qw)(e))[w];if(!h)throw new n.Jh(`Sso session '${w}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!h[e])throw new n.Jh(`Sso session '${w}' is missing required property '${e}'.`,!1);h.sso_start_url;const u=h.sso_region;let g;try{g=await(0,t.vf)(w)}catch(e){throw new n.Jh(`The SSO session token associated with profile=${o} was not found or is invalid. ${i}`,!1)}l("accessToken",g.accessToken),l("expiresAt",g.expiresAt);const{accessToken:S,expiresAt:p}=g,_={token:S,expiration:new Date(p)};if(_.expiration.getTime()-Date.now()>3e5)return _;if(Date.now()-d.getTime()<3e4)return c(_),_;l("clientId",g.clientId,!0),l("clientSecret",g.clientSecret,!0),l("refreshToken",g.refreshToken,!0);try{d.setTime(Date.now());const e=await a(g,u);l("accessToken",e.accessToken),l("expiresIn",e.expiresIn);const s=new Date(Date.now()+1e3*e.expiresIn);try{await((e,s)=>{const o=(0,t.C9)(e),n=JSON.stringify(s,null,2);return f(o,n)})(w,{...g,accessToken:e.accessToken,expiresAt:s.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:s}}catch(e){return c(_),_}},u=!1,g=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:i,ssoRegion:r,ssoRoleName:a,ssoClient:c,clientConfig:l,profile:w})=>{let f;const d="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await h({profile:w})();f={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new n.C1(e.message,u)}else try{f=await(0,t.vf)(e)}catch(e){throw new n.C1(`The SSO session associated with this profile is invalid. ${d}`,u)}if(new Date(f.expiresAt).getTime()-Date.now()<=0)throw new n.C1(`The SSO session associated with this profile has expired. ${d}`,u);const{accessToken:g}=f,{SSOClient:S,GetRoleCredentialsCommand:p}=await o.e(563).then(o.bind(o,62563)),_=c||new S(Object.assign({},l??{},{region:l?.region??r}));let m;try{m=await _.send(new p({accountId:i,roleName:a,accessToken:g}))}catch(e){throw n.C1.from(e,u)}const{roleCredentials:{accessKeyId:T,secretAccessKey:C,sessionToken:k,expiration:y,credentialScope:x}={}}=m;if(!(T&&C&&k&&y))throw new n.C1("SSO returns an invalid temporary credential.",u);return{accessKeyId:T,secretAccessKey:C,sessionToken:k,expiration:new Date(y),credentialScope:x}},S=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso","fromSSO");const{ssoStartUrl:s,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoSession:a}=e,{ssoClient:c}=e,l=(0,t.Bz)(e);if(s||o||i||r||a){if(s&&o&&i&&r)return g({ssoStartUrl:s,ssoSession:a,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoClient:c,clientConfig:e.clientConfig,profile:l});throw new n.C1('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"')}{const o=(await(0,t.YU)(e))[l];if(!o)throw new n.C1(`Profile ${l} was not found.`);if(!(w=o)||"string"!=typeof w.sso_start_url&&"string"!=typeof w.sso_account_id&&"string"!=typeof w.sso_session&&"string"!=typeof w.sso_region&&"string"!=typeof w.sso_role_name)throw new n.C1(`Profile ${l} is not configured with SSO credentials.`);if(o?.sso_session){const r=(await(0,t.qw)(e))[o.sso_session],a=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(i&&i!==r.sso_region)throw new n.C1("Conflicting SSO region"+a,!1);if(s&&s!==r.sso_start_url)throw new n.C1("Conflicting SSO start_url"+a,!1);o.sso_region=r.sso_region,o.sso_start_url=r.sso_start_url}const{sso_start_url:r,sso_account_id:a,sso_region:f,sso_role_name:d,sso_session:h}=(e=>{const{sso_start_url:s,sso_account_id:o,sso_region:t,sso_role_name:i}=e;if(!(s&&o&&t&&i))throw new n.C1(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,!1);return e})(o);return g({ssoStartUrl:r,ssoSession:h,ssoAccountId:a,ssoRegion:f,ssoRoleName:d,ssoClient:c,clientConfig:e.clientConfig,profile:l})}var w}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=819,exports.ids=[819],exports.modules={57819:(e,n,o)=>{o.r(n),o.d(n,{fromTokenFile:()=>d,fromWebToken:()=>t});var i=o(18112),r=o(79896);const t=e=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity","fromWebToken");const{roleArn:n,roleSessionName:i,webIdentityToken:r,providerId:t,policyArns:s,policy:d,durationSeconds:l}=e;let{roleAssumerWithWebIdentity:a}=e;if(!a){const{getDefaultRoleAssumerWithWebIdentity:n}=await o.e(787).then(o.bind(o,18787));a=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return a({RoleArn:n,RoleSessionName:i??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:t,PolicyArns:s,Policy:d,DurationSeconds:l})};var s=o(65606);const d=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity","fromTokenFile");const n=e?.webIdentityTokenFile??s.env.AWS_WEB_IDENTITY_TOKEN_FILE,o=e?.roleArn??s.env.AWS_ROLE_ARN,d=e?.roleSessionName??s.env.AWS_ROLE_SESSION_NAME;if(!n||!o)throw new i.C1("Web identity configuration not specified");return t({...e,webIdentityToken:(0,r.readFileSync)(n,{encoding:"ascii"}),roleArn:o,roleSessionName:d})()}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=897,exports.ids=[897],exports.modules={47897:(e,t,a)=>{a.r(t),a.d(t,{DEFAULT_MAX_RETRIES:()=>u,DEFAULT_TIMEOUT:()=>l,ENV_CMDS_AUTH_TOKEN:()=>w,ENV_CMDS_FULL_URI:()=>h,ENV_CMDS_RELATIVE_URI:()=>v,Endpoint:()=>T,fromContainerMetadata:()=>E,fromInstanceMetadata:()=>L,getInstanceMetadataEndpoint:()=>M,httpRequest:()=>s,providerConfigFromInit:()=>m});var n=a(18112),r=a(87016),o=a(20181),i=a(58611);function s(e){return new Promise(((t,a)=>{const r=(0,i.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",(e=>{a(Object.assign(new n.mZ("Unable to connect to instance metadata service"),e)),r.destroy()})),r.on("timeout",(()=>{a(new n.mZ("TimeoutError from instance metadata service")),r.destroy()})),r.on("response",(e=>{const{statusCode:i=400}=e;(i<200||300<=i)&&(a(Object.assign(new n.mZ("Error response received from instance metadata service"),{statusCode:i})),r.destroy());const s=[];e.on("data",(e=>{s.push(e)})),e.on("end",(()=>{t(o.Buffer.concat(s)),r.destroy()}))})),r.end()}))}const c=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,d=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration)}),l=1e3,u=0,m=({maxRetries:e=u,timeout:t=l})=>({maxRetries:e,timeout:t}),p=(e,t)=>{let a=e();for(let n=0;n<t;n++)a=a.catch(e);return a};var f=a(65606);const h="AWS_CONTAINER_CREDENTIALS_FULL_URI",v="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",w="AWS_CONTAINER_AUTHORIZATION_TOKEN",E=(e={})=>{const{timeout:t,maxRetries:a}=m(e);return()=>p((async()=>{const e=await g(),a=JSON.parse(await _(t,e));if(!c(a))throw new n.C1("Invalid response received from instance metadata service.");return d(a)}),a)},_=async(e,t)=>{f.env[w]&&(t.headers={...t.headers,Authorization:f.env[w]});return(await s({...t,timeout:e})).toString()},I={localhost:!0,"127.0.0.1":!0},A={"http:":!0,"https:":!0},g=async()=>{if(f.env[v])return{hostname:"169.254.170.2",path:f.env[v]};if(f.env[h]){const e=(0,r.parse)(f.env[h]);if(!e.hostname||!(e.hostname in I))throw new n.C1(`${e.hostname} is not a valid container metadata service hostname`,!1);if(!e.protocol||!(e.protocol in A))throw new n.C1(`${e.protocol} is not a valid container metadata service protocol`,!1);return{...e,port:e.port?parseInt(e.port,10):void 0}}throw new n.C1(`The container metadata credential provider cannot be used unless the ${v} or ${h} environment variable is set`,!1)};var y=a(51881);class S extends n.C1{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,S.prototype)}}var T,C=a(82641);!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(T||(T={}));const b={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var D;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(D||(D={}));const x={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:D.IPv4},M=async()=>(0,C.D)(await N()||await R()),N=async()=>(0,y.Z)(b)(),R=async()=>{const e=await(0,y.Z)(x)();switch(e){case D.IPv4:return T.IPv4;case D.IPv6:return T.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(D)}`)}},O=(e,t)=>{const a=300+Math.floor(300*Math.random()),n=new Date(Date.now()+1e3*a);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:n}};var k=a(96763);const P="/latest/meta-data/iam/security-credentials/",V="AWS_EC2_METADATA_V1_DISABLED",U="ec2_metadata_v1_disabled",$="x-aws-ec2-metadata-token",L=(e={})=>((e,t={})=>{const a=t?.logger||k;let n;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=O(t,a))}catch(e){if(!n)throw e;a.warn("Credential renew failed: ",e),t=O(n,a)}return n=t,t}})(K(e),{logger:e.logger}),K=e=>{let t=!1;const{logger:a,profile:r}=e,{timeout:o,maxRetries:i}=m(e),s=async(a,o)=>{if(t||null==o.headers?.[$]){let t=!1,a=!1;const o=await(0,y.Z)({environmentVariableSelector:e=>{const t=e[V];if(a=!!t&&"false"!==t,void 0===t)throw new n.C1(`${V} not set in env, checking config file next.`);return a},configFileSelector:e=>{const a=e[U];return t=!!a&&"false"!==a,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||o){const n=[];throw e.ec2MetadataV1Disabled&&n.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&n.push(`config file profile (${U})`),a&&n.push(`process environment variable (${V})`),new S(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${n.join(", ")}].`)}}const i=(await p((async()=>{let e;try{e=await W(o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)).trim();return p((async()=>{let e;try{e=await j(i,o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)};return async()=>{const e=await M();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...e,timeout:o});{let n;try{n=(await F({...e,timeout:o})).toString()}catch(n){if(400===n?.statusCode)throw Object.assign(n,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===n.message||[403,404,405].includes(n.statusCode))&&(t=!0),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...e,timeout:o})}return s(i,{...e,headers:{[$]:n},timeout:o})}}},F=async e=>s({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),W=async e=>(await s({...e,path:P})).toString(),j=async(e,t)=>{const a=JSON.parse((await s({...t,path:P+e})).toString());if(!c(a))throw new n.C1("Invalid response received from instance metadata service.");return d(a)}}};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"109.index.js": "109.index.js",
|
|
3
|
+
"526.index.js": "526.index.js",
|
|
4
|
+
"563.index.js": "563.index.js",
|
|
5
|
+
"610.index.js": "610.index.js",
|
|
6
|
+
"787.index.js": "787.index.js",
|
|
7
|
+
"789.index.js": "789.index.js",
|
|
8
|
+
"791.index.js": "791.index.js",
|
|
9
|
+
"819.index.js": "819.index.js",
|
|
10
|
+
"897.index.js": "897.index.js",
|
|
11
|
+
"index.js.LICENSE.txt": "index.js.LICENSE.txt",
|
|
12
|
+
"main.js": "index.js"
|
|
13
|
+
}
|