Repository navigation
ARSN-672: export the destination ARN parser and names - #2745
Open
anurag4DSB wants to merge 2 commits into
Open
anurag4DSB wants to merge 2 commits into
anurag4DSB wants to merge 2 commits into
Conversation
Tenant destination ARNs must have six fields, an empty region, a 12-digit account and a name in the IAM group and policy grammar, 1 to 128 characters. Global ARNs keep being read as today, with any region and any non-empty name. The new module is reachable from models, and the existing models do not change. The tests fail on the base, because the module does not exist yet.
Add models.NotificationDestination, with parseArn, isValidName and isGlobal, so that CloudServer and backbeat read a destination ARN and check a name the same way. The name pattern is the one of Vault's IAM name check. ARN.createFromString and NotificationConfiguration do not change, so no existing caller gets a different answer.
Contributor
Hello anurag4dsb,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development/8.7 #2745 +/- ##
===================================================
+ Coverage 75.39% 75.41% +0.01%
===================================================
Files 226 227 +1
Lines 18634 18656 +22
Branches 3895 3868 -27
===================================================
+ Hits 14049 14069 +20
- Misses 4580 4582 +2
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
anurag4DSB
marked this pull request as ready for review
November 3, 2026 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds one shared helper, models.NotificationDestination (parseArn, isValidName, isGlobal). With it, CloudServer and backbeat read a bucketnotif destination ARN and check a destination name with the same rules, and existing exports keep their behavior.
Intent: why does this change exist?
CloudServer and backbeat must read a bucket notification destination ARN and check a destination name the same way, and Arsenal has neither:
ARN.createFromStringrejectsbucketnotif, and the only check is a private prefix test inNotificationConfiguration.System impact: what's affected, including downstream?
Additive only: one new module and one new export,
models.NotificationDestination, withparseArn,isValidNameandisGlobal.ARN.createFromStringandNotificationConfigurationdo not change, so no component that bumps Arsenal 8.7 gets a different answer.Preserved behavior: what explicitly stays the same?
Every existing export and its answers. A global ARN (empty account) is read as today, with any region and any non-empty name, so stored global ARNs stay valid.
Intended change: what's different after this PR?
A tenant ARN,
arn:scality:bucketnotif::<12-digit account>:<name>, parses to its account and name, with an empty region and a name in Vault's IAM name grammar, 1 to 128 characters. A stored ARN with an account outside those rules returns null: before tenant destinations, readers used only the name field, so how CloudServer and backbeat treat such stored configurations is an open spec question for their tasks.Verification: how do we know this worked, or how would we know if it didn't?
The new spec fails on the test commit and passes with the code; the full unit suite, tsc, lint and the prettier check pass. As on the base,
yarn testexits 1 after the open-handle warning ofrequestUtils.spec.js.