@caelo-cms/provisioning 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caelo-cms/provisioning",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "private": false,
5
5
  "license": "MPL-2.0",
6
6
  "description": "Pulumi-driven provisioning for Caelo CMS — `bunx @caelo-cms/provisioning --provider <self-hosted|gcp|aws|azure>` brings up a TLS-served install with Postgres + storage + secrets manager + the admin + the API gateway.",
@@ -38,7 +38,7 @@
38
38
  "prepublishOnly": "tsc -b --force && tsc --project stacks/gcp/tsconfig.json && tsc --project stacks/gcp-firebase/tsconfig.json"
39
39
  },
40
40
  "dependencies": {
41
- "@caelo-cms/shared": "^0.3.15",
41
+ "@caelo-cms/shared": "^0.3.16",
42
42
  "@clack/prompts": "1.3.0",
43
43
  "@pulumi/aws": "^7",
44
44
  "@pulumi/awsx": "^3",
@@ -546,22 +546,26 @@ const adminDomainMapping = provisionAdminDomain
546
546
  // shipped. If your provider build is older than v8.x, run
547
547
  // `gcloud beta run services update <admin-service> --iap` as a
548
548
  // post-up step. The stack provisions the IAM bindings either way.
549
- // v0.3.13 — For IAP-protected Cloud Run, the correct IAM role
550
- // for allowlisted-user access is `roles/run.invoker`, NOT
551
- // `roles/iap.httpsResourceAccessor` (Cloud Run IAM rejects that
552
- // role on both v1 and v2 APIs with "Role is not supported for
553
- // this resource"). IAP authenticates the user via Google; after
554
- // auth passes, IAP forwards the request to Cloud Run, which
555
- // checks `run.invoker` on the authenticated identity. So
556
- // granting `run.invoker` to the user email IS the IAP allowlist.
549
+ // v0.3.16 — IAP-protected Cloud Run requires `roles/iap.httpsResourceAccessor`
550
+ // on the IAP WEB layer (not the Cloud Run service IAM). The IAP
551
+ // layer authenticates the user, checks this role on the
552
+ // IAP-web-cloud-run resource, then forwards the request to the
553
+ // Cloud Run service (which auto-trusts IAP-forwarded traffic via
554
+ // the native IAP integration on the cloudrunv2.Service spec).
555
+ //
556
+ // Resource: `gcp.iap.WebCloudRunServiceIamMember` — Cloud Run IAM
557
+ // (v1 + v2) both reject this role with "Role is not supported for
558
+ // this resource". The correct binding is at the IAP web service
559
+ // layer via this dedicated resource (`gcloud iap web
560
+ // add-iam-policy-binding --resource-type=cloud-run` shape).
557
561
  for (const principal of iapAllowlist) {
558
- new gcp.cloudrunv2.ServiceIamMember(
562
+ new gcp.iap.WebCloudRunServiceIamMember(
559
563
  `${namePrefix}-admin-iap-${principal.replace(/[^a-z0-9]/gi, "-").slice(0, 40)}`,
560
564
  {
561
- location: region,
562
565
  project,
563
- name: adminSvc.name,
564
- role: "roles/run.invoker",
566
+ location: region,
567
+ cloudRunServiceName: adminSvc.name,
568
+ role: "roles/iap.httpsResourceAccessor",
565
569
  member: principal,
566
570
  },
567
571
  opts,