Implement acme.sh-based certificate revocation lifecycle - #9
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds durable, idempotent support for revoking issued certificates at their ACME certificate authority, including API, backend, database, and documentation changes. It introduces a new
/v1/certificates/{id}/revokeendpoint, persists revocation requests and their statuses, and ensures that revocation is handled safely and consistently, including error handling and idempotency via anIdempotency-Key.API and Documentation:
POST /v1/certificates/{id}/revokeendpoint for revoking a certificate at its CA, with support for RFC 5280 reason codes and idempotency. (README.md,acme_api/routers/certificates.py, [1] [2] [3]DELETE) and CA revocation (POST /revoke). (README.md, README.mdR199-R220)Database and Models:
certificate_revocationstable and corresponding SQLAlchemy model to persist revocation requests, their status, and metadata. (acme_api/models/certificate_revocation.py,alembic/versions/a7c3e9d2b4f1_add_certificate_revocations.py, [1] [2]acme_api/models/certificate.py, acme_api/models/certificate.pyR178-R183)Backend and Business Logic:
acme_api/backend/acmesh_backend.py,acme_api/services/certificate_revocations.py, [1] [2]acme_api/backend/protocol.py,acme_api/backend/mock_backend.py, [1] [2]Schemas and Validation:
acme_api/schemas/certificate.py, acme_api/schemas/certificate.pyR73-R103)Testing Support:
tests/helpers/api.py, [1] [2] [3]