Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2024 11:54:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 280405] security/step-certificates: 'service step-ca configure' fails
Message-ID:  <bug-280405-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280405

            Bug ID: 280405
           Summary: security/step-certificates: 'service step-ca
                    configure' fails
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: jason.mann@gmail.com
                CC: mw@wipp.bayern
                CC: mw@wipp.bayern
             Flags: maintainer-feedback?(mw@wipp.bayern)

I installed the step-certificates and step-cli packages on a
FreeBSD-14.1-RELEASE-amd64 system.

Following the installation, I performed the following actions:

- Added 'step_ca_enable=3D"YES"' to /etc/rc.conf.local
- Ran 'service step-ca configure'

  root@filer ~]# service step-ca configure
  No configured Step CA found.
  Creating new one....
  open /usr/local/etc/step/ca/contexts.json failed: not a directory
  Step CA Password file for auto-start not found
  Creating it....
  Please enter the Step CA Password:

After entering a password, I could see that /usr/local/etc/step/password.txt
had been created, as well as a /usr/local/etc/step/ca file.

The service then could not be started:

  [root@filer ~]# service step-ca start
  Starting step_ca.
  step_ca is not running.

Judging by the "open /usr/local/etc/step/ca/contexts.json failed: not a
directory" error, that 'ca' file should instead be a directory.

I examined the /usr/local/etc/rc.d/step-ca RC script and found the followin=
g on
line 93:

  install -m 600 -o ${step_ca_user} -g ${step_ca_group} /dev/null
${step_ca_steppath}

It appears this line is missing a '-d' argument to create a directory and
instead creates a file.

I added the '-d' argument to the script on my system, deleted the
/usr/local/etc/step/ca and password.txt files, then re-ran 'service step-ca
configure' and got what looks like the correct outcome:

  [root@filer /usr/local/etc/step]# service step-ca configure
  No configured Step CA found.
  Creating new one....
  install: /dev/null exists but is not a directory
  =E2=9C=94 Deployment Type: Standalone
  What would you like to name your new PKI?
  =E2=9C=94 (e.g. Smallstep): [redacted]
  What DNS names or IP addresses will clients use to reach your CA?
  =E2=9C=94 (e.g. ca.example.com[,10.1.2.3,etc.]): localhost
  What IP and port will your new CA bind to? (:443 will bind to 0.0.0.0:443)
  =E2=9C=94 (e.g. :443 or 127.0.0.1:443): 127.0.0.1:8443
  What would you like to name the CA's first provisioner?
  =E2=9C=94 (e.g. you@smallstep.com): [redacted]
  Choose a password for your CA keys and first provisioner.
  =E2=9C=94 [leave empty and we'll generate one]:=20
  =E2=9C=94 Password: [redacted]

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280405-7788>