Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
The DUM Lambda authorizer (index.js) checks only a single Cognito user group per node ID. The client sends a single UserGroup header value derived from NodeUtil.node_id_to_group_name(), which always returns exactly one group name (e.g. PDS_SBN_USERS).
SBN has two separate organizations (UMD and PSI), each with its own Cognito user group. A user authenticated under PDS_SBN_UMD_USERS attempts to upload with --node sbn, the client sends UserGroup: PDS_SBN_USERS, and the authorizer rejects the request with 401 Unauthorized because the user's actual group (PDS_SBN_UMD_USERS) does not match the single expected group.
🕵️ Expected behavior
A user in any Cognito group associated with the --node sbn flag should be authorized to upload. The system should support a configurable list of permitted groups per node ID and allow access if the user belongs to any of them.
📜 To Reproduce
- Create a Cognito user in group
PDS_SBN_UMD_USERS (not PDS_SBN_USERS)
- Configure a DUM INI file targeting the production environment with
node = sbn
- Run:
pds-ingress-client -c <config> -n sbn -- <path>
- Observe 401 Unauthorized: "You are not authorized to use the ingestion service. Your account may not be in the required user group."
🖥 Environment Info
- Version of this software: v2.6.0-dev
- Operating System: N/A (Lambda authorizer + Python client)
📚 Version of Software Used
v2.6.0-dev
🩺 Test Data / Additional context
Proposed fix (Option A — multi-group support):
node_util.py: Rename node_id_to_group_name → node_id_to_group_names, return a list of permitted group names per node ID. For sbn, return e.g. ["PDS_SBN_USERS", "PDS_SBN_UMD_USERS", "PDS_SBN_PSI_USERS"] (exact names TBD with ops team).
pds_ingress_client.py: Send all group names as a comma-separated UserGroup header value.
authorizer/index.js: Split the UserGroup header on commas, then authorize if the user's cognito:groups intersects with any of the permitted groups.
This is the minimal-impact fix — no changes to node IDs, bucket maps, or Terraform config.
🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
🎉 Integration & Test
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
The DUM Lambda authorizer (
index.js) checks only a single Cognito user group per node ID. The client sends a singleUserGroupheader value derived fromNodeUtil.node_id_to_group_name(), which always returns exactly one group name (e.g.PDS_SBN_USERS).SBN has two separate organizations (UMD and PSI), each with its own Cognito user group. A user authenticated under
PDS_SBN_UMD_USERSattempts to upload with--node sbn, the client sendsUserGroup: PDS_SBN_USERS, and the authorizer rejects the request with 401 Unauthorized because the user's actual group (PDS_SBN_UMD_USERS) does not match the single expected group.🕵️ Expected behavior
A user in any Cognito group associated with the
--node sbnflag should be authorized to upload. The system should support a configurable list of permitted groups per node ID and allow access if the user belongs to any of them.📜 To Reproduce
PDS_SBN_UMD_USERS(notPDS_SBN_USERS)node = sbnpds-ingress-client -c <config> -n sbn -- <path>🖥 Environment Info
📚 Version of Software Used
v2.6.0-dev
🩺 Test Data / Additional context
Proposed fix (Option A — multi-group support):
node_util.py: Renamenode_id_to_group_name→node_id_to_group_names, return alistof permitted group names per node ID. Forsbn, return e.g.["PDS_SBN_USERS", "PDS_SBN_UMD_USERS", "PDS_SBN_PSI_USERS"](exact names TBD with ops team).pds_ingress_client.py: Send all group names as a comma-separatedUserGroupheader value.authorizer/index.js: Split theUserGroupheader on commas, then authorize if the user'scognito:groupsintersects with any of the permitted groups.This is the minimal-impact fix — no changes to node IDs, bucket maps, or Terraform config.
🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
🎉 Integration & Test