Skip to content

CLDSRV-1065: GetNotificationDestination API - #6366

Open
anurag4DSB wants to merge 2 commits into
improvement/CLDSRV-1064-destination-createfrom
improvement/CLDSRV-1065-destination-get
Open

anurag4DSB wants to merge 2 commits into
improvement/CLDSRV-1064-destination-createfrom
improvement/CLDSRV-1065-destination-get

Conversation

@anurag4DSB

@anurag4DSB anurag4DSB commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Spec: https://claude.ai/artifact/QhKsCqtGNzaVice35nvip9#bcc30d01-27db.m1yth80jczv.20396

Intent: why does this change exist?

  • An account needs to read back a destination that it created.

System impact: what's affected, including downstream?

  • The XML element of a record is shared, so that List answers each entry as Get does.

Preserved behavior: what explicitly stays the same?

  • Get never returns a secret: Auth holds only its Type.

Intended change: what's different after this PR?

  • Get answers the record of the requester's account, or 404 for a name of another account.

Verification: how do we know this worked, or how would we know if it didn't?

  • Unit tests run the XML element and the handler on mem.
  • Functional route tests in s3c-ft-tests and file-ft-tests read records through Create.

https://claude.ai/code/session_01LSEjuApZSsJxDp6dw1FhVa

Comment thread lib/notificationDestination/xml.js Resolved
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.19%. Comparing base (aa1abf8) to head (b78b066).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/api.js 93.83% <100.00%> (+0.02%) ⬆️
lib/api/apiUtils/notificationDestination/xml.js 100.00% <100.00%> (ø)
lib/api/notificationDestinationGet.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@@                              Coverage Diff                               @@
##           improvement/CLDSRV-1064-destination-create    #6366      +/-   ##
==============================================================================
+ Coverage                                       88.18%   88.19%   +0.01%     
==============================================================================
  Files                                             212      214       +2     
  Lines                                           14597    14638      +41     
==============================================================================
+ Hits                                            12872    12910      +38     
- Misses                                           1725     1728       +3     
Flag Coverage Δ
checksums-disabled-tests 35.23% <26.82%> (-0.03%) ⬇️
file-ft-tests 71.50% <87.80%> (+0.07%) ⬆️
file-ft-tests-null-compat 71.97% <87.80%> (+0.04%) ⬆️
kmip-ft-tests 28.02% <26.82%> (-0.01%) ⬇️
mongo-v0-ft-tests 70.97% <26.82%> (-0.12%) ⬇️
mongo-v1-ft-tests 70.97% <26.82%> (-0.11%) ⬇️
multiple-backend 35.96% <26.82%> (-0.03%) ⬇️
s3c-ft-tests-v0 66.78% <87.80%> (+0.07%) ⬆️
s3c-ft-tests-v0-null-compat 66.83% <87.80%> (+0.07%) ⬆️
s3c-ft-tests-v1 66.76% <87.80%> (+0.04%) ⬆️
sur-tests 36.50% <26.82%> (+<0.01%) ⬆️
sur-tests-inflights 39.32% <26.82%> (-0.01%) ⬇️
unit 76.19% <100.00%> (+0.06%) ⬆️
utapi-v2-tests 35.18% <26.82%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 1548713 to bdd3517 Compare November 10, 2026 13:56
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 4bc793b to eb5be89 Compare November 10, 2026 15:06
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from bdd3517 to 16111a8 Compare November 10, 2026 15:06
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from eb5be89 to 6c7f664 Compare November 10, 2026 15:22
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 16111a8 to fd93c65 Compare November 10, 2026 15:23
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 6c7f664 to 0a72701 Compare November 12, 2026 09:52
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from fd93c65 to 8503531 Compare November 12, 2026 09:52
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 0a72701 to 04182af Compare November 12, 2026 09:53
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 8503531 to 8f59a89 Compare November 12, 2026 09:53
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 04182af to 19e1e34 Compare November 12, 2026 12:21
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 8f59a89 to be8e241 Compare November 12, 2026 12:21
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 19e1e34 to 99d8b2a Compare November 12, 2026 13:05
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from be8e241 to 713425b Compare November 12, 2026 13:06
@anurag4DSB
anurag4DSB marked this pull request as ready for review November 12, 2026 13:38
@anurag4DSB
anurag4DSB requested review from a team, nicolas2bert and tmacro November 12, 2026 13:38
@anurag4DSB
anurag4DSB marked this pull request as draft November 12, 2026 14:21
@anurag4DSB
anurag4DSB removed request for a team, nicolas2bert and tmacro November 12, 2026 14:21
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from 99d8b2a to f13a1e8 Compare November 12, 2026 14:40
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 713425b to a7b2f42 Compare November 12, 2026 14:40
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from f13a1e8 to a9b8de7 Compare November 12, 2026 15:02
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from a7b2f42 to b604e88 Compare November 12, 2026 15:03
@anurag4DSB
anurag4DSB marked this pull request as ready for review November 12, 2026 15:18
@anurag4DSB
anurag4DSB requested a review from a team November 12, 2026 15:19
Add unit tests for the XML element of a destination record. They
check:

- every field, in order
- brokers in stored order
- every value escaped
- Auth reduced to its Type, for each auth type
- no secret string in the output

Add unit tests for the Get handler on the in-memory backend, with
records that Create stores. They check:

- found, unknown and other account 404
- invalid name with no read
- store and record errors
- no record value in the logs

Add functional tests through Create. They check:

- every field, and no password, client key or key password in the
  body
- brokers in order
- CreatedAt and UpdatedAt in ISO 8601 UTC, to the millisecond
- 404, 400 and anonymous 403
- an IAM user allowed on one destination ARN reads that one only

Each IAM test makes its own IAM user and destinations, with names that
no other test uses, and removes the user when it ends.
- notificationDestinationGet checks the name and reads the record of
  the requester's account. It answers the NotificationDestination XML,
  with Auth reduced to its Type.
- apiUtils/notificationDestination/xml.js builds the element, so that
  List reuses it for each entry.
- The handler reports its call to the Prometheus metrics, as the bucket
  APIs do.
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1064-destination-create branch from a9b8de7 to aa1abf8 Compare November 12, 2026 15:57
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from b604e88 to b78b066 Compare November 12, 2026 15:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant