Repository navigation
fix: let container and daemon roles find ACM certificates by their import tag - #972
Merged
Merged
Conversation
|
Enclave skipped this draft pull request. It will run automatically when you mark the PR as Ready for review. |
Member
Author
|
@greptileai review |
|
Member
Author
|
@greptileai review |
…port tag ImportCertificate without an ARN creates a new certificate on every call and takes no idempotency token. To find a certificate whose import response was lost, a controller lists certificates and reads their tags. Grant acm:ListTagsForCertificate (tag-conditioned) and acm:ListCertificates (on *, the only resource AWS accepts for it) to container/management, container/provision and daemon/provision, as worker sets already have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alongubkin
force-pushed
the
alon/alien-1372-acm-list-permissions
branch
from
October 10, 2026 19:07
a8d1c59 to
802cc5d
Compare
Member
Author
|
@greptileai review |
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.
Summary
ImportCertificatewithout aCertificateArnmakes a new certificate on every call and takes no idempotency token (API reference). When ACM accepts an import but the response is lost, or the caller stops right after the call, a retry cannot tell whether a certificate already exists and imports a second one. The first is then owned by nothing.The way to find it is to tag each import with a token recorded before the call, then list certificates and read their tags (
find_imported_certificates_by_tag, added in #935). The worker and Kubernetes public endpoint permission sets already grant this. The container and daemon sets did not, so a controller for those resources cannot look up a lost import.This PR adds the same two grants to
container/management,container/provisionanddaemon/provision:acm:ListTagsForCertificatein the existing tag-conditioned certificate statement (stack, resource and managed-by tags). A certificate without our tags answers AccessDenied, and the lookup skips it.acm:ListCertificatesin a newlist-tls-certificatesstatement on*. AWS evaluates this action only against*(ACM API permissions). It returns certificate ARNs and domain names, nothing else.Safety
ListCertificatesimports as before. Rerunning setup grants it.Why this over alternatives
History
Same grants and wording as the worker / Kubernetes public endpoint change (#935).
Tests
CI:
Rust crates(including the permission-set ABAC test and the IAM dataset check, which validates both action names) and the setup snapshot tests pass. Container and daemon sets are not in the setup snapshots, so no snapshot changes.Linear: ALIEN-1372
🤖 Generated with Claude Code