Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup vault role level access #1593

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

abdullahaslam306
Copy link
Contributor

No description provided.

title: 'Backup Vault Role Access',
category: 'Backup',
domain: 'Storage',
description: 'Ensure that AWS Backup Vault are accessed through roles.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: 'Ensure that AWS Backup Vault are accessed through roles.',
description: 'Ensure that AWS Backup vaults are accessed through roles.',

if (getBackupVaultAccessPolicy && getBackupVaultAccessPolicy.err && getBackupVaultAccessPolicy.err.code &&
getBackupVaultAccessPolicy.err.code == 'ResourceNotFoundException') {
helpers.addResult(results, 2,
'No access policy found for Backup vault', region, resource);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it mean no access?

helpers.addResult(results, 0,
'The Backup Vault policy does not have trust relationship statements',
region, resource);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return;
continue;

continue;
}

if (!getBackupVaultAccessPolicy || getBackupVaultAccessPolicy.err || !getBackupVaultAccessPolicy.data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!getBackupVaultAccessPolicy || getBackupVaultAccessPolicy.err || !getBackupVaultAccessPolicy.data) {
if (!getBackupVaultAccessPolicy || getBackupVaultAccessPolicy.err || !getBackupVaultAccessPolicy.data || !getBackupVaultAccessPolicy.data.Policy) {

var actions = [];
let roleAccess = true;
for (var statement of statements) {
var principalEval = helpers.globalPrincipal(statement.Principal);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it have to be global principal?


if (!roleAccess) {
helpers.addResult(results, 2,
'Backup Vault does not have role level access only' + actions,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't actions list empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants