add-grant

Implements GCP IAM and Cloud Run IAP grants as reviewable Pulumi changes in marin-iac.

3.2k|266|Updated Mar 22, 2024
One-click install
npx skills add https://github.com/marin-community/marin --skill add-grant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-grant
Source: https://github.com/marin-community/marin/tree/main/.agents/skills/add-grant
Command: npx skills add https://github.com/marin-community/marin --skill add-grant

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turning an access request into a safe, reviewable infrastructure change is error-prone: personal emails must be KMS-encrypted before entering a public repo, the correct grant surface must be identified, and changes must never be applied locally. This Skill guides the full workflow from request to PR without leaking plaintext principals.

Core Features & Use Cases

  • Encrypted principal registry: Registers human emails as opaque human-NNN IDs via iam_principal.py, keeping personal emails out of the public repository, commits, and PR bodies.
  • Two grant surfaces: Handles shared project/resource IAM in iam_data.yaml (project roles, buckets, secrets, Artifact Registry, service accounts) and deploy-target IAM/IAP viewer grants for Echo, EvalDash, Grafana, and Loom.
  • GitHub issue workflow: Fetches access-request issues with gh, asks for missing details instead of guessing, and opens a properly labeled PR assigned to grant approvers.
  • Use Case: A teammate files an issue asking for read access to the eval record bucket. The Skill registers their encrypted principal, adds the narrowest storage role to iam_data.yaml, runs pre-commit checks, and opens a PR titled by capability for a reviewer to apply with pulumi up.

Quick Start

Ask the agent to grant a specific person read access to a named GCP resource in marin-iac and open a review PR.

Frequently Asked Questions about add-grant

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I grant a user access to a GCP resource in marin-iac?

Register the person's email with the iam_principal.py grant or register command, which KMS-encrypts it into an opaque human-NNN ID. Then reference that ID in iam_data.yaml or the deploy-target module and open a PR for review.

How do I add an IAP viewer to a Cloud Run service like EvalDash?

Register the person's encrypted principal first, then add the principals["human-NNN"] reference to the target's iam_grants() declaration under infra/pulumi/src/iac/gcp/. The change is composed into the marin Pulumi stack and applied by a reviewer.

Why are personal emails encrypted in the IAM configuration?

The marin repository is public, so human user: principals are KMS-encrypted once in the principals registry and referenced by opaque human-NNN IDs. Service accounts, groups, and domains remain plain strings since they are not personal data.

Can I run pulumi preview or pulumi up to verify my grant change?

No. A local preview decrypts and prints real emails, and applying is reserved for the reviewer. Run the pre-commit checks instead; CI executes a redacted preview on the PR, and a second person runs review-grant then pulumi up.

What happens if a GitHub access request is missing details?

The Skill does not guess. It posts a single comment prefixed with a robot emoji listing exactly what is missing, such as the principal, target resource, or justification, and stops without opening a half-specified PR.