Stephan van Rooij

Software architect with a passion for home automation.

Github Actions: Use secret file

G

Github Actions are great for automating tests and builds, among other things. If you need a secret (key/token/password), you can add those in the configuration and use them in your workflow.

Sometimes you need a file that is meant to be secret inside your workflow. This post shows you how to securely save this file as a secret and recreate the file during build. We use base64 encoding for a way to convert any file to a string that can be saved in the secrets.

This is all done in powershell core, which is available in all (Windows/Mac/Linux) runners on Github. The code below should work on any platform, but is only tested on a windows-latest runner.

Using Managed Identity without Azure

U

Azure managed identities are great. You just turn it on and your Azure Resource can request a token for other resources that support it in your tenant. This way each resource in Azure can get it’s own “identity” and Microsoft will manage the credentials for you. You’ll no longer have to store credentials in the configuration as this is all part of the managed services.

This post will give you an in-depth view of how Azure allows several client apps to requests tokens for Azure Resources.

Home automation setup

H

I’m big fan of smart homes, almost everything in our home is controlable over the network. And I’ve build some awesome apps for it. This post will describe all the components used in my home, and how they connect to each other.

Azure Functions with multi tenant authentication

A

Azure Functions (and Azure App Service) support authentication out of the box. They even made a wizard to get you started quickly. This is really useful if you just want users from your tenant (or a specific other tenant) to login.

Check-out the documentation to get started.

My open-source projects

My github repositories, last edited first.

A dotnet tool for parsing rss feeds and modifying a markdown file
A Teams app showing all your assigned and provisioned apps (no production!)
HTML 0 0
:speaker: Sonos control library, use this library in your own appliction.
TypeScript 64 13
Publish data from your Smart meter with a P1 interface to you MQTT server.
TypeScript 27 6
Control Sonos from dotnet
🔊 📖 Sonos api documentation for the local UPNP api and a generator to generate clients based on service discovery
TypeScript 19 7
Sonos2mqtt companion for Home Assistant
Python 4 0
:speaker: Sonos mqtt controller. Control your speakers from your mqtt server. mqtt-smarthome insprired.
TypeScript 61 17
Demo speed increase with batching for the Microsoft Graph API
HTML 3 0
Some usefull PowerShell snippets collected
PowerShell 4 0