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

Add paramaters to pull all RBAC roles to Run-SubscriptionScan and Sca… #17

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

montereyharris
Copy link

@montereyharris montereyharris commented Jan 6, 2022

…n-AzureAdmins. Add Assignment to Azure Privileged Entity Results to for to identify where the Privilege is coming from

Desired Outcome

Allow for Scanning of All RBAC roles in Azure Subscription and easy identification of group that user is receiving the assignment via.

Implemented Changes

Describe how the desired outcome above has been achieved with this PR. In
particular, consider:

  • What's changed?
    Run-SubscriptionScan changed to include an -AllRoles Parameter to scan all roles.
    This parameter is supported by logic at lines 559 - 565 that grabs all roles. Original Logic is now in the else case below case.
    Scan-AzureAdmins: -AllAzureRBACRoles Parameter added to surface new functionality
    Add-PrivilegeAzureEntity - Added -PrivilegeGroup and -GroupPrivilege PrivilegeGroup refers to the group that has the privilege that user is recieving and GroupPrivilege is switch that exists to tell the cmdlet what to fill in new Assignment field
    Run-SubscriptionScan has been updated so that it use Add-AzurePrivilegedEntity for Groups in the do while loop that processes groups.

  • Why were these changes made?_ To make this script more useful for auditing permissions and resolving.

  • How should the reviewer approach this PR, especially if manual tests are required?

  • Scan-AzureAdmins -ScanAllAzureRBACRoles to expose all roles

  • Are there relevant screenshots you can add to the PR description?

Connected Issue/Story

Resolves #[relevant GitHub issue(s), e.g. 76]

CyberArk internal issue link: insert issue ID

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be
merged.

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: insert issue ID
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@Hechtov
Copy link
Collaborator

Hechtov commented Jan 13, 2022

Hi @montereyharris
Thanks for your contribution! Your modification looks good and I approved your pull request.
Please keep helping SkyArk, the security community needs tool like this.
Asaf

@Hechtov Hechtov merged commit 727ae48 into cyberark:master Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants