Skip to content

Instantly share code, notes, and snippets.

Avatar

Tero Saarni tsaarni

  • Ericsson
  • Finland
View GitHub Profile
@tsaarni
tsaarni / README.md
Last active Sep 17, 2020
Manual test procedure for client cert authentication for backend TLS
View README.md
@tsaarni
tsaarni / make-client-auth-invisible.patch
Created Mar 18, 2020
disabling external client cert validation
View make-client-auth-invisible.patch
diff --git a/apis/projectcontour/v1/httpproxy.go b/apis/projectcontour/v1/httpproxy.go
index 2c7a323d..5ee30820 100644
--- a/apis/projectcontour/v1/httpproxy.go
+++ b/apis/projectcontour/v1/httpproxy.go
@@ -120,12 +120,12 @@ type TLS struct {
// backing cluster.
// +optional
Passthrough bool `json:"passthrough,omitempty"`
- // ClientValidation defines how to verify the client certificate. This setting:
- // 1. Enables TLS client certificate validation.
View generate-crd-clients.patch
diff --git a/hack/generate-crd-clients.sh b/hack/generate-crd-clients.sh
index 9bfeadff..7fee28ca 100755
--- a/hack/generate-crd-clients.sh
+++ b/hack/generate-crd-clients.sh
@@ -17,7 +17,6 @@ readonly DESTDIR=${DESTDIR:-$(mktemp -d)}
readonly YEAR=$(date +%Y)
readonly GO111MODULE=on
-readonly GOFLAGS=-mod=vendor
@tsaarni
tsaarni / README.md
Last active Jan 2, 2020
Multiboot in UEFI system with Windows 10 installed on separate drive
View README.md

Windows boot entry missing from grub menu

Problem: After installing Windows 10 on separate disk, Windows entry is not visible in grub menu. Windows 10 installer might not have used GPT partition table, but instead is using MBR for booting. It might still look like UEFI boot since Windows created small system partition with bit similar content as EFI partition would have.

From https://askubuntu.com/questions/447686/how-to-boot-windows-8-from-a-legacy-mbr-partition-in-uefi-mode-via-grub

The custom GRUB entry isn't needed (at least not for windows 10's boot manager), you can install to the BCD to your main EFI partition, with "bcdboot C:\Windows /s X: /f UEFI", where X is the letter you assigned to the UEFI partition. You can assign a letter to the UEFI partition either using the windows gui or using "diskpart" command line utility. This works even if windows isn't in a GPT partition

@tsaarni
tsaarni / readme.md
Last active Dec 28, 2019
Install any version of go (using existing installation of go)
View readme.md

Install any version of go

Get a list of all available go versions by running:

curl -s "https://golang.org/dl/?mode=json&include=all" | jq -r '.[].version' | sort -V

To install latest version of go (not including beta versions) by using existing go installation for bootstrapping:

GOLATEST=$(curl -s "https://golang.org/dl/?mode=json&include=all" | jq -r '.[].version | select(contains("beta") | not )' | sort -V | tail -1)
go get golang.org/dl/$GOLATEST   # compiles go downloader
@tsaarni
tsaarni / extract-pre-master-secret.py
Created Nov 15, 2019
Extract keys to decrypt Java TLS stream
View extract-pre-master-secret.py
#!/usr/bin/env python3
#
# Extract TLS pre-master secret to decrypt captured TLS stream in Wireshark
#
# Java TLS implementation can be configured to dump information on TLS stream,
# making it possible to extracting TLS key for decrypting the stream for debug
# purposes.
#
# This script is originally by Timothy Basanov
# https://timothybasanov.com/2016/05/26/java-pre-master-secret.html
View dwc_otg_compilation_warnings.txt
drivers/usb/host/dwc_otg/dwc_otg_hcd.c: In function ‘assign_and_init_hc’:
drivers/usb/host/dwc_otg/dwc_otg_hcd.c:1243:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hc->xfer_buff = (uint8_t *) urb->dma + urb->actual_length;
^
drivers/usb/host/dwc_otg/dwc_otg_hcd.c:1287:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hc->xfer_buff = (uint8_t *) urb->setup_dma;
^
drivers/usb/host/dwc_otg/dwc_otg_hcd.c:1318:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hc->xfer_buff = (uint8_t *) hcd->status_buf_dma;
^
@tsaarni
tsaarni / README.md
Last active Apr 25, 2019
Wansview NCM700GC web camera
View README.md
@tsaarni
tsaarni / README.md
Last active Mar 11, 2021
How to connect to Azure AKS Kubernetes node VM by SSH
View README.md

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@tsaarni
tsaarni / README.md
Last active Nov 8, 2017
Installing any version of go compiler on ubuntu
View README.md

Prepare working environment for go compiler

Create "go path" directory (will store downloads and the source code that you yourself write)

mkdir ~/go

add following to your .bashrc or somewhere

if [ -d $HOME/go ]; then
   export GOPATH=${HOME}/go