@openhi/constructs 0.0.146 → 0.0.148

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/lib/index.d.mts CHANGED
@@ -1645,9 +1645,14 @@ declare class OpenHiAuthService extends OpenHiService {
1645
1645
  protected createUserPool(): IUserPool;
1646
1646
  /**
1647
1647
  * Grants the Pre Token Generation Lambda read-only access on the data
1648
- * store table and its GSIs. The Lambda only needs:
1648
+ * store table and its GSIs. The Lambda needs:
1649
1649
  * - `Query` on GSI2 to resolve a User by Cognito `sub`
1650
- * - `GetItem` on the base table for direct User reads
1650
+ * - `GetItem` on the base table for direct User reads (canonical row hydration
1651
+ * after the GSI2 hit, per #1175)
1652
+ * - `BatchGetItem` on the base table for ElectroDB `batchGetWithRetry`
1653
+ * hydration used by `listMembershipsOperation` and
1654
+ * `listRoleAssignmentsOperation` when resolving the
1655
+ * `ohi_organization_roles` / `ohi_platform_roles` claims
1651
1656
  *
1652
1657
  * No write or scan access: a User missing `currentTenant`/`currentWorkspace`
1653
1658
  * falls into the absent-claims path; repair belongs in a separate backfill.
package/lib/index.d.ts CHANGED
@@ -2311,9 +2311,14 @@ declare class OpenHiAuthService extends OpenHiService {
2311
2311
  protected createUserPool(): IUserPool;
2312
2312
  /**
2313
2313
  * Grants the Pre Token Generation Lambda read-only access on the data
2314
- * store table and its GSIs. The Lambda only needs:
2314
+ * store table and its GSIs. The Lambda needs:
2315
2315
  * - `Query` on GSI2 to resolve a User by Cognito `sub`
2316
- * - `GetItem` on the base table for direct User reads
2316
+ * - `GetItem` on the base table for direct User reads (canonical row hydration
2317
+ * after the GSI2 hit, per #1175)
2318
+ * - `BatchGetItem` on the base table for ElectroDB `batchGetWithRetry`
2319
+ * hydration used by `listMembershipsOperation` and
2320
+ * `listRoleAssignmentsOperation` when resolving the
2321
+ * `ohi_organization_roles` / `ohi_platform_roles` claims
2317
2322
  *
2318
2323
  * No write or scan access: a User missing `currentTenant`/`currentWorkspace`
2319
2324
  * falls into the absent-claims path; repair belongs in a separate backfill.
package/lib/index.js CHANGED
@@ -7860,16 +7860,25 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
7860
7860
  }
7861
7861
  /**
7862
7862
  * Grants the Pre Token Generation Lambda read-only access on the data
7863
- * store table and its GSIs. The Lambda only needs:
7863
+ * store table and its GSIs. The Lambda needs:
7864
7864
  * - `Query` on GSI2 to resolve a User by Cognito `sub`
7865
- * - `GetItem` on the base table for direct User reads
7865
+ * - `GetItem` on the base table for direct User reads (canonical row hydration
7866
+ * after the GSI2 hit, per #1175)
7867
+ * - `BatchGetItem` on the base table for ElectroDB `batchGetWithRetry`
7868
+ * hydration used by `listMembershipsOperation` and
7869
+ * `listRoleAssignmentsOperation` when resolving the
7870
+ * `ohi_organization_roles` / `ohi_platform_roles` claims
7866
7871
  *
7867
7872
  * No write or scan access: a User missing `currentTenant`/`currentWorkspace`
7868
7873
  * falls into the absent-claims path; repair belongs in a separate backfill.
7869
7874
  */
7870
7875
  grantPreTokenGenerationPermissions() {
7871
7876
  const dataStoreTable = this.dataStoreTable();
7872
- const dynamoActions = ["dynamodb:GetItem", "dynamodb:Query"];
7877
+ const dynamoActions = [
7878
+ "dynamodb:GetItem",
7879
+ "dynamodb:Query",
7880
+ "dynamodb:BatchGetItem"
7881
+ ];
7873
7882
  dataStoreTable.grant(this.preTokenGenerationLambda, ...dynamoActions);
7874
7883
  this.preTokenGenerationLambda.addToRolePolicy(
7875
7884
  new import_aws_iam7.PolicyStatement({