This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az storage account list --query "[].id" -o tsv | az storage account update --allow-shared-key-access false --ids @- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create csr | |
cd /usr/lib/unifi | |
sudo java -jar lib/ace.jar new_cert unifi.idhero.de "Unifi" "Germany" "BE" DE | |
# the CSR is in data subfolder (/usr/lib/unifi/data) | |
# strip from new lines | |
tr -d '\n\r' < DigiCertCA.crt | echo $(cat -) > DigiCertCA.crt | |
tr -d '\n\r' < TrustedRoot.crt | echo $(cat -) > TrustedRoot.crt | |
tr -d '\n\r' < unifi_idhero_de.crt | echo $(cat -) > unifi_idhero_de.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az storage account list --query "[?allowBlobPublicAccess].id" -o tsv | az storage account update --allow-blob-public-access false --ids @- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"definition": { | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"contentVersion": "1.0.0.0", | |
"triggers": { | |
"Recurrence": { | |
"type": "Recurrence", | |
"recurrence": { | |
"frequency": "Day", | |
"interval": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "Newtonsoft.Json" | |
using System.Net; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Primitives; | |
using Newtonsoft.Json; | |
public static async Task<IActionResult> Run(HttpRequest req, ILogger log) | |
{ | |
log.LogInformation("C# HTTP trigger function processed a request."); | |
string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Define the output CSV file | |
output_file="aws_resources.csv" | |
## List of resource types to include in the report | |
resource_types=("ec2" "lambda" "ecs" "eks" "rds" "dynamodb" "elasticmapreduce" "kinesis" "elasticache") | |
## Check if the AWS CLI is installed | |
if ! command -v aws &> /dev/null; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
az functionapp list --query "[].{n:name,g:resourceGroup}" -o Table | |
az functionapp list --query "[].{n:name,g:resourceGroup}" -o tsv | awk -F'\t' '{system("az functionapp function list -n "$1" -g " $2 " --query \"[].{g:resourceGroup,n:name,t:type}\" -o table")}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace System.Net | |
# Input bindings are passed in via param block. | |
param($Request, $TriggerMetadata) | |
function Parse-JWTtoken { | |
[cmdletbinding()] | |
param([Parameter(Mandatory=$true)][string]$token) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" | |
PolicySchemaVersion="0.3.0.0" | |
TenantId="yourtenant.onmicrosoft.com" | |
PolicyId="B2C_1A_SendgridCustomTemplateId" | |
PublicPolicyUri="http://tonycosite.onmicrosoft.com/B2C_1A_SendgridCustomTemplateId" | |
DeploymentMode="Development" | |
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, connect to Azure AD | |
Connect-AzureAD | |
# Make sure there is no same policy already defined | |
# Get your policies and inspect them | |
Get-AzureADPolicy | |
# modify your gorup filter as appropriate | |
# ref: https://learn.microsoft.com/en-us/azure/active-directory/develop/reference-claims-mapping-policy-type#group-filter | |
$PolicyDefinitionString = "{ |
NewerOlder