Skip to content

Commit

Permalink
Merge pull request #46 from akamai/release/3.0.0
Browse files Browse the repository at this point in the history
Release/3.0.0 --> Master
  • Loading branch information
atuljain16 authored Aug 22, 2024
2 parents a09c9c5 + 54e00dc commit 6a00380
Show file tree
Hide file tree
Showing 16 changed files with 511 additions and 18 deletions.
34 changes: 21 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
## 2.9.0 (February 2024 release)
## 3.0.0 (August 2024 Release)

- New Commands:
- `custom-bot-category-item-sequence` Display contents of custom bot category item sequence.
- `modify-custom-bot-category-item-sequence` Update existing custom bot category item sequence.
- `content-protection-javascript-injection-rule-list` Display contents of content protection javascript injection rules.
- `content-protection-javascript-injection-rule` Display contents of content protection javascript injection rule.
- `create-content-protection-javascript-injection-rule` Create a content protection javascript injection rule.
- `modify-content-protection-javascript-injection-rule` Update a content protection JavaScript injection rule.
- `delete-content-protection-javascript-injection-rule` Delete a content protection JavaScript injection rule.

## 2.9.0 (February 2024 Release)

- CLI Enhancements
- "--debug" flag support to log output in the debug mode
Expand All @@ -8,7 +19,7 @@
- `content-protection-rule` command displays contents of content protection rule.
- `content-protection-detections` command displays content protection detections.
- `content-protection-rule-detection-settings` command displays overridden detection settings of content protection rule.
- `content-protection-rule-list` command lists all content protection rules.
- `content-protection-rule-list` command lists all content protection rules.
- `content-protection-rule-sequence` command displays contents of content bot category sequence.
- `create-content-protection-rule` command creates a content protection rule.
- `delete-content-protection-rule` command deletes a content protection rule.
Expand All @@ -26,7 +37,7 @@
- Templates:
- Adding `clientListMatch` sample object in crbTemplate.json

## 2.8.0 (June release)
## 2.8.0 (June 2023 release)

- New Commands:
- `api-pii-learning` command displays API PII settings.
Expand All @@ -45,7 +56,7 @@
- `challenge-interception-rules` command displays contents of challenge interception rules.
- `modify-challenge-interception-rules` command updates existing challenge interception rules.

## 2.7.0 (September Release)
## 2.7.0 (September 2022 Release)

- New Commands:

Expand All @@ -61,7 +72,6 @@
- `disable-malware-policy` command removes actions to an existing malware policy in a firewall policy.
- `enable-malware-policy` command assigns actions to an existing malware policy in a firewall policy.
- `malware-content-types` command lists all malware content types.

- Moving BOTMAN CLI commands -
- `akamai-bot-category` command displays contents of akamai bot category.
- `akamai-bot-category-action` command displays contents of akamai bot category action.
Expand Down Expand Up @@ -154,19 +164,19 @@
- Supporting "--accountkey" flag to switch the account when performing the operation
- Fixing security vulnerabilities

## 2.6.0 (February Release)
## 2.6.0 (February 2022 Release)

- New Command:
- `activation-history` command lists activation history for the configuration

## 2.5.0 (January Release)
## 2.5.0 (January 2022 Release)

- New Command:
- `evasive-path-match` command displays the evasive path match settings
- `enable-evasive-path-match` command enables evasive path match settings
- `disable-evasive-path-match` command disable evasive path match settings

## 2.4.0 (August Release)
## 2.4.0 (August 2021 Release)

- New Command:
- `recommendations` command displays recommendations in a policy
Expand All @@ -175,14 +185,14 @@
- `reset-recommendation` command resets a recommendation
- Renaming `start-eval` command parameter - `mode` to `eval-mode`

## 2.3.0 (July Release)
## 2.3.0 (July 2021 Release)

- WAP Plus support for selected-hostnames, modify-hostnames, and network-lists
- Added "mode" parameter to support ASE (Auto and Manual) for the "start-eval" command
- Added "threat-intel", "enable-threat-intel", and "disable-threat-intel" commands
- Support for including hostnames ("--include-hostnames") and contract-group ("--include-contract-group") in the "configs" command

## 2.2.0 (May Release)
## 2.2.0 (May 2021 Release)

- CLI Enhancements - adding "--query", "--fields", "--raw", and "--sort" flags.
- --query:
Expand All @@ -199,15 +209,13 @@
- Usage: `akamai appsec configs --fields id,name,targetProduct --sort id,desc`
- Adding option to specify "rule-update" flag while cloning a config version
- New Command:

- `modify-hostnames`: Modify hostnames for the configuration version

- Bugfixes:
- When all hostnames are selected for the website match-target, command will return "ALL_HOSTNAMES" (instead of "undefined")
- `modify-bypass-network-lists` command will return all the network lists instead of JSON (when --json option is not provided)
- `create-security-policy` command will return policyId instead of JSON (when --json option is not provided)

## 2.1.0
## 2.1.0 (April 2021 Release)

- Commands:
- Pragma header (list and modify)
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Commands:
conditional-action-list List all conditional action.
configs List all available configurations.
content-protection-detections Display content protection detections.
content-protection-javascript-injection-rule-list Display contents of content protection javascript injection rules.
content-protection-javascript-injection-rule Display contents of content protection javascript injection rule.
content-protection-rule Display contents of content protection rule.
content-protection-rule-detection-settings Display overridden detection settings of content protection rule.
content-protection-rule-list List all content protection rules.
Expand All @@ -79,6 +81,7 @@ Commands:
create-conditional-action Create a conditional action.
create-config Create a new security config.
create-content-protection-rule Create a content protection rule.
create-content-protection-javascript-injection-rule Create a content protection javascript injection rule.
create-custom-bot-category Create a custom bot category.
create-custom-client Create a custom client.
create-custom-defined-bot Create a custom defined bot.
Expand All @@ -100,6 +103,7 @@ Commands:
custom-bot-category-action-list List all custom bot category action.
custom-bot-category-list List all custom bot category.
custom-bot-category-sequence Display contents of custom bot category sequence.
custom-bot-category-item-sequence Display contents of custom bot category item sequence.
custom-client Display contents of custom client.
custom-client-list List all custom client.
custom-client-sequence Display contents of custom client sequence.
Expand All @@ -116,6 +120,7 @@ Commands:
delete-conditional-action Delete a conditional action.
delete-config Delete a security config.
delete-content-protection-rule Delete a content protection rule.
delete-content-protection-javascript-injection-rule Delete a content protection JavaScript injection rule.
delete-custom-bot-category Delete a custom bot category.
delete-custom-client Delete a custom client.
delete-custom-defined-bot Delete a custom defined bot.
Expand Down Expand Up @@ -196,11 +201,13 @@ Commands:
modify-client-side-security Update existing client side security.
modify-conditional-action Update existing conditional action.
modify-content-protection-rule Update content protection rule.
modify-content-protection-javascript-injection-rule Update a content protection JavaScript injection rule.
modify-content-protection-rule-detection-settings Update detection settings of content protection rule.
modify-content-protection-rule-sequence Update existing content protection rule sequence.
modify-custom-bot-category Update existing custom bot category.
modify-custom-bot-category-action Update existing custom bot category action.
modify-custom-bot-category-sequence Update existing custom bot category sequence.
modify-custom-bot-category-item-sequence Update existing custom bot category item sequence.
modify-custom-client Update existing custom client.
modify-custom-client-sequence Update existing custom client sequence.
modify-custom-defined-bot Update existing custom defined bot.
Expand Down
57 changes: 57 additions & 0 deletions bin/commands/contentprotectionjavascriptinjectionrule.create.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
let ContentProtectionJavaScriptInjectionRule = require('../../src/contentprotectionjavascriptinjectionrule')
.contentProtectionJavaScriptInjectionRule;
let out = require('./lib/out');

class CreateContentProtectionJavaScriptInjectionRuleCommand {
constructor() {
this.flags = 'create-content-protection-javascript-injection-rule';
this.desc = 'Create a content protection javascript injection rule.';
this.setup = this.setup.bind(this);
this.run = this.run.bind(this);
}

setup(sywac) {
sywac
.positional('<@path>', {
paramsDesc: 'The input file path.'
})
.number('--config <id>', {
desc: 'Configuration ID. Mandatory if you have more than one configuration.',
group: 'Optional:',
required: false
})
.string('--version <id>', {
desc:
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.",
group: 'Optional:',
required: false
})
.string('--policy <id>', {
desc:
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.',
group: 'Optional:',
required: false
})
.check((argv, context) => {
if (!argv['@path'].startsWith('@')) {
return context.cliMessage("ERROR: Invalid file name, should start with '@'");
}
});
}

run(options) {
options.file = options['@path'].replace('@', '');

out.print({
promise: new ContentProtectionJavaScriptInjectionRule(
options
).addContentProtectionJavaScriptInjectionRule(),
args: options,
success: (args, data) => {
return JSON.stringify(data);
}
});
}
}

module.exports = new CreateContentProtectionJavaScriptInjectionRuleCommand();
52 changes: 52 additions & 0 deletions bin/commands/contentprotectionjavascriptinjectionrule.delete.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
let ContentProtectionJavaScriptInjectionRule = require('../../src/contentprotectionjavascriptinjectionrule')
.contentProtectionJavaScriptInjectionRule;
let out = require('./lib/out');

class DeleteContentProtectionJavaScriptInjectionRuleCommand {
constructor() {
this.flags = 'delete-content-protection-javascript-injection-rule';
this.desc = 'Delete a content protection JavaScript injection rule.';
this.setup = this.setup.bind(this);
this.run = this.run.bind(this);
}

setup(sywac) {
sywac
.positional('<content-protection-javascript-injection-rule-id>', {
paramsDesc: 'Content protection JavaScript injection rule ID'
})
.number('--config <id>', {
desc: 'Configuration ID. Mandatory if you have more than one configuration.',
group: 'Optional:',
required: false
})
.string('--version <id>', {
desc:
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.",
group: 'Optional:',
required: false
})
.string('--policy <id>', {
desc:
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.',
group: 'Optional:',
required: false
});
}

run(options) {
options.rule_id = options['content-protection-javascript-injection-rule-id'];

out.print({
promise: new ContentProtectionJavaScriptInjectionRule(
options
).deleteContentProtectionJavaScriptInjectionRule(),
args: options,
success: (args, data) => {
return data;
}
});
}
}

module.exports = new DeleteContentProtectionJavaScriptInjectionRuleCommand();
52 changes: 52 additions & 0 deletions bin/commands/contentprotectionjavascriptinjectionrule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
let ContentProtectionJavaScriptInjectionRule = require('../../src/contentprotectionjavascriptinjectionrule')
.contentProtectionJavaScriptInjectionRule;
let out = require('./lib/out');

class ContentProtectionJavaScriptInjectionRuleCommand {
constructor() {
this.flags = 'content-protection-javascript-injection-rule';
this.desc = 'Display contents of content protection javascript injection rule.';
this.setup = this.setup.bind(this);
this.run = this.run.bind(this);
}

setup(sywac) {
sywac
.positional('<content-protection-javascript-injection-rule-id>', {
paramsDesc: 'Content protection JavaScript injection rule ID'
})
.number('--config <id>', {
desc: 'Configuration ID. Mandatory if you have more than one configuration.',
group: 'Optional:',
required: false
})
.string('--version <id>', {
desc:
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.",
group: 'Optional:',
required: false
})
.string('--policy <id>', {
desc:
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.',
group: 'Optional:',
required: false
});
}

run(options) {
options.rule_id = options['content-protection-javascript-injection-rule-id'];

out.print({
promise: new ContentProtectionJavaScriptInjectionRule(
options
).getContentProtectionJavaScriptInjectionRule(),
args: options,
success: (args, data) => {
return JSON.stringify(data);
}
});
}
}

module.exports = new ContentProtectionJavaScriptInjectionRuleCommand();
61 changes: 61 additions & 0 deletions bin/commands/contentprotectionjavascriptinjectionrule.modify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
let ContentProtectionJavaScriptInjectionRule = require('../../src/contentprotectionjavascriptinjectionrule')
.contentProtectionJavaScriptInjectionRule;
let out = require('./lib/out');

class ModifyContentProtectionJavaScriptInjectionRulesCommand {
constructor() {
this.flags = 'modify-content-protection-javascript-injection-rule';
this.desc = 'Update content protection JavaScript injection rule.';
this.setup = this.setup.bind(this);
this.run = this.run.bind(this);
}

setup(sywac) {
sywac
.positional('<content-protection-javascript-injection-rule-id>', {
paramsDesc: 'Content protection JavaScript injection rule ID'
})
.positional('<@path>', {
paramsDesc: 'The input file path.'
})
.number('--config <id>', {
desc: 'Configuration ID. Mandatory if you have more than one configuration.',
group: 'Optional:',
required: false
})
.string('--version <id>', {
desc:
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.",
group: 'Optional:',
required: false
})
.string('--policy <id>', {
desc:
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.',
group: 'Optional:',
required: false
})
.check((argv, context) => {
if (!argv['@path'].startsWith('@')) {
return context.cliMessage("ERROR: Invalid file name, should start with '@'");
}
});
}

run(options) {
options.rule_id = options['content-protection-javascript-injection-rule-id'];
options.file = options['@path'].replace('@', '');

out.print({
promise: new ContentProtectionJavaScriptInjectionRule(
options
).updateContentProtectionJavaScriptInjectionRule(),
args: options,
success: (args, data) => {
return JSON.stringify(data);
}
});
}
}

module.exports = new ModifyContentProtectionJavaScriptInjectionRulesCommand();
Loading

0 comments on commit 6a00380

Please sign in to comment.