@pattform/api-kit 2.6.0 → 2.6.1

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.
@@ -22,6 +22,6 @@ export interface GcpProjectComponentArgs {
22
22
  services?: string[];
23
23
  deployServiceAccountId?: string;
24
24
  deployRoles?: string[];
25
- workloadIdentityMembers?: pulumi.Input<string>[];
25
+ tokenCreatorMembers?: pulumi.Input<string>[];
26
26
  importProjectId?: string;
27
27
  }
@@ -38,13 +38,14 @@ class GcpProjectComponent extends pulumi.ComponentResource {
38
38
  member: pulumi.interpolate `serviceAccount:${deploySa.email}`,
39
39
  }, { parent: deploySa });
40
40
  }
41
- // Grant the ESC env subjects that may impersonate the deploy SA. Members
42
- // are WIF principals, e.g.
43
- // principal://iam.googleapis.com/<pool>/subject/pulumi:environments:org:Pattform:env:<Project>/<env>
44
- ((_e = args.workloadIdentityMembers) !== null && _e !== void 0 ? _e : []).forEach((member, i) => {
45
- new gcp.serviceaccount.IAMMember(`${name}-deploy-wif-${i}`, {
41
+ // Trust hop, mirroring OrganizationAccountAccessRole on AWS: the base
42
+ // automation identity (pattform-infra, opened via the shared Common
43
+ // gcp-login) may mint tokens for this project's deploy SA. Stacks then
44
+ // set gcp:impersonateServiceAccount to hop in, no per-client ESC auth.
45
+ ((_e = args.tokenCreatorMembers) !== null && _e !== void 0 ? _e : []).forEach((member, i) => {
46
+ new gcp.serviceaccount.IAMMember(`${name}-deploy-token-creator-${i}`, {
46
47
  serviceAccountId: deploySa.name,
47
- role: "roles/iam.workloadIdentityUser",
48
+ role: "roles/iam.serviceAccountTokenCreator",
48
49
  member: member,
49
50
  }, { parent: deploySa });
50
51
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pattform/api-kit",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Pulumi infra library for building and deploying an API",
5
5
  "author": "Pattform <contact@pattform.io>",
6
6
  "license": "SEE LICENSE IN LICENSE",