PowerDNS All Data Was Not Consumed Message

This was … annoying today.

I’m playing with upgrading a PowerDNS instance and started getting All data was not consumed when doing queries against particular zones. Turns out, it was the space at the end of the SOA record, somehow something was adding that in…

# pdnsutil check-zone example.com
[Error] Following record had a problem: "example.com IN SOA ns1.example.net dns.example.net 2020092142 3600 7200 3600000 172800 "
[Error] Error was: All data was not consumed
Checked 26 records of 'example.com', 1 errors, 0 warnings.

# psql -h nsdb.example.com


powerdns=> select * from records where type='SOA' and name like '%isdnsworking%';
    id    | domain_id | name        | type |                      content                                         | ttl  | prio | change_date | disabled | ordername | auth
----------+-----------+-------------+------+----------------------------------------------------------------------+------+------+-------------+----------+-----------+------
 15122753 |   1557559 | example.com | SOA  | ns1.example.net dns.example.net 2020092142 3600 7200 3600000 172800  | 3600 |      |             | f        |           | t
(1 row)

powerdns=> update records set content='ns1.example.net dmain.netregistry.net 2020092142 3600 7200 3600000 172800' where type='SOA' and name like '%isdnsworking%' ;
UPDATE 1
powerdns=> select * from records where type='SOA' and name like '%isdnsworking%';
    id    | domain_id | name        | type |                     content                                         | ttl  | prio | change_date | disabled | ordername | auth
----------+-----------+-------------+------+---------------------------------------------------------------------+------+------+-------------+----------+-----------+------
 15122753 |   1557559 | example.com | SOA  | ns1.example.net dns.example.net 2020092142 3600 7200 3600000 172800 | 3600 |      |             | f        |           | t
(1 row)

powerdns=> \q
# pdnsutil check-zone example.com
Checked 26 records of 'example.com', 0 errors, 0 warnings.

… wow.

[Read More]

Battery Equivalence...

This was oddly hard to find…

The Energizer A544 is equivalent to the 4LR44, a 6 volt battery - which my Merlin garage door opener uses. It also replaces the 6V PX28A.

[Read More]

Raspberry Pi USB Boot 'USB-MSD Boot Requires Newer Software'

I was getting this error when trying to boot my Raspi4 8GB from USB:

USB-MSD boot requires newer software

The fix is to grab the latest firmware from the raspberrypi/firmware repository like so:

  1. git clone --depth 1 https://github.com/raspberrypi/firmware
  2. cd firmware/boot
  3. Mount the USB boot drive on my mac
  4. cp -R * /Volumes/boot
  5. Unmount the drive and put it into the Pi

This’ll copy the latest firmware (don’t delete any other files) and it should work.

[Read More]

ManageEngine Password Manager Pro Parameter Error

If you start getting an error like this, you need to update the SSL certificate on your SAML server ;)

It’ll show up in $installdir\logs\security-log-0.txt.

[10:52:00:698]|[06-18-2020]|[com.adventnet.iam.security.URLRule]|[WARNING]|[77]: Extra parameter found: the parameter Map :  {[SigAlg = http://www.w3.org/2000/09/xmldsig#rsa-sha1][Signature = Tn+28vsQB9fXiL2SwGShT4gGwyNhDUbWWLPM1SZjc/K2M6xuwAS+zEL8fdDU9/XzAVvnRhrK4SRDitCWjCBwAUMiHLYONjMz6jNRs5HqjwFUCEk8slFlvup0oER2vq4w5BfbXBt7VKku85xOWqu7gHHAr9Xkhtlx8i/Xdmw0S4r/66V+bMHHKUm3dc/bJ/dEF8KOFdseSwNF2gDhiTX2iMyhIsrZeifjp5O/WpJJdi80WbX50kQrkGOJa17Pbvi9o9yoFBLtHDvyp2AfUXghW6kuA8d0unvBmo5dqr8kwTkungs/+IExBHbGIP8M/gKvAcUKgleP/99jXUxjct6GCw==]}  for the URI : (/STATE_ID/[0-9]+)?/saml2|
[Read More]

Drone CI and 'Github Pages Promoted Build xxxx' causing failed builds

I enabled Github Pages on Dewar last night and it started triggering these weird failing builds in Drone CI.

github-pages [bot] promoted github-pages to ac77354f

After much searching I finally found a thread on the Drone CI Discourse “GitHub Pages triggering builds incorrectly” - turns out it’s a weird deploy hook thing.

Adding the “trigger” block to my .drone.yml fixed it (block snipped from the larger file):

kind: pipeline
type: docker
name: dewar

trigger:
  event:
    exclude: [ promote ]
steps:
- name: pytest

Quote from @bradrydzewski on the Discourse:

[Read More]

Proxmox VE and Management on IPv6

I try to run IPv6 all the things, these days. It makes connectivity from the outside world (when needed) much easier; once DNS is set up, who needs to connect via IP address anyway?

I knew connectivity worked because I could ssh to the IPv6 address, but pveproxy was being a pain (as usual). Turns out, it looks at /etc/hosts for the hostname on startup, to figure out where to bind to.

[Read More]

Splunk, SAML, and ADFS: failed to parse issuer

Trying to get Splunk doing SAML auth against ADFS today. Was getting this error in splunkd.log.

05-15-2020 00:43:39.673 +0000 ERROR Saml - Failed to parse issuer. Could not evaluate xpath expression /samlp:Response/samlp:Status/samlp:StatusMessage or no matching nodes found. No value found in SamlResponse for key=/samlp:Response/samlp:Status/samlp:StatusMessageCould not evaluate xpath expression /samlp:Response/samlp:Status/samlp:StatusDetail/Cause or no matching nodes found. No value found in SamlResponse for key=/samlp:Response/samlp:Status/samlp:StatusDetail/CauseCould not evaluate xpath expression //saml:Assertion/saml:Issuer or no matching nodes found. No value found in SamlResponse for key=//saml:Assertion/saml:Issuer
05-15-2020 00:43:39.673 +0000 ERROR UiSAML - IDP failed to authenticate request. Status Message="" Status Code="Responder"

Turned off Authentication request signing and it came good. I can’t store the frontend cert in the ADFS config because it changes as often as the LetsEncrypt issuance period, so this’ll do for now.

[Read More]

Getting the TOTP Key From the Guacamole Database

Guac’s great, but there’s no interface for changing the TOTP key once it’s set for a user.

I’m using docker-compose to build this, so your method might be different.

Connect to postgresql:

psql guacamole postgres

To make sure you’re in the right db, type \dt and hit enter, it should show you a bunch of tables starting with guacamole_.

This is the query, copypasta should do it.

select entity.name, uid.user_id, uattr.attribute_value 
from guacamole_user as uid, 
    guacamole_user_attribute as uattr, 
    guacamole_entity as entity 
where uattr.attribute_name='guac-totp-key-secret' 
    AND uid.entity_id=entity.entity_id
    AND uid.user_id=uattr.user_id;

And the result I get (I’ve only got one user)

[Read More]

Hexagonal Architecture in Netflix

This post on the Netflix Tech Blog about rebuilding one oftheir applications using Hexagonal Architecture patterns was a fascinating read. I’d never argue for every project to have a big universal interfacing method or connectors everywhere, but at some point you realise your platform needs it.

The idea of Hexagonal Architecture is to put inputs and outputs at the edges of our design. Business logic should not depend on whether we expose a REST or a GraphQL API, and it should not depend on where we get data from — a database, a microservice API exposed via gRPC or REST, or just a simple CSV file.

[Read More]

SK6812 LEDs, Tasmota and Home Assistant

Installing the requirements should be easy, just run:

$ pip3 install --user platformio

Truncated output should look like this:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting platformio
  Downloading https://files.pythonhosted.org/packages/15/58/49a7134412731bd585f996d9c69e70f7eff0bacf795a7a55524dadf412cd/platformio-4.3.1.tar.gz (169kB)
    100% |████████████████████████████████| 174kB 1.2MB/s
<snip>
Successfully built platformio
Installing collected packages: bottle, marshmallow, pyelftools, semantic-version, tabulate, platformio
Successfully installed bottle-0.12.18 marshmallow-3.5.1 platformio-4.3.1 pyelftools-0.26 semantic-version-2.8.4 tabulate-0.8.7

To set up the drivers to use the SK6812 properly, there’s a few configuration changes that need to be done. Open Tasmota/tasmota/my_user_config.h in a text editor and search for USE_WS2812. You’ll want to update the next few lines to match these. We’re going to make sure the DMA thing’s commented out, (// at the start of the line), the hardware’s set to be right, and the colour type is set to GRBW, because SK6812’s have their colours in a different order.

[Read More]