Repository navigation
AWS connections: trust the install's own account, release-pinned templates, and a live permissions check with a one-click update - #323
Merged
Conversation
…lates, and a live permissions check with a one-click update - A self-hosted install never falls back to CoderHelm's AWS account: without CODERHELM_ACCOUNT_ID it refuses to make the role link and Setup checks fail. - The role and update templates are built into each release and published under launch/<version>/; a self-hosted install links to its own release's copy, and the role can be downloaded with the install's account filled in. - On self-host the role's trust is narrowed to the install's own roles (aws:PrincipalArn, TrustedRolePrefix). - Each connection is checked live against this release's permissions (IAM policy simulator on the role, or one read of each kind), with a one-click update stack per permission set and plain reasons when it fails. - A daily sweep tells each team once per new permission set; the log fix evidence step names refused reads and keeps working. - aws_connections setup check; self-host integrations docs rewritten.
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
Connected AWS accounts on a self-hosted install now trust the install's own account and use the install's own release's templates. Every account, hosted or self-hosted, gets a live check of this release's read-only permissions with a one-click update. Paired with the dashboard PR (CoderHelm/coderhelm, same branch name).
Changes
public_urls::platform_account_id: on self-host, "" instead of the hosted account whenCODERHELM_ACCOUNT_IDis missing;cfn-urlthen refuses with a plain fix.common::log_reader: the role and update templates built into the release (include_str!), the abilities with their IAM actions and why, the permission set's id, the Launch Stack and update links, and a template download with the install's account filled in. Tests keep the code's action list equal to both templates' actions and every action read-only.infra/cfn:TrustedRolePrefixplus anaws:PrincipalArncondition (the self-host link narrows trust to<prefix>-*roles);iam:SimulatePrincipalPolicyon the role itself. Newcoderhelm-log-reader-update.yaml: one policy per update stack (CoderHelmLogReaderUpdate-<id>).SHA256SUMSand attestation, and are written once tolaunch/<tag>/(the publisher role already allowslaunch/*). A self-hosted release defaultsLOG_READER_TEMPLATE_URLto that copy;RESOURCE_PREFIXis set on the services.common::live::permissions: a live check through IAM's policy simulator on the role (it names a permissions boundary or an SCP), falling back to one read of each kind for older roles. After Update is pressed, it looks for the update stack and names the problem: failed, in progress, not found in the role's account, or not added yet.POST /api/aws-connections/:id/permissions/check,GET /api/aws-connections/template, a richercfn-url(account, prefix, grouped actions). The integrations card says "Update needed: N new read-only permissions". The old metrics/Airflow add-on link is replaced by the update stack.aws_permissions_sweep(EventBridge rule) saves each account's check and tells each team once per permission set in Slack/Teams. The log fix evidence step names refused reads ("skipped, update in one click") and keeps working.aws_connections: the install knows its account; the role and update templates it links to are this release's.docs/self-host/integrations.mdrewritten per integration (what you need, how to connect on self-host, what changes with hybrid; definition lists),config-reference.md,check-your-install.md.Verification
cargo fmt --check,cargo clippy --workspace -- -D warnings,cargo test --workspace(common 1067, gateway 696, worker 512,no_hosted_urls).infranpm test(70): new synth tests for the install's own account, the release-pinned template,RESOURCE_PREFIX, the IAM to take on the role, and release publishing.installernpm test,lambda/tests,selfhost/launchtests,actionlint,check_workflows.py.