@axway/axway-central-cli 2.30.0-rc.2 → 2.31.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.
@@ -52,7 +52,7 @@ const ConfigFiles = exports.ConfigFiles = {
52
52
  ResourcesYAML: 'amplify-agents-setup.yaml',
53
53
  EC2DeployYAML: 'amplify-agents-ec2.yaml',
54
54
  FargateDeployYAML: 'amplify-agents-ecs-fargate.yaml',
55
- AgentConfigZip: 'aws_apigw_agent_config-v1.1.60-alpha4.zip',
55
+ AgentConfigZip: 'aws_apigw_agent_config-latest.zip',
56
56
  DAEnvVars: `${helpers.configFiles.DA_ENV_VARS}`,
57
57
  TAEnvVars: `${helpers.configFiles.TA_ENV_VARS}`,
58
58
  CFProperties: 'cloudformation_properties.json'
@@ -79,6 +79,7 @@ const AWSPrompts = exports.AWSPrompts = {
79
79
  SUBNET: 'Enter the Subnet for the EC2 Instance of ECS Container',
80
80
  S3_BUCKET: 'Enter the existing S3 bucket, within your region, where the agent resources will be uploaded',
81
81
  TA_LOG_GROUP: 'Enter the log group name the traceability agent will log to',
82
+ FULL_TRANSACTION_LOGGING: 'Do you want to enable Full Transaction Logging? Please note that CloudWatch costs would increase when Full Transaction Logging is enabled',
82
83
  TA_QUEUE: 'Enter the traceability queue name',
83
84
  VPC_ID: 'Enter the VPC ID to deploy the EC2 instance to. Leave blank to create entire infrastructure'
84
85
  };
@@ -275,6 +276,14 @@ const gatewayConnectivity = async installConfig => {
275
276
  awsAgentValues.logGroup = apiGWTrafficLogGroupName;
276
277
  awsAgentValues.cloudFormationConfig.APIGWTrafficLogGroupName = apiGWTrafficLogGroupName;
277
278
 
279
+ // FullTransactionLogging
280
+ const fullTransactionLogging = (await (0, _basicPrompts.askList)({
281
+ msg: AWSPrompts.FULL_TRANSACTION_LOGGING,
282
+ choices: _types.YesNoChoices,
283
+ default: _types.YesNo.No
284
+ })) === _types.YesNo.Yes;
285
+ awsAgentValues.fullTransactionLogging = fullTransactionLogging;
286
+
278
287
  // set agent versions
279
288
  awsAgentValues.cloudFormationConfig.DiscoveryAgentVersion = installConfig.daVersion;
280
289
  awsAgentValues.cloudFormationConfig.TraceabilityAgentVersion = installConfig.taVersion;
@@ -415,7 +424,7 @@ ${_chalk.default.gray(`Additional information about agent features can be found
415
424
 
416
425
  // Download latest aws apigw config zip
417
426
  const downloadAPIGWAgentConfigZip = async () => {
418
- const url = `/aws_apigw_agent_config/${ConfigFiles.AgentConfigZip}`;
427
+ const url = `/aws_apigw_agent_config/latest/${ConfigFiles.AgentConfigZip}`;
419
428
  const service = await (0, _dataService.dataService)({
420
429
  baseUrl: _types.PublicRepoUrl,
421
430
  basePath: _types.BasePaths.AWSAgents
@@ -27,10 +27,12 @@ class DataplaneConfig {
27
27
  }
28
28
  }
29
29
  class AWSDataplaneConfig extends DataplaneConfig {
30
- constructor(arn) {
30
+ constructor(arn, enableFullTransactionLogging) {
31
31
  super('AWS');
32
32
  _defineProperty(this, "accessLogARN", void 0);
33
+ _defineProperty(this, "fullTransactionLogging", void 0);
33
34
  this.accessLogARN = arn;
35
+ this.fullTransactionLogging = enableFullTransactionLogging;
34
36
  }
35
37
  }
36
38
  class Sampling {
@@ -102,6 +104,7 @@ class SaasAWSAgentValues extends SaasAgentValues {
102
104
  _defineProperty(this, "assumeRole", void 0);
103
105
  _defineProperty(this, "externalID", void 0);
104
106
  _defineProperty(this, "accessLogARN", void 0);
107
+ _defineProperty(this, "fullTransactionLogging", void 0);
105
108
  this.authType = AWSAuthType.ASSUME;
106
109
  this.accessKey = '';
107
110
  this.secretKey = '';
@@ -109,6 +112,7 @@ class SaasAWSAgentValues extends SaasAgentValues {
109
112
  this.assumeRole = '';
110
113
  this.externalID = '';
111
114
  this.accessLogARN = '';
115
+ this.fullTransactionLogging = false;
112
116
  }
113
117
  getAccessData() {
114
118
  let data = JSON.stringify({
@@ -143,6 +147,7 @@ const SaasPrompts = {
143
147
  ASSUME_ROLE: 'Enter the Role ARN that the agent will Assume',
144
148
  EXTERNAL_ID: 'Enter the External ID the Assume Role expects',
145
149
  ACCESS_LOG_ARN: 'Enter the ARN for the Access Log that the Discovery will add and the Traceability will use',
150
+ FULL_TRANSACTION_LOGGING: 'Do you want to enable Full Transaction Logging? Please note that CloudWatch costs would increase when Full Transaction Logging is enabled',
146
151
  DA_FREQUENCY: 'How often should the discovery run, leave blank for integrating in CI/CD process',
147
152
  TA_FREQUENCY: 'How often should the traffic collection run, leave blank for manual trigger only',
148
153
  QUEUE: 'Do you want to discover immediately after installation',
@@ -346,6 +351,11 @@ const gatewayConnectivity = async installConfig => {
346
351
  msg: SaasPrompts.ACCESS_LOG_ARN,
347
352
  validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_ACCESS_LOG_ARN, helpers.invalidValueExampleErrMsg('access log arn', 'arn:aws:logs:region:000000000000:log-group:log-group-name'))
348
353
  });
354
+ hostedAgentValues.fullTransactionLogging = (await (0, _basicPrompts.askList)({
355
+ msg: SaasPrompts.FULL_TRANSACTION_LOGGING,
356
+ default: _types.YesNo.No,
357
+ choices: _types.YesNoChoices
358
+ })) === _types.YesNo.Yes;
349
359
  }
350
360
  }
351
361
 
@@ -407,7 +417,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
407
417
  }) : installConfig.centralConfig.ampcEnvInfo.name;
408
418
  if (installConfig.gatewayType === _types.GatewayTypes.AWS_GATEWAY) {
409
419
  if (installConfig.switches.isTaEnabled) {
410
- awsAgentValues.dataplaneConfig = new AWSDataplaneConfig(awsAgentValues.accessLogARN);
420
+ awsAgentValues.dataplaneConfig = new AWSDataplaneConfig(awsAgentValues.accessLogARN, awsAgentValues.fullTransactionLogging);
411
421
  } else {
412
422
  awsAgentValues.dataplaneConfig = new DataplaneConfig('AWS');
413
423
  }
@@ -17,24 +17,26 @@ class AWSAgentValues {
17
17
  _defineProperty(this, "accessKey", void 0);
18
18
  _defineProperty(this, "secretKey", void 0);
19
19
  _defineProperty(this, "logGroup", void 0);
20
+ _defineProperty(this, "fullTransactionLogging", void 0);
20
21
  _defineProperty(this, "region", void 0);
21
22
  _defineProperty(this, "apigwAgentConfigZipFile", void 0);
22
23
  _defineProperty(this, "centralConfig", void 0);
23
24
  _defineProperty(this, "traceabilityConfig", void 0);
24
25
  _defineProperty(this, "cloudFormationConfig", void 0);
25
26
  _defineProperty(this, "updateCloudFormationConfig", () => {
27
+ this.cloudFormationConfig.ECSCentralRegion = this.centralConfig.region;
26
28
  if (this.cloudFormationConfig.DeploymentType === 'ECS Fargate') {
27
29
  this.cloudFormationConfig.ECSCentralOrganizationID = this.centralConfig.orgId;
28
30
  this.cloudFormationConfig.ECSCentralEnvironmentName = this.centralConfig.environment;
29
31
  this.cloudFormationConfig.ECSCentralClientID = this.centralConfig.dosaAccount.clientId;
30
32
  this.cloudFormationConfig.ECSCentralDiscoveryAgentName = this.centralConfig.daAgentName;
31
33
  this.cloudFormationConfig.ECSCentralTraceabilityAgentName = this.centralConfig.taAgentName;
32
- this.cloudFormationConfig.ECSCentralRegion = this.centralConfig.region;
33
34
  }
34
35
  });
35
36
  this.accessKey = awsDeployment === 'Other' ? '**Insert Access Key**' : '';
36
37
  this.secretKey = awsDeployment === 'Other' ? '**Insert Secret Key**' : '';
37
38
  this.logGroup = '';
39
+ this.fullTransactionLogging = false;
38
40
  this.region = '';
39
41
  this.apigwAgentConfigZipFile = '';
40
42
  this.centralConfig = new _types.CentralAgentConfig();
@@ -56,6 +58,9 @@ AWS_AUTH_ACCESSKEY={{accessKey}}
56
58
  {{#if secretKey}}
57
59
  AWS_AUTH_SECRETKEY={{secretKey}}
58
60
  {{/if}}
61
+ {{#if fullTransactionLogging}}
62
+ AWS_FULLTRANSACTIONLOGGING={{fullTransactionLogging}}
63
+ {{/if}}
59
64
 
60
65
  # Amplify Central configs
61
66
  {{#if traceabilityConfig.usageReportingOffline}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.30.0-rc.2",
3
+ "version": "2.31.0",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {