@intentius/chant-lexicon-aws 0.124.31 → 0.124.32
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/actions/dynamodb.js +41 -0
- package/dist/actions/ecr.js +9 -0
- package/dist/actions/ecs.js +5 -0
- package/dist/actions/iam.js +3 -0
- package/dist/actions/index.js +9 -0
- package/dist/actions/lambda.js +11 -0
- package/dist/actions/logs.js +4 -0
- package/dist/actions/s3.js +40 -0
- package/dist/actions/sns.js +5 -0
- package/dist/actions/sqs.js +15 -0
- package/dist/agentcore/trace-fetch.d.ts.map +1 -1
- package/dist/agentcore/trace-fetch.js +472 -0
- package/dist/agentcore/trace-render.js +359 -0
- package/dist/ambient.js +148 -0
- package/dist/api/credential-chain.d.ts +30 -3
- package/dist/api/credential-chain.d.ts.map +1 -1
- package/dist/api/credential-chain.js +509 -0
- package/dist/api/read-client.d.ts +16 -43
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/api/read-client.js +458 -0
- package/dist/api/sigv4.d.ts +4 -4
- package/dist/api/sigv4.js +185 -0
- package/dist/behaviour-kinds.js +114 -0
- package/dist/caller-identity.d.ts +3 -5
- package/dist/caller-identity.d.ts.map +1 -1
- package/dist/caller-identity.js +146 -0
- package/dist/codegen/docs-cli.js +2 -0
- package/dist/codegen/docs.js +120 -0
- package/dist/codegen/enum-overlay.js +162 -0
- package/dist/codegen/extensions.js +139 -0
- package/dist/codegen/fallback.js +32 -0
- package/dist/codegen/generate-cli.js +15 -0
- package/dist/codegen/generate-lexicon.js +70 -0
- package/dist/codegen/generate-typescript.js +226 -0
- package/dist/codegen/generate.d.ts.map +1 -1
- package/dist/codegen/generate.js +234 -0
- package/dist/codegen/naming.js +135 -0
- package/dist/codegen/package.js +67 -0
- package/dist/codegen/patches.d.ts +26 -1
- package/dist/codegen/patches.d.ts.map +1 -1
- package/dist/codegen/patches.js +90 -0
- package/dist/codegen/property-overlay.js +85 -0
- package/dist/codegen/property-overlay.json +1 -16
- package/dist/codegen/sam.js +402 -0
- package/dist/codegen/typecheck.js +4 -0
- package/dist/codegen/versions.js +31 -0
- package/dist/components/__tests__/mock-cloud-executor.js +326 -0
- package/dist/components/apply.d.ts +44 -1
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +752 -0
- package/dist/components/builders.js +37 -0
- package/dist/components/capability-plugin.js +66 -0
- package/dist/components/cloud-executor.d.ts +35 -0
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +576 -0
- package/dist/components/config-bom.js +207 -0
- package/dist/components/host-delivery.js +117 -0
- package/dist/components/index.js +18 -0
- package/dist/components/job-submission.js +77 -0
- package/dist/components/publish.js +234 -0
- package/dist/components/safety.js +62 -0
- package/dist/components/wait-aws.js +68 -0
- package/dist/composites/agentcore-agent.js +187 -0
- package/dist/composites/agentcore-trust-policy.js +13 -0
- package/dist/composites/alb-shared.js +84 -0
- package/dist/composites/bucket-deployment.js +93 -0
- package/dist/composites/catalog.js +2714 -0
- package/dist/composites/dynamodb-table.js +66 -0
- package/dist/composites/ec2-instance-bundle.js +75 -0
- package/dist/composites/ec2-instance-role.js +26 -0
- package/dist/composites/ecr-repository.js +64 -0
- package/dist/composites/ecs-trust-policy.js +10 -0
- package/dist/composites/efs-with-access-point.js +44 -0
- package/dist/composites/eks-cluster.js +118 -0
- package/dist/composites/fargate-alb.js +216 -0
- package/dist/composites/fargate-service.js +222 -0
- package/dist/composites/index.js +28 -0
- package/dist/composites/lambda-api.js +15 -0
- package/dist/composites/lambda-dynamodb.js +77 -0
- package/dist/composites/lambda-eventbridge.js +27 -0
- package/dist/composites/lambda-function.js +54 -0
- package/dist/composites/lambda-s3.js +93 -0
- package/dist/composites/lambda-sns.js +23 -0
- package/dist/composites/lambda-sqs.js +34 -0
- package/dist/composites/landing-zone.js +82 -0
- package/dist/composites/microvm-app.js +293 -0
- package/dist/composites/minimal-vpc.js +40 -0
- package/dist/composites/monitoring-stack.js +105 -0
- package/dist/composites/nlb-service.js +61 -0
- package/dist/composites/rds-instance.js +98 -0
- package/dist/composites/scheduled-lambda.js +28 -0
- package/dist/composites/solr-fargate-service.js +33 -0
- package/dist/composites/step-functions-workflow.js +78 -0
- package/dist/composites/vpc-default.js +132 -0
- package/dist/condition.js +43 -0
- package/dist/coverage.js +4 -0
- package/dist/deep-observe.d.ts.map +1 -1
- package/dist/deep-observe.js +709 -0
- package/dist/deep-topology.js +226 -0
- package/dist/default-tags.js +50 -0
- package/dist/defaults.js +85 -0
- package/dist/dependencies.js +269 -0
- package/dist/detect.js +21 -0
- package/dist/disruption.d.ts.map +1 -1
- package/dist/disruption.js +129 -0
- package/dist/effect-receipt-row.js +107 -0
- package/dist/generated/index.d.ts +1297 -82
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +12382 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +131 -0
- package/dist/identity-observe.d.ts.map +1 -1
- package/dist/identity-observe.js +127 -0
- package/dist/import/generator.js +757 -0
- package/dist/import/live-export.js +34 -0
- package/dist/import/parser.js +394 -0
- package/dist/index.js +69 -0
- package/dist/integrity.json +6 -6
- package/dist/intrinsics.js +393 -0
- package/dist/lint/audit-catalog.js +87 -0
- package/dist/lint/audit-lineage.js +150 -0
- package/dist/lint/post-synth/cf-refs.js +247 -0
- package/dist/lint/post-synth/cor020.js +60 -0
- package/dist/lint/post-synth/ext001.d.ts.map +1 -1
- package/dist/lint/post-synth/ext001.js +197 -0
- package/dist/lint/post-synth/index.js +124 -0
- package/dist/lint/post-synth/waw010.js +41 -0
- package/dist/lint/post-synth/waw011.js +41 -0
- package/dist/lint/post-synth/waw013.js +38 -0
- package/dist/lint/post-synth/waw014.js +42 -0
- package/dist/lint/post-synth/waw015.js +88 -0
- package/dist/lint/post-synth/waw016.d.ts.map +1 -1
- package/dist/lint/post-synth/waw016.js +116 -0
- package/dist/lint/post-synth/waw017.js +43 -0
- package/dist/lint/post-synth/waw018.js +61 -0
- package/dist/lint/post-synth/waw019.js +64 -0
- package/dist/lint/post-synth/waw020.js +56 -0
- package/dist/lint/post-synth/waw021.js +44 -0
- package/dist/lint/post-synth/waw022.js +36 -0
- package/dist/lint/post-synth/waw023.js +40 -0
- package/dist/lint/post-synth/waw024.js +46 -0
- package/dist/lint/post-synth/waw025.js +36 -0
- package/dist/lint/post-synth/waw026.js +38 -0
- package/dist/lint/post-synth/waw027.js +41 -0
- package/dist/lint/post-synth/waw028.js +39 -0
- package/dist/lint/post-synth/waw029.js +54 -0
- package/dist/lint/post-synth/waw030.js +282 -0
- package/dist/lint/post-synth/waw031.js +58 -0
- package/dist/lint/post-synth/waw032.js +45 -0
- package/dist/lint/post-synth/waw033.js +75 -0
- package/dist/lint/post-synth/waw034.js +52 -0
- package/dist/lint/post-synth/waw035.js +56 -0
- package/dist/lint/post-synth/waw036.js +79 -0
- package/dist/lint/post-synth/waw037.js +67 -0
- package/dist/lint/post-synth/waw038.js +42 -0
- package/dist/lint/post-synth/waw039.js +42 -0
- package/dist/lint/post-synth/waw040.js +45 -0
- package/dist/lint/post-synth/waw041.js +40 -0
- package/dist/lint/post-synth/waw042.js +99 -0
- package/dist/lint/post-synth/waw043.js +51 -0
- package/dist/lint/post-synth/waw044.js +64 -0
- package/dist/lint/post-synth/waw045.js +49 -0
- package/dist/lint/post-synth/waw046.js +52 -0
- package/dist/lint/post-synth/waw047.js +43 -0
- package/dist/lint/post-synth/waw048.js +40 -0
- package/dist/lint/post-synth/waw049.js +78 -0
- package/dist/lint/post-synth/waw050.js +44 -0
- package/dist/lint/post-synth/waw051.js +41 -0
- package/dist/lint/post-synth/waw052.js +43 -0
- package/dist/lint/post-synth/waw053.js +43 -0
- package/dist/lint/post-synth/waw054.js +41 -0
- package/dist/lint/post-synth/waw055.js +41 -0
- package/dist/lint/post-synth/waw056.js +65 -0
- package/dist/lint/post-synth/waw057.js +43 -0
- package/dist/lint/post-synth/waw058.js +61 -0
- package/dist/lint/post-synth/waw059.js +338 -0
- package/dist/lint/post-synth/waw060.js +83 -0
- package/dist/lint/post-synth/waw061.js +60 -0
- package/dist/lint/post-synth/waw062.js +0 -0
- package/dist/lint/post-synth/waw063.js +0 -0
- package/dist/lint/post-synth/waw064.js +45 -0
- package/dist/lint/post-synth/waw065.js +104 -0
- package/dist/lint/post-synth/waw066.js +145 -0
- package/dist/lint/post-synth/waw067.js +115 -0
- package/dist/lint/post-synth/waw068.js +69 -0
- package/dist/lint/post-synth/waw069.js +0 -0
- package/dist/lint/rules/hardcoded-region.js +38 -0
- package/dist/lint/rules/iam-wildcard.js +60 -0
- package/dist/lint/rules/index.js +6 -0
- package/dist/lint/rules/s3-encryption.js +60 -0
- package/dist/live-attrs.js +42 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +18 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +66 -0
- package/dist/manifest.json +1 -1
- package/dist/mapping.js +33 -0
- package/dist/meta.json +17359 -784
- package/dist/nested-stack.js +95 -0
- package/dist/okf/index.md +203 -0
- package/dist/okf/rules/EXT001.md +1 -0
- package/dist/okf/rules/WAW016.md +2 -0
- package/dist/okf/rules/WAW019.md +1 -0
- package/dist/okf/rules/WAW028.md +1 -0
- package/dist/okf/rules/WAW030.md +2 -0
- package/dist/okf/rules/WAW039.md +1 -0
- package/dist/okf/rules/WAW049.md +1 -0
- package/dist/okf/rules/WAW056.md +1 -0
- package/dist/okf/rules/WAW058.md +1 -0
- package/dist/okf/rules/WAW062.md +1 -0
- package/dist/okf/rules/WAW064.md +1 -0
- package/dist/okf/rules/WAW065.md +1 -0
- package/dist/okf/rules/WAW066.md +1 -0
- package/dist/okf/rules/WAW067.md +1 -0
- package/dist/okf/rules/WAW068.md +1 -0
- package/dist/okf/rules/WAW069.md +4 -0
- package/dist/okf/types/AIWorkloadConfig.md +23 -0
- package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
- package/dist/okf/types/AccountAccessApplication.md +28 -0
- package/dist/okf/types/AccountAccessEntitlement.md +22 -0
- package/dist/okf/types/ActionTarget.md +20 -0
- package/dist/okf/types/AdConfiguration.md +21 -0
- package/dist/okf/types/Adapter.md +26 -0
- package/dist/okf/types/AgentContext.md +35 -0
- package/dist/okf/types/AgentGoal.md +31 -0
- package/dist/okf/types/AgentProfile.md +34 -0
- package/dist/okf/types/Alarm.md +3 -1
- package/dist/okf/types/AlarmModel.md +14 -9
- package/dist/okf/types/AmplifyWebhook.md +25 -0
- package/dist/okf/types/ApiCache.md +8 -8
- package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
- package/dist/okf/types/AppAuthorization.md +35 -0
- package/dist/okf/types/AppBlockBuilder.md +1 -0
- package/dist/okf/types/AppInstance.md +2 -2
- package/dist/okf/types/AppInstanceBot.md +2 -2
- package/dist/okf/types/AppStreamFleet.md +3 -2
- package/dist/okf/types/AppSyncApiKey.md +6 -6
- package/dist/okf/types/AppSyncType.md +22 -0
- package/dist/okf/types/ApplicationStatusCheck.md +36 -0
- package/dist/okf/types/ApplicationVersion.md +4 -1
- package/dist/okf/types/ApplicationsList.md +26 -0
- package/dist/okf/types/ApprovalPolicy.md +28 -0
- package/dist/okf/types/ArchiveRule.md +24 -0
- package/dist/okf/types/Asset.md +30 -0
- package/dist/okf/types/Backup.md +31 -0
- package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
- package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
- package/dist/okf/types/BedrockSession.md +28 -0
- package/dist/okf/types/BillEstimate.md +35 -0
- package/dist/okf/types/Brand.md +32 -0
- package/dist/okf/types/CallAnalyticsCategory.md +25 -0
- package/dist/okf/types/Campaign.md +28 -0
- package/dist/okf/types/CapacityProvider.md +30 -0
- package/dist/okf/types/Case.md +24 -0
- package/dist/okf/types/CertificateAssociation.md +13 -0
- package/dist/okf/types/ChangeSet.md +36 -0
- package/dist/okf/types/ChannelFlow.md +29 -0
- package/dist/okf/types/ChimeChannel.md +39 -0
- package/dist/okf/types/Classifier.md +6 -6
- package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
- package/dist/okf/types/ClientVpnEndpoint.md +2 -0
- package/dist/okf/types/ClientVpnRoute.md +5 -5
- package/dist/okf/types/CloudConnector.md +29 -0
- package/dist/okf/types/Cluster.md +39 -0
- package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
- package/dist/okf/types/CodeCommitRepository.md +12 -12
- package/dist/okf/types/CodeConnectionsHost.md +26 -0
- package/dist/okf/types/CodeRepository.md +5 -5
- package/dist/okf/types/CompositeAlarm.md +1 -0
- package/dist/okf/types/ComputeEnvironment.md +2 -0
- package/dist/okf/types/ComputeNodeGroup.md +1 -1
- package/dist/okf/types/ComputeQuota.md +34 -0
- package/dist/okf/types/ConfigRule.md +1 -1
- package/dist/okf/types/ConfigurationRecorder.md +7 -6
- package/dist/okf/types/ConnectAttachment.md +2 -0
- package/dist/okf/types/ConnectQueue.md +5 -1
- package/dist/okf/types/ConnectVocabulary.md +28 -0
- package/dist/okf/types/ConnectionType.md +24 -0
- package/dist/okf/types/ConsentPortal.md +33 -0
- package/dist/okf/types/ContactMethod.md +29 -0
- package/dist/okf/types/ContainerAssociation.md +26 -0
- package/dist/okf/types/ContainerFleet.md +1 -1
- package/dist/okf/types/ContainerGroupDefinition.md +1 -1
- package/dist/okf/types/Content.md +40 -0
- package/dist/okf/types/ContentAssociation.md +28 -0
- package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
- package/dist/okf/types/CustomEntityType.md +4 -9
- package/dist/okf/types/Customization.md +22 -0
- package/dist/okf/types/CwIntegration.md +31 -0
- package/dist/okf/types/DAXParameterGroup.md +3 -8
- package/dist/okf/types/DAXSubnetGroup.md +0 -5
- package/dist/okf/types/DBClusterEndpoint.md +31 -0
- package/dist/okf/types/DBProxyTargetGroup.md +1 -0
- package/dist/okf/types/DBSnapshot.md +62 -0
- package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
- package/dist/okf/types/DLPSetting.md +31 -0
- package/dist/okf/types/DMSInstanceProfile.md +1 -1
- package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
- package/dist/okf/types/Daemon.md +1 -0
- package/dist/okf/types/DataExchangeDataSet.md +29 -0
- package/dist/okf/types/DataIntegrationFlow.md +27 -0
- package/dist/okf/types/DataMigration.md +1 -1
- package/dist/okf/types/DataProvider.md +2 -1
- package/dist/okf/types/DataQualityRuleset.md +6 -11
- package/dist/okf/types/DataSource.md +23 -0
- package/dist/okf/types/Dataset.md +20 -0
- package/dist/okf/types/DatasetIntegration.md +23 -0
- package/dist/okf/types/DbCluster.md +1 -1
- package/dist/okf/types/DbInstance.md +8 -2
- package/dist/okf/types/DeadlineBudget.md +29 -0
- package/dist/okf/types/DelegationSet.md +23 -0
- package/dist/okf/types/DeliveryChannel.md +6 -11
- package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
- package/dist/okf/types/DevOpsAgentService.md +1 -0
- package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
- package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
- package/dist/okf/types/Directory.md +60 -0
- package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
- package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
- package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
- package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
- package/dist/okf/types/Domain.md +27 -0
- package/dist/okf/types/EKSCertificateAuthority.md +42 -0
- package/dist/okf/types/EKSCluster.md +8 -0
- package/dist/okf/types/EcSnapshot.md +66 -0
- package/dist/okf/types/EmailIdentityCertificate.md +15 -0
- package/dist/okf/types/EndpointConfig.md +14 -13
- package/dist/okf/types/EntityRecognizer.md +27 -0
- package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
- package/dist/okf/types/EnvironmentEC2.md +13 -13
- package/dist/okf/types/EvaluationForm.md +1 -0
- package/dist/okf/types/Evaluator.md +6 -2
- package/dist/okf/types/EventAction.md +26 -0
- package/dist/okf/types/EventRule.md +2 -0
- package/dist/okf/types/EventSource.md +30 -0
- package/dist/okf/types/EventTracker.md +22 -0
- package/dist/okf/types/EventsV2EventBus.md +28 -0
- package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
- package/dist/okf/types/EventsV2Subscriber.md +39 -0
- package/dist/okf/types/ExperimentDefinition.md +39 -0
- package/dist/okf/types/ExperimentRun.md +33 -0
- package/dist/okf/types/ExperimentTrialComponent.md +13 -11
- package/dist/okf/types/FHIRDatastore.md +3 -0
- package/dist/okf/types/FSxSnapshot.md +5 -5
- package/dist/okf/types/FSxVolume.md +9 -9
- package/dist/okf/types/FeaturedResultsSet.md +26 -0
- package/dist/okf/types/Feed.md +1 -0
- package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
- package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
- package/dist/okf/types/FileCache.md +45 -0
- package/dist/okf/types/Filter.md +27 -0
- package/dist/okf/types/Firewall.md +6 -0
- package/dist/okf/types/FlowMediaStream.md +28 -0
- package/dist/okf/types/FlowOutput.md +1 -0
- package/dist/okf/types/FpgaImage.md +38 -0
- package/dist/okf/types/Function.md +2 -2
- package/dist/okf/types/Gateway.md +41 -0
- package/dist/okf/types/GatewayClusterAssociations.md +23 -0
- package/dist/okf/types/GatewayRateLimit.md +26 -0
- package/dist/okf/types/GatewayRule.md +32 -0
- package/dist/okf/types/GlobalReplicationGroup.md +3 -0
- package/dist/okf/types/GlobalResolver.md +1 -1
- package/dist/okf/types/GlobalTable.md +1 -0
- package/dist/okf/types/GlueConnection.md +5 -4
- package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
- package/dist/okf/types/GlueSession.md +38 -0
- package/dist/okf/types/GlueTable.md +5 -10
- package/dist/okf/types/GlueWorkflow.md +5 -10
- package/dist/okf/types/Group.md +27 -0
- package/dist/okf/types/Harness.md +1 -0
- package/dist/okf/types/HostKey.md +33 -0
- package/dist/okf/types/HostedZone.md +1 -0
- package/dist/okf/types/HttpApi.md +2 -0
- package/dist/okf/types/HttpNamespace.md +5 -5
- package/dist/okf/types/HubV2.md +1 -0
- package/dist/okf/types/HumanTaskUi.md +22 -0
- package/dist/okf/types/IPv4Pool.md +28 -0
- package/dist/okf/types/ImageBuilder.md +1 -0
- package/dist/okf/types/ImageBuilderImage.md +1 -1
- package/dist/okf/types/ImagePipeline.md +1 -1
- package/dist/okf/types/InferenceComponent.md +5 -1
- package/dist/okf/types/InfluxDBBackup.md +65 -0
- package/dist/okf/types/InfluxDBCluster.md +3 -0
- package/dist/okf/types/InfrastructureConfiguration.md +2 -0
- package/dist/okf/types/IngestionDestination.md +28 -0
- package/dist/okf/types/InputSecurityGroup.md +6 -4
- package/dist/okf/types/InspectorV2Connector.md +38 -0
- package/dist/okf/types/InstanceEventWindow.md +25 -0
- package/dist/okf/types/InstanceFleetConfig.md +10 -10
- package/dist/okf/types/InstanceGroupConfig.md +3 -3
- package/dist/okf/types/InstrumentationConfig.md +31 -0
- package/dist/okf/types/IntegrationAssociation.md +3 -0
- package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
- package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
- package/dist/okf/types/IoTSiteWiseTask.md +24 -0
- package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
- package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
- package/dist/okf/types/Job.md +35 -0
- package/dist/okf/types/JobTemplate.md +26 -0
- package/dist/okf/types/KinesisChannel.md +31 -0
- package/dist/okf/types/KinesisStream.md +1 -0
- package/dist/okf/types/LambdaResourcePolicy.md +14 -0
- package/dist/okf/types/Lexicon.md +34 -0
- package/dist/okf/types/LicenseAssetGroup.md +23 -0
- package/dist/okf/types/LicenseConfiguration.md +33 -0
- package/dist/okf/types/LicenseServerEndpoint.md +32 -0
- package/dist/okf/types/LightsailKeyPair.md +29 -0
- package/dist/okf/types/LimitsProfile.md +27 -0
- package/dist/okf/types/LocationAzureBlob.md +2 -1
- package/dist/okf/types/LocationObjectStorage.md +1 -0
- package/dist/okf/types/LogAlarm.md +2 -0
- package/dist/okf/types/MGNConnector.md +23 -0
- package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
- package/dist/okf/types/MLTransform.md +15 -15
- package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
- package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
- package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
- package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
- package/dist/okf/types/MediaConvertQueue.md +8 -10
- package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
- package/dist/okf/types/MediaLiveInput.md +41 -18
- package/dist/okf/types/MediaPackageV2Channel.md +3 -0
- package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
- package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
- package/dist/okf/types/MediaTailorFunction.md +27 -0
- package/dist/okf/types/MedicalVocabulary.md +21 -0
- package/dist/okf/types/Member.md +26 -0
- package/dist/okf/types/Memory.md +6 -0
- package/dist/okf/types/MemoryDBSnapshot.md +29 -0
- package/dist/okf/types/Metric.md +59 -0
- package/dist/okf/types/MetricAttribution.md +23 -0
- package/dist/okf/types/MicrosoftAD.md +11 -11
- package/dist/okf/types/MigrationProject.md +8 -1
- package/dist/okf/types/Monitor.md +26 -0
- package/dist/okf/types/NFSFileShare.md +44 -0
- package/dist/okf/types/NeptuneGraphGraph.md +1 -0
- package/dist/okf/types/NetworkConnector.md +4 -0
- package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
- package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
- package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
- package/dist/okf/types/NotebookInstance.md +18 -18
- package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
- package/dist/okf/types/NotifyConfiguration.md +35 -0
- package/dist/okf/types/OTelEnrichment.md +2 -0
- package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
- package/dist/okf/types/OrganizationConfigRule.md +7 -7
- package/dist/okf/types/Outpost.md +32 -0
- package/dist/okf/types/ParallelData.md +40 -0
- package/dist/okf/types/Partition.md +5 -5
- package/dist/okf/types/PaymentConnector.md +4 -1
- package/dist/okf/types/Pentest.md +1 -0
- package/dist/okf/types/PerfReports.md +28 -0
- package/dist/okf/types/PermissionAssociation.md +30 -0
- package/dist/okf/types/PersonalizeDataset.md +1 -0
- package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
- package/dist/okf/types/PersonalizeSchema.md +1 -0
- package/dist/okf/types/Pipeline.md +25 -0
- package/dist/okf/types/PlaybackConfiguration.md +1 -0
- package/dist/okf/types/PolicyAssociation.md +1 -1
- package/dist/okf/types/PolicyGrant.md +2 -2
- package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
- package/dist/okf/types/PortalProduct.md +24 -0
- package/dist/okf/types/PrefetchSchedule.md +25 -0
- package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
- package/dist/okf/types/PrincipalAssociation.md +27 -0
- package/dist/okf/types/PrivateDnsNamespace.md +8 -8
- package/dist/okf/types/PrivateVirtualInterface.md +1 -0
- package/dist/okf/types/ProcurementPortalPreference.md +45 -0
- package/dist/okf/types/Program.md +33 -0
- package/dist/okf/types/ProjectMembership.md +1 -1
- package/dist/okf/types/ProtocolsList.md +26 -0
- package/dist/okf/types/PublicDnsNamespace.md +7 -7
- package/dist/okf/types/PublicVirtualInterface.md +1 -0
- package/dist/okf/types/QEV2IdcApplication.md +25 -0
- package/dist/okf/types/QueryLoggingConfig.md +21 -0
- package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
- package/dist/okf/types/QuickSightAssignment.md +24 -0
- package/dist/okf/types/RAMResourceAssociation.md +27 -0
- package/dist/okf/types/RDSClusterSnapshot.md +54 -0
- package/dist/okf/types/RDSDBParameterGroup.md +5 -0
- package/dist/okf/types/RDSDeployment.md +41 -0
- package/dist/okf/types/RcsAgent.md +38 -0
- package/dist/okf/types/ReceiptRule.md +5 -5
- package/dist/okf/types/ReceiptRuleSet.md +1 -6
- package/dist/okf/types/RecommenderFilter.md +27 -0
- package/dist/okf/types/RecommenderSchema.md +25 -0
- package/dist/okf/types/RecordSet.md +16 -22
- package/dist/okf/types/RecoveryPlan.md +28 -0
- package/dist/okf/types/RedshiftIdcApplication.md +31 -0
- package/dist/okf/types/RedshiftSnapshot.md +59 -0
- package/dist/okf/types/RegistrationAttachment.md +28 -0
- package/dist/okf/types/Registry.md +41 -0
- package/dist/okf/types/RegistryRecord.md +38 -0
- package/dist/okf/types/RelatedItem.md +24 -0
- package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
- package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
- package/dist/okf/types/ReplicationTask.md +14 -14
- package/dist/okf/types/ReportGenerator.md +29 -0
- package/dist/okf/types/ReportGroup.md +1 -3
- package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
- package/dist/okf/types/ResilienceHubV2Service.md +1 -0
- package/dist/okf/types/ResourceConfiguration.md +1 -1
- package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
- package/dist/okf/types/RestApi.md +1 -0
- package/dist/okf/types/RetrievalInstruction.md +32 -0
- package/dist/okf/types/RouterOutput.md +1 -0
- package/dist/okf/types/Rule.md +31 -0
- package/dist/okf/types/RunCache.md +29 -0
- package/dist/okf/types/Runtime.md +2 -1
- package/dist/okf/types/SCNInstance.md +33 -0
- package/dist/okf/types/SDBDomain.md +2 -2
- package/dist/okf/types/SMBFileShare.md +49 -0
- package/dist/okf/types/SageMakerArtifact.md +27 -0
- package/dist/okf/types/SageMakerEndpoint.md +0 -1
- package/dist/okf/types/ScalableTarget.md +1 -0
- package/dist/okf/types/ScalingPlan.md +6 -6
- package/dist/okf/types/ScheduledReport.md +31 -0
- package/dist/okf/types/SecondaryNetwork.md +26 -0
- package/dist/okf/types/SecurityAgentArtifact.md +25 -0
- package/dist/okf/types/SecurityAgentIntegration.md +31 -0
- package/dist/okf/types/Server.md +1 -0
- package/dist/okf/types/ServerlessCache.md +2 -0
- package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
- package/dist/okf/types/ServerlessRepoApplication.md +32 -0
- package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
- package/dist/okf/types/SipMediaApplication.md +27 -0
- package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
- package/dist/okf/types/SnapshotCopyGrant.md +20 -0
- package/dist/okf/types/Solution.md +1 -0
- package/dist/okf/types/SourceAssociation.md +25 -0
- package/dist/okf/types/SourceCredential.md +6 -6
- package/dist/okf/types/SourceNetwork.md +23 -0
- package/dist/okf/types/StackFleetAssociation.md +2 -7
- package/dist/okf/types/StorageTierPolicy.md +20 -0
- package/dist/okf/types/StorageVirtualMachine.md +9 -9
- package/dist/okf/types/Stream.md +28 -0
- package/dist/okf/types/SubnetCidrReservation.md +26 -0
- package/dist/okf/types/SubscriptionProvider.md +26 -0
- package/dist/okf/types/SupportPermit.md +29 -0
- package/dist/okf/types/Table.md +2 -1
- package/dist/okf/types/TableOptimizer.md +5 -10
- package/dist/okf/types/Tape.md +31 -0
- package/dist/okf/types/Template.md +36 -0
- package/dist/okf/types/Tenant.md +2 -0
- package/dist/okf/types/Terminology.md +39 -0
- package/dist/okf/types/Thesaurus.md +25 -0
- package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
- package/dist/okf/types/Topic.md +1 -0
- package/dist/okf/types/TopicRuleDestination.md +1 -0
- package/dist/okf/types/TrafficPolicy.md +26 -0
- package/dist/okf/types/TrafficPolicyInstance.md +28 -0
- package/dist/okf/types/TranscribeVocabulary.md +27 -0
- package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
- package/dist/okf/types/TransitVirtualInterface.md +1 -0
- package/dist/okf/types/Tunnel.md +25 -0
- package/dist/okf/types/UsageLimit.md +26 -0
- package/dist/okf/types/UseCase.md +23 -0
- package/dist/okf/types/User.md +47 -0
- package/dist/okf/types/VPCEndpoint.md +1 -1
- package/dist/okf/types/VPCEndpointService.md +6 -0
- package/dist/okf/types/VPCPeeringConnection.md +2 -2
- package/dist/okf/types/VPNConcentrator.md +1 -1
- package/dist/okf/types/VPNConnection.md +1 -1
- package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
- package/dist/okf/types/View.md +27 -0
- package/dist/okf/types/VoiceConnector.md +30 -0
- package/dist/okf/types/Volume.md +44 -0
- package/dist/okf/types/Vpc.md +1 -1
- package/dist/okf/types/VpcAttachment.md +2 -0
- package/dist/okf/types/WebFunction.md +27 -0
- package/dist/okf/types/WebFunctionEndpoint.md +44 -0
- package/dist/okf/types/WebFunctionRevision.md +32 -0
- package/dist/okf/types/WickrNetwork.md +27 -0
- package/dist/okf/types/Worker.md +29 -0
- package/dist/okf/types/Workforce.md +26 -0
- package/dist/okf/types/Workload.md +35 -0
- package/dist/okf/types/WorkloadEstimate.md +35 -0
- package/dist/okf/types/Workspace.md +28 -0
- package/dist/okf/types/Workteam.md +8 -8
- package/dist/op/activities/aws-apply.js +214 -0
- package/dist/op/activities/floci.js +97 -0
- package/dist/op/activities/index.js +32 -0
- package/dist/op/builders.js +50 -0
- package/dist/ownership.js +52 -0
- package/dist/package-cli.js +25 -0
- package/dist/parameter.js +19 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1006 -0
- package/dist/properties.js +166 -0
- package/dist/pseudo.js +25 -0
- package/dist/receipt-store.d.ts.map +1 -1
- package/dist/receipt-store.js +233 -0
- package/dist/reference-catalog.js +106 -0
- package/dist/rules/ext001.ts +3 -3
- package/dist/rules/waw016.ts +2 -2
- package/dist/serializer.js +529 -0
- package/dist/spec/fetch.js +193 -0
- package/dist/spec/parse.js +259 -0
- package/dist/spec/pin.js +185 -0
- package/dist/spec/pinned-types.json +203 -0
- package/dist/stack-errors.js +14 -0
- package/dist/taggable.d.ts.map +1 -1
- package/dist/taggable.js +33 -0
- package/dist/teardown.js +199 -0
- package/dist/template-sections.js +53 -0
- package/dist/template-transform.js +50 -0
- package/dist/types/index.d.ts +18847 -1124
- package/dist/validate-cli.js +16 -0
- package/dist/validate.js +33 -0
- package/package.json +9 -9
- package/src/agentcore/trace-fetch.ts +2 -1
- package/src/api/credential-chain.ts +119 -9
- package/src/api/credential-isolation.test.ts +72 -0
- package/src/api/read-client-chain.test.ts +159 -0
- package/src/api/read-client.ts +42 -6
- package/src/api/sigv4.ts +4 -4
- package/src/caller-identity.ts +3 -5
- package/src/codegen/any-budget.test.ts +12 -2
- package/src/codegen/generate.ts +9 -0
- package/src/codegen/package.ts +2 -2
- package/src/codegen/patches.test.ts +95 -0
- package/src/codegen/patches.ts +53 -9
- package/src/codegen/property-overlay.json +1 -16
- package/src/components/apply.ts +218 -6
- package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
- package/src/components/cfn-plan.test.ts +225 -16
- package/src/components/cloud-executor.ts +73 -25
- package/src/deep-observe.ts +2 -1
- package/src/disruption.ts +2 -1
- package/src/generated/index.d.ts +18847 -1124
- package/src/generated/index.ts +1376 -161
- package/src/generated/lexicon-aws.json +17359 -784
- package/src/identity-observe.ts +2 -1
- package/src/lint/post-synth/ext001.ts +3 -3
- package/src/lint/post-synth/waw016.ts +2 -2
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +2 -1
- package/src/receipt-store.ts +2 -1
- package/src/spec/pin.ts +3 -3
- package/src/spec/pinned-types.json +203 -0
- package/src/taggable.ts +2 -2
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AWS credential chain, as the AWS CLI walks it, for `chant lifecycle
|
|
3
|
+
* whoami` (#3954).
|
|
4
|
+
*
|
|
5
|
+
* `resolveCredentials` (./sigv4.ts) reads the three environment variables and
|
|
6
|
+
* nothing else. That is right for the read transport's synchronous signing
|
|
7
|
+
* seam, and it made whoami wrong for anyone whose shell holds a profile rather
|
|
8
|
+
* than keys: `AWS_PROFILE=dev` with an SSO session came back as "no identity
|
|
9
|
+
* is configured" while `aws sts get-caller-identity` answered. This module is
|
|
10
|
+
* the asynchronous half: it resolves what the CLI would sign with and hands
|
|
11
|
+
* back literal credentials plus a label for where they came from. The read
|
|
12
|
+
* transport uses the same walk through {@link transportCredentials} (#3958),
|
|
13
|
+
* so whoami and `describeResources` sign as the same principal.
|
|
14
|
+
*
|
|
15
|
+
* There is still no `@aws-sdk/*` here, for the reason the read transport gives:
|
|
16
|
+
* a lexicon keeps that tree out. The chain is small enough to state.
|
|
17
|
+
*
|
|
18
|
+
* ## Order
|
|
19
|
+
*
|
|
20
|
+
* 1. `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` (+ `AWS_SESSION_TOKEN`).
|
|
21
|
+
* They win over `AWS_PROFILE`, as they do in the AWS CLI. (The JS
|
|
22
|
+
* SDK v3 skips the environment when `AWS_PROFILE` is set; the CLI does
|
|
23
|
+
* not, and the CLI is what an operator checks whoami against.) When both
|
|
24
|
+
* are set, the label says the profile was not used.
|
|
25
|
+
* 2. The profile `AWS_PROFILE` names, else `default` when one exists, read
|
|
26
|
+
* from `AWS_CONFIG_FILE` (`~/.aws/config`) and
|
|
27
|
+
* `AWS_SHARED_CREDENTIALS_FILE` (`~/.aws/credentials`). Within a profile:
|
|
28
|
+
* `role_arn` (with `source_profile` or `credential_source = Environment`),
|
|
29
|
+
* then static keys, then SSO (`sso_session` or the legacy
|
|
30
|
+
* `sso_start_url`), then `credential_process`.
|
|
31
|
+
*
|
|
32
|
+
* Not resolved, and said so rather than skipped: `web_identity_token_file`,
|
|
33
|
+
* `mfa_serial`, `credential_source` other than `Environment`, and the
|
|
34
|
+
* instance-metadata and container endpoints.
|
|
35
|
+
*
|
|
36
|
+
* ## SSO
|
|
37
|
+
*
|
|
38
|
+
* The token `aws sso login` cached under `~/.aws/sso/cache/` is read, and when
|
|
39
|
+
* its access token has expired but it carries a refresh token, it is refreshed
|
|
40
|
+
* through SSO OIDC the way the CLI does. The refreshed token is used for this
|
|
41
|
+
* call and NOT written back; whoami is read-only. A missing, expired or
|
|
42
|
+
* refused session is a `no-credentials` answer naming
|
|
43
|
+
* `aws sso login --profile <p>`.
|
|
44
|
+
*
|
|
45
|
+
* ## Credential material
|
|
46
|
+
*
|
|
47
|
+
* Nothing this module returns in a label or an error carries a key, a secret,
|
|
48
|
+
* a session token or an SSO bearer token. `credential_process` output is
|
|
49
|
+
* credential JSON, so a malformed one is described, never echoed.
|
|
50
|
+
*/
|
|
51
|
+
import { exec } from "node:child_process";
|
|
52
|
+
import { createHash } from "node:crypto";
|
|
53
|
+
import { readFileSync } from "node:fs";
|
|
54
|
+
import { homedir } from "node:os";
|
|
55
|
+
import { join } from "node:path";
|
|
56
|
+
import { AwsReadError, assumeRole } from "./read-client.js";
|
|
57
|
+
/** A timestamp as a Date, or undefined when it is absent or does not parse. */
|
|
58
|
+
function expiryOf(value) {
|
|
59
|
+
if (value === undefined || value === "")
|
|
60
|
+
return undefined;
|
|
61
|
+
const ms = typeof value === "number" ? value : Date.parse(value);
|
|
62
|
+
return Number.isFinite(ms) ? new Date(ms) : undefined;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The INI dialect of the AWS shared files: `[section]`, `key = value`, `#` and
|
|
66
|
+
* `;` comments on their own line (not inline: a `credential_process` command
|
|
67
|
+
* line may hold either character). An indented line under a key with an empty value is a nested
|
|
68
|
+
* setting (`s3 =` / ` max_concurrent_requests = 10`); nothing here reads
|
|
69
|
+
* those, so they are dropped rather than mistaken for top-level keys.
|
|
70
|
+
*/
|
|
71
|
+
export function parseIni(text) {
|
|
72
|
+
const out = {};
|
|
73
|
+
let current;
|
|
74
|
+
let nestedUnder;
|
|
75
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
76
|
+
if (/^\s*([#;]|$)/.test(raw))
|
|
77
|
+
continue;
|
|
78
|
+
const header = raw.match(/^\s*\[([^\]]+)\]\s*([#;].*)?$/);
|
|
79
|
+
if (header) {
|
|
80
|
+
const name = header[1].trim().replace(/\s+/g, " ");
|
|
81
|
+
current = out[name] ?? (out[name] = {});
|
|
82
|
+
nestedUnder = undefined;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (!current)
|
|
86
|
+
continue;
|
|
87
|
+
if (nestedUnder && /^\s/.test(raw))
|
|
88
|
+
continue;
|
|
89
|
+
const kv = raw.match(/^\s*([^=]+?)\s*=\s*(.*?)\s*$/);
|
|
90
|
+
if (!kv)
|
|
91
|
+
continue;
|
|
92
|
+
const [, key, value] = kv;
|
|
93
|
+
nestedUnder = value === "" ? key : undefined;
|
|
94
|
+
if (value !== "")
|
|
95
|
+
current[key] = value;
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
function loadSharedFiles(env, home, read) {
|
|
100
|
+
const configPath = env.AWS_CONFIG_FILE || join(home, ".aws", "config");
|
|
101
|
+
const credentialsPath = env.AWS_SHARED_CREDENTIALS_FILE || join(home, ".aws", "credentials");
|
|
102
|
+
return {
|
|
103
|
+
configPath,
|
|
104
|
+
credentialsPath,
|
|
105
|
+
config: parseIni(read(configPath) ?? ""),
|
|
106
|
+
credentials: parseIni(read(credentialsPath) ?? ""),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/** A profile's settings, the credentials file winning over the config file as in the CLI. */
|
|
110
|
+
function profileSettings(files, name) {
|
|
111
|
+
const fromConfig = files.config[name === "default" ? "default" : `profile ${name}`] ??
|
|
112
|
+
(name === "default" ? files.config["profile default"] : undefined);
|
|
113
|
+
const fromCredentials = files.credentials[name];
|
|
114
|
+
if (!fromConfig && !fromCredentials)
|
|
115
|
+
return undefined;
|
|
116
|
+
return { ...fromConfig, ...fromCredentials };
|
|
117
|
+
}
|
|
118
|
+
const defaultReadFile = (path) => {
|
|
119
|
+
try {
|
|
120
|
+
return readFileSync(path, "utf-8");
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const defaultHttp = async (url, init) => {
|
|
127
|
+
const res = await fetch(url, { method: init.method, headers: init.headers, body: init.body });
|
|
128
|
+
return { status: res.status, text: await res.text() };
|
|
129
|
+
};
|
|
130
|
+
const defaultRunProcess = (command) => new Promise((resolve) => {
|
|
131
|
+
exec(command, { timeout: 60000, maxBuffer: 1024 * 1024 }, (error, stdout, stderr) => {
|
|
132
|
+
const code = error ? (typeof error.code === "number" ? error.code : 1) : 0;
|
|
133
|
+
resolve({ exitCode: code, stdout: String(stdout), stderr: String(stderr) });
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
class ChainRefusal extends Error {
|
|
137
|
+
constructor(reason, detail) {
|
|
138
|
+
super(detail);
|
|
139
|
+
this.reason = reason;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function envCredentials(env) {
|
|
143
|
+
if (!env.AWS_ACCESS_KEY_ID || !env.AWS_SECRET_ACCESS_KEY)
|
|
144
|
+
return undefined;
|
|
145
|
+
return {
|
|
146
|
+
accessKeyId: env.AWS_ACCESS_KEY_ID,
|
|
147
|
+
secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
|
|
148
|
+
...(env.AWS_SESSION_TOKEN ? { sessionToken: env.AWS_SESSION_TOKEN } : {}),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function envLabel(env) {
|
|
152
|
+
return env.AWS_SESSION_TOKEN ? "env AWS_ACCESS_KEY_ID + AWS_SESSION_TOKEN" : "env AWS_ACCESS_KEY_ID";
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Resolve credentials the way the AWS CLI does. Returns literal credentials
|
|
156
|
+
* and their source, or a typed refusal that says what to do about it.
|
|
157
|
+
*/
|
|
158
|
+
export async function resolveCredentialChain(options = {}) {
|
|
159
|
+
const env = options.env ?? process.env;
|
|
160
|
+
const fromEnv = envCredentials(env);
|
|
161
|
+
if (fromEnv) {
|
|
162
|
+
const ignored = env.AWS_PROFILE ? `; AWS_PROFILE=${env.AWS_PROFILE} not used, as in the AWS CLI` : "";
|
|
163
|
+
return { resolved: { credentials: fromEnv, source: `${envLabel(env)}${ignored}` } };
|
|
164
|
+
}
|
|
165
|
+
const home = options.home ?? (env.HOME || env.USERPROFILE || homedir());
|
|
166
|
+
const read = options.readFile ?? defaultReadFile;
|
|
167
|
+
const ctx = {
|
|
168
|
+
env,
|
|
169
|
+
home,
|
|
170
|
+
read,
|
|
171
|
+
files: loadSharedFiles(env, home, read),
|
|
172
|
+
http: options.http ?? defaultHttp,
|
|
173
|
+
runProcess: options.runProcess ?? defaultRunProcess,
|
|
174
|
+
sts: options.sts ?? {},
|
|
175
|
+
now: options.now ?? (() => new Date()),
|
|
176
|
+
};
|
|
177
|
+
const named = env.AWS_PROFILE;
|
|
178
|
+
const name = named ?? "default";
|
|
179
|
+
if (!profileSettings(ctx.files, name)) {
|
|
180
|
+
return {
|
|
181
|
+
unresolved: {
|
|
182
|
+
reason: "no-credentials",
|
|
183
|
+
detail: named
|
|
184
|
+
? `AWS_PROFILE=${named}, but there is no profile ${named} in ${ctx.files.configPath} or ${ctx.files.credentialsPath}`
|
|
185
|
+
: `no AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY in the environment, no AWS_PROFILE, and no default profile in ${ctx.files.configPath} or ${ctx.files.credentialsPath}`,
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
try {
|
|
190
|
+
const resolved = await resolveProfile(ctx, name, []);
|
|
191
|
+
return { resolved: { ...resolved, profile: name } };
|
|
192
|
+
}
|
|
193
|
+
catch (err) {
|
|
194
|
+
if (err instanceof ChainRefusal)
|
|
195
|
+
return { unresolved: { reason: err.reason, detail: err.message } };
|
|
196
|
+
throw err;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
async function resolveProfile(ctx, name, visited) {
|
|
200
|
+
if (visited.includes(name)) {
|
|
201
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: source_profile loops (${[...visited, name].join(" -> ")})`);
|
|
202
|
+
}
|
|
203
|
+
const p = profileSettings(ctx.files, name);
|
|
204
|
+
if (!p) {
|
|
205
|
+
throw new ChainRefusal("no-credentials", `profile ${visited.at(-1)} names source_profile ${name}, which is not in ${ctx.files.configPath} or ${ctx.files.credentialsPath}`);
|
|
206
|
+
}
|
|
207
|
+
// A source profile that has static keys signs with them even when it also
|
|
208
|
+
// has a role_arn, as in the CLI. Only the profile asked for, or a source
|
|
209
|
+
// profile without keys, assumes its role.
|
|
210
|
+
const isSource = visited.length > 0;
|
|
211
|
+
if (p.role_arn && !(isSource && p.aws_access_key_id && p.aws_secret_access_key)) {
|
|
212
|
+
return resolveRoleProfile(ctx, name, p, visited);
|
|
213
|
+
}
|
|
214
|
+
if (p.aws_access_key_id && p.aws_secret_access_key) {
|
|
215
|
+
return {
|
|
216
|
+
credentials: {
|
|
217
|
+
accessKeyId: p.aws_access_key_id,
|
|
218
|
+
secretAccessKey: p.aws_secret_access_key,
|
|
219
|
+
...(p.aws_session_token ? { sessionToken: p.aws_session_token } : {}),
|
|
220
|
+
},
|
|
221
|
+
source: `profile ${name} (static keys)`,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
if (p.sso_session || p.sso_start_url)
|
|
225
|
+
return resolveSsoProfile(ctx, name, p);
|
|
226
|
+
if (p.credential_process)
|
|
227
|
+
return resolveProcessProfile(ctx, name, p.credential_process);
|
|
228
|
+
if (p.web_identity_token_file) {
|
|
229
|
+
throw new ChainRefusal("no-credentials", `profile ${name} uses web_identity_token_file, which chant does not resolve`);
|
|
230
|
+
}
|
|
231
|
+
throw new ChainRefusal("no-credentials", `profile ${name} has no aws_access_key_id, role_arn, sso_session, sso_start_url or credential_process`);
|
|
232
|
+
}
|
|
233
|
+
function withExpiry(expiration) {
|
|
234
|
+
return expiration ? { expiration } : {};
|
|
235
|
+
}
|
|
236
|
+
function earliest(a, b) {
|
|
237
|
+
if (!a)
|
|
238
|
+
return b;
|
|
239
|
+
if (!b)
|
|
240
|
+
return a;
|
|
241
|
+
return a.getTime() <= b.getTime() ? a : b;
|
|
242
|
+
}
|
|
243
|
+
async function resolveRoleProfile(ctx, name, p, visited) {
|
|
244
|
+
if (p.mfa_serial) {
|
|
245
|
+
throw new ChainRefusal("no-credentials", `profile ${name} sets mfa_serial; chant cannot prompt for an MFA code`);
|
|
246
|
+
}
|
|
247
|
+
let base;
|
|
248
|
+
if (p.source_profile) {
|
|
249
|
+
base = await resolveProfile(ctx, p.source_profile, [...visited, name]);
|
|
250
|
+
}
|
|
251
|
+
else if (p.credential_source === "Environment") {
|
|
252
|
+
const creds = envCredentials(ctx.env);
|
|
253
|
+
if (!creds) {
|
|
254
|
+
throw new ChainRefusal("no-credentials", `profile ${name} has credential_source = Environment, but AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY are not set`);
|
|
255
|
+
}
|
|
256
|
+
base = { credentials: creds, source: envLabel(ctx.env) };
|
|
257
|
+
}
|
|
258
|
+
else if (p.credential_source) {
|
|
259
|
+
throw new ChainRefusal("no-credentials", `profile ${name} has credential_source = ${p.credential_source}; chant resolves only Environment`);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
throw new ChainRefusal("no-credentials", `profile ${name} has role_arn but no source_profile or credential_source`);
|
|
263
|
+
}
|
|
264
|
+
const duration = p.duration_seconds ? Number(p.duration_seconds) : undefined;
|
|
265
|
+
try {
|
|
266
|
+
const assumed = await assumeRole({
|
|
267
|
+
roleArn: p.role_arn,
|
|
268
|
+
sessionName: p.role_session_name || `chant-${ctx.now().getTime()}`,
|
|
269
|
+
...(p.external_id ? { externalId: p.external_id } : {}),
|
|
270
|
+
...(duration && Number.isFinite(duration) ? { durationSeconds: duration } : {}),
|
|
271
|
+
}, { ...ctx.sts, region: ctx.sts.region ?? p.region ?? "us-east-1", credentials: base.credentials });
|
|
272
|
+
return {
|
|
273
|
+
credentials: {
|
|
274
|
+
accessKeyId: assumed.accessKeyId,
|
|
275
|
+
secretAccessKey: assumed.secretAccessKey,
|
|
276
|
+
sessionToken: assumed.sessionToken,
|
|
277
|
+
},
|
|
278
|
+
source: `profile ${name} (role ${p.role_arn} via ${base.source})`,
|
|
279
|
+
...withExpiry(earliest(expiryOf(assumed.expiration), base.expiration)),
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
catch (err) {
|
|
283
|
+
const what = err instanceof AwsReadError ? `${err.code ? `${err.code}: ` : ""}${err.message}` : String(err);
|
|
284
|
+
const refused = err instanceof AwsReadError && (err.status === 401 || err.status === 403);
|
|
285
|
+
throw new ChainRefusal(refused ? "no-credentials" : "read-failed", `profile ${name}: sts:AssumeRole ${p.role_arn} failed: ${what}`);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function loginHint(name) {
|
|
289
|
+
return `run \`aws sso login --profile ${name}\``;
|
|
290
|
+
}
|
|
291
|
+
async function resolveSsoProfile(ctx, name, p) {
|
|
292
|
+
let startUrl = p.sso_start_url;
|
|
293
|
+
let ssoRegion = p.sso_region;
|
|
294
|
+
let cacheKey = startUrl;
|
|
295
|
+
let label = `profile ${name} (sso ${startUrl})`;
|
|
296
|
+
if (p.sso_session) {
|
|
297
|
+
const session = ctx.files.config[`sso-session ${p.sso_session}`];
|
|
298
|
+
if (!session) {
|
|
299
|
+
throw new ChainRefusal("no-credentials", `profile ${name} names sso_session ${p.sso_session}, which has no [sso-session ${p.sso_session}] section in ${ctx.files.configPath}`);
|
|
300
|
+
}
|
|
301
|
+
startUrl = session.sso_start_url;
|
|
302
|
+
ssoRegion = session.sso_region ?? ssoRegion;
|
|
303
|
+
cacheKey = p.sso_session;
|
|
304
|
+
label = `profile ${name} (sso session ${p.sso_session})`;
|
|
305
|
+
}
|
|
306
|
+
const accountId = p.sso_account_id;
|
|
307
|
+
const roleName = p.sso_role_name;
|
|
308
|
+
if (!startUrl || !ssoRegion || !accountId || !roleName) {
|
|
309
|
+
const missing = [
|
|
310
|
+
!startUrl && "sso_start_url",
|
|
311
|
+
!ssoRegion && "sso_region",
|
|
312
|
+
!accountId && "sso_account_id",
|
|
313
|
+
!roleName && "sso_role_name",
|
|
314
|
+
].filter(Boolean);
|
|
315
|
+
throw new ChainRefusal("no-credentials", `profile ${name} is an SSO profile missing ${missing.join(", ")}`);
|
|
316
|
+
}
|
|
317
|
+
const cachePath = join(ctx.home, ".aws", "sso", "cache", `${createHash("sha1").update(cacheKey).digest("hex")}.json`);
|
|
318
|
+
const raw = ctx.read(cachePath);
|
|
319
|
+
if (raw === undefined) {
|
|
320
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: no cached SSO token at ${cachePath}; ${loginHint(name)}`);
|
|
321
|
+
}
|
|
322
|
+
let token;
|
|
323
|
+
try {
|
|
324
|
+
token = JSON.parse(raw);
|
|
325
|
+
}
|
|
326
|
+
catch {
|
|
327
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: the cached SSO token at ${cachePath} is not JSON; ${loginHint(name)}`);
|
|
328
|
+
}
|
|
329
|
+
const now = ctx.now().getTime();
|
|
330
|
+
let accessToken = token.accessToken;
|
|
331
|
+
const expires = token.expiresAt ? Date.parse(token.expiresAt) : NaN;
|
|
332
|
+
if (!accessToken || !(expires > now)) {
|
|
333
|
+
accessToken = p.sso_session ? await refreshSsoToken(ctx, token, ssoRegion, now) : undefined;
|
|
334
|
+
if (!accessToken) {
|
|
335
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: the SSO session has expired; ${loginHint(name)}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
const url = `https://portal.sso.${ssoRegion}.amazonaws.com/federation/credentials` +
|
|
339
|
+
`?account_id=${encodeURIComponent(accountId)}&role_name=${encodeURIComponent(roleName)}`;
|
|
340
|
+
let res;
|
|
341
|
+
try {
|
|
342
|
+
res = await ctx.http(url, { method: "GET", headers: { "x-amz-sso_bearer_token": accessToken } });
|
|
343
|
+
}
|
|
344
|
+
catch (err) {
|
|
345
|
+
throw new ChainRefusal("read-failed", `profile ${name}: sso:GetRoleCredentials failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
346
|
+
}
|
|
347
|
+
if (res.status === 401 || res.status === 403) {
|
|
348
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: the SSO portal refused the cached session (HTTP ${res.status}); ${loginHint(name)}`);
|
|
349
|
+
}
|
|
350
|
+
if (res.status >= 400) {
|
|
351
|
+
throw new ChainRefusal("read-failed", `profile ${name}: sso:GetRoleCredentials for ${roleName} in ${accountId} failed with HTTP ${res.status}`);
|
|
352
|
+
}
|
|
353
|
+
let role;
|
|
354
|
+
try {
|
|
355
|
+
role = JSON.parse(res.text).roleCredentials;
|
|
356
|
+
}
|
|
357
|
+
catch {
|
|
358
|
+
role = undefined;
|
|
359
|
+
}
|
|
360
|
+
if (!role?.accessKeyId || !role.secretAccessKey) {
|
|
361
|
+
throw new ChainRefusal("read-failed", `profile ${name}: sso:GetRoleCredentials answered without role credentials`);
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
credentials: {
|
|
365
|
+
accessKeyId: role.accessKeyId,
|
|
366
|
+
secretAccessKey: role.secretAccessKey,
|
|
367
|
+
...(role.sessionToken ? { sessionToken: role.sessionToken } : {}),
|
|
368
|
+
},
|
|
369
|
+
source: `${label}, role ${roleName} in ${accountId}`,
|
|
370
|
+
...withExpiry(expiryOf(role.expiration)),
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Trade a cached refresh token for a new access token through SSO OIDC, the
|
|
375
|
+
* way the CLI keeps an `sso-session` alive without a browser. Returns
|
|
376
|
+
* `undefined` when there is nothing to refresh with or the refresh is
|
|
377
|
+
* refused; the caller turns that into the `aws sso login` hint.
|
|
378
|
+
*/
|
|
379
|
+
async function refreshSsoToken(ctx, token, region, now) {
|
|
380
|
+
if (!token.refreshToken || !token.clientId || !token.clientSecret)
|
|
381
|
+
return undefined;
|
|
382
|
+
if (token.registrationExpiresAt && !(Date.parse(token.registrationExpiresAt) > now))
|
|
383
|
+
return undefined;
|
|
384
|
+
let res;
|
|
385
|
+
try {
|
|
386
|
+
res = await ctx.http(`https://oidc.${region}.amazonaws.com/token`, {
|
|
387
|
+
method: "POST",
|
|
388
|
+
headers: { "content-type": "application/json" },
|
|
389
|
+
body: JSON.stringify({
|
|
390
|
+
grantType: "refresh_token",
|
|
391
|
+
clientId: token.clientId,
|
|
392
|
+
clientSecret: token.clientSecret,
|
|
393
|
+
refreshToken: token.refreshToken,
|
|
394
|
+
}),
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
catch {
|
|
398
|
+
return undefined;
|
|
399
|
+
}
|
|
400
|
+
if (res.status >= 400)
|
|
401
|
+
return undefined;
|
|
402
|
+
try {
|
|
403
|
+
return JSON.parse(res.text).accessToken || undefined;
|
|
404
|
+
}
|
|
405
|
+
catch {
|
|
406
|
+
return undefined;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
async function resolveProcessProfile(ctx, name, command) {
|
|
410
|
+
const out = await ctx.runProcess(command);
|
|
411
|
+
if (out.exitCode !== 0) {
|
|
412
|
+
const firstLine = out.stderr.trim().split(/\r?\n/)[0] ?? "";
|
|
413
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: credential_process exited ${out.exitCode}${firstLine ? `: ${firstLine}` : ""}`);
|
|
414
|
+
}
|
|
415
|
+
let parsed;
|
|
416
|
+
try {
|
|
417
|
+
parsed = JSON.parse(out.stdout);
|
|
418
|
+
}
|
|
419
|
+
catch {
|
|
420
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: credential_process did not print JSON`);
|
|
421
|
+
}
|
|
422
|
+
if (parsed.Version !== 1 || !parsed.AccessKeyId || !parsed.SecretAccessKey) {
|
|
423
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: credential_process output is not Version 1 with AccessKeyId and SecretAccessKey`);
|
|
424
|
+
}
|
|
425
|
+
if (parsed.Expiration && !(Date.parse(parsed.Expiration) > ctx.now().getTime())) {
|
|
426
|
+
throw new ChainRefusal("no-credentials", `profile ${name}: credential_process returned credentials that expired at ${parsed.Expiration}`);
|
|
427
|
+
}
|
|
428
|
+
return {
|
|
429
|
+
credentials: {
|
|
430
|
+
accessKeyId: parsed.AccessKeyId,
|
|
431
|
+
secretAccessKey: parsed.SecretAccessKey,
|
|
432
|
+
...(parsed.SessionToken ? { sessionToken: parsed.SessionToken } : {}),
|
|
433
|
+
},
|
|
434
|
+
source: `profile ${name} (credential_process)`,
|
|
435
|
+
...withExpiry(expiryOf(parsed.Expiration)),
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
/* ── Credentials for the read transport (#3958) ─────────────────────────── */
|
|
439
|
+
/** Cached credentials are re-resolved this long before they expire. */
|
|
440
|
+
export const TRANSPORT_REFRESH_MARGIN_MS = 5 * 60000;
|
|
441
|
+
/**
|
|
442
|
+
* How long "nothing resolves" is kept before the chain is walked again, so a
|
|
443
|
+
* long-running process picks up an `aws sso login` done after it started.
|
|
444
|
+
*/
|
|
445
|
+
export const TRANSPORT_UNRESOLVED_TTL_MS = 5 * 60000;
|
|
446
|
+
/**
|
|
447
|
+
* One walk per environment and shared-file location, shared by every read in
|
|
448
|
+
* the process. Concurrent first reads await the same promise, so an SSO
|
|
449
|
+
* portal call or a `credential_process` runs once rather than once per read.
|
|
450
|
+
*/
|
|
451
|
+
const transportCache = new Map();
|
|
452
|
+
/** Forget every cached walk. For tests, and for a process that changed its profile. */
|
|
453
|
+
export function resetTransportCredentials() {
|
|
454
|
+
transportCache.clear();
|
|
455
|
+
}
|
|
456
|
+
async function walkForTransport(options, now) {
|
|
457
|
+
let result;
|
|
458
|
+
try {
|
|
459
|
+
result = await resolveCredentialChain(options);
|
|
460
|
+
}
|
|
461
|
+
catch {
|
|
462
|
+
result = undefined;
|
|
463
|
+
}
|
|
464
|
+
const t = now().getTime();
|
|
465
|
+
if (!result || "unresolved" in result)
|
|
466
|
+
return { refreshAt: t + TRANSPORT_UNRESOLVED_TTL_MS };
|
|
467
|
+
const expires = result.resolved.expiration?.getTime();
|
|
468
|
+
if (expires === undefined)
|
|
469
|
+
return { credentials: result.resolved.credentials, refreshAt: Infinity };
|
|
470
|
+
const early = expires - TRANSPORT_REFRESH_MARGIN_MS;
|
|
471
|
+
return { credentials: result.resolved.credentials, refreshAt: early > t ? early : expires };
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* What the native read transport signs with when the caller injected nothing:
|
|
475
|
+
* the same chain whoami walks, so `lifecycle diff --live` signs as the
|
|
476
|
+
* principal whoami reports. The signing seam (`AwsCredentialResolver` in
|
|
477
|
+
* ./sigv4.ts) is synchronous and the chain is not, so the transport awaits
|
|
478
|
+
* this once before a request and passes the literal credentials in.
|
|
479
|
+
*
|
|
480
|
+
* Environment keys answer directly, as in the chain. Otherwise the walk is
|
|
481
|
+
* cached per process, keyed by the profile and the shared-file locations, and
|
|
482
|
+
* walked again within {@link TRANSPORT_REFRESH_MARGIN_MS} of the expiry the
|
|
483
|
+
* role, SSO or `credential_process` answer carried. A refusal or a failure is
|
|
484
|
+
* `undefined`, which leaves the request unsigned exactly as before; it is kept
|
|
485
|
+
* for {@link TRANSPORT_UNRESOLVED_TTL_MS}.
|
|
486
|
+
*/
|
|
487
|
+
export async function transportCredentials(options = {}) {
|
|
488
|
+
const env = options.env ?? process.env;
|
|
489
|
+
const fromEnv = envCredentials(env);
|
|
490
|
+
if (fromEnv)
|
|
491
|
+
return fromEnv;
|
|
492
|
+
const now = options.now ?? (() => new Date());
|
|
493
|
+
const home = options.home ?? (env.HOME || env.USERPROFILE || homedir());
|
|
494
|
+
const key = JSON.stringify([env.AWS_PROFILE ?? "", env.AWS_CONFIG_FILE ?? "", env.AWS_SHARED_CREDENTIALS_FILE ?? "", home]);
|
|
495
|
+
const cached = transportCache.get(key);
|
|
496
|
+
if (cached) {
|
|
497
|
+
const entry = await cached;
|
|
498
|
+
if (now().getTime() < entry.refreshAt)
|
|
499
|
+
return entry.credentials;
|
|
500
|
+
if (transportCache.get(key) === cached)
|
|
501
|
+
transportCache.delete(key);
|
|
502
|
+
}
|
|
503
|
+
let pending = transportCache.get(key);
|
|
504
|
+
if (!pending) {
|
|
505
|
+
pending = walkForTransport({ ...options, env, home }, now);
|
|
506
|
+
transportCache.set(key, pending);
|
|
507
|
+
}
|
|
508
|
+
return (await pending).credentials;
|
|
509
|
+
}
|
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The native AWS read transport (#1206) — the read half of what
|
|
3
|
-
* `op/activities/aws-apply.ts` already does for writes.
|
|
4
|
-
*
|
|
5
|
-
* Every AWS observer shelled `aws …` once per entity, serially, and parsed
|
|
6
|
-
* stderr to find out what went wrong (#1085). The applier does not: `awsApply`
|
|
7
|
-
* speaks the CloudFormation Query protocol over `fetch`, honours an endpoint
|
|
8
|
-
* override, and is injectable for tests. This module is that same transport
|
|
9
|
-
* pointed at the two APIs the read path needs:
|
|
10
|
-
*
|
|
11
|
-
* - **CloudFormation Query** (form-encoded POST, XML back) — the stack reads
|
|
12
|
-
* `describeResources` and the deep pass both start from.
|
|
13
|
-
* - **Cloud Control** (AWS JSON 1.0, `X-Amz-Target: CloudApiService.*`) — the
|
|
14
|
-
* property-level reads (#1015).
|
|
15
|
-
*
|
|
16
|
-
* Both take the endpoint the same way the applier does, so `chant emulator` /
|
|
17
|
-
* behold `--local` keep working by construction rather than by each observer
|
|
18
|
-
* remembering to inject `--endpoint-url`.
|
|
19
|
-
*
|
|
20
|
-
* ## Signing
|
|
21
|
-
*
|
|
22
|
-
* Requests are signed with SigV4 (#1686) when credentials resolve — see
|
|
23
|
-
* `./sigv4.ts`, which holds the implementation so that cedar's AVP client can
|
|
24
|
-
* adopt the same one rather than growing a second. Two cases stay unsigned, and
|
|
25
|
-
* both are deliberate:
|
|
26
|
-
*
|
|
27
|
-
* - **No credentials.** The caller's existing no-credentials path is
|
|
28
|
-
* untouched: the request still goes out carrying only the credential scope
|
|
29
|
-
* of {@link regionScope}, which is what the emulator lanes have always
|
|
30
|
-
* sent.
|
|
31
|
-
* - **An endpoint override.** Floci does not verify signatures, and signing
|
|
32
|
-
* against it would mean every local lane suddenly needs credentials to read
|
|
33
|
-
* what it just deployed. `signEndpointOverride` opts back in for an
|
|
34
|
-
* override that *is* real AWS — a VPC endpoint, a signing proxy.
|
|
35
|
-
*
|
|
36
|
-
* What counts as an override is one rule, {@link resolveEndpointOverride}: the
|
|
37
|
-
* `endpoint` option, else the ambient `AWS_ENDPOINT_URL_<SERVICE>` the AWS SDK
|
|
38
|
-
* honours per service, else `AWS_ENDPOINT_URL` (#1694). Cedar's AVP client
|
|
39
|
-
* (`lexicons/cedar/src/avp/client.ts`) applies the same rule; it restates it
|
|
40
|
-
* rather than importing it, because cedar does not depend on this lexicon and
|
|
41
|
-
* a lexicon build compiles against the published core, so a helper hoisted
|
|
42
|
-
* into core would not be visible to either until the next core release.
|
|
43
|
-
*/
|
|
44
1
|
import { type AwsCredentialSource } from "./sigv4.js";
|
|
45
2
|
export type { AwsCredentials, AwsCredentialResolver, AwsCredentialSource } from "./sigv4.js";
|
|
46
3
|
/** Injectable HTTP, mirroring `AwsHttp` in the applier so tests avoid the network. */
|
|
@@ -120,6 +77,22 @@ export declare function serviceUrl(service: string, endpoint?: string, region?:
|
|
|
120
77
|
* override the environment named is skipped exactly like one the option did.
|
|
121
78
|
*/
|
|
122
79
|
export declare function requestHeaders(service: string, url: string, body: string, base: Record<string, string>, options: AwsReadClientOptions): Record<string, string>;
|
|
80
|
+
/**
|
|
81
|
+
* `options` with literal credentials from the AWS CLI's credential chain
|
|
82
|
+
* (#3958), when the caller injected none and the request will be signed.
|
|
83
|
+
*
|
|
84
|
+
* Every request function awaits this after {@link withEndpointOverride} and
|
|
85
|
+
* before {@link requestHeaders}, whose seam is synchronous. The chain is not
|
|
86
|
+
* walked against an endpoint override that is not signed: an emulator read
|
|
87
|
+
* should not start an SSO refresh or a `credential_process`, the same rule
|
|
88
|
+
* whoami follows. When nothing resolves the options come back unchanged and
|
|
89
|
+
* the request goes out unsigned, as it did before.
|
|
90
|
+
*
|
|
91
|
+
* An injected `env` without `HOME`, `USERPROFILE`, `AWS_CONFIG_FILE` or
|
|
92
|
+
* `AWS_SHARED_CREDENTIALS_FILE` names no shared files, so only its keys are
|
|
93
|
+
* read; the process's own `~/.aws` is not consulted behind it.
|
|
94
|
+
*/
|
|
95
|
+
export declare function withChainCredentials(options: AwsReadClientOptions): Promise<AwsReadClientOptions>;
|
|
123
96
|
/**
|
|
124
97
|
* The `<Tag>text</Tag>` pairs of one XML fragment, as a flat record. Repeated
|
|
125
98
|
* tags keep the first occurrence, which is what a `<member>` body wants —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-client.d.ts","sourceRoot":"","sources":["../../src/api/read-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-client.d.ts","sourceRoot":"","sources":["../../src/api/read-client.ts"],"names":[],"mappings":"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"}
|