@spinnaker/amazon 0.0.0-2025.1-0
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/CHANGELOG.md +4365 -0
- package/LICENSE.txt +203 -0
- package/dist/amazon.logo352d4e042476837f.svg +503 -0
- package/dist/aws.module.d.ts +5 -0
- package/dist/aws.settings.d.ts +59 -0
- package/dist/aws.validators.d.ts +7 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +6 -0
- package/dist/certificates/index.d.ts +1 -0
- package/dist/common/AwsModalFooter.d.ts +21 -0
- package/dist/common/common.module.d.ts +1 -0
- package/dist/common/footer.component.d.ts +1 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/deploymentStrategy/AdditionalFields.d.ts +10 -0
- package/dist/deploymentStrategy/rollingPush.strategy.d.ts +10 -0
- package/dist/domain/IAmazonBlockDeviceMapping.d.ts +15 -0
- package/dist/domain/IAmazonCertificate.d.ts +5 -0
- package/dist/domain/IAmazonFunction.d.ts +65 -0
- package/dist/domain/IAmazonFunctionSourceData.d.ts +46 -0
- package/dist/domain/IAmazonHealth.d.ts +11 -0
- package/dist/domain/IAmazonInstance.d.ts +24 -0
- package/dist/domain/IAmazonLaunchTemplate.d.ts +91 -0
- package/dist/domain/IAmazonLoadBalancer.d.ts +230 -0
- package/dist/domain/IAmazonLoadBalancerSourceData.d.ts +170 -0
- package/dist/domain/IAmazonScalingPolicy.d.ts +22 -0
- package/dist/domain/IAmazonSecurityGroup.d.ts +4 -0
- package/dist/domain/IAmazonServerGroup.d.ts +67 -0
- package/dist/domain/IKeyPair.d.ts +6 -0
- package/dist/domain/IScalingPolicy.d.ts +44 -0
- package/dist/domain/IScalingProcess.d.ts +10 -0
- package/dist/domain/ITargetTrackingPolicy.d.ts +22 -0
- package/dist/domain/index.d.ts +15 -0
- package/dist/function/CreateLambdaFunction.d.ts +25 -0
- package/dist/function/configure/ExecutionRole.d.ts +15 -0
- package/dist/function/configure/FunctionBasicInformation.d.ts +26 -0
- package/dist/function/configure/FunctionDebugAndErrorHandling.d.ts +15 -0
- package/dist/function/configure/FunctionEnvironmentVariables.d.ts +14 -0
- package/dist/function/configure/FunctionSettings.d.ts +14 -0
- package/dist/function/configure/FunctionTags.d.ts +14 -0
- package/dist/function/configure/Network.d.ts +42 -0
- package/dist/function/details/AmazonFunctionDetails.d.ts +19 -0
- package/dist/function/details/FunctionActions.d.ts +20 -0
- package/dist/function/function.module.d.ts +1 -0
- package/dist/function/function.transformer.d.ts +7 -0
- package/dist/function/index.d.ts +5 -0
- package/dist/help/amazon.help.d.ts +1 -0
- package/dist/image/image.reader.d.ts +25 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +20873 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/amazon.instance.write.service.d.ts +15 -0
- package/dist/instance/awsInstanceType.service.d.ts +50 -0
- package/dist/instance/awsInstanceTypes.d.ts +10 -0
- package/dist/instance/details/AmazonInstanceInformation.d.ts +6 -0
- package/dist/instance/details/CostFactor.d.ts +6 -0
- package/dist/instance/details/InstanceDns.d.ts +16 -0
- package/dist/instance/details/InstanceInformation.d.ts +13 -0
- package/dist/instance/details/InstanceSecurityGroups.d.ts +6 -0
- package/dist/instance/details/InstanceStatus.d.ts +16 -0
- package/dist/instance/details/InstanceTags.d.ts +8 -0
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +1 -0
- package/dist/instance/details/instance.details.controller.d.ts +2 -0
- package/dist/instance/details/instanceDns.component.d.ts +1 -0
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +1 -0
- package/dist/instance/details/instanceStatus.component.d.ts +1 -0
- package/dist/instance/details/instanceTags.component.d.ts +1 -0
- package/dist/instance/details/utils.d.ts +3 -0
- package/dist/instance/index.d.ts +5 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +4 -0
- package/dist/keyPairs/index.d.ts +1 -0
- package/dist/loadBalancer/AmazonLoadBalancerClusterContainer.d.ts +6 -0
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +20 -0
- package/dist/loadBalancer/OidcConfigReader.d.ts +16 -0
- package/dist/loadBalancer/TargetGroup.d.ts +12 -0
- package/dist/loadBalancer/TargetGroupDetails.d.ts +7 -0
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +6 -0
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +18 -0
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +14 -0
- package/dist/loadBalancer/configure/application/ALBAdvancedSettings.d.ts +2 -0
- package/dist/loadBalancer/configure/application/ALBListeners.d.ts +59 -0
- package/dist/loadBalancer/configure/application/ConfigureOidcConfigModal.d.ts +20 -0
- package/dist/loadBalancer/configure/application/ConfigureRedirectConfigModal.d.ts +17 -0
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +35 -0
- package/dist/loadBalancer/configure/application/TargetGroups.d.ts +33 -0
- package/dist/loadBalancer/configure/classic/AdvancedSettings.d.ts +10 -0
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +33 -0
- package/dist/loadBalancer/configure/classic/HealthCheck.d.ts +11 -0
- package/dist/loadBalancer/configure/classic/Listeners.d.ts +34 -0
- package/dist/loadBalancer/configure/common/AmazonCertificateSelectField.d.ts +15 -0
- package/dist/loadBalancer/configure/common/LoadBalancerLocation.d.ts +48 -0
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +36 -0
- package/dist/loadBalancer/configure/common/targetGroupValidators.d.ts +10 -0
- package/dist/loadBalancer/configure/network/CertificateSelectors.d.ts +3 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +34 -0
- package/dist/loadBalancer/configure/network/NLBAdvancedSettings.d.ts +5 -0
- package/dist/loadBalancer/configure/network/NLBListeners.d.ts +43 -0
- package/dist/loadBalancer/configure/network/TargetGroups.d.ts +34 -0
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +19 -0
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +1 -0
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +41 -0
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +30 -0
- package/dist/loadBalancer/index.d.ts +9 -0
- package/dist/loadBalancer/loadBalancer.module.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +17 -0
- package/dist/loadBalancer/targetGroup.states.d.ts +1 -0
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +2 -0
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +2 -0
- package/dist/pipeline/stages/deleteLambda/DeleteLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/deleteLambda/LambdaDeleteStage.d.ts +8 -0
- package/dist/pipeline/stages/deleteLambda/constants/deleteVersion.constants.d.ts +6 -0
- package/dist/pipeline/stages/deleteLambda/constants/deleteVersion.picker.d.ts +16 -0
- package/dist/pipeline/stages/deleteLambda/constants/index.d.ts +2 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +8 -0
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +1 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationExecutionDetails.d.ts +7 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +25 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +10 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.d.ts +13 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionDetails.d.ts +7 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionLabel.d.ts +12 -0
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionMarkerIcon.d.ts +6 -0
- package/dist/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/BasicSettingsForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/EnvironmentForm.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/components/ExecutionRoleForm.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/components/LambdaAtEdgeForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/NetworkForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/TriggerEventsForm.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/components/function.constants.d.ts +5 -0
- package/dist/pipeline/stages/deployLambda/components/index.d.ts +5 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStage.d.ts +3 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageConfig.d.ts +4 -0
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/deployLambda/config/UpsertDefaults.d.ts +1 -0
- package/dist/pipeline/stages/deployLambda/config/function.defaults.d.ts +2 -0
- package/dist/pipeline/stages/deployLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +2 -0
- package/dist/pipeline/stages/invokeLambda/InvokeLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/invokeLambda/LambdaInvokeStage.d.ts +8 -0
- package/dist/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.d.ts +3 -0
- package/dist/pipeline/stages/invokeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/invokeLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/routeLambda/LambdaRouteStage.d.ts +8 -0
- package/dist/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/TriggerEventsForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/BlueGreenDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/HealthCheckStrategy.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/InvocationHealthCheck.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/health.constants.d.ts +5 -0
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/index.d.ts +1 -0
- package/dist/pipeline/stages/routeLambda/components/DeploymentStrategyForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/RenderStrategy.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/SimpleDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/VersionPicker.d.ts +14 -0
- package/dist/pipeline/stages/routeLambda/components/WeightedDeploymentForm.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/routeLambda/constants/index.d.ts +3 -0
- package/dist/pipeline/stages/routeLambda/constants/strategy.constants.d.ts +6 -0
- package/dist/pipeline/stages/routeLambda/constants/strategy.picker.d.ts +16 -0
- package/dist/pipeline/stages/routeLambda/constants/versions.constants.d.ts +6 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +2 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.d.ts +3 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageConfig.d.ts +5 -0
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/updateCodeLambda/components/UpdateCodeStageForm.d.ts +3 -0
- package/dist/pipeline/stages/updateCodeLambda/components/index.d.ts +1 -0
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +2 -0
- package/dist/reactShims/aws.react.injector.d.ts +18 -0
- package/dist/reactShims/aws.react.module.d.ts +1 -0
- package/dist/reactShims/index.d.ts +1 -0
- package/dist/search/searchResultFormatter.d.ts +2 -0
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +2 -0
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +2 -0
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +2 -0
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +1 -0
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +1 -0
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +10 -0
- package/dist/securityGroup/details/IPRangeRules.d.ts +17 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +2 -0
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.module.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +6 -0
- package/dist/securityGroup/securityGroup.transformer.d.ts +2 -0
- package/dist/serverGroup/AvailabilityZoneSelector.d.ts +21 -0
- package/dist/serverGroup/configure/AmazonImageSelectInput.d.ts +44 -0
- package/dist/serverGroup/configure/index.d.ts +5 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +17 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +126 -0
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +15 -0
- package/dist/serverGroup/configure/wizard/capacity/CapacitySelector.d.ts +18 -0
- package/dist/serverGroup/configure/wizard/capacity/MinMaxDesired.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.d.ts +6 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.d.ts +14 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AmazonInstanceTypeInfoRenderer.d.ts +5 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceProfileSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeRow.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeSelect.d.ts +7 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTable.d.ts +18 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableBody.d.ts +14 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableParts.d.ts +17 -0
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.d.ts +9 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +32 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupCapacity.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupInstanceType.d.ts +22 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +29 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupSecurityGroups.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupZones.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettings.d.ts +13 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.d.ts +12 -0
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsInner.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/pages/index.d.ts +8 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +22 -0
- package/dist/serverGroup/configure/wizard/securityGroups/ServerGroupSecurityGroupsRemoved.d.ts +11 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +23 -0
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/amazonServerGroupDetailsGetter.d.ts +4 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +47 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.d.ts +21 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicySummary.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +55 -0
- package/dist/serverGroup/details/scalingPolicy/StepPolicySummary.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/chart/DateLineChart.d.ts +15 -0
- package/dist/serverGroup/details/scalingPolicy/chart/MetricAlarmChart.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/index.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/popover/AlarmSummary.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/popover/StepPolicyPopoverContent.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.d.ts +17 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingChart.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/PolicyTypeSelectionModal.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/ScalingPolicyCommandBuilderService.d.ts +11 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.d.ts +16 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +12 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.d.ts +15 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/namespaces.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/index.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.d.ts +13 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.d.ts +18 -0
- package/dist/serverGroup/details/scalingProcesses/AutoScalingProcessService.d.ts +6 -0
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +2 -0
- package/dist/serverGroup/details/scheduledAction/ScheduledAction.d.ts +8 -0
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/AmazonInfoDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/HealthDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/IAmazonServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/sections/InstancesDistributionDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/LaunchConfigDetailsSection.d.ts +11 -0
- package/dist/serverGroup/details/sections/LaunchTemplateDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/LogsDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/MultipleInstanceTypesSubSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/PackageDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/ScalingPoliciesDetailsSection.d.ts +8 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +15 -0
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +12 -0
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +14 -0
- package/dist/serverGroup/details/sections/TagsDetailsSection.d.ts +5 -0
- package/dist/serverGroup/details/sections/index.d.ts +15 -0
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +1 -0
- package/dist/serverGroup/details/utils.d.ts +1 -0
- package/dist/serverGroup/index.d.ts +5 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +14 -0
- package/dist/subnet/SubnetSelectField.d.ts +23 -0
- package/dist/subnet/SubnetSelectInput.d.ts +18 -0
- package/dist/subnet/index.d.ts +2 -0
- package/dist/subnet/subnet.renderer.d.ts +5 -0
- package/dist/validation/ApplicationNameValidator.d.ts +1 -0
- package/dist/vpc/VpcReader.d.ts +7 -0
- package/dist/vpc/VpcTag.d.ts +5 -0
- package/dist/vpc/index.d.ts +1 -0
- package/dist/vpc/vpc.module.d.ts +1 -0
- package/package.json +63 -0
- package/src/applicationProviderFields/awsFields.html +13 -0
- package/src/aws.module.ts +211 -0
- package/src/aws.settings.ts +71 -0
- package/src/aws.validators.ts +31 -0
- package/src/certificates/AmazonCertificateReader.ts +24 -0
- package/src/certificates/index.ts +1 -0
- package/src/common/AwsModalFooter.tsx +70 -0
- package/src/common/common.module.ts +6 -0
- package/src/common/footer.component.ts +29 -0
- package/src/common/index.ts +1 -0
- package/src/deploymentStrategy/AdditionalFields.tsx +110 -0
- package/src/deploymentStrategy/rollingPush.strategy.ts +43 -0
- package/src/domain/IAmazonBlockDeviceMapping.ts +16 -0
- package/src/domain/IAmazonCertificate.ts +6 -0
- package/src/domain/IAmazonFunction.ts +64 -0
- package/src/domain/IAmazonFunctionSourceData.ts +45 -0
- package/src/domain/IAmazonHealth.ts +15 -0
- package/src/domain/IAmazonInstance.ts +25 -0
- package/src/domain/IAmazonLaunchTemplate.ts +104 -0
- package/src/domain/IAmazonLoadBalancer.ts +277 -0
- package/src/domain/IAmazonLoadBalancerSourceData.ts +188 -0
- package/src/domain/IAmazonScalingPolicy.ts +26 -0
- package/src/domain/IAmazonSecurityGroup.ts +4 -0
- package/src/domain/IAmazonServerGroup.ts +74 -0
- package/src/domain/IKeyPair.ts +6 -0
- package/src/domain/IScalingPolicy.ts +85 -0
- package/src/domain/IScalingProcess.ts +11 -0
- package/src/domain/ITargetTrackingPolicy.ts +31 -0
- package/src/domain/index.ts +15 -0
- package/src/function/CreateLambdaFunction.tsx +228 -0
- package/src/function/configure/ExecutionRole.tsx +45 -0
- package/src/function/configure/FunctionBasicInformation.tsx +207 -0
- package/src/function/configure/FunctionDebugAndErrorHandling.tsx +49 -0
- package/src/function/configure/FunctionEnvironmentVariables.tsx +42 -0
- package/src/function/configure/FunctionSettings.tsx +43 -0
- package/src/function/configure/FunctionTags.tsx +35 -0
- package/src/function/configure/Network.tsx +260 -0
- package/src/function/details/AmazonFunctionDetails.tsx +198 -0
- package/src/function/details/FunctionActions.spec.tsx +55 -0
- package/src/function/details/FunctionActions.tsx +132 -0
- package/src/function/function.module.ts +5 -0
- package/src/function/function.transformer.ts +71 -0
- package/src/function/index.ts +5 -0
- package/src/help/amazon.help.ts +228 -0
- package/src/image/image.reader.spec.ts +75 -0
- package/src/image/image.reader.ts +44 -0
- package/src/image/index.ts +1 -0
- package/src/index.ts +15 -0
- package/src/instance/amazon.instance.write.service.ts +85 -0
- package/src/instance/awsInstanceType.service.spec.js +380 -0
- package/src/instance/awsInstanceType.service.ts +253 -0
- package/src/instance/awsInstanceTypes.ts +311 -0
- package/src/instance/details/AmazonInstanceInformation.tsx +35 -0
- package/src/instance/details/CostFactor.tsx +29 -0
- package/src/instance/details/InstanceDns.tsx +73 -0
- package/src/instance/details/InstanceInformation.spec.tsx +71 -0
- package/src/instance/details/InstanceInformation.tsx +66 -0
- package/src/instance/details/InstanceSecurityGroups.tsx +45 -0
- package/src/instance/details/InstanceStatus.tsx +92 -0
- package/src/instance/details/InstanceTags.tsx +21 -0
- package/src/instance/details/amazonInstanceInformation.component.ts +13 -0
- package/src/instance/details/instance.details.controller.js +586 -0
- package/src/instance/details/instance.details.controller.spec.js +133 -0
- package/src/instance/details/instanceDetails.html +65 -0
- package/src/instance/details/instanceDns.component.ts +21 -0
- package/src/instance/details/instanceSecurityGroups.component.ts +13 -0
- package/src/instance/details/instanceStatus.component.ts +19 -0
- package/src/instance/details/instanceTags.component.ts +13 -0
- package/src/instance/details/utils.ts +34 -0
- package/src/instance/index.ts +5 -0
- package/src/keyPairs/KeyPairsReader.ts +11 -0
- package/src/keyPairs/index.ts +1 -0
- package/src/loadBalancer/AmazonLoadBalancerClusterContainer.tsx +53 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +231 -0
- package/src/loadBalancer/OidcConfigReader.ts +21 -0
- package/src/loadBalancer/TargetGroup.tsx +63 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +13 -0
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +64 -0
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +155 -0
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +42 -0
- package/src/loadBalancer/configure/application/ALBAdvancedSettings.tsx +28 -0
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1023 -0
- package/src/loadBalancer/configure/application/ConfigureConfigModal.css +3 -0
- package/src/loadBalancer/configure/application/ConfigureOidcConfigModal.tsx +140 -0
- package/src/loadBalancer/configure/application/ConfigureRedirectConfigModal.tsx +146 -0
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +337 -0
- package/src/loadBalancer/configure/application/TargetGroups.tsx +548 -0
- package/src/loadBalancer/configure/classic/AdvancedSettings.css +3 -0
- package/src/loadBalancer/configure/classic/AdvancedSettings.tsx +69 -0
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +282 -0
- package/src/loadBalancer/configure/classic/HealthCheck.tsx +69 -0
- package/src/loadBalancer/configure/classic/Listeners.less +21 -0
- package/src/loadBalancer/configure/classic/Listeners.tsx +273 -0
- package/src/loadBalancer/configure/common/AmazonCertificateSelectField.tsx +48 -0
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +417 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +223 -0
- package/src/loadBalancer/configure/common/configure.less +131 -0
- package/src/loadBalancer/configure/common/targetGroupValidators.spec.ts +130 -0
- package/src/loadBalancer/configure/common/targetGroupValidators.ts +41 -0
- package/src/loadBalancer/configure/network/CertificateSelectors.tsx +73 -0
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +303 -0
- package/src/loadBalancer/configure/network/NLBAdvancedSettings.tsx +34 -0
- package/src/loadBalancer/configure/network/NLBListeners.tsx +298 -0
- package/src/loadBalancer/configure/network/TargetGroups.tsx +447 -0
- package/src/loadBalancer/details/LoadBalancerActions.tsx +166 -0
- package/src/loadBalancer/details/loadBalancerActions.component.ts +16 -0
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +76 -0
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +240 -0
- package/src/loadBalancer/details/loadBalancerDetails.html +266 -0
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +95 -0
- package/src/loadBalancer/details/targetGroupDetails.html +138 -0
- package/src/loadBalancer/index.ts +9 -0
- package/src/loadBalancer/loadBalancer.module.ts +15 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +638 -0
- package/src/loadBalancer/targetGroup.less +46 -0
- package/src/loadBalancer/targetGroup.states.ts +55 -0
- package/src/logo/amazon.logo.svg +503 -0
- package/src/logo/aws.icon.svg +10 -0
- package/src/logo/aws.logo.less +5 -0
- package/src/pipeline/stages/bake/awsBakeStage.js +219 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +43 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +65 -0
- package/src/pipeline/stages/bake/bakeStage.html +205 -0
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +143 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +143 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +1 -0
- package/src/pipeline/stages/deleteLambda/DeleteLambdaFunctionStageForm.tsx +143 -0
- package/src/pipeline/stages/deleteLambda/LambdaDeleteStage.tsx +86 -0
- package/src/pipeline/stages/deleteLambda/constants/deleteVersion.constants.ts +37 -0
- package/src/pipeline/stages/deleteLambda/constants/deleteVersion.picker.tsx +47 -0
- package/src/pipeline/stages/deleteLambda/constants/index.ts +5 -0
- package/src/pipeline/stages/deleteLambda/index.ts +17 -0
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +80 -0
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +46 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationExecutionDetails.tsx +23 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +84 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +84 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +37 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +33 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +80 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionDetails.tsx +56 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionLabel.tsx +53 -0
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionMarkerIcon.tsx +20 -0
- package/src/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.tsx +138 -0
- package/src/pipeline/stages/deployLambda/components/BasicSettingsForm.tsx +176 -0
- package/src/pipeline/stages/deployLambda/components/EnvironmentForm.tsx +24 -0
- package/src/pipeline/stages/deployLambda/components/ExecutionRoleForm.tsx +15 -0
- package/src/pipeline/stages/deployLambda/components/LambdaAtEdgeForm.tsx +28 -0
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +123 -0
- package/src/pipeline/stages/deployLambda/components/TriggerEventsForm.tsx +49 -0
- package/src/pipeline/stages/deployLambda/components/function.constants.ts +32 -0
- package/src/pipeline/stages/deployLambda/components/index.ts +8 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStage.tsx +20 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStageConfig.tsx +64 -0
- package/src/pipeline/stages/deployLambda/config/LambdaDeploymentStageExecutionDetails.tsx +31 -0
- package/src/pipeline/stages/deployLambda/config/UpsertDefaults.tsx +21 -0
- package/src/pipeline/stages/deployLambda/config/function.defaults.ts +39 -0
- package/src/pipeline/stages/deployLambda/index.ts +18 -0
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +66 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +69 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +84 -0
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +26 -0
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +73 -0
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +11 -0
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +79 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +24 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +36 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +44 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +11 -0
- package/src/pipeline/stages/invokeLambda/InvokeLambdaFunctionStageForm.tsx +106 -0
- package/src/pipeline/stages/invokeLambda/LambdaInvokeStage.tsx +125 -0
- package/src/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.tsx +78 -0
- package/src/pipeline/stages/invokeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/invokeLambda/index.ts +18 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +36 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +24 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +98 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +127 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +90 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +4 -0
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +66 -0
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +43 -0
- package/src/pipeline/stages/routeLambda/LambdaRouteStage.tsx +98 -0
- package/src/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.tsx +150 -0
- package/src/pipeline/stages/routeLambda/TriggerEventsForm.tsx +51 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/BlueGreenDeploymentForm.tsx +27 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/HealthCheckStrategy.tsx +21 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/InvocationHealthCheck.tsx +93 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/health.constants.ts +14 -0
- package/src/pipeline/stages/routeLambda/components/BlueGreenDeployment/index.ts +4 -0
- package/src/pipeline/stages/routeLambda/components/DeploymentStrategyForm.tsx +18 -0
- package/src/pipeline/stages/routeLambda/components/RenderStrategy.tsx +23 -0
- package/src/pipeline/stages/routeLambda/components/SimpleDeploymentForm.tsx +67 -0
- package/src/pipeline/stages/routeLambda/components/VersionPicker.tsx +43 -0
- package/src/pipeline/stages/routeLambda/components/WeightedDeploymentForm.tsx +107 -0
- package/src/pipeline/stages/routeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/routeLambda/constants/index.ts +6 -0
- package/src/pipeline/stages/routeLambda/constants/strategy.constants.tsx +26 -0
- package/src/pipeline/stages/routeLambda/constants/strategy.picker.tsx +47 -0
- package/src/pipeline/stages/routeLambda/constants/versions.constants.ts +31 -0
- package/src/pipeline/stages/routeLambda/index.ts +18 -0
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +78 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +73 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +34 -0
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +38 -0
- package/src/pipeline/stages/tagImage/tagImageStage.html +10 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.less +5 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.tsx +20 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageConfig.tsx +41 -0
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageExecutionDetails.tsx +31 -0
- package/src/pipeline/stages/updateCodeLambda/components/UpdateCodeStageForm.tsx +122 -0
- package/src/pipeline/stages/updateCodeLambda/components/index.ts +4 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +18 -0
- package/src/reactShims/aws.react.injector.ts +25 -0
- package/src/reactShims/aws.react.module.ts +12 -0
- package/src/reactShims/index.ts +1 -0
- package/src/search/searchResultFormatter.ts +19 -0
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +106 -0
- package/src/securityGroup/clone/cloneSecurityGroup.html +19 -0
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +307 -0
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +47 -0
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +115 -0
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +366 -0
- package/src/securityGroup/configure/createSecurityGroup.html +19 -0
- package/src/securityGroup/configure/createSecurityGroupIngress.html +100 -0
- package/src/securityGroup/configure/createSecurityGroupProperties.html +123 -0
- package/src/securityGroup/configure/editSecurityGroup.html +20 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +77 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +6 -0
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +190 -0
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +16 -0
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +16 -0
- package/src/securityGroup/details/IPRangeRules.tsx +56 -0
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/details/securityGroupDetail.controller.js +249 -0
- package/src/securityGroup/details/securityGroupDetail.html +114 -0
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +12 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.module.ts +26 -0
- package/src/securityGroup/securityGroup.reader.ts +24 -0
- package/src/securityGroup/securityGroup.transformer.js +48 -0
- package/src/serverGroup/AvailabilityZoneSelector.tsx +107 -0
- package/src/serverGroup/configure/AccountServiceFixtures.js +45 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +101 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +412 -0
- package/src/serverGroup/configure/index.ts +5 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +430 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +528 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +284 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +478 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +747 -0
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +243 -0
- package/src/serverGroup/configure/wizard/ServerGroupTemplateSelection.tsx +60 -0
- package/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx +181 -0
- package/src/serverGroup/configure/wizard/capacity/MinMaxDesired.tsx +60 -0
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +62 -0
- package/src/serverGroup/configure/wizard/instanceType/InstanceTypeSelector.tsx +167 -0
- package/src/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.tsx +44 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +102 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AmazonInstanceTypeInfoRenderer.tsx +59 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceProfileSelector.tsx +36 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeRow.tsx +157 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeSelect.tsx +78 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTable.tsx +148 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableBody.tsx +144 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableParts.tsx +129 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.less +5 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.tsx +111 -0
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/advancedMode.less +122 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +65 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +354 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupCapacity.tsx +71 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +158 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +262 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupSecurityGroups.tsx +52 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupZones.tsx +68 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettings.tsx +30 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +374 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsInner.tsx +40 -0
- package/src/serverGroup/configure/wizard/pages/index.ts +8 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +108 -0
- package/src/serverGroup/configure/wizard/securityGroups/ServerGroupSecurityGroupsRemoved.tsx +49 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +343 -0
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +47 -0
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +79 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +83 -0
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +458 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +146 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +139 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +97 -0
- package/src/serverGroup/details/scalingPolicy/ScalingPolicySummary.tsx +33 -0
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +102 -0
- package/src/serverGroup/details/scalingPolicy/StepPolicySummary.less +10 -0
- package/src/serverGroup/details/scalingPolicy/StepPolicySummary.tsx +120 -0
- package/src/serverGroup/details/scalingPolicy/chart/DateLineChart.tsx +117 -0
- package/src/serverGroup/details/scalingPolicy/chart/MetricAlarmChart.tsx +85 -0
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +15 -0
- package/src/serverGroup/details/scalingPolicy/index.ts +12 -0
- package/src/serverGroup/details/scalingPolicy/popover/AlarmSummary.tsx +26 -0
- package/src/serverGroup/details/scalingPolicy/popover/StepPolicyPopoverContent.tsx +90 -0
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +6 -0
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +14 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.less +10 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.tsx +212 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.less +11 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.tsx +122 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingChart.tsx +85 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.less +11 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.tsx +117 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.tsx +77 -0
- package/src/serverGroup/details/scalingPolicy/upsert/PolicyTypeSelectionModal.tsx +77 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.less +11 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.tsx +105 -0
- package/src/serverGroup/details/scalingPolicy/upsert/ScalingPolicyCommandBuilderService.ts +133 -0
- package/src/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.tsx +213 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.less +19 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.tsx +176 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +89 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.less +15 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.tsx +170 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +18 -0
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/namespaces.ts +31 -0
- package/src/serverGroup/details/scalingPolicy/upsert/index.ts +7 -0
- package/src/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.less +9 -0
- package/src/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.tsx +70 -0
- package/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.less +18 -0
- package/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx +163 -0
- package/src/serverGroup/details/scalingProcesses/AutoScalingProcessService.spec.ts +94 -0
- package/src/serverGroup/details/scalingProcesses/AutoScalingProcessService.ts +76 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +95 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +106 -0
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +30 -0
- package/src/serverGroup/details/scheduledAction/ScheduledAction.tsx +25 -0
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +70 -0
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +89 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +61 -0
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +39 -0
- package/src/serverGroup/details/sections/AmazonInfoDetailsSection.tsx +89 -0
- package/src/serverGroup/details/sections/HealthDetailsSection.tsx +25 -0
- package/src/serverGroup/details/sections/IAmazonServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +88 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.tsx +50 -0
- package/src/serverGroup/details/sections/LaunchConfigDetailsSection.tsx +93 -0
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +255 -0
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.tsx +61 -0
- package/src/serverGroup/details/sections/LogsDetailsSection.tsx +19 -0
- package/src/serverGroup/details/sections/MultipleInstanceTypesSubSection.tsx +44 -0
- package/src/serverGroup/details/sections/PackageDetailsSection.tsx +78 -0
- package/src/serverGroup/details/sections/ScalingPoliciesDetailsSection.tsx +65 -0
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +113 -0
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +92 -0
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +119 -0
- package/src/serverGroup/details/sections/TagsDetailsSection.tsx +26 -0
- package/src/serverGroup/details/sections/index.ts +15 -0
- package/src/serverGroup/details/sections/multipleInstanceTypesSubSection.less +50 -0
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +95 -0
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +40 -0
- package/src/serverGroup/details/serverGroupDetails.module.ts +18 -0
- package/src/serverGroup/details/utils.spec.ts +23 -0
- package/src/serverGroup/details/utils.ts +13 -0
- package/src/serverGroup/index.ts +5 -0
- package/src/serverGroup/serverGroup.transformer.spec.ts +185 -0
- package/src/serverGroup/serverGroup.transformer.ts +160 -0
- package/src/subnet/SubnetSelectField.tsx +84 -0
- package/src/subnet/SubnetSelectInput.spec.tsx +91 -0
- package/src/subnet/SubnetSelectInput.tsx +111 -0
- package/src/subnet/index.ts +2 -0
- package/src/subnet/subnet.renderer.ts +12 -0
- package/src/validation/ApplicationNameValidator.ts +84 -0
- package/src/vpc/VpcReader.spec.ts +45 -0
- package/src/vpc/VpcReader.ts +36 -0
- package/src/vpc/VpcTag.spec.tsx +37 -0
- package/src/vpc/VpcTag.tsx +24 -0
- package/src/vpc/index.ts +1 -0
- package/src/vpc/vpc.module.ts +9 -0
|
@@ -0,0 +1,1023 @@
|
|
|
1
|
+
import type { FormikErrors, FormikProps } from 'formik';
|
|
2
|
+
import { difference, flatten, get, some, uniq, uniqBy } from 'lodash';
|
|
3
|
+
import { $q } from 'ngimport';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { SortEnd } from 'react-sortable-hoc';
|
|
6
|
+
import { arrayMove, SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
|
7
|
+
|
|
8
|
+
import type { Application, IWizardPageComponent } from '@spinnaker/core';
|
|
9
|
+
import { ConfirmationModalService, CustomLabels, HelpField, Tooltip, ValidationMessage } from '@spinnaker/core';
|
|
10
|
+
|
|
11
|
+
import { ConfigureOidcConfigModal } from './ConfigureOidcConfigModal';
|
|
12
|
+
import { ConfigureRedirectConfigModal } from './ConfigureRedirectConfigModal';
|
|
13
|
+
import type { IAuthenticateOidcActionConfig } from '../../OidcConfigReader';
|
|
14
|
+
import { OidcConfigReader } from '../../OidcConfigReader';
|
|
15
|
+
import { AWSProviderSettings } from '../../../aws.settings';
|
|
16
|
+
import { AmazonCertificateReader } from '../../../certificates/AmazonCertificateReader';
|
|
17
|
+
import { AmazonCertificateSelectField } from '../common/AmazonCertificateSelectField';
|
|
18
|
+
import type {
|
|
19
|
+
ALBListenerProtocol,
|
|
20
|
+
IALBListenerCertificate,
|
|
21
|
+
IALBTargetGroupDescription,
|
|
22
|
+
IAmazonApplicationLoadBalancerUpsertCommand,
|
|
23
|
+
IAmazonCertificate,
|
|
24
|
+
IListenerAction,
|
|
25
|
+
IListenerActionType,
|
|
26
|
+
IListenerDescription,
|
|
27
|
+
IListenerRule,
|
|
28
|
+
IListenerRuleCondition,
|
|
29
|
+
IRedirectActionConfig,
|
|
30
|
+
ListenerRuleConditionField,
|
|
31
|
+
} from '../../../domain';
|
|
32
|
+
|
|
33
|
+
export interface IALBListenersState {
|
|
34
|
+
certificates: { [accountId: number]: IAmazonCertificate[] };
|
|
35
|
+
certificateTypes: string[];
|
|
36
|
+
oidcConfigs: IAuthenticateOidcActionConfig[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const DragHandle = SortableHandle(() => (
|
|
40
|
+
<span className="pipeline-drag-handle clickable glyphicon glyphicon-resize-vertical" />
|
|
41
|
+
));
|
|
42
|
+
|
|
43
|
+
const defaultAuthAction = {
|
|
44
|
+
authenticateOidcConfig: {
|
|
45
|
+
authorizationEndpoint: '',
|
|
46
|
+
clientId: '',
|
|
47
|
+
issuer: '',
|
|
48
|
+
scope: 'openid',
|
|
49
|
+
sessionCookieName: 'AWSELBAuthSessionCookie',
|
|
50
|
+
tokenEndpoint: '',
|
|
51
|
+
userInfoEndpoint: '',
|
|
52
|
+
},
|
|
53
|
+
type: 'authenticate-oidc',
|
|
54
|
+
} as IListenerAction;
|
|
55
|
+
|
|
56
|
+
export interface IALBListenersProps {
|
|
57
|
+
app: Application;
|
|
58
|
+
formik: FormikProps<IAmazonApplicationLoadBalancerUpsertCommand>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class ALBListeners
|
|
62
|
+
extends React.Component<IALBListenersProps, IALBListenersState>
|
|
63
|
+
implements IWizardPageComponent<IAmazonApplicationLoadBalancerUpsertCommand> {
|
|
64
|
+
public protocols = ['HTTP', 'HTTPS'];
|
|
65
|
+
|
|
66
|
+
private initialActionsWithAuth: Set<IListenerAction[]> = new Set();
|
|
67
|
+
private initialListenersWithDefaultAuth: Set<IListenerDescription> = new Set();
|
|
68
|
+
private removedAuthActions: Map<IListenerDescription, { [key: number]: IListenerAction }> = new Map();
|
|
69
|
+
|
|
70
|
+
constructor(props: IALBListenersProps) {
|
|
71
|
+
super(props);
|
|
72
|
+
this.state = {
|
|
73
|
+
certificates: [],
|
|
74
|
+
certificateTypes: get(AWSProviderSettings, 'loadBalancers.certificateTypes', ['iam', 'acm']),
|
|
75
|
+
oidcConfigs: undefined,
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
this.props.formik.initialValues.listeners.forEach((l) => {
|
|
79
|
+
const hasDefaultAuth = l.defaultActions[0].type === 'authenticate-oidc';
|
|
80
|
+
if (hasDefaultAuth) {
|
|
81
|
+
this.initialListenersWithDefaultAuth.add(l);
|
|
82
|
+
}
|
|
83
|
+
l.rules.forEach((r) => {
|
|
84
|
+
if (r.actions[0].type === 'authenticate-oidc') {
|
|
85
|
+
this.initialActionsWithAuth.add(r.actions);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private getAllTargetGroupsFromListeners(listeners: IListenerDescription[]): string[] {
|
|
92
|
+
const actions = flatten(listeners.map((l) => l.defaultActions));
|
|
93
|
+
const rules = flatten(listeners.map((l) => l.rules));
|
|
94
|
+
actions.push(...flatten(rules.map((r) => r.actions)));
|
|
95
|
+
return uniq(actions.map((a) => a.targetGroupName));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public validate(
|
|
99
|
+
values: IAmazonApplicationLoadBalancerUpsertCommand,
|
|
100
|
+
): FormikErrors<IAmazonApplicationLoadBalancerUpsertCommand> {
|
|
101
|
+
const errors = {} as any;
|
|
102
|
+
|
|
103
|
+
// Check to make sure all target groups have an associated listener
|
|
104
|
+
const targetGroupNames = values.targetGroups.map((tg) => tg.name);
|
|
105
|
+
const usedTargetGroupNames = this.getAllTargetGroupsFromListeners(values.listeners);
|
|
106
|
+
const unusedTargetGroupNames = difference(targetGroupNames, usedTargetGroupNames);
|
|
107
|
+
if (unusedTargetGroupNames.length === 1) {
|
|
108
|
+
errors.listeners = `Target group ${unusedTargetGroupNames[0]} is unused.`;
|
|
109
|
+
} else if (unusedTargetGroupNames.length > 1) {
|
|
110
|
+
errors.listeners = `Target groups ${unusedTargetGroupNames.join(', ')} are unused.`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const { listeners } = values;
|
|
114
|
+
if (uniqBy(listeners, 'port').length < listeners.length) {
|
|
115
|
+
errors.listenerPorts = 'Multiple listeners cannot use the same port.';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const missingRuleFields = values.listeners.find((l) => {
|
|
119
|
+
const defaultActionsHaveMissingTarget = !!l.defaultActions.find(
|
|
120
|
+
(da) =>
|
|
121
|
+
(da.type === 'forward' && !da.targetGroupName) ||
|
|
122
|
+
(da.type === 'authenticate-oidc' && !da.authenticateOidcConfig.clientId) ||
|
|
123
|
+
(da.type === 'redirect' &&
|
|
124
|
+
(!da.redirectActionConfig || !some(da.redirectActionConfig, (field) => field && field !== ''))),
|
|
125
|
+
);
|
|
126
|
+
const rulesHaveMissingFields = !!l.rules.find((rule) => {
|
|
127
|
+
const missingTargets = !!rule.actions.find((a) => a.type === 'forward' && !a.targetGroupName);
|
|
128
|
+
const missingAuth = !!rule.actions.find(
|
|
129
|
+
(a) => a.type === 'authenticate-oidc' && !a.authenticateOidcConfig.clientId,
|
|
130
|
+
);
|
|
131
|
+
const missingValue = !!rule.conditions.find((c) => {
|
|
132
|
+
if (c.field === 'http-request-method') {
|
|
133
|
+
return !c.values.length;
|
|
134
|
+
}
|
|
135
|
+
return c.values.includes('');
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
return missingTargets || missingAuth || missingValue;
|
|
139
|
+
});
|
|
140
|
+
return defaultActionsHaveMissingTarget || rulesHaveMissingFields;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
if (missingRuleFields) {
|
|
144
|
+
errors.listeners = `Missing fields in rule configuration.`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return errors;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
public componentDidMount(): void {
|
|
151
|
+
this.loadCertificates();
|
|
152
|
+
this.loadOidcClients();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
private loadCertificates(): void {
|
|
156
|
+
AmazonCertificateReader.listCertificates().then((certificates) => {
|
|
157
|
+
this.setState({ certificates });
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
private attachClientSecret = (action: IListenerAction, oidcConfigs: IAuthenticateOidcActionConfig[]) => {
|
|
162
|
+
if (action.type === 'authenticate-oidc') {
|
|
163
|
+
const config = oidcConfigs.find((c) => c.clientId === action.authenticateOidcConfig.clientId);
|
|
164
|
+
if (config) {
|
|
165
|
+
action.authenticateOidcConfig.clientSecret = config.clientSecret;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
private loadOidcClients(): void {
|
|
171
|
+
OidcConfigReader.getOidcConfigsByApp(this.props.app.name)
|
|
172
|
+
.then((oidcConfigs) => {
|
|
173
|
+
// make sure we have all the secrets for listener actions that need them
|
|
174
|
+
if (oidcConfigs && oidcConfigs.length) {
|
|
175
|
+
this.props.formik.values.listeners.forEach((listener) => {
|
|
176
|
+
listener.defaultActions.forEach((action) => this.attachClientSecret(action, oidcConfigs));
|
|
177
|
+
listener.rules.forEach((rule) =>
|
|
178
|
+
rule.actions.forEach((action) => this.attachClientSecret(action, oidcConfigs)),
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this.setState({ oidcConfigs });
|
|
184
|
+
this.updateListeners();
|
|
185
|
+
})
|
|
186
|
+
.catch(() => {});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
private updateListeners(): void {
|
|
190
|
+
this.props.formik.setFieldValue('listeners', this.props.formik.values.listeners);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
private needsCert(listener: IListenerDescription): boolean {
|
|
194
|
+
return listener.protocol === 'HTTPS';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
private showCertificateSelect(certificate: IALBListenerCertificate): boolean {
|
|
198
|
+
return certificate.type === 'iam' && this.state.certificates && Object.keys(this.state.certificates).length > 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private addListenerCertificate(listener: IListenerDescription): void {
|
|
202
|
+
listener.certificates = listener.certificates || [];
|
|
203
|
+
listener.certificates.push({
|
|
204
|
+
certificateArn: undefined,
|
|
205
|
+
type: 'iam',
|
|
206
|
+
name: undefined,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private removeAuthActions(listener: IListenerDescription): void {
|
|
211
|
+
const authIndex = listener.defaultActions.findIndex((a) => a.type === 'authenticate-oidc');
|
|
212
|
+
if (authIndex !== -1) {
|
|
213
|
+
this.removeAuthAction(listener, listener.defaultActions, authIndex, -1);
|
|
214
|
+
}
|
|
215
|
+
listener.rules.forEach((rule, ruleIndex) => {
|
|
216
|
+
const index = rule.actions.findIndex((a) => a.type === 'authenticate-oidc');
|
|
217
|
+
if (index !== -1) {
|
|
218
|
+
this.removeAuthAction(listener, rule.actions, index, ruleIndex);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
this.updateListeners();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
private reenableAuthActions(listener: IListenerDescription): void {
|
|
225
|
+
const removedAuthActions = this.removedAuthActions.has(listener) ? this.removedAuthActions.get(listener) : [];
|
|
226
|
+
const existingDefaultAuthAction = removedAuthActions[-1];
|
|
227
|
+
if (existingDefaultAuthAction) {
|
|
228
|
+
removedAuthActions[-1] = undefined;
|
|
229
|
+
listener.defaultActions.unshift({ ...existingDefaultAuthAction });
|
|
230
|
+
}
|
|
231
|
+
listener.rules.forEach((rule, ruleIndex) => {
|
|
232
|
+
const existingAuthAction = removedAuthActions[ruleIndex];
|
|
233
|
+
removedAuthActions[ruleIndex] = undefined;
|
|
234
|
+
if (existingAuthAction) {
|
|
235
|
+
rule.actions.unshift({ ...existingAuthAction });
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
private listenerProtocolChanged(listener: IListenerDescription, newProtocol: ALBListenerProtocol): void {
|
|
241
|
+
listener.protocol = newProtocol;
|
|
242
|
+
if (listener.protocol === 'HTTPS') {
|
|
243
|
+
listener.port = 443;
|
|
244
|
+
if (!listener.certificates || listener.certificates.length === 0) {
|
|
245
|
+
this.addListenerCertificate(listener);
|
|
246
|
+
}
|
|
247
|
+
this.reenableAuthActions(listener);
|
|
248
|
+
}
|
|
249
|
+
if (listener.protocol === 'HTTP') {
|
|
250
|
+
listener.port = 80;
|
|
251
|
+
listener.certificates.length = 0;
|
|
252
|
+
this.removeAuthActions(listener);
|
|
253
|
+
}
|
|
254
|
+
this.updateListeners();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
private listenerPortChanged(listener: IListenerDescription, newPort: string): void {
|
|
258
|
+
listener.port = Number.parseInt(newPort, 10);
|
|
259
|
+
this.updateListeners();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
private certificateTypeChanged(certificate: IALBListenerCertificate, newType: string): void {
|
|
263
|
+
certificate.type = newType;
|
|
264
|
+
this.updateListeners();
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
private handleCertificateChanged(certificate: IALBListenerCertificate, newCertificateName: string): void {
|
|
268
|
+
certificate.name = newCertificateName;
|
|
269
|
+
this.updateListeners();
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
private removeListener(index: number): void {
|
|
273
|
+
this.props.formik.values.listeners.splice(index, 1);
|
|
274
|
+
this.updateListeners();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
private addListener = (): void => {
|
|
278
|
+
this.props.formik.values.listeners.push({
|
|
279
|
+
certificates: [],
|
|
280
|
+
protocol: 'HTTP',
|
|
281
|
+
port: 80,
|
|
282
|
+
defaultActions: [
|
|
283
|
+
{
|
|
284
|
+
type: 'forward',
|
|
285
|
+
targetGroupName: '',
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
rules: [],
|
|
289
|
+
});
|
|
290
|
+
this.updateListeners();
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
private addRule = (listener: IListenerDescription): void => {
|
|
294
|
+
const newRule: IListenerRule = {
|
|
295
|
+
priority: null,
|
|
296
|
+
actions: [
|
|
297
|
+
{
|
|
298
|
+
type: 'forward',
|
|
299
|
+
targetGroupName: '',
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
conditions: [
|
|
303
|
+
{
|
|
304
|
+
field: 'path-pattern',
|
|
305
|
+
values: [''],
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
listener.rules.push(newRule);
|
|
311
|
+
this.updateListeners();
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
public removeRule = (listener: IListenerDescription, index: number): void => {
|
|
315
|
+
listener.rules.splice(index, 1);
|
|
316
|
+
this.updateListeners();
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
private handleConditionFieldChanged = (
|
|
320
|
+
condition: IListenerRuleCondition,
|
|
321
|
+
newField: ListenerRuleConditionField,
|
|
322
|
+
): void => {
|
|
323
|
+
condition.field = newField;
|
|
324
|
+
|
|
325
|
+
if (newField === 'http-request-method') {
|
|
326
|
+
condition.values = [];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
this.updateListeners();
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
private handleConditionValueChanged = (condition: IListenerRuleCondition, newValue: string): void => {
|
|
333
|
+
condition.values[0] = newValue;
|
|
334
|
+
this.updateListeners();
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
private handleHttpRequestMethodChanged = (
|
|
338
|
+
condition: IListenerRuleCondition,
|
|
339
|
+
newValue: string,
|
|
340
|
+
selected: boolean,
|
|
341
|
+
): void => {
|
|
342
|
+
let newValues = condition.values || [];
|
|
343
|
+
|
|
344
|
+
if (selected) {
|
|
345
|
+
newValues.push(newValue);
|
|
346
|
+
} else {
|
|
347
|
+
newValues = newValues.filter((v) => v !== newValue);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The `http-request-method` conditions have a differnt model.
|
|
352
|
+
* AWS uses `httpRequestMethodConfig` as the source of truth, while deck uses `values`.
|
|
353
|
+
* Both are updated for consistency.
|
|
354
|
+
*/
|
|
355
|
+
condition.values = newValues;
|
|
356
|
+
condition.httpRequestMethodConfig = {
|
|
357
|
+
values: newValues,
|
|
358
|
+
};
|
|
359
|
+
this.updateListeners();
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
private addCondition = (rule: IListenerRule): void => {
|
|
363
|
+
if (rule.conditions.length === 1) {
|
|
364
|
+
const field = rule.conditions[0].field === 'path-pattern' ? 'host-header' : 'path-pattern';
|
|
365
|
+
rule.conditions.push({ field, values: [''] });
|
|
366
|
+
}
|
|
367
|
+
this.updateListeners();
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
private removeCondition = (rule: IListenerRule, index: number): void => {
|
|
371
|
+
rule.conditions.splice(index, 1);
|
|
372
|
+
this.updateListeners();
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
private handleRuleActionTargetChanged = (action: IListenerAction, newTarget: string): void => {
|
|
376
|
+
action.targetGroupName = newTarget;
|
|
377
|
+
this.updateListeners();
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
private handleRuleActionTypeChanged = (action: IListenerAction, newType: IListenerActionType): void => {
|
|
381
|
+
action.type = newType;
|
|
382
|
+
|
|
383
|
+
if (action.type === 'forward') {
|
|
384
|
+
delete action.redirectActionConfig;
|
|
385
|
+
} else if (action.type === 'redirect') {
|
|
386
|
+
action.redirectActionConfig = {
|
|
387
|
+
statusCode: 'HTTP_301',
|
|
388
|
+
};
|
|
389
|
+
delete action.targetGroupName;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
this.updateListeners();
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
private handleSortEnd = (sortEnd: SortEnd, listener: IListenerDescription): void => {
|
|
396
|
+
listener.rules = arrayMove(listener.rules, sortEnd.oldIndex, sortEnd.newIndex);
|
|
397
|
+
this.updateListeners();
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
private configureOidcClient = (action: IListenerAction): void => {
|
|
401
|
+
ConfigureOidcConfigModal.show({ config: action.authenticateOidcConfig })
|
|
402
|
+
.then((config: any) => {
|
|
403
|
+
action.authenticateOidcConfig = config;
|
|
404
|
+
this.updateListeners(); // pushes change to formik, needed due to prop mutation
|
|
405
|
+
})
|
|
406
|
+
.catch(() => {});
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
private configureRedirect = (action: IListenerAction): void => {
|
|
410
|
+
ConfigureRedirectConfigModal.show({ config: action.redirectActionConfig })
|
|
411
|
+
.then((config: any) => {
|
|
412
|
+
action.redirectActionConfig = config;
|
|
413
|
+
this.updateListeners(); // pushes change to formik, needed due to prop mutation
|
|
414
|
+
})
|
|
415
|
+
.catch(() => {});
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
private removeAuthActionInternal(
|
|
419
|
+
listener: IListenerDescription,
|
|
420
|
+
actions: IListenerAction[],
|
|
421
|
+
authIndex: number,
|
|
422
|
+
ruleIndex = -1,
|
|
423
|
+
): void {
|
|
424
|
+
const removedAuthAction = actions.splice(authIndex, 1)[0];
|
|
425
|
+
if (!this.removedAuthActions.has(listener)) {
|
|
426
|
+
this.removedAuthActions.set(listener, []);
|
|
427
|
+
}
|
|
428
|
+
this.removedAuthActions.get(listener)[ruleIndex || -1] = removedAuthAction;
|
|
429
|
+
this.updateListeners();
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
private removeAuthAction(
|
|
433
|
+
listener: IListenerDescription,
|
|
434
|
+
actions: IListenerAction[],
|
|
435
|
+
authIndex: number,
|
|
436
|
+
ruleIndex = -1,
|
|
437
|
+
): void {
|
|
438
|
+
// TODO: Check if initial is true.
|
|
439
|
+
const confirmDefaultRemove = ruleIndex === -1 && this.initialListenersWithDefaultAuth.has(listener);
|
|
440
|
+
const confirmRemove = ruleIndex > -1 && this.initialActionsWithAuth.has(actions);
|
|
441
|
+
|
|
442
|
+
if (confirmDefaultRemove || confirmRemove) {
|
|
443
|
+
// TODO: Confirmation Dialog first.
|
|
444
|
+
ConfirmationModalService.confirm({
|
|
445
|
+
header: 'Really remove authentication?',
|
|
446
|
+
buttonText: `Remove Auth`,
|
|
447
|
+
submitMethod: () => {
|
|
448
|
+
this.removeAuthActionInternal(listener, actions, authIndex, ruleIndex);
|
|
449
|
+
if (confirmDefaultRemove) {
|
|
450
|
+
this.initialListenersWithDefaultAuth.delete(listener);
|
|
451
|
+
}
|
|
452
|
+
if (confirmRemove) {
|
|
453
|
+
this.initialActionsWithAuth.delete(actions);
|
|
454
|
+
}
|
|
455
|
+
return $q.resolve();
|
|
456
|
+
},
|
|
457
|
+
});
|
|
458
|
+
} else {
|
|
459
|
+
this.removeAuthActionInternal(listener, actions, authIndex, ruleIndex);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
private authenticateRuleToggle = (listener: IListenerDescription, ruleIndex: number) => {
|
|
464
|
+
const rules = listener.rules[ruleIndex];
|
|
465
|
+
const actions = (rules && rules.actions) || listener.defaultActions;
|
|
466
|
+
if (actions) {
|
|
467
|
+
const authIndex = actions.findIndex((a) => a.type === 'authenticate-oidc');
|
|
468
|
+
if (authIndex !== -1) {
|
|
469
|
+
this.removeAuthAction(listener, actions, authIndex, ruleIndex);
|
|
470
|
+
} else {
|
|
471
|
+
const removedAction = this.removedAuthActions.has(listener)
|
|
472
|
+
? this.removedAuthActions.get(listener)[ruleIndex || -1]
|
|
473
|
+
: undefined;
|
|
474
|
+
const newAuthAction = removedAction || { ...defaultAuthAction };
|
|
475
|
+
actions.unshift({ ...newAuthAction });
|
|
476
|
+
}
|
|
477
|
+
this.updateListeners();
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
private oidcConfigChanged = (action: IListenerAction, config: IAuthenticateOidcActionConfig) => {
|
|
482
|
+
action.authenticateOidcConfig = { ...config };
|
|
483
|
+
this.updateListeners();
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
private redirectConfigChanged = (action: IListenerAction, config: IRedirectActionConfig) => {
|
|
487
|
+
action.redirectActionConfig = { ...config };
|
|
488
|
+
this.updateListeners();
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
public render() {
|
|
492
|
+
const { errors, values } = this.props.formik;
|
|
493
|
+
const { certificates, certificateTypes, oidcConfigs } = this.state;
|
|
494
|
+
return (
|
|
495
|
+
<div className="container-fluid form-horizontal">
|
|
496
|
+
<div className="form-group">
|
|
497
|
+
<div className="col-md-12">
|
|
498
|
+
{values.listeners.map((listener, index) => (
|
|
499
|
+
<div key={index} className="wizard-pod">
|
|
500
|
+
<div>
|
|
501
|
+
<div className="wizard-pod-row header">
|
|
502
|
+
<div className="wizard-pod-row-title">Listen On</div>
|
|
503
|
+
<div className="wizard-pod-row-contents spread">
|
|
504
|
+
<div>
|
|
505
|
+
<span className="wizard-pod-content">
|
|
506
|
+
<label>Protocol</label>
|
|
507
|
+
<select
|
|
508
|
+
className="form-control input-sm inline-number"
|
|
509
|
+
style={{ width: '80px' }}
|
|
510
|
+
value={listener.protocol}
|
|
511
|
+
onChange={(event) =>
|
|
512
|
+
this.listenerProtocolChanged(listener, event.target.value as ALBListenerProtocol)
|
|
513
|
+
}
|
|
514
|
+
>
|
|
515
|
+
{this.protocols.map((p) => (
|
|
516
|
+
<option key={p}>{p}</option>
|
|
517
|
+
))}
|
|
518
|
+
</select>
|
|
519
|
+
</span>
|
|
520
|
+
<span className="wizard-pod-content">
|
|
521
|
+
<label>Port</label>
|
|
522
|
+
<input
|
|
523
|
+
className="form-control input-sm inline-number"
|
|
524
|
+
type="text"
|
|
525
|
+
min={0}
|
|
526
|
+
value={listener.port || ''}
|
|
527
|
+
onChange={(event) => this.listenerPortChanged(listener, event.target.value)}
|
|
528
|
+
style={{ width: '80px' }}
|
|
529
|
+
required={true}
|
|
530
|
+
/>
|
|
531
|
+
</span>
|
|
532
|
+
</div>
|
|
533
|
+
<div>
|
|
534
|
+
<a className="sm-label clickable" onClick={() => this.removeListener(index)}>
|
|
535
|
+
<span className="glyphicon glyphicon-trash" />
|
|
536
|
+
</a>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
{this.needsCert(listener) && (
|
|
541
|
+
<div className="wizard-pod-row">
|
|
542
|
+
<div className="wizard-pod-row-title">Certificate</div>
|
|
543
|
+
<div className="wizard-pod-row-contents">
|
|
544
|
+
{listener.certificates.map((certificate, cIndex) => (
|
|
545
|
+
<div key={cIndex} style={{ width: '100%', display: 'flex', flexDirection: 'row' }}>
|
|
546
|
+
<select
|
|
547
|
+
className="form-control input-sm inline-number"
|
|
548
|
+
style={{ width: '45px' }}
|
|
549
|
+
value={certificate.type}
|
|
550
|
+
onChange={(event) => this.certificateTypeChanged(certificate, event.target.value)}
|
|
551
|
+
>
|
|
552
|
+
{certificateTypes.map((t) => (
|
|
553
|
+
<option key={t}>{t}</option>
|
|
554
|
+
))}
|
|
555
|
+
</select>
|
|
556
|
+
{this.showCertificateSelect(certificate) && (
|
|
557
|
+
<AmazonCertificateSelectField
|
|
558
|
+
certificates={certificates}
|
|
559
|
+
accountName={values.credentials}
|
|
560
|
+
currentValue={certificate.name}
|
|
561
|
+
app={this.props.app}
|
|
562
|
+
onCertificateSelect={(value) => this.handleCertificateChanged(certificate, value)}
|
|
563
|
+
/>
|
|
564
|
+
)}
|
|
565
|
+
{!this.showCertificateSelect(certificate) && (
|
|
566
|
+
<input
|
|
567
|
+
className="form-control input-sm no-spel"
|
|
568
|
+
style={{ display: 'inline-block' }}
|
|
569
|
+
type="text"
|
|
570
|
+
value={certificate.name}
|
|
571
|
+
onChange={(event) => this.handleCertificateChanged(certificate, event.target.value)}
|
|
572
|
+
required={true}
|
|
573
|
+
/>
|
|
574
|
+
)}
|
|
575
|
+
</div>
|
|
576
|
+
))}
|
|
577
|
+
</div>
|
|
578
|
+
</div>
|
|
579
|
+
)}
|
|
580
|
+
<div className="wizard-pod-row">
|
|
581
|
+
<div className="wizard-pod-row-contents" style={{ padding: '0' }}>
|
|
582
|
+
<table className="table table-condensed packed rules-table">
|
|
583
|
+
<thead>
|
|
584
|
+
<tr>
|
|
585
|
+
<th style={{ width: '15px', padding: '0' }} />
|
|
586
|
+
<th>If</th>
|
|
587
|
+
<th style={{ width: '315px' }}>Then</th>
|
|
588
|
+
<th style={{ width: '45px' }} />
|
|
589
|
+
</tr>
|
|
590
|
+
</thead>
|
|
591
|
+
<Rules
|
|
592
|
+
addCondition={this.addCondition}
|
|
593
|
+
addRule={this.addRule}
|
|
594
|
+
authenticateRuleToggle={this.authenticateRuleToggle}
|
|
595
|
+
distance={10}
|
|
596
|
+
handleConditionFieldChanged={this.handleConditionFieldChanged}
|
|
597
|
+
handleConditionValueChanged={this.handleConditionValueChanged}
|
|
598
|
+
handleHttpRequestMethodChanged={this.handleHttpRequestMethodChanged}
|
|
599
|
+
handleRuleActionTargetChanged={this.handleRuleActionTargetChanged}
|
|
600
|
+
handleRuleActionTypeChanged={this.handleRuleActionTypeChanged}
|
|
601
|
+
listener={listener}
|
|
602
|
+
helperClass="rule-sortable-helper"
|
|
603
|
+
removeRule={this.removeRule}
|
|
604
|
+
removeCondition={this.removeCondition}
|
|
605
|
+
targetGroups={values.targetGroups}
|
|
606
|
+
oidcConfigs={oidcConfigs}
|
|
607
|
+
oidcConfigChanged={this.oidcConfigChanged}
|
|
608
|
+
redirectConfigChanged={this.redirectConfigChanged}
|
|
609
|
+
onSortEnd={(sortEnd) => this.handleSortEnd(sortEnd, listener)}
|
|
610
|
+
configureOidcClient={this.configureOidcClient}
|
|
611
|
+
configureRedirect={this.configureRedirect}
|
|
612
|
+
/>
|
|
613
|
+
</table>
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
</div>
|
|
618
|
+
))}
|
|
619
|
+
{errors.listenerPorts && (
|
|
620
|
+
<div className="wizard-pod-row-errors">
|
|
621
|
+
<ValidationMessage type="error" message={errors.listenerPorts} />
|
|
622
|
+
</div>
|
|
623
|
+
)}
|
|
624
|
+
{errors.listeners && (
|
|
625
|
+
<div className="wizard-pod-row-errors">
|
|
626
|
+
<ValidationMessage type="error" message={errors.listeners} />
|
|
627
|
+
</div>
|
|
628
|
+
)}
|
|
629
|
+
<table className="table table-condensed packed">
|
|
630
|
+
<tbody>
|
|
631
|
+
<tr>
|
|
632
|
+
<td>
|
|
633
|
+
<button type="button" className="add-new col-md-12" onClick={this.addListener}>
|
|
634
|
+
<span>
|
|
635
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add new listener
|
|
636
|
+
</span>
|
|
637
|
+
</button>
|
|
638
|
+
</td>
|
|
639
|
+
</tr>
|
|
640
|
+
</tbody>
|
|
641
|
+
</table>
|
|
642
|
+
</div>
|
|
643
|
+
</div>
|
|
644
|
+
</div>
|
|
645
|
+
);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface IRuleProps {
|
|
650
|
+
rule: IListenerRule;
|
|
651
|
+
listener: IListenerDescription;
|
|
652
|
+
index: number;
|
|
653
|
+
targetGroups: IALBTargetGroupDescription[];
|
|
654
|
+
oidcConfigChanged: (action: IListenerAction, config: IAuthenticateOidcActionConfig) => void;
|
|
655
|
+
redirectConfigChanged: (action: IListenerAction, config: IRedirectActionConfig) => void;
|
|
656
|
+
oidcConfigs: IAuthenticateOidcActionConfig[];
|
|
657
|
+
ruleIndex: number;
|
|
658
|
+
authenticateRuleToggle: (listener: IListenerDescription, index: number) => void;
|
|
659
|
+
removeRule: (listener: IListenerDescription, index: number) => void;
|
|
660
|
+
handleRuleActionTargetChanged: (action: IListenerAction, newTarget: string) => void;
|
|
661
|
+
handleRuleActionTypeChanged: (action: IListenerAction, newType: string) => void;
|
|
662
|
+
addCondition: (rule: IListenerRule) => void;
|
|
663
|
+
removeCondition: (rule: IListenerRule, index: number) => void;
|
|
664
|
+
handleConditionFieldChanged: (condition: IListenerRuleCondition, newField: ListenerRuleConditionField) => void;
|
|
665
|
+
handleConditionValueChanged: (condition: IListenerRuleCondition, newValue: string) => void;
|
|
666
|
+
handleHttpRequestMethodChanged: (condition: IListenerRuleCondition, newValue: string, selected: boolean) => void;
|
|
667
|
+
configureOidcClient: (action: IListenerAction) => void;
|
|
668
|
+
configureRedirect: (action: IListenerAction) => void;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const Rule = SortableElement((props: IRuleProps) => (
|
|
672
|
+
<tr className="listener-rule">
|
|
673
|
+
<td className="handle">
|
|
674
|
+
<DragHandle />
|
|
675
|
+
</td>
|
|
676
|
+
<td>
|
|
677
|
+
{props.rule.conditions.map((condition, cIndex) => (
|
|
678
|
+
<div key={cIndex} className="listener-rule-condition">
|
|
679
|
+
<select
|
|
680
|
+
className="form-control input-sm inline-number"
|
|
681
|
+
value={condition.field}
|
|
682
|
+
onChange={(event) =>
|
|
683
|
+
props.handleConditionFieldChanged(condition, event.target.value as ListenerRuleConditionField)
|
|
684
|
+
}
|
|
685
|
+
style={{ width: '40%' }}
|
|
686
|
+
required={true}
|
|
687
|
+
>
|
|
688
|
+
{(props.rule.conditions.length === 1 || condition.field === 'host-header') && (
|
|
689
|
+
<option value="host-header">Host</option>
|
|
690
|
+
)}
|
|
691
|
+
{(props.rule.conditions.length === 1 || condition.field === 'path-pattern') && (
|
|
692
|
+
<option value="path-pattern">Path</option>
|
|
693
|
+
)}
|
|
694
|
+
{(props.rule.conditions.length === 1 || condition.field === 'http-request-method') && (
|
|
695
|
+
<option value="http-request-method">Method(s)</option>
|
|
696
|
+
)}
|
|
697
|
+
</select>
|
|
698
|
+
{condition.field === 'path-pattern' && <HelpField id="aws.loadBalancer.ruleCondition.path" />}
|
|
699
|
+
{condition.field === 'host-header' && <HelpField id="aws.loadBalancer.ruleCondition.host" />}
|
|
700
|
+
{condition.field !== 'http-request-method' && (
|
|
701
|
+
<input
|
|
702
|
+
className="form-control input-sm"
|
|
703
|
+
type="text"
|
|
704
|
+
value={condition.values[0]}
|
|
705
|
+
onChange={(event) => props.handleConditionValueChanged(condition, event.target.value)}
|
|
706
|
+
maxLength={128}
|
|
707
|
+
required={true}
|
|
708
|
+
style={{ width: '63%' }}
|
|
709
|
+
/>
|
|
710
|
+
)}
|
|
711
|
+
{condition.field === 'http-request-method' && (
|
|
712
|
+
<div className="col-md-6 checkbox">
|
|
713
|
+
{['DELETE', 'GET', 'PATCH', 'POST', 'PUT'].map((httpMethod) => (
|
|
714
|
+
<label key={`${httpMethod}-checkbox`}>
|
|
715
|
+
<input
|
|
716
|
+
type="checkbox"
|
|
717
|
+
checked={condition.values.includes(httpMethod)}
|
|
718
|
+
onChange={(event) =>
|
|
719
|
+
props.handleHttpRequestMethodChanged(condition, httpMethod, event.target.checked)
|
|
720
|
+
}
|
|
721
|
+
/>
|
|
722
|
+
{httpMethod}
|
|
723
|
+
</label>
|
|
724
|
+
))}
|
|
725
|
+
</div>
|
|
726
|
+
)}
|
|
727
|
+
<span className="remove-condition">
|
|
728
|
+
{cIndex === 1 && (
|
|
729
|
+
<a
|
|
730
|
+
className="btn btn-sm btn-link clickable"
|
|
731
|
+
onClick={() => props.removeCondition(props.rule, cIndex)}
|
|
732
|
+
style={{ padding: '0' }}
|
|
733
|
+
>
|
|
734
|
+
<Tooltip value="Remove Condition">
|
|
735
|
+
<span className="glyphicon glyphicon-trash" />
|
|
736
|
+
</Tooltip>
|
|
737
|
+
</a>
|
|
738
|
+
)}
|
|
739
|
+
</span>
|
|
740
|
+
</div>
|
|
741
|
+
))}
|
|
742
|
+
{props.rule.conditions.length === 1 && (
|
|
743
|
+
<div className="add-new-container">
|
|
744
|
+
<button type="button" className="add-new col-md-12" onClick={() => props.addCondition(props.rule)}>
|
|
745
|
+
<span>
|
|
746
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add new condition
|
|
747
|
+
</span>
|
|
748
|
+
</button>
|
|
749
|
+
<span style={{ minWidth: '15px' }} />
|
|
750
|
+
</div>
|
|
751
|
+
)}
|
|
752
|
+
</td>
|
|
753
|
+
<td>
|
|
754
|
+
{props.rule.actions.map((action, index) => (
|
|
755
|
+
<Action
|
|
756
|
+
key={index}
|
|
757
|
+
action={action}
|
|
758
|
+
actionTypeChanged={(type) => props.handleRuleActionTypeChanged(action, type)}
|
|
759
|
+
oidcConfigChanged={(config) => props.oidcConfigChanged(action, config)}
|
|
760
|
+
redirectConfigChanged={(config) => props.redirectConfigChanged(action, config)}
|
|
761
|
+
targetChanged={(target) => props.handleRuleActionTargetChanged(action, target)}
|
|
762
|
+
targetGroups={props.targetGroups}
|
|
763
|
+
oidcConfigs={props.oidcConfigs}
|
|
764
|
+
configureOidcClient={props.configureOidcClient}
|
|
765
|
+
configureRedirect={props.configureRedirect}
|
|
766
|
+
/>
|
|
767
|
+
))}
|
|
768
|
+
</td>
|
|
769
|
+
<td>
|
|
770
|
+
<RuleActions
|
|
771
|
+
ruleIndex={props.ruleIndex}
|
|
772
|
+
listener={props.listener}
|
|
773
|
+
authenticateRuleToggle={props.authenticateRuleToggle}
|
|
774
|
+
removeRule={props.removeRule}
|
|
775
|
+
actions={props.rule.actions}
|
|
776
|
+
/>
|
|
777
|
+
</td>
|
|
778
|
+
</tr>
|
|
779
|
+
));
|
|
780
|
+
|
|
781
|
+
const Action = (props: {
|
|
782
|
+
action: IListenerAction;
|
|
783
|
+
oidcConfigChanged: (config: IAuthenticateOidcActionConfig) => void;
|
|
784
|
+
redirectConfigChanged: (config: IRedirectActionConfig) => void;
|
|
785
|
+
actionTypeChanged: (actionType: string) => void;
|
|
786
|
+
targetChanged: (newTarget: string) => void;
|
|
787
|
+
targetGroups: IALBTargetGroupDescription[];
|
|
788
|
+
oidcConfigs: IAuthenticateOidcActionConfig[];
|
|
789
|
+
configureOidcClient: (action: IListenerAction) => void;
|
|
790
|
+
configureRedirect: (action: IListenerAction) => void;
|
|
791
|
+
}) => {
|
|
792
|
+
if (props.action.type !== 'authenticate-oidc') {
|
|
793
|
+
const redirectConfig = props.action.redirectActionConfig || props.action.redirectConfig;
|
|
794
|
+
// TODO: Support redirect
|
|
795
|
+
return (
|
|
796
|
+
<div className="horizontal top">
|
|
797
|
+
<select
|
|
798
|
+
className="form-control input-sm"
|
|
799
|
+
style={{ width: '80px' }}
|
|
800
|
+
value={props.action.type}
|
|
801
|
+
onChange={(event) => props.actionTypeChanged(event.target.value)}
|
|
802
|
+
>
|
|
803
|
+
<option value="forward">forward to</option>
|
|
804
|
+
<option value="redirect">redirect to</option>
|
|
805
|
+
</select>
|
|
806
|
+
{props.action.type === 'forward' && (
|
|
807
|
+
<select
|
|
808
|
+
className="form-control input-sm"
|
|
809
|
+
value={props.action.targetGroupName}
|
|
810
|
+
onChange={(event) => props.targetChanged(event.target.value)}
|
|
811
|
+
required={true}
|
|
812
|
+
>
|
|
813
|
+
<option value="" />
|
|
814
|
+
{uniq(props.targetGroups.map((tg) => tg.name)).map((name) => (
|
|
815
|
+
<option key={name}>{name}</option>
|
|
816
|
+
))}
|
|
817
|
+
</select>
|
|
818
|
+
)}
|
|
819
|
+
{props.action.type === 'redirect' && (
|
|
820
|
+
<dl className="dl-horizontal dl-narrow">
|
|
821
|
+
<dt>Host</dt>
|
|
822
|
+
<dd>{redirectConfig.host}</dd>
|
|
823
|
+
<dt>Path</dt>
|
|
824
|
+
<dd>{redirectConfig.path}</dd>
|
|
825
|
+
<dt>Port</dt>
|
|
826
|
+
<dd>{redirectConfig.port}</dd>
|
|
827
|
+
<dt>Protocol</dt>
|
|
828
|
+
<dd>{redirectConfig.protocol}</dd>
|
|
829
|
+
<dt>Query</dt>
|
|
830
|
+
<dd>{redirectConfig.query}</dd>
|
|
831
|
+
<dt>Status Code</dt>
|
|
832
|
+
<dd>{redirectConfig.statusCode}</dd>
|
|
833
|
+
<dt>
|
|
834
|
+
<button
|
|
835
|
+
className="btn btn-link no-padding"
|
|
836
|
+
type="button"
|
|
837
|
+
onClick={() => props.configureRedirect(props.action)}
|
|
838
|
+
>
|
|
839
|
+
Configure...
|
|
840
|
+
</button>
|
|
841
|
+
</dt>
|
|
842
|
+
</dl>
|
|
843
|
+
)}
|
|
844
|
+
</div>
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
if (props.action.type === 'authenticate-oidc') {
|
|
848
|
+
const clientId = props.action.authenticateOidcConfig.clientId;
|
|
849
|
+
|
|
850
|
+
const disableManualOidcDialog = get(AWSProviderSettings, 'loadBalancers.disableManualOidcDialog', false);
|
|
851
|
+
const showOidcConfigs =
|
|
852
|
+
disableManualOidcDialog ||
|
|
853
|
+
(props.oidcConfigs &&
|
|
854
|
+
props.oidcConfigs.length > 0 &&
|
|
855
|
+
(!clientId || props.oidcConfigs.find((c) => c.clientId === clientId)));
|
|
856
|
+
|
|
857
|
+
const oidcOptions = props.oidcConfigs?.length ? (
|
|
858
|
+
props.oidcConfigs.map((config) => <option key={config.clientId}>{config.clientId}</option>)
|
|
859
|
+
) : (
|
|
860
|
+
<option disabled>No {CustomLabels.get('OIDC client')} config found</option>
|
|
861
|
+
);
|
|
862
|
+
|
|
863
|
+
return (
|
|
864
|
+
<div className="horizontal middle" style={{ height: '30px' }}>
|
|
865
|
+
<span style={{ whiteSpace: 'pre' }}>auth with {CustomLabels.get('OIDC client')} </span>
|
|
866
|
+
|
|
867
|
+
{showOidcConfigs && (
|
|
868
|
+
<select
|
|
869
|
+
className="form-control input-sm"
|
|
870
|
+
value={clientId}
|
|
871
|
+
onChange={(event) =>
|
|
872
|
+
props.oidcConfigChanged(props.oidcConfigs.find((c) => c.clientId === event.target.value))
|
|
873
|
+
}
|
|
874
|
+
required={true}
|
|
875
|
+
>
|
|
876
|
+
<option value="" />
|
|
877
|
+
{oidcOptions}
|
|
878
|
+
</select>
|
|
879
|
+
)}
|
|
880
|
+
{!showOidcConfigs && (
|
|
881
|
+
// a link text to open an oidc modal that is labeled with the client_id
|
|
882
|
+
<a onClick={() => props.configureOidcClient(props.action)} className="clickable">
|
|
883
|
+
{clientId || 'Configure...'}
|
|
884
|
+
</a>
|
|
885
|
+
)}
|
|
886
|
+
<span style={{ whiteSpace: 'pre' }}>
|
|
887
|
+
<em> and then</em>
|
|
888
|
+
</span>
|
|
889
|
+
</div>
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
return null;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
const RuleActions = (props: {
|
|
897
|
+
ruleIndex?: number;
|
|
898
|
+
actions: IListenerAction[];
|
|
899
|
+
listener: IListenerDescription;
|
|
900
|
+
authenticateRuleToggle: (listener: IListenerDescription, index: number) => void;
|
|
901
|
+
removeRule?: (listener: IListenerDescription, index: number) => void;
|
|
902
|
+
}) => {
|
|
903
|
+
const hasAuth = Boolean(props.actions.find((a) => a.type === 'authenticate-oidc'));
|
|
904
|
+
const allowAuth = props.listener.protocol === 'HTTPS';
|
|
905
|
+
const tooltip = hasAuth ? 'Remove authentication from rule' : 'Authenticate rule';
|
|
906
|
+
const icon = hasAuth ? 'fas fa-fw fa-lock-open' : 'fas fa-fw fa-user-lock';
|
|
907
|
+
return (
|
|
908
|
+
<span>
|
|
909
|
+
{allowAuth && (
|
|
910
|
+
<>
|
|
911
|
+
<a
|
|
912
|
+
className="btn btn-sm btn-link clickable"
|
|
913
|
+
onClick={() => props.authenticateRuleToggle(props.listener, props.ruleIndex)}
|
|
914
|
+
style={{ padding: '0' }}
|
|
915
|
+
>
|
|
916
|
+
<Tooltip value={tooltip}>
|
|
917
|
+
<i className={icon} />
|
|
918
|
+
</Tooltip>
|
|
919
|
+
</a>
|
|
920
|
+
<HelpField id="aws.loadBalancer.oidcAuthentication" />
|
|
921
|
+
</>
|
|
922
|
+
)}
|
|
923
|
+
{props.ruleIndex !== undefined && props.ruleIndex >= 0 && props.removeRule && (
|
|
924
|
+
<a
|
|
925
|
+
className="btn btn-sm btn-link clickable"
|
|
926
|
+
onClick={() => props.removeRule(props.listener, props.ruleIndex)}
|
|
927
|
+
style={{ padding: '0' }}
|
|
928
|
+
>
|
|
929
|
+
<Tooltip value="Remove Rule">
|
|
930
|
+
<i className="far fa-fw fa-trash-alt" />
|
|
931
|
+
</Tooltip>
|
|
932
|
+
</a>
|
|
933
|
+
)}
|
|
934
|
+
</span>
|
|
935
|
+
);
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
interface IRulesProps {
|
|
939
|
+
addRule: (listener: IListenerDescription) => void;
|
|
940
|
+
authenticateRuleToggle: (listener: IListenerDescription, index: number) => void;
|
|
941
|
+
removeRule: (listener: IListenerDescription, index: number) => void;
|
|
942
|
+
handleRuleActionTargetChanged: (action: IListenerAction, newTarget: string) => void;
|
|
943
|
+
handleRuleActionTypeChanged: (action: IListenerAction, type: string) => void;
|
|
944
|
+
addCondition: (rule: IListenerRule) => void;
|
|
945
|
+
removeCondition: (rule: IListenerRule, index: number) => void;
|
|
946
|
+
handleConditionFieldChanged: (condition: IListenerRuleCondition, newField: ListenerRuleConditionField) => void;
|
|
947
|
+
handleConditionValueChanged: (condition: IListenerRuleCondition, newValue: string) => void;
|
|
948
|
+
handleHttpRequestMethodChanged: (condition: IListenerRuleCondition, newValue: string, selected: boolean) => void;
|
|
949
|
+
listener: IListenerDescription;
|
|
950
|
+
targetGroups: IALBTargetGroupDescription[];
|
|
951
|
+
oidcConfigChanged: (action: IListenerAction, config: IAuthenticateOidcActionConfig) => void;
|
|
952
|
+
redirectConfigChanged: (action: IListenerAction, config: IRedirectActionConfig) => void;
|
|
953
|
+
oidcConfigs: IAuthenticateOidcActionConfig[];
|
|
954
|
+
configureOidcClient: (action: IListenerAction) => void;
|
|
955
|
+
configureRedirect: (action: IListenerAction) => void;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
const Rules = SortableContainer((props: IRulesProps) => (
|
|
959
|
+
<tbody>
|
|
960
|
+
<tr className="not-sortable">
|
|
961
|
+
<td />
|
|
962
|
+
<td>Default</td>
|
|
963
|
+
<td>
|
|
964
|
+
{props.listener.defaultActions.map((action, index) => (
|
|
965
|
+
<Action
|
|
966
|
+
key={index}
|
|
967
|
+
action={action}
|
|
968
|
+
actionTypeChanged={(type) => props.handleRuleActionTypeChanged(action, type)}
|
|
969
|
+
targetChanged={(target) => props.handleRuleActionTargetChanged(action, target)}
|
|
970
|
+
targetGroups={props.targetGroups}
|
|
971
|
+
oidcConfigs={props.oidcConfigs}
|
|
972
|
+
oidcConfigChanged={(config) => props.oidcConfigChanged(action, config)}
|
|
973
|
+
redirectConfigChanged={(config) => props.redirectConfigChanged(action, config)}
|
|
974
|
+
configureOidcClient={props.configureOidcClient}
|
|
975
|
+
configureRedirect={props.configureRedirect}
|
|
976
|
+
/>
|
|
977
|
+
))}
|
|
978
|
+
</td>
|
|
979
|
+
<td>
|
|
980
|
+
<RuleActions
|
|
981
|
+
listener={props.listener}
|
|
982
|
+
actions={props.listener.defaultActions}
|
|
983
|
+
authenticateRuleToggle={props.authenticateRuleToggle}
|
|
984
|
+
/>
|
|
985
|
+
</td>
|
|
986
|
+
</tr>
|
|
987
|
+
{props.listener.rules
|
|
988
|
+
.sort((a, b) => (a.priority as number) - (b.priority as number))
|
|
989
|
+
.map((rule, index) => (
|
|
990
|
+
<Rule
|
|
991
|
+
key={index}
|
|
992
|
+
rule={rule}
|
|
993
|
+
addCondition={props.addCondition}
|
|
994
|
+
handleConditionFieldChanged={props.handleConditionFieldChanged}
|
|
995
|
+
handleConditionValueChanged={props.handleConditionValueChanged}
|
|
996
|
+
handleHttpRequestMethodChanged={props.handleHttpRequestMethodChanged}
|
|
997
|
+
handleRuleActionTargetChanged={props.handleRuleActionTargetChanged}
|
|
998
|
+
handleRuleActionTypeChanged={props.handleRuleActionTypeChanged}
|
|
999
|
+
oidcConfigChanged={props.oidcConfigChanged}
|
|
1000
|
+
redirectConfigChanged={props.redirectConfigChanged}
|
|
1001
|
+
removeCondition={props.removeCondition}
|
|
1002
|
+
authenticateRuleToggle={props.authenticateRuleToggle}
|
|
1003
|
+
removeRule={props.removeRule}
|
|
1004
|
+
targetGroups={props.targetGroups}
|
|
1005
|
+
oidcConfigs={props.oidcConfigs}
|
|
1006
|
+
listener={props.listener}
|
|
1007
|
+
index={index}
|
|
1008
|
+
ruleIndex={index}
|
|
1009
|
+
configureOidcClient={props.configureOidcClient}
|
|
1010
|
+
configureRedirect={props.configureRedirect}
|
|
1011
|
+
/>
|
|
1012
|
+
))}
|
|
1013
|
+
<tr className="not-sortable">
|
|
1014
|
+
<td colSpan={5}>
|
|
1015
|
+
<button type="button" className="add-new col-md-12" onClick={() => props.addRule(props.listener)}>
|
|
1016
|
+
<span>
|
|
1017
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add new rule
|
|
1018
|
+
</span>
|
|
1019
|
+
</button>
|
|
1020
|
+
</td>
|
|
1021
|
+
</tr>
|
|
1022
|
+
</tbody>
|
|
1023
|
+
));
|