Luther Monson, Staff Software Engineer at SUSE

Luther Monson

Go by way of PHP · Containers · VMs · Windows · Kubernetes

Logging In to Proxmox From Go: Tickets, CSRF Tokens and API Tokens

Proxmox VE has two ways to authenticate against its API. Here's how go-proxmox handles each one and why the client is now configured entirely with functional options.

5-Minute Read

Diagram of the ticket login flow and the API token header for the Proxmox VE API

I just spent a week of evenings on the access side of go-proxmox. Realms, groups, users and roles all landed. Before any of that, I reworked how a client gets its credentials in the first place. Proxmox gives you two different ways to authenticate. They behave differently enough that it’s worth writing down how each one works on the wire and what the client does with it.

Waiting on Proxmox: UPIDs, Tasks and WaitFor in Go

Most Proxmox VE API calls that change something hand you a UPID instead of a result. Here is how go-proxmox turns that string into something you can wait on.

6-Minute Read

Diagram breaking a Proxmox UPID string into node, pid, pstart, starttime, type, id and user

If you start automating Proxmox VE through the API, one thing trips you up first. Almost nothing you ask it to do is finished when the HTTP call returns. Start a VM, clone a template, download an ISO to storage, delete a disk… the response is a single string that looks like a typo. The actual work is happening in a worker process on the node. If your next call depends on that work being done, you have to go find out when it’s done.

Recreating Proxmox Ve Xtermjs in Go

Proxmox's web console is xterm.js over a websocket. Here's how I reverse engineered that protocol and rebuilt the terminal connection in Go with go-proxmox.

9-Minute Read

Proxmox VE Logo

Part of a hobby of mine is running a home lab and using on Proxmox VE to do the virtualization. Since I work in the space I’m slowly trying to build tooling around Proxmox that will let me use the home lab full time for work. Usually my work involves building Kubernetes management tooling. You can imagine waiting for public cloud APIs all day can take away hours of your day. That’s at cost to your employer for both your time and the compute resources.

Practical Cue Example, Produce YAML Config from Go Types

A hands-on Cue tutorial: start from Go types, generate Cue definitions, and produce two different YAML config files from them.

5-Minute Read

I recently had to spend some time to learn Cue and felt the examples/tutorials were a bit lacking. The paradigm shift to the entire language sort of messed with my head, and some things Cue does were a bit foreign to me. To get started, note that I spent all of my time getting this information from two places: their main docs and a community Cuetorials site. This will be a tutorial on how you can use Cue to generate two different YAML documents, all starting with Go types to generate Cue files.

Recent Posts

Categories

About

Luther is a 20+ year software veteran specializing in backend APIs and architecting products. Employed at SUSE as the Team Lead for the Containers on Windows Team working on Rancher + Kubernetes