This repository contains HDUHelp's audited fork of
crazygit/cert-manager-alidns-webhook.
It provides the AliDNS DNS-01 solver used by cert-manager in the HDUHelp cluster.
The fork remains licensed under Apache-2.0. Upstream authorship and history are preserved in Git.
- Authentication is accepted only through the two mandatory environment variables
ALIBABA_CLOUD_ACCESS_KEY_IDandALIBABA_CLOUD_ACCESS_KEY_SECRET. - The Helm chart can populate those variables only from an existing Kubernetes Secret. It never accepts or creates plaintext AccessKeys.
- The process fails closed if either credential is absent or blank. It never falls back to a CLI profile, RRSA, ECS instance metadata, or another default credential provider.
ALIDNS_ALLOWED_ZONESis mandatory. DNS writes outside the configured authoritative zones are rejected.- The chart requires an image digest and applies a non-root, read-only container security context with all Linux capabilities dropped.
- AliDNS record lookup, creation, and deletion match the exact RR name, TXT type, and value.
The sample minimum-permission RAM policy is in
deploy/cert-manager-alidns-webhook/ram-policy.template.json.
Review the resource scope against the current AliDNS API before applying it.
- cert-manager installed in the cluster
- an image built from a reviewed commit and pinned by
sha256digest - a dedicated RAM AccessKey with only the required AliDNS permissions
- an existing Secret in the webhook release namespace with keys
accessKeyIDandaccessKeySecret
Do not commit credentials, pass them through Helm values, or place them in an Issuer.
helm upgrade --install cert-manager-alidns-webhook \
deploy/cert-manager-alidns-webhook \
--namespace cert-manager \
--set image.repository=REGISTRY/PROJECT/cert-manager-alidns-webhook \
--set image.digest=sha256:REVIEWED_DIGEST \
--set aliyunAuth.existingSecret=EXISTING_SECRET_NAME \
--set-json 'aliyunAuth.allowedZones=["hduhelp.com","hduhelp.net"]'The default webhook API group is alidns.acme.hduhelp.com. A cert-manager solver
references it without carrying credentials:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod-dns01
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-prod-dns01-account
solvers:
- dns01:
webhook:
groupName: alidns.acme.hduhelp.com
solverName: alidnsStart with a staging ACME issuer and a disposable test hostname. Promote to production only after issuance, renewal, TXT cleanup, and rollback have been verified.
helm uninstall cert-manager-alidns-webhook --namespace cert-managerUninstalling the chart does not delete the externally managed credential Secret, RAM identity, DNS zones, certificates, or Issuers.
go test ./...
go test -race ./...
go vet ./...
helm lint deploy/cert-manager-alidns-webhook \
--set image.repository=example.invalid/cert-manager-alidns-webhook \
--set image.digest=sha256:0000000000000000000000000000000000000000000000000000000000000000 \
--set aliyunAuth.existingSecret=test-onlySee DEVELOPMENT.md for release and review requirements.