Skip to content

Instance role's lambda:InvokeFunctionUrl grant is pinned to spore.host's DNS updater, blocking self-hosted updaters #1158

Closed

Description

@scttfrdmn

Split from #1137.

Found while writing the custom DNS guide for spore-host/spore-host#585 part 3. Checked in source; nothing here has been run on AWS.

  1. spored probably can't call a self-hosted updater in another account.
    • The instance role's lambda:InvokeFunctionUrl grant is pinned to spore.host's function: "Resource": "arn:aws:lambda:*:<spore.host infra account>:function:spawn-dns-updater" (pkg/aws/iam.go:995, again at :1609).
    • A cross-account Function URL call needs an allow in both the resource policy and the caller's identity policy, and the deploy script's --allow-account only provides the first.
    • So a central updater in an institution's own account should return 403, and spored then sets spawn:dns-status=failed.
    • The guide documents a workaround (an --iam-policy-file grant) and says the path is unproven. The fix is to derive the grant from the resolved dns_endpoint (its function ARN) instead of hardcoding it.

Related: #1121 (an SSM AccessDenied silently falls back to spore.host).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions