mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 14:21:37 +00:00
feat(M47): add Kubernetes Secrets target + AWS ACM PCA issuer connectors
Implement both M47 connectors with full cross-layer wiring: Kubernetes Secrets target: DNS-1123 validation, kubernetes.io/tls Secret create-or-update, chain concatenation, serial number validation, Helm RBAC gating. 18 tests. AWS ACM Private CA issuer: synchronous issuance (like Vault), ARN regex validation, RFC 5280 revocation reason mapping, CA cert retrieval, factory + env var seeding. 23 tests. Cross-cutting: domain types, service validation, config, factory, agent dispatch, frontend (TargetsPage, issuerTypes), OpenAPI, seed data, Helm chart, connectors docs, README. Testing docs (testing-guide, qa-test-guide, qa_test.go) with Parts thematically integrated near related connectors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,10 +29,41 @@ type Config struct {
|
||||
DigiCert DigiCertConfig
|
||||
Sectigo SectigoConfig
|
||||
GoogleCAS GoogleCASConfig
|
||||
AWSACMPCA AWSACMPCAConfig
|
||||
Digest DigestConfig
|
||||
Encryption EncryptionConfig
|
||||
}
|
||||
|
||||
// AWSACMPCAConfig contains AWS ACM Private CA issuer connector configuration.
|
||||
type AWSACMPCAConfig struct {
|
||||
// Region is the AWS region where the Private CA resides (e.g., "us-east-1").
|
||||
// Required for AWS ACM PCA integration.
|
||||
// Setting: CERTCTL_AWS_PCA_REGION environment variable.
|
||||
Region string
|
||||
|
||||
// CAArn is the ARN of the ACM Private CA certificate authority.
|
||||
// Format: arn:aws:acm-pca:<region>:<account>:certificate-authority/<id>
|
||||
// Required for AWS ACM PCA integration.
|
||||
// Setting: CERTCTL_AWS_PCA_CA_ARN environment variable.
|
||||
CAArn string
|
||||
|
||||
// SigningAlgorithm is the signing algorithm for certificate issuance.
|
||||
// Valid: SHA256WITHRSA, SHA384WITHRSA, SHA512WITHRSA, SHA256WITHECDSA, SHA384WITHECDSA, SHA512WITHECDSA.
|
||||
// Default: "SHA256WITHRSA".
|
||||
// Setting: CERTCTL_AWS_PCA_SIGNING_ALGORITHM environment variable.
|
||||
SigningAlgorithm string
|
||||
|
||||
// ValidityDays is the certificate validity period in days.
|
||||
// Default: 365.
|
||||
// Setting: CERTCTL_AWS_PCA_VALIDITY_DAYS environment variable.
|
||||
ValidityDays int
|
||||
|
||||
// TemplateArn is the optional ARN of an ACM PCA certificate template.
|
||||
// Used for constrained subordinate CAs or custom certificate profiles.
|
||||
// Setting: CERTCTL_AWS_PCA_TEMPLATE_ARN environment variable.
|
||||
TemplateArn string
|
||||
}
|
||||
|
||||
// EncryptionConfig contains configuration for encrypting sensitive data at rest.
|
||||
type EncryptionConfig struct {
|
||||
// ConfigEncryptionKey is the passphrase used to derive AES-256-GCM keys for encrypting
|
||||
@@ -597,6 +628,13 @@ func Load() (*Config, error) {
|
||||
Credentials: getEnv("CERTCTL_GOOGLE_CAS_CREDENTIALS", ""),
|
||||
TTL: getEnv("CERTCTL_GOOGLE_CAS_TTL", "8760h"),
|
||||
},
|
||||
AWSACMPCA: AWSACMPCAConfig{
|
||||
Region: getEnv("CERTCTL_AWS_PCA_REGION", ""),
|
||||
CAArn: getEnv("CERTCTL_AWS_PCA_CA_ARN", ""),
|
||||
SigningAlgorithm: getEnv("CERTCTL_AWS_PCA_SIGNING_ALGORITHM", "SHA256WITHRSA"),
|
||||
ValidityDays: getEnvInt("CERTCTL_AWS_PCA_VALIDITY_DAYS", 365),
|
||||
TemplateArn: getEnv("CERTCTL_AWS_PCA_TEMPLATE_ARN", ""),
|
||||
},
|
||||
ACME: ACMEConfig{
|
||||
DirectoryURL: getEnv("CERTCTL_ACME_DIRECTORY_URL", ""),
|
||||
Email: getEnv("CERTCTL_ACME_EMAIL", ""),
|
||||
|
||||
Reference in New Issue
Block a user