Users Client Certificates and OTP seeds

Started by cosmin alexa, May 06, 2022, 01:10:19 PM

Previous topic - Next topic
Hello everybody,
I wanted to find out if there is a way to make a massive download of user certificates; and in the same way have access to the OTP keys of all users in a single file, so as not to open every single user and copy the key.

Thanks in advance for any response

May 06, 2022, 01:28:04 PM #1 Last Edit: May 06, 2022, 01:42:00 PM by meyergru
Download the configuration XML and process it for user/otpseed and user/authorizedkeys path sub expressions.

You can do that with XSLT and something like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:foo="http://www.foo.org/" xmlns:bar="http://www.bar.org">
<xsl:template match="/">
     <xsl:for-each select="opnsense/system/user">"<xsl:value-of select="name"/>","<xsl:value-of select="authorizedkeys"/>","<xsl:value-of select="otp_seed"/>"
     </xsl:for-each>
</xsl:template>
</xsl:stylesheet>


Try it here: https://www.freeformatter.com/xsl-transformer.html, but be warned to expose any real data to an arbitrary website...
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+