Skip to content

Commit

Permalink
Azure Security. (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdriscoll committed Sep 4, 2024
1 parent 07a062d commit 0f00633
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Graph/Azure.Security/.universal/roles.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if ($PSUAzureSecurityTenantId) {
Connect-MgGraph -TenantId $PSUAzureSecurityTenantId -ClientSecretCredential $Secret:PSUAzureSecurityCredential -NoWelcome
Get-MgGroup | ForEach-Object {
New-PSURole -Name $_.DisplayName -ClaimType 'groups' -ClaimValue $_.Id -Description $_.Description
}
}
17 changes: 17 additions & 0 deletions Graph/Azure.Security/Azure.Security.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@{
ModuleVersion = '1.0.0'
GUID = '8c0637ef-efa0-4ccb-a9b6-f81b94b6b807'
Author = 'Ironman Software'
CompanyName = 'Ironman Software'
Copyright = '(c) Ironman Software. All rights reserved.'
Description = 'Azure Security integration for PowerShell Universal.'
PrivateData = @{
PSData = @{
Tags = @('app', 'weather')
LicenseUri = 'https://github.com/ironmansoftware/scripts/blob/main/LICENSE'
ProjectUri = 'https://github.com/ironmansoftware/scripts/tree/main/Graph/Azure.Security'
IconUri = 'https://raw.githubusercontent.com/ironmansoftware/scripts/main/images/script.png'
}
}
}

12 changes: 12 additions & 0 deletions Graph/Azure.Security/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Azure Security

Creates PowerShell Universal roles based on Entra ID groups in Azure. In conjunction with OpenID Connect, the roles will automatically be assigned to users based on their group membership. You can then assign resources to these roles in PowerShell Universal.

## Requirements

- `Microsoft.Graph` module

## Configuration

- `$PSUAzureSecurityTenantId` - The Azure AD tenant ID. Required.
- `$Secret:PSUAzureSecurityCredential` - The Azure AD application client ID (user name) and client secret (password). Required.

0 comments on commit 0f00633

Please sign in to comment.