Skip to content

[Bug]: puppetserver ca clean fails with date format concerns #23

@tskirvin

Description

@tskirvin

Is this a critical security issue?

  • This is not a security issue.

Describe the Bug

I've got a puppet CA going back to 2015. When I attempt to clear a cert from one of the older machines, I see something like this:

[root@PUPPET-CA ~]# puppetserver ca clean --certname HOSTNAME                   
Error:
    When attempting to revoke certificate 'HOSTNAME', received:
      code: 500
      body: Internal Server Error: java.lang.IllegalArgumentException: Invalid format: "2020-11-29T17:07:23+00:00" is malformed at "+00:00"

This may have something to do with inventory.txt having multiple date formats included, because of the age of the system. Matching lines for that host in here:

0x0477 2015-11-30T17:07:23+00:00 2020-11-29T17:07:23+00:00 /CN=HOSTNAME         0x1D46 2017-07-25T20:24:26UTC 2022-07-25T20:24:26UTC /CN=HOSTNAME
0x2021 2017-09-20T21:54:51UTC 2022-09-20T21:54:51UTC /CN=HOSTNAME               0x3FC8 2020-10-27T19:47:26UTC 2025-10-27T19:47:26UTC /CN=HOSTNAME
0x5695 2023-10-17T19:37:27UTC 2028-10-16T19:37:27UTC /CN=HOSTNAME               0x68D2 2025-06-15T13:50:46UTC 2030-06-15T13:50:46UTC /CN=HOSTNAME
0x68D3 2025-06-15T14:57:37UTC 2030-06-15T14:57:37UTC /CN=HOSTNAME

Expected Behavior

It should have cleaned the cert.

Steps to Reproduce

I'm not convinced that it's easy to reproduce, but I've provided enough data above to get close?

Environment

Version openvox-server-8.8.1-1.el9.noarch
Platform Alma Linux 9.6 (RHEL clone)

Additional Context

Discussed on #puppet in openvox Slack.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions