Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Kirchner pkirch

View GitHub Profile
@pkirch
pkirch / websockets-best-practices.md
Created Jan 23, 2020
Summary of a research about best practices for and securing of web sockets which are used in a client-server architecture. (No browser-server scenario.)
View websockets-best-practices.md

Best Practices for and Securing of Web Sockets

In one of our customer projects we have used Web Sockets for client-server communication of real-time data.

Question

What are the characteristics of Web Sockets vs. RAW sockets?

Answer

View Get-VMsGroupedByCloudService.ps1
$allVMs = Get-AzureVM
$allVMs | Group-Object -Property ServiceName
<# Output
Count Name Group
----- ---- -----
2 pksttest1 {Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext, Microsoft.WindowsAzure.Commands.ServiceManage...
1 pksttest2 {Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext}
#>
View MVA-1506-101.ps1
Select-AzureSubscription "MSFT MVA Live"
Switch-AzureMode AzureResourceManager
New-AzureResourceGroup –Name mvasqlsvr –Location "West Europe"
New-AzureKeyVault -VaultName mvasqlsvr -ResourceGroupName mvasqlsvr -Location "West Europe" -SKU Premium
$key1 = Add-AzureKeyVaultKey -VaultName mvasqlsvr -Name testkey1 -Destination Software
View Create-WebDavVm.ps1
# Warning: This script is only for demo purposes.
# The connection to the WebDAV server is not secured.
# Content and user credentials are transmitted unencrypted.
# Before using this script, you need the PowerShell commandlets installed, have already an Azure
# subscription imported and the first three settings in this file changed. (See region Settings.)
# How to do this, you can read here (in German):
# http://blogs.msdn.com/b/pkirchner/archive/2015/01/13/grundlagen-powershell-f-252-r-microsoft-azure-installieren.aspx
# http://blogs.msdn.com/b/pkirchner/archive/2015/01/19/grundlagen-azure-amp-powershell-verwaltungszertifikate-installieren.aspx
View MVA-Config-402.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 402 - http://aka.ms/mva-1505-402
# Settings
$subscriptionName = "MSFT MVA Live" # Get-AzureSubscription
$location = "West Europe" # Get-AzureLocation
$serviceName = "mvaconfig402"
$storageAccountName = "mvaconfig401" # Reuse storage account with already published PS configurations.
$adminUsername = "adm_demo"
View ADDSInstall.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 401 - http://aka.ms/mva-1505-401
configuration ADDSInstall
{
node ("localhost")
{
WindowsFeature ADDS
{
View CS-ArgumentsSample.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 301 - http://aka.ms/mva-1505-301
param($name, $number)
Write-Output "Name: $name"
Write-Output "Number: $number"
$features = Get-WindowsFeature
View MVA-Config-203.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 203 - http://aka.ms/mva-1505-203
#region Create VM
# Settings
$subscriptionName = "MSFT MVA Live" # Get-AzureSubscription
$location = "West Europe" # Get-AzureLocation
$serviceName = "mvaconfig203"
View MVA-Config-202.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 202 - http://aka.ms/mva-1505-202
#region Create VM
# Settings
$subscriptionName = "MSFT MVA Stage" # Get-AzureSubscription
$location = "West Europe" # Get-AzureLocation
$serviceName = "mvaconfig204"
View MVA-Config-201.ps1
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 201 - http://aka.ms/mva-1505-201
#region Create VM
# Settings
$subscriptionName = "MSFT MVA Stage" # Get-AzureSubscription
$location = "West Europe" # Get-AzureLocation
$serviceName = "mvaconfig202"
You can’t perform that action at this time.