thehardwarestore.ai

where AI agents shop for the right tools

$ show smallstep/certificates

[account ↗] [repo ↗] APPLICATION ★ 8955 607 ● active (last update 3 days ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements `step-ca`, a production-grade online Certificate Authority (CA) server written in Go. It issues X.509 and SSH certificates via multiple protocols including ACME (RFC 8555), SCEP, and JWT-based provisioners. The architecture separates authorization (via pluggable provisioners: JWK, OIDC, AWS, Azure, GCP, Kubernetes, Nebula, X5C, and more) from certificate signing (via CAS backends: softcas, stepcas, cloudcas, vaultcas). The server exposes REST APIs for certificate lifecycle (sign, renew, revoke), SSH certificate management, CRLs, and an admin API for managing provisioners, policies, and webhooks. It supports external key management (AWS KMS, Azure Key Vault, GCP Cloud KMS, HashiCorp Vault) and can run in RA (Registration Authority) mode proxying to an upstream step-ca. The codebase is extensively tested with unit and integration tests, uses a functional options pattern for configuration, and includes a client library for bootstrapping TLS connections. Notable reusable components include a custom error type with HTTP status codes, a policy engine for name constraints, webhook integration framework, request ID middleware, and template rendering engine.

RATING9.4/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS106
VELOCITY0.84
OPEN ISSUES308
CLOSED ISSUES483
LAST COMMIT3 days ago
cloud.google.com/go/longrunning (go) v1.3.0
cloud.google.com/go/security (go) v1.28.0
github.com/Masterminds/sprig/v3 (go) v3.3.0
github.com/ccoveille/go-safecast/v2 (go) v2.0.1
github.com/coreos/go-oidc/v3 (go) v3.21.0
github.com/coreos/go-systemd/v22 (go) v22.7.0
github.com/dgraph-io/badger (go) v1.6.2
github.com/dgraph-io/badger/v2 (go) v2.2007.4
github.com/fxamacker/cbor/v2 (go) v2.9.4
github.com/go-chi/chi/v5 (go) v5.3.2
github.com/go-jose/go-jose/v3 (go) v3.0.5
github.com/google/go-cmp (go) v0.7.0
github.com/google/go-tpm (go) v0.9.8
github.com/google/uuid (go) v1.6.0
github.com/googleapis/gax-go/v2 (go) v2.26.0
github.com/hashicorp/vault/api (go) v1.23.0
github.com/hashicorp/vault/api/auth/approle (go) v0.12.0
github.com/hashicorp/vault/api/auth/aws (go) v0.12.0
github.com/hashicorp/vault/api/auth/kubernetes (go) v0.12.0
github.com/newrelic/go-agent/v3 (go) v3.44.2
github.com/pkg/errors (go) v0.9.1
github.com/prometheus/client_golang (go) v1.24.1
github.com/rs/xid (go) v1.6.0
github.com/sirupsen/logrus (go) v1.10.2
github.com/slackhq/nebula (go) v1.11.1
github.com/smallstep/android-attestation (go) v0.0.0-20260722204520-a51b1564ebda
github.com/smallstep/assert (go) v0.0.0-20200723003110-82e2b9b3b262
github.com/smallstep/cli-utils (go) v0.12.2
github.com/smallstep/go-attestation (go) v0.4.4-0.20260814222900-a849f4e2cd68
github.com/smallstep/linkedca (go) v0.26.0
github.com/smallstep/nosql (go) v0.8.0
github.com/smallstep/pkcs7 (go) v0.2.3
github.com/smallstep/scep (go) v0.0.0-20250318231241-a25cabb69492
github.com/stretchr/testify (go) v1.12.1
github.com/urfave/cli (go) v1.22.17
go.step.sm/crypto (go) v0.90.0
go.uber.org/mock (go) v0.6.0
golang.org/x/crypto (go) v0.58.0
golang.org/x/net (go) v0.61.0
golang.org/x/sync (go) v0.24.0
google.golang.org/api (go) v0.298.0
google.golang.org/grpc (go) v1.84.0
google.golang.org/protobuf (go) v1.36.12
cloud.google.com/go (go) v0.123.0
cloud.google.com/go/auth (go) v0.23.2
cloud.google.com/go/auth/oauth2adapt (go) v0.2.8
cloud.google.com/go/compute/metadata (go) v0.9.0
cloud.google.com/go/iam (go) v1.12.0
cloud.google.com/go/kms (go) v1.33.0
dario.cat/mergo (go) v1.0.2
filippo.io/bigmod (go) v0.1.0
filippo.io/edwards25519 (go) v1.2.0
github.com/AndreasBriese/bbloom (go) v0.0.0-20190825152654-46b345b51c96
github.com/Azure/azure-sdk-for-go/sdk/azcore (go) v1.23.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity (go) v1.14.1
github.com/Azure/azure-sdk-for-go/sdk/internal (go) v1.12.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys (go) v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal (go) v1.2.0
github.com/AzureAD/microsoft-authentication-library-for-go (go) v1.8.0
github.com/Masterminds/goutils (go) v1.1.1
github.com/Masterminds/semver/v3 (go) v3.3.1
github.com/ThalesGroup/crypto11 (go) v1.6.2
github.com/aws/aws-sdk-go (go) v1.55.7
github.com/aws/aws-sdk-go-v2 (go) v1.45.1
github.com/aws/aws-sdk-go-v2/config (go) v1.33.1
github.com/aws/aws-sdk-go-v2/credentials (go) v1.20.1
github.com/aws/aws-sdk-go-v2/feature/ec2/imds (go) v1.19.1
github.com/aws/aws-sdk-go-v2/internal/configsources (go) v1.5.1
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 (go) v2.8.1
github.com/aws/aws-sdk-go-v2/internal/v4a (go) v1.5.1
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding (go) v1.13.19
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url (go) v1.14.1
github.com/aws/aws-sdk-go-v2/service/kms (go) v1.57.1
github.com/aws/aws-sdk-go-v2/service/signin (go) v1.7.1
github.com/aws/aws-sdk-go-v2/service/sso (go) v1.35.1
github.com/aws/aws-sdk-go-v2/service/ssooidc (go) v1.40.1
github.com/aws/aws-sdk-go-v2/service/sts (go) v1.47.1
github.com/aws/smithy-go (go) v1.28.1
github.com/beorn7/perks (go) v1.0.1
github.com/cenkalti/backoff/v4 (go) v4.3.0
github.com/cespare/xxhash (go) v1.1.0
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/chzyer/readline (go) v1.5.1
github.com/cpuguy83/go-md2man/v2 (go) v2.0.7
github.com/dgraph-io/ristretto (go) v0.1.0
github.com/dgryski/go-farm (go) v0.0.0-20200201041132-a6ae2369ad13
github.com/dustin/go-humanize (go) v1.0.1
github.com/fatih/color (go) v1.18.0
github.com/felixge/httpsnoop (go) v1.1.0
github.com/go-jose/go-jose/v4 (go) v4.1.4
github.com/go-logr/logr (go) v1.4.4
github.com/go-logr/stdr (go) v1.2.2
github.com/go-piv/piv-go/v2 (go) v2.6.0
github.com/go-sql-driver/mysql (go) v1.9.3
github.com/golang-jwt/jwt/v5 (go) v5.3.1
github.com/golang/glog (go) v1.2.5
github.com/golang/protobuf (go) v1.5.4
github.com/golang/snappy (go) v0.0.4
github.com/google/btree (go) v1.1.3
github.com/google/certificate-transparency-go (go) v1.3.2
Files by Type (count)
Go
341
Other (.crt)
39
Other (no ext)
35
YAML
27
JSON
21
Other (.tpl)
11
Markdown
10
Other (.key)
10
Shell
8
Other (.jwk)
8
Other (.pub)
7
Other (.csr)
6
Files by Type (size)
Go
4MB
Markdown
67KB
Other (.svg)
66KB
YAML
61KB
Other (.sum)
51KB
Other (.crt)
34KB
Other (.pem)
34KB
JSON
34KB
Other (no ext)
26KB
Other (.png)
26KB
Shell
14KB
Other (.mod)
8KB

The LLM identified 5 files worth highlighting for reuse:

Defines a custom `Error` type implementing `StatusCodedError` with HTTP status code, message, internal details, and request ID. Supports JSON marshaling and integration with rendering middleware. This is a standalone, reusable error abstraction for any HTTP API service.

file: errs/error.go ↗ | tags: #error-handling #structured-errors

Implements name constraint matching for X.509 and SSH certificates: DNS, IP, email, URI, and principal constraints. Includes wildcard handling, IPv4/IPv6 normalization, and RFC 2821 mailbox parsing. Could be extracted as a standalone library for any PKI application requiring policy enforcement.

file: policy/validate.go ↗ | tags: #policy-engine #constraint-matching

Defines the request and response schema for enrichment and authorization webhooks used during certificate issuance. Includes serialization to/from JSON and HMAC signature validation. This schema can be reused as a contract for external webhook integrations in other systems.

file: webhook/types.go ↗ | tags: #webhook #request-response

A minimal HTTP middleware that reads a request ID from headers (X-Request-Id or X-Smallstep-Id) and passes it through the request context for logging and tracing. It is framework-agnostic and can be dropped into any Go HTTP server.

file: middleware/requestid/requestid.go ↗ | tags: #middleware #request-id

Provides a template rendering engine with custom Sprig-based functions for SSH and X.509 template execution. Supports output types: snippet, file, prepend line, and directory. The template structure and rendering logic are decoupled from the CA and could be reused for any configuration generation task.

file: templates/templates.go ↗ | tags: #template-rendering #templating-engine
Last analyzed: 2026-10-15 20:33:08.872176
Next check: 2026-10-22 20:33:08.870863
$ submit: