From c98f01db8c23ab926e389b6c52f85b8858fe60b2 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 13:44:53 +0200 Subject: [PATCH 01/15] Update README.md --- README.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 76bf18b..119f4a8 100644 --- a/README.md +++ b/README.md @@ -16,35 +16,36 @@ contains some errors, I have decided to create a PowerShell Module called **AzWo This module is especially useful in scenario's where you want to manage the Workspace Manager using Infrastructure as Code or using pipelines. -## Common setup +### Get started with the CLI To get started with this PowerShell module you only need to follow these basic steps. -### Prerequisites +
+ +Prerequisites +
- [PowerShell Core](https://github.com/PowerShell/PowerShell) - [Az.Accounts 2.10.0 or higher](https://www.powershellgallery.com/packages/Az.Accounts/2.12.5) +
-Installing the module +
+ Install Module +
+ ```powershell Install-Module -AzWorkspaceManager ``` +
+ +## Community + +We all thrive on feedback and community involvement! + +**Have a question?** → open a [GitHub issue](https://github.com/SecureHats/AzWorkspaceManager/issues/new/choose). - +**Want to get involved?** → Learn how to [contribute](https://github.com/SecureHats/AzWorkspaceManager/blob/main/CONTRIBUTING.md). ## Buy me a Coffee From a2939065aada876a35e6187e9f018a4b2e30eb40 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:03:14 +0200 Subject: [PATCH 02/15] Create CONTRIBUTING.md --- CONTRIBUTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9c837bd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,16 @@ +# Contributing to AzWorkspaceManager +Because Open Source plays a major part in how products are build, +I see it as a matter of course to give the same effort back to our +community by creating extensible and easy-to-use software. + +We welcome contributions from the community and have created some +resources to help you get started extending AzWorkspaceManager: + +## Coding Standards + +[https://steampipe.io/docs/develop/coding-standards](https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/strongly-encouraged-development-guidelines?view=powershell-7.3) + +## PS Script Analyzer + +[https://steampipe.io/docs/develop/coding-standards](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules) + From f1c33cec62188e0b85097389d9a67cdad2aece3d Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:04:01 +0200 Subject: [PATCH 03/15] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c837bd..57987a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,9 +8,9 @@ resources to help you get started extending AzWorkspaceManager: ## Coding Standards -[https://steampipe.io/docs/develop/coding-standards](https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/strongly-encouraged-development-guidelines?view=powershell-7.3) +[Coding standards](https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/strongly-encouraged-development-guidelines?view=powershell-7.3) ## PS Script Analyzer -[https://steampipe.io/docs/develop/coding-standards](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules) +[PsScriptAnalyzer](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules) From 0a6f8ea31964e71a02deb6d88fe0a231e02e3738 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:08:29 +0200 Subject: [PATCH 04/15] Create CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..df5b148 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## v0.2.0 [2023-08-13] + +_What's new?_ +* Signature to all scripts has been added. ([#2](https://github.com/securehats/AzWorkspaceManager/issues/2)) + +_Bug fixes_ +* N/A From 9b18b6cd571312338bc76a6f00b15d1172383368 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:25:32 +0200 Subject: [PATCH 05/15] Create SECURITY.md --- SECURITY.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..5187d14 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +I deeply appreciate any effort to discover and disclose security vulnerabilities responsibly. + +If you would like to report a vulnerability in one of the modules, or have security concerns regarding the AzWorkspaceManager, please email rogierdijkman@hotmail.com. + +In order for me to best respond to your report, please include any of the following: + +Steps to reproduce or proof-of-concept +Any relevant tools, including versions used +Tool output From 5d3103aba0875d7589d202b44cdcd0917ce4f0c4 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 16:16:57 +0200 Subject: [PATCH 06/15] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df5b148..049127c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,4 @@ _What's new?_ * Signature to all scripts has been added. ([#2](https://github.com/securehats/AzWorkspaceManager/issues/2)) _Bug fixes_ -* N/A +* Solved an issue that showed the payload. ([#5](https://github.com/securehats/AzWorkspaceManager/issues/5)) From b28155e5500393c8bbf8443055d0e1ab508ae703 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 16:28:39 +0200 Subject: [PATCH 07/15] Update README.md --- README.md | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 112 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 119f4a8..0dabfb0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ contains some errors, I have decided to create a PowerShell Module called **AzWo This module is especially useful in scenario's where you want to manage the Workspace Manager using Infrastructure as Code or using pipelines. -### Get started with the CLI +## Installation To get started with this PowerShell module you only need to follow these basic steps. @@ -32,11 +32,119 @@ To get started with this PowerShell module you only need to follow these basic s
Install Module
- - ```powershell - Install-Module -AzWorkspaceManager +
+ + ## Get started with the module + +This section shows a couple of examples on how to get started with this module. + +
+ +Workspace Manager Configuration +
+ + ### Create a Workspace Manager configuration + +Creating a Workspace Manager configuration in the parent Microsoft Sentinel instance. + ```pwsh + Add-AzWorkpaceManager -Name 'myWorkspace' -ResourceGroup 'myResourceGroup' ``` +
+
+ +![Add-WorkspaceManager](https://github.com/SecureHats/AzWorkspaceManager/assets/40334679/759beecd-2768-4c74-952f-32b04c34ee2b) + + +
+ +
+ +Add Workspace Manager Members and Groups +
+ + ### Add a Workspace Manager Member + +Creating Workspace Manager members in the Workspace Manager Configuration. + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + resourceId = $resourceId + tenantId = $tenantId +} + + Add-AzWorkpaceManagerMember @arguments +``` +
+ +### Add a Workspace Manager Group + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + name = 'myGroup' + workspaceManagerMembers = 'mySecondWorkspace(f6426b36-04fa-4a41-a9e4-7f13abe34d55)' +} + + Add-AzWorkpaceManagerGroup @arguments +``` +
+ +### Create a member and add through pipeline to group + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + resourceId = $resourceId + tenantId = $tenantId +} + + Add-AzWorkpaceManagerMember @arguments | Add-AzWorkspaceManagerGroup - GroupName 'myGroup' +} + +``` + +![Add-WorkspaceManagerMember-Group](https://github.com/SecureHats/AzWorkspaceManager/assets/40334679/a01048f2-3aca-4d64-bf01-8f0b669269f1) + +
+ +
+ +Add Workspace Manager Assignments +
+ + ### Add a Workspace Manager Assignment + +Creating a Workspace Manager assignment. + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + resourceId = $resourceId + tenantId = $tenantId +} + + Add-AzWorkpaceManagerAssignment @arguments +``` +
+ +### Add Alert Rules to a Workspace Manager Assignment using pipeline input + +```pwsh +$AlertRules = Get-AzWorkspaceManagerItem -WorkspaceName 'myWorkspace' -Type 'AlertRuels' + +$arguments = @{ + workspaceName = 'myWorkspace' + resourceId = $resourceId + tenantId = $tenantId + ResourceId = $items.ResourceId +} + + Add-AzWorkpaceManagerAssignment @arguments +``` +
+
## Community From d31f3bf179f66e87f83ead82d82a545929bf0fac Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 18:06:33 +0200 Subject: [PATCH 08/15] Update README.md --- README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0dabfb0..bc8ae4b 100644 --- a/README.md +++ b/README.md @@ -121,27 +121,38 @@ Creating a Workspace Manager assignment. ```pwsh $arguments = @{ workspaceName = 'myWorkspace' + groupName = 'myGroup' resourceId = $resourceId - tenantId = $tenantId } - Add-AzWorkpaceManagerAssignment @arguments + Add-AzWorkspaceManagerAssignment @arguments ```
-### Add Alert Rules to a Workspace Manager Assignment using pipeline input +### Add Alert Rules to a Workspace Manager Assignment ```pwsh -$AlertRules = Get-AzWorkspaceManagerItem -WorkspaceName 'myWorkspace' -Type 'AlertRuels' - $arguments = @{ workspaceName = 'myWorkspace' + groupName = 'myGroup' resourceId = $resourceId - tenantId = $tenantId - ResourceId = $items.ResourceId } - Add-AzWorkpaceManagerAssignment @arguments + Add-AzWorkspaceManagerAssignment @arguments +``` + +### Add Alert Rules to a Workspace Manager Assignment + +```pwsh +$SavedSearches = Get-AzWorkspaceManagerItem -WorkspaceName 'myWorkspace' -Type SavedSearches + +$arguments = @{ + workspaceName = 'myWorkspace' + groupName = 'myGroup' + resourceId = $SavedSearches +} + + Add-AzWorkspaceManagerAssignment @arguments ```
From 7fdd7810976be65136c1b2325cb3f550c86e7040 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 18:42:09 +0200 Subject: [PATCH 09/15] Update README.md --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc8ae4b..ee36f1f 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,8 @@ $arguments = @{ ### Add a Workspace Manager Assignment -Creating a Workspace Manager assignment. +This example creates an empty assignment. +Because the assignment name is not provided, the 'GroupName' value will be used. ```pwsh $arguments = @{ @@ -129,11 +130,14 @@ $arguments = @{ ```
-### Add Alert Rules to a Workspace Manager Assignment +### Add an Alert Rules to a Workspace Manager Assignment + + This example adds the resourceId of an alert rule to an assignment ```pwsh $arguments = @{ workspaceName = 'myWorkspace' + name = 'myAssignment' groupName = 'myGroup' resourceId = $resourceId } @@ -141,15 +145,18 @@ $arguments = @{ Add-AzWorkspaceManagerAssignment @arguments ``` -### Add Alert Rules to a Workspace Manager Assignment +### Add Alert Rules to a Workspace Manager Assignment + + This example gets all saved searches and adds them to an assignment ```pwsh $SavedSearches = Get-AzWorkspaceManagerItem -WorkspaceName 'myWorkspace' -Type SavedSearches $arguments = @{ workspaceName = 'myWorkspace' + name = 'myAssignment' groupName = 'myGroup' - resourceId = $SavedSearches + resourceId = $SavedSearches.resourceId } Add-AzWorkspaceManagerAssignment @arguments @@ -158,6 +165,54 @@ $arguments = @{ +
+ +Create an Assignment Job +
+ + ### Adding a Workspace Manager Assignment Job + +Creating a Workspace Manager assignment job. + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + name = 'myAssignment' +} + + Add-AzWorkspaceManagerAssignmentJob @arguments +``` +
+ + +### Add a WorkspaceManager Assignment Job for all assignments + + This example creates an assignment job for each Workspace Manager assignment + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' +} + + Get-AzWorkspaceManagerAssignment @arguments | Add-AzWorkspaceManagerAssignmentJob +``` + +### Get all WorkspaceManager Assignment Jobs for an assignment + + This example gets all jobs for a Workspace Manager Assignment + +```pwsh +$arguments = @{ + workspaceName = 'myWorkspace' + name = 'myAssignment' +} + + Get-AzWorkspaceManagerAssignmentJob @arguments +``` +
+ +
+ ## Community We all thrive on feedback and community involvement! From e5af8363aedffa4ee6a55f292129e5594cd4282d Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 18:42:51 +0200 Subject: [PATCH 10/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee36f1f..4bc35ca 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ $arguments = @{
-Create an Assignment Job +Create an Assignment Job and get status
### Adding a Workspace Manager Assignment Job From 674e6ddba9b9b60e018927fab64bf802f9ace927 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 18:44:04 +0200 Subject: [PATCH 11/15] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4bc35ca..85093b4 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ $arguments = @{
-### Add a WorkspaceManager Assignment Job for all assignments +### Add a Workspace Manager Assignment Job for all assignments This example creates an assignment job for each Workspace Manager assignment @@ -197,7 +197,7 @@ $arguments = @{ Get-AzWorkspaceManagerAssignment @arguments | Add-AzWorkspaceManagerAssignmentJob ``` -### Get all WorkspaceManager Assignment Jobs for an assignment +### Get all Workspace Manager Assignment Jobs for an assignment This example gets all jobs for a Workspace Manager Assignment From 9a33fe02037d66cb8f65e9a94d1eb78ae2e4fa98 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:45:27 +0200 Subject: [PATCH 12/15] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85093b4..512475c 100644 --- a/README.md +++ b/README.md @@ -229,8 +229,9 @@ I am running on coffee and good music when busy writing code. so feel free to bu -## Not happy? +## Feedback -If you encounter any issues, or have suggestions for improvements, feel free to open an Issue +If you encounter any issues, have suggestions for improvements or anything else, feel free to open an Issue +I will try to respond to each issue and Pull requests within 48 hours. [Create Issue](../../issues/new/choose) From a194a1c61783d5b756dbe34ed2da0b7c32e9556f Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:46:16 +0200 Subject: [PATCH 13/15] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 512475c..950fd6a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ This module is especially useful in scenario's where you want to manage the Work To get started with this PowerShell module you only need to follow these basic steps. +Click the topics below to fold them out. +
Prerequisites From 2debe25dab1a57a412dcc4fa85f48d0a66c23d37 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:47:27 +0200 Subject: [PATCH 14/15] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 950fd6a..f5b1a46 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This module is especially useful in scenario's where you want to manage the Work To get started with this PowerShell module you only need to follow these basic steps. -Click the topics below to fold them out. +> Click on the topics below to fold them out.
@@ -33,6 +33,10 @@ Click the topics below to fold them out.
Install Module + + ```powershell +Install-Module AzWorkspaceManager + ```
From d27ee543f9dc08dfcb22fe58c6b2de81e1a8bd97 Mon Sep 17 00:00:00 2001 From: Rogier Dijkman <40334679+azurekid@users.noreply.github.com> Date: Mon, 14 Aug 2023 09:09:26 +0200 Subject: [PATCH 15/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5b1a46..b03f358 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ $arguments = @{ tenantId = $tenantId } - Add-AzWorkpaceManagerMember @arguments | Add-AzWorkspaceManagerGroup - GroupName 'myGroup' + Add-AzWorkpaceManagerMember @arguments | Add-AzWorkspaceManagerGroup -GroupName 'myGroup' } ```