cloudflare / certmgr

Automated certificate management using a CFSSL CA.
BSD 2-Clause "Simplified" License
218 stars 40 forks source link

spec as yaml broken #115

Open ChrisChoke opened 2 years ago

ChrisChoke commented 2 years ago

hey,

i wanted to provide my specs as yaml. according to spec.rst and release changelog since 2.0.0 it is supported for spec files, too. i have testet with the binary from release 3.0.3. and an own builded binary from source. with binary from 1.6.5 it works, but without 'ca' key in the global section like shown in example json from readme.

my yaml:

service: nginx
action: restart
request:
  CN: www.example.net
  hosts:
    - example.net
    - www.example.net
  key:
    algo: ecdsa
    size: 521
  names:
    - C: US
      ST: CA
      L: San Francisco
      O: Example, LLC
private_key:
  path: "/opt/pki/www_yaml.key"
  owner: www-data
  group: www-data
  mode: "0600"
certificate:
  path: "/opt/pki/test1_yaml.pem"
  owner: www-data
  group: www-data
ca:
  path: "/opt/pki/ca_yaml.pem"
  owner: www-data
  group: www-data
authority:
  remote: ca.example.net:8888
  auth_key: "012345678012345678"
  label: www_ca
  profile: three-month

and the error output:

root@sslca:/etc/certmgr.d# /opt/certmgr check
INFO[0000] certmgr: loading from config file /etc/certmgr/certmgr.yaml 
INFO[0000] manager: loading certificates from /etc/certmgr.d 
INFO[0000] manager: loading spec from /etc/certmgr.d/nginx.yaml 
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020460348 stack=[0xc020460000, 0xc040460000]
fatal error: stack overflow

runtime stack:
runtime.throw({0xafe312?, 0xfd3260?})
    /usr/local/go/src/runtime/panic.go:992 +0x71
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1101 +0x5cc
runtime.morestack()
    /usr/local/go/src/runtime/asm_amd64.s:547 +0x8b

goroutine 1 [running]:
reflect.Value.Elem({0xa7d700?, 0xc0003fe0d8?, 0x16?})
    /usr/local/go/src/reflect/value.go:1166 +0x1ba fp=0xc020460358 sp=0xc020460350 pc=0x49507a
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:308 +0x18d fp=0xc0204603e8 sp=0xc020460358 pc=0x7bad2d
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020460450 sp=0xc0204603e8 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc0204604f0 sp=0xc020460450 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460518 sp=0xc0204604f0 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020460580 sp=0xc020460518 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020460610 sp=0xc020460580 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020460678 sp=0xc020460610 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020460718 sp=0xc020460678 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460740 sp=0xc020460718 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204607a8 sp=0xc020460740 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020460838 sp=0xc0204607a8 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204608a0 sp=0xc020460838 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020460940 sp=0xc0204608a0 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460968 sp=0xc020460940 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204609d0 sp=0xc020460968 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020460a60 sp=0xc0204609d0 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020460ac8 sp=0xc020460a60 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020460b68 sp=0xc020460ac8 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460b90 sp=0xc020460b68 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020460bf8 sp=0xc020460b90 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020460c88 sp=0xc020460bf8 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020460cf0 sp=0xc020460c88 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020460d90 sp=0xc020460cf0 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460db8 sp=0xc020460d90 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020460e20 sp=0xc020460db8 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x100?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020460eb0 sp=0xc020460e20 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020460f18 sp=0xc020460eb0 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020460fb8 sp=0xc020460f18 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020460fe0 sp=0xc020460fb8 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461048 sp=0xc020460fe0 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc0204610d8 sp=0xc020461048 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020461140 sp=0xc0204610d8 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc0204611e0 sp=0xc020461140 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461208 sp=0xc0204611e0 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461270 sp=0xc020461208 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461300 sp=0xc020461270 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020461368 sp=0xc020461300 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461408 sp=0xc020461368 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461430 sp=0xc020461408 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461498 sp=0xc020461430 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461528 sp=0xc020461498 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020461590 sp=0xc020461528 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461630 sp=0xc020461590 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461658 sp=0xc020461630 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204616c0 sp=0xc020461658 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461750 sp=0xc0204616c0 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204617b8 sp=0xc020461750 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461858 sp=0xc0204617b8 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461880 sp=0xc020461858 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204618e8 sp=0xc020461880 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461978 sp=0xc0204618e8 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204619e0 sp=0xc020461978 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461a80 sp=0xc0204619e0 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461aa8 sp=0xc020461a80 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461b10 sp=0xc020461aa8 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461ba0 sp=0xc020461b10 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020461c08 sp=0xc020461ba0 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461ca8 sp=0xc020461c08 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461cd0 sp=0xc020461ca8 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461d38 sp=0xc020461cd0 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461dc8 sp=0xc020461d38 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020461e30 sp=0xc020461dc8 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020461ed0 sp=0xc020461e30 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020461ef8 sp=0xc020461ed0 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020461f60 sp=0xc020461ef8 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020461ff0 sp=0xc020461f60 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020462058 sp=0xc020461ff0 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc0204620f8 sp=0xc020462058 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462120 sp=0xc0204620f8 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020462188 sp=0xc020462120 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462218 sp=0xc020462188 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020462280 sp=0xc020462218 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462320 sp=0xc020462280 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462348 sp=0xc020462320 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204623b0 sp=0xc020462348 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462440 sp=0xc0204623b0 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204624a8 sp=0xc020462440 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462548 sp=0xc0204624a8 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462570 sp=0xc020462548 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc0204625d8 sp=0xc020462570 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462668 sp=0xc0204625d8 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204626d0 sp=0xc020462668 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462770 sp=0xc0204626d0 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462798 sp=0xc020462770 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020462800 sp=0xc020462798 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462890 sp=0xc020462800 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc0204628f8 sp=0xc020462890 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462998 sp=0xc0204628f8 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc0204629c0 sp=0xc020462998 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020462a28 sp=0xc0204629c0 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462ab8 sp=0xc020462a28 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020462b20 sp=0xc020462ab8 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462bc0 sp=0xc020462b20 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462be8 sp=0xc020462bc0 pc=0x9b324b
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00039e840, 0xc000401880, {0x7fa534b441f0, 0xc0003fe0d8})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:270 +0xa7 fp=0xc020462c50 sp=0xc020462be8 pc=0x7ba727
gopkg.in/yaml%2ev2.(*decoder).prepare(0x0?, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x0?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:313 +0x252 fp=0xc020462ce0 sp=0xc020462c50 pc=0x7badf2
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00039e840, 0xc000401880, {0xa7d700?, 0xc0003fe0d8?, 0x40f025?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:364 +0x105 fp=0xc020462d48 sp=0xc020462ce0 pc=0x7baf65
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler.func1({0xa7d700?, 0xc0003fe0d8?})
    /root/go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/decode.go:272 +0x125 fp=0xc020462de8 sp=0xc020462d48 pc=0x7ba9e5
github.com/cloudflare/certmgr/certmgr/mgr.(*ParsableAuthority).UnmarshalYAML(0x0?, 0xa7d700?)
    /opt/certmgr-src/certmgr/mgr/file.go:67 +0x2b fp=0xc020462e10 sp=0xc020462de8 pc=0x9b324b
...additional frames elided...

maybe @ferringb @jmunson can help, because they did huge great work on this project in the past.

Chris

ChrisChoke commented 1 year ago

Any maintenance on this project? Any feedback would be great 👍@willbuckner @cloudflare

ChrisChoke commented 1 year ago

hmm sad that here is not much activitiy. its a great project and simple to setup. well, i investigate some time to search a bit. the problem is here: https://github.com/cloudflare/certmgr/blob/4af0d7701d7500080ddc53bebb9c3d85977df3e4/certmgr/mgr/file.go#L183 in this yaml.UnmarshalStrict call, the software fails and exit. i thought, "hey look how we parse certmgr.yaml config file" and found this: https://github.com/cloudflare/certmgr/blob/ec8c2beb2c124fbe57d4e79aee6d206fdf4117ba/certmgr/mgr/manager.go#L81 but i had to find out that this function "NewFromConfig" does not used in the project. the configfile is parsed by the viper framework.

leave this infos and hope someone with more skills than me could help to investigate.

Chris