[Bug]: notBefore and notAfter values in template files are ignored

Đang mở
#1,507 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@hslatman đang làm issue này rồi.

Từ ngày 11/11/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug needs triage
Steps to Reproduce

I was playing around with template files and noticed that the notBefore and notAfter values in template files are ignored by the step-cli.

You can easily reproduce it when you use the fields notBefore and/or notAfter in a template file and create a certificate. You can see an example in the Actual behavior section.

You can use this for testing:

{
  "notBefore": "2020-01-01T00:00:00Z",
  "notAfter": "2030-01-01T00:00:00Z"
}
Your Environment
  • OS - Fedora 42
  • step CLI Version - CLI/0.28.7 (linux/amd64)
Expected Behavior

When specifing the notBefore and/or notAfter fields I would expect that the dates will be carried over to the actual certificate. The fields are visible in the certificate.go.

Actual Behavior
Image

When specifing a wrong value you can see from the error that it actually reads the value:

Image
Additional Context

My use-case for this would be to create something like standalone cert-profiles that are fully defined as code and don't need the CLI parameters. Then you can just specify the parts that change like the Subject and SAN and then just have to add the template

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Ngôn ngữ chính
Go
Star
4.3k
Fork
320
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của smallstep/cli

Tất cả issue của smallstep/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.