Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

light tool to create/sign (via kms) fulcio/tsa certs (ca, leaf etc) #1334

Closed
ianhundere opened this issue Nov 8, 2024 · 6 comments
Closed
Labels
enhancement New feature or request

Comments

@ianhundere
Copy link
Contributor

Description

cross posting this from sigstore/helm-charts#863 as i'm thinking something like this would best live here.

@ianhundere ianhundere added the enhancement New feature or request label Nov 8, 2024
@haydentherapper
Copy link
Contributor

Hey Ian, I like this idea! Would this make sense as a utility in the fulcio or timestamp-authority repositories? I want to make sure the generated certificates are conformant with the Fulcio/RFC3161 standards respectively, and if you're planning to leverage libraries from these repositories already, then maybe it'd be easiest to have them maintained under their respective repos.

@ianhundere
Copy link
Contributor Author

ianhundere commented Nov 9, 2024

hey Hayden, that definitely makes more sense.

i wasn't planning on leveraging libraries from those respective repos, but it looks like there's some overlap.

i'm currently using the following packages/config templates to create/sign certs for fulcio and tsa:

packages

	"context"
	"fmt"
	"math/big"
	"time"

	"crypto/x509"
	"crypto/x509/pkix"

	"encoding/json"
	"encoding/pem"
	"os"

	"go.step.sm/crypto/kms/apiv1"
	"go.step.sm/crypto/kms/awskms"
	"go.step.sm/crypto/kms/cloudkms"
	"go.step.sm/crypto/kms/azurekms"
	"go.step.sm/crypto/x509util"

fulcio intermediate/leaf cert template


{
  "subject": {
    "commonName": "https://blah.com"
  },
  "issuer": {
    "commonName": "https://blah.com"
  },
  "keyUsage": [
    "certSign",
    "crlSign"
  ],
  "extKeyUsage": [
    "CodeSigning"
  ],
  "basicConstraints": {
    "isCA": true,
    "maxPathLen": 0
  }
}

tsa intermediate/leaf cert template

{
    "subject": {
        "commonName": "https://blah.com"
    },
    "issuer": {
        "commonName": "https://blah.com"
    },
    "keyUsage": [
        "certSign",
        "crlSign"
    ],
    "basicConstraints": {
        "isCA": false,
        "maxPathLen": 0
    },
    "extensions": [
        {
            "id": "2.5.29.37",
            "critical": true,
            "value": "asn1Seq (asn1Enc oid:1.3.6.1.5.5.7.3.8) | toJson"
        }
    ]
}

maybe have a utility with the expected cert standards (e.g. fulcio/rfc3161) and each lives in its respective repo?

lemme know, and i can open an issue for each respective repository and pivot there for discussing further.

btw, thanks for the quick response / feedback!

@ianhundere ianhundere changed the title Open light tool to create/sign (via kms) fulcio/tsa certs (ca, leaf etc) light tool to create/sign (via kms) fulcio/tsa certs (ca, leaf etc) Nov 11, 2024
@ianhundere
Copy link
Contributor Author

@haydentherapper / @bobcallaway

should i create a PR in each respective repo:

or should we have it just live in the fulcio repo w/ the expectation that someone can grab it there if needed for tsa ?

@haydentherapper
Copy link
Contributor

In each repo is good with me, I'll review the PRs.

@ianhundere
Copy link
Contributor Author

sounds good / i'll open issues there and should have PRs up by the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants