Skip to content

fix(server): answer the account of a BackupArn before its shape - #1358

Open
LeeroyHannigan wants to merge 9 commits into
fix/1271-restore-check-orderfrom
fix/1354-backup-arn-account
Open

LeeroyHannigan wants to merge 9 commits into
fix/1271-restore-check-orderfrom
fix/1354-backup-arn-account

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

The branch is at 7de94a14a4. These commits sit on f85a4b050, the head that the review of 2 Dec 2026 read:

  • dca0b9cf0 merges fix(engine): check a restore's override values in DynamoDB's order #1353 at cfab9313c, which holds main and fix(engine): answer a missing or malformed BackupArn as DynamoDB does #1327's head of 25 Nov. The conflicts:
  • 15c6e0994: the cross-account refusal no longer checks the table segment of a BackupArn. In an account that the catalog holds, a backup ARN with a table segment outside the pattern now gets ValidationException with the owner-only text. DynamoDB gives that answer for an account that exists (measured on 25 November and 3 December 2026). Before, it got Invalid Backup ARN.
  • ad2276afa: the comment above the wire table of the account rows names the cells measured on 25 November 2026. It also says that the denied rows name an account that does not exist.
  • 31f083682 and 3668aaa3d: the table of the checks that the WebAssembly build does not make, docs/differences-from-dynamodb.md and docs/dynamodb-limits.md state the account answers of this PR. The refusal of DescribeBackup and DeleteBackup before any policy is for a BackupArn of the caller's account. The docs of check_backup_arn_account and of the name gate say that the measurement of 22 November 2026 used an account that does not exist. They also say that the check reads no catalog.
  • 26bec30a68 merges fix(engine): check a restore's override values in DynamoDB's order #1353 at 9a7483aa04, which holds fix(engine): answer a missing or malformed BackupArn as DynamoDB does #1327's pushed head and main of 2 Dec. One conflict was the WebAssembly section of README.md, which docs(readme): lead with a first request, move WebAssembly to its own page #1521 moved to docs/webassembly.md on main. The merge makes this PR's row changes there. The other was the table of malformed ARNs in crates/engine/src/backup/tests.rs, where the merge keeps the account rows of this PR and the mixed-case id of fix(engine): answer a missing or malformed BackupArn as DynamoDB does #1327.
  • 6c53ce3774: check_backup_arn_account reads the account from the BackupArn as sent, as DynamoDB does (measured on 3 December 2026). Before, it read the trimmed value. The gate table, the engine table of malformed ARNs and _BACKUP_ARN_ACCOUNT_ROWS get two rows each: a leading space, and a resource of only a newline. The BackupArn rows of the two docs files say that the account check reads the value as sent.
  • 7de94a14a4: the BackupArn row of docs/differences-from-dynamodb.md gives the service's answer for another account's backup ARN with a leading space or tab.
  • The description limits the Access is denied sentence to an account that does not exist, and says when a restore checks the account. It gives the conflicts and the test runs at the new head.

What

DescribeBackup, DeleteBackup and RestoreTableFromBackup now answer the account of a BackupArn before any other check of it, as DynamoDB does. A restore of an ARN that is not a table/ resource checks the account after the IAM decision. The cross-account refusal does not read such an ARN.

  • An ARN of six fields with a non-empty resource, whose account field names an account that this deployment's catalog does not hold, gets AccessDeniedException with Access is denied. An empty account field counts as another account. DynamoDB gives that answer for an account that does not exist (measured on 22 November 2026). There, the partition, the service, the region, the resource and the table segment do not change it.
  • In an account that the catalog holds, a backup ARN gets ValidationException with This action is only supported by accounts that match the resource owner’s account., whatever its table segment.
  • An ARN of fewer fields, or with an empty resource, gets ValidationException with Invalid Backup ARN. So does the caller's own backup ARN with a table segment outside the pattern.
  • The account check reads the value as sent. An ARN with a leading space gets Invalid Backup ARN, and a resource that is only a newline is not empty.

Before this change:

  • DescribeBackup and DeleteBackup answered Invalid Backup ARN to an ARN of another account that is not a backup ARN, such as arn:aws:dynamodb:us-east-1:000000000000:x or an S3 bucket ARN. authz_resource::validate_operation_arns gave that answer before authorization.
  • The three operations answered Invalid Backup ARN to a backup ARN of another account whose table segment is outside the pattern. The name gate gave that answer.
  • RestoreTableFromBackup answered Access is denied to an ARN of another account with an empty resource, arn:aws:dynamodb:us-east-1:000000000000:.

The changes:

  • check_backup_arn_account in crates/engine/src/backup.rs holds the account comparison of backup_arn_member, and it requires a non-empty resource. The engine runs it before it resolves a BackupArn.
  • In the name gate (crates/server/src/table_name_gate.rs), a BackupArn that the cross-account refusal reads goes whole to that refusal, for the three operations. For the other ARNs, DescribeBackup and DeleteBackup run the account check and then the table segment check, before authorization. RestoreTableFromBackup runs only the table segment check there. Its account check stays in the engine, after authorization, as on fix(engine): check a restore's override values in DynamoDB's order #1353.
  • The cross-account refusal (crates/server/src/authz_resource/cross_account.rs) checks no table segment. Its module doc gives the measured answers to a backup ARN with a table segment outside the pattern, and its unit test checks them.
  • The table in docs/webassembly.md of the checks that the WebAssembly build does not make, docs/differences-from-dynamodb.md and docs/dynamodb-limits.md give these answers.

The base of this PR is #1353.

Why

These are DynamoDB's answers, measured in us-east-1 on 22 November 2026 with signed requests. Each request went out twice and got the same answer both times. No backup exists. <caller> is the account of the credentials, and 000000000000 is another account. <name> is a table name in the pattern, and <id> is 01700000000000-abcdef12. AD is AccessDeniedException, Access is denied. IBA is ValidationException, Invalid Backup ARN.

BackupArn Operation DynamoDB ExtendDB on #1353 ExtendDB with this PR
arn:aws:dynamodb:us-east-1:000000000000:x DescribeBackup, DeleteBackup AD IBA AD
arn:aws:s3:::<bucket> DescribeBackup, DeleteBackup AD IBA AD
arn:aws:dynamodb:us-east-1::x DescribeBackup, DeleteBackup AD IBA AD
arn:aws:iam::000000000000:role/x DescribeBackup, DeleteBackup AD IBA AD
arn:aws:dynamodb:us-west-2:000000000000:x DescribeBackup AD IBA AD
arn:aws-cn:dynamodb:cn-north-1:000000000000:x DescribeBackup AD IBA AD
arn:aws:dynamodb:us-east-1:000000000000:table/a b/backup/<id> DescribeBackup, DeleteBackup, RestoreTableFromBackup AD IBA AD
arn:aws:dynamodb:us-east-1:000000000000: RestoreTableFromBackup IBA AD IBA
arn:aws:dynamodb:us-east-1:000000000000:table/<name> DescribeBackup, DeleteBackup AD AD AD
arn:aws:dynamodb:us-east-1:000000000000:table/<name>/backup/<id> DescribeBackup AD AD AD
the same with a table segment of 300 t DescribeBackup AD AD AD
arn:aws:dynamodb:us-east-1::x RestoreTableFromBackup AD AD AD
arn:aws:dynamodb:us-east-1:<caller>:table/a b/backup/<id> DescribeBackup IBA IBA IBA
arn:aws:dynamodb:us-east-1:<caller>:x DescribeBackup IBA IBA IBA
arn:aws:dynamodb:us-east-1:<caller>:table/<name> DescribeBackup IBA IBA IBA
arn:aws:dynamodb:us-east-1:000000000000 DescribeBackup, RestoreTableFromBackup IBA IBA IBA
arn:aws:dynamodb:us-east-1:000000000000: DescribeBackup IBA IBA IBA
x and arn:aws DescribeBackup IBA IBA IBA

With this PR, the 27 requests get DynamoDB's type name and message, where 13 did on #1353. The 33 earlier rows of #1272 and #1271 that name a BackupArn of another account get the same answers as on #1353. One of them differs from DynamoDB on both trees: a ListBackups ExclusiveStartBackupArn with an empty account field gets Invalid Backup ARN, where DynamoDB answers Invalid Request: The supplied ExclusiveStartBackupArn is not a valid backup arn. #1373 gives that cursor the service's text.

On 25 November 2026 the same kind of requests went out with an account that exists, in the same way. <account> is that account, and OWNER is ValidationException with the owner-only text. In ExtendDB, <account> is an account that the catalog holds. The #1353 column of these rows comes from its code. On 3 December 2026 DescribeBackup got OWNER again for the x row and for the table segment a b.

BackupArn Operation DynamoDB ExtendDB on #1353 ExtendDB with this PR
arn:aws:dynamodb:us-east-1:<account>:table/<name>/backup/<id> DescribeBackup OWNER OWNER OWNER
arn:aws:dynamodb:us-east-1:<account>:table/a b/backup/<id> DescribeBackup, RestoreTableFromBackup OWNER IBA OWNER
arn:aws:dynamodb:us-east-1:<account>:x DescribeBackup, DeleteBackup OWNER IBA AD
arn:aws:dynamodb:us-east-1:<account>:x RestoreTableFromBackup OWNER AD AD

On 3 December 2026 these went out with whitespace, in the same way, with <id> as 01791976431438-73d8d5bc:

BackupArn Operation DynamoDB ExtendDB with this PR
a space, then arn:aws:dynamodb:us-east-1:000000000000:x DescribeBackup, DeleteBackup, RestoreTableFromBackup IBA IBA
arn:aws:dynamodb:us-east-1:000000000000: and a newline DescribeBackup, DeleteBackup, RestoreTableFromBackup AD AD
a tab, then arn:aws:dynamodb:us-east-1:000000000000:table/t367name/backup/<id> DescribeBackup IBA AD

A restore can come from a caller that the IAM decision denies, with a BackupArn of another account that the cross-account refusal does not read. Such a restore gets the IAM denial, as on #1353. DynamoDB's order of these two answers is not measured.

Fixes #1354

Testing done

At 7de94a14a4, each cargo command with --locked:

  • cargo +1.97.0 test -p extenddb-core -p extenddb-engine -p extenddb-server --lib --no-fail-fast: core 1260 passed and 1 ignored, engine 982 passed, server 524 passed. On this host 5 backup_store::tests of the server fail on every branch, main included, because another user owns /local/home.
  • cargo +1.97.0 clippy of the core, engine, server and storage crates with --all-targets -- -D warnings, the same command with --features extenddb-engine/backup-test-hooks, cargo +1.94.0 check of the four crates with --all-targets, and cargo +1.97.0 fmt --all -- --check are clean.
  • cargo +1.97.0 test -p extenddb-wasm-adapter: the 3 unit tests pass, and the parity test passes all 281 cases of the corpus. The clippy step of the WebAssembly workflow is clean.
  • Against ExtendDB on SQLite built from this head: tests/test_backup_restore_fidelity.py 56 passed, with the 17 rows of test_backup_arn_account_is_checked_before_its_shape, and tests/test_authz_cross_account.py 19 passed. pytest --collect-only -q collects tests/ and tests/python with no error. The three operations got the answers of the tables above for the resources x, table/a b/backup/<id> and table/<name>/backup/<id>. They did so in an account that the catalog holds and in one that it does not hold.
  • Control on 6c53ce3774: with the trimmed read put back in check_backup_arn_account, the engine test of malformed ARNs and the gate test a_backup_arn_of_another_account_is_refused_before_its_shape fail at the new rows.
  • On the merge dca0b9cf0, the cross-account test with its new expectation ran with the segment check still in place. It failed at the backup ARN with the table segment a b in an account that the catalog holds. It got Invalid Backup ARN, where it expects the owner-only text.
  • On f85a4b050, against ExtendDB on SQLite (a release build), the 27 requests and the 33 earlier rows got the answers above. With a caller that the IAM decision denies, the restore of arn:aws:s3:::<bucket> with a valid target got the IAM denial.

Line counts at 7de94a14a4, against #1353's head 9a7483aa04: production +65 -20, tests +253 -1, docs +6 -6. The test files, the parity corpus and the lines after #[cfg(test)] and mod tests count as tests, and .md files as docs.

git merge-tree shows no conflict with main at c8e66fb568. This PR adds no conflict with any of the 106 open PRs that change the files of this stack.

Not in this PR:

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

ADR / RFC: n/a

Breaking changes

DescribeBackup and DeleteBackup answer an ARN of another account whose resource is not a table/... resource, such as arn:aws:dynamodb:us-east-1:000000000000:x, with AccessDeniedException Access is denied. Before, they answered Invalid Backup ARN. On the three operations, a backup ARN of another account with a table segment outside the pattern gets the answer for another account. Before, it got Invalid Backup ARN. A restore of an ARN of another account with an empty resource gets Invalid Backup ARN, where it got Access is denied. The account check reads the value as sent, so an ARN of another account whose resource is only a newline gets Access is denied. A client that matches on the old texts sees the new ones. A BackupArn of the caller's account gets the same answer as before.


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

DescribeBackup and DeleteBackup answered a BackupArn of another account
that is not a backup ARN, such as arn:aws:dynamodb:us-east-1:000000000000:x
or arn:aws:s3:::bucket, with ValidationException "Invalid Backup ARN".
The answer came from the shape check before authorization, which the
account check of the engine never reached. The three operations gave the
same answer, from the name gate, to a backup ARN of another account whose
table segment is outside the pattern. RestoreTableFromBackup answered a
BackupArn of another account with an empty resource,
arn:aws:dynamodb:us-east-1:000000000000:, with AccessDeniedException.

DynamoDB answers the account of a BackupArn before anything else about
it. An ARN of six fields with a non-empty resource whose account field
is not the caller's, an empty account included, gets AccessDeniedException
"Access is denied". Its partition, service, region, resource and table
segment do not change that answer. An ARN of fewer fields, or with an
empty resource, gets ValidationException "Invalid Backup ARN". So does
the caller's own backup ARN with a table segment outside the pattern.
Measured in us-east-1 on 22 Nov 2026 with DescribeBackup, DeleteBackup
and RestoreTableFromBackup.

The account comparison of the engine moves into check_backup_arn_account
and now requires a non-empty resource. The engine runs it before it
resolves a BackupArn, as before. For the three operations, the name gate
of the server leaves a BackupArn that the cross-account refusal reads
whole to that refusal. The refusal answers it by whether the account
exists. The gate runs the table segment check on the others. For
DescribeBackup and DeleteBackup the gate runs the account check before
authorization, ahead of the table segment check. RestoreTableFromBackup
keeps its account check in the engine, after authorization, and in the
gate for a target name the gate refuses, as before. The refusal checks
the table segment of a BackupArn in an account the catalog holds, as the
gate did for every account.

Fixes #1354.
The new head of fix/1271-restore-check-order holds main and the new
head of fix/1272-invalid-backup-arn.

Conflicts:

- backup.rs: backup_arn_member. This branch moved the account check to
  check_backup_arn_account. fix/1272-invalid-backup-arn reads the
  fields of the ARN once, for the account check and for the partition
  of an upper-case backup id. The merge keeps the move and the fields,
  which the partition check reads.
- lib.rs: the pub use backup::{...} list. The merge keeps the new list
  of fix/1271-restore-check-order and adds check_backup_arn_account to
  it.
- table_name_gate.rs: this branch adds a test for a BackupArn of
  another account. The test comes before the test for a member of
  another JSON type, whose doc fix/1263-backup-arn-type changed. The
  merge keeps both.
For an account that the catalog holds, the cross-account refusal checked
the table segment of a BackupArn. It answered a segment outside the
pattern with ValidationException "Invalid Backup ARN" on DescribeBackup,
DeleteBackup and RestoreTableFromBackup. DynamoDB answers such an ARN
with the owner-only ValidationException for an account that exists.
Measured in us-east-1 on 25 Nov 2026 with DescribeBackup and
RestoreTableFromBackup, each request twice.

The refusal no longer checks the segment, so the ARN gets the owner-only
text, as a backup ARN with a valid segment does. The module doc gives
both measured answers. The unit test of the shape checks now expects the
owner-only text for the segment in an account that the catalog holds.
With the segment check put back, the test fails at that row.
Each row of the account table goes to DescribeBackup, DeleteBackup and
RestoreTableFromBackup. The comment above it now names the cells measured
on DynamoDB on 25 Nov 2026:

- RestoreTableFromBackup for the us-west-2, aws-cn and 300-character
  rows, arn:aws and the caller's a b segment.
- DeleteBackup for the us-west-2 row, the caller's a b segment and the
  empty resource.

Each answer matched its row. The comment also states that the other
account of the denied rows does not exist. DynamoDB answers an account
that exists with the owner-only ValidationException.
The README table of the checks that the WebAssembly build does not
make, docs/differences-from-dynamodb.md and docs/dynamodb-limits.md
gave the answers from before this branch. They said that the server
answers Invalid Backup ARN to a backup ARN of another account with a
table segment outside the pattern. They also said that DescribeBackup
and DeleteBackup give that text to an ARN of another account that is
not a backup or table ARN.

They now give the answers of this branch. A backup ARN of another
account gets the answer for another account, whatever its table
segment. Other ARNs of six fields with a non-empty resource and
another account get "Access is denied". That answer covers an account
that the catalog holds too.

DynamoDB answers such an ARN with the owner-only ValidationException
for an account that exists, measured on 25 Nov 2026. The two docs
files name that difference. The docs of check_backup_arn_account and
of the name gate now say that their measurement of 22 Nov 2026 used an
account that does not exist. They also say that the check reads no
catalog.
The account sentences that the last commit added to the BackupArn rows
of docs/differences-from-dynamodb.md and docs/dynamodb-limits.md had up
to 48 words. They now have 25 words or fewer each, with the same facts.
@navareamol navareamol self-assigned this Dec 2, 2026

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is not on top of the current head of its base. #1353 and this PR contain only the first commit of #1327 (8da64f4). #1327 is now at 2fda6a9, 58 commits further. A merge of this head with it conflicts in crates/engine/src/backup.rs, crates/engine/src/backup_requests/pitr.rs, crates/engine/src/lib.rs and crates/server/src/table_name_gate.rs, and #1353 conflicts with #1327 in the same four files. Against main the merge conflicts in backup.rs and lib.rs, so "git merge-tree shows no conflict with main" no longer holds (main changed under the old branch). The CI run is from 22 Nov on that older stack, and main now has workflows that never ran on this code. I think #1353 has to be rebased first and this PR on top of it, with CI rerun and the 17 wire rows rerun on that tree.

Your table measures 000000000000 only. I sent the same shapes to a second account that the catalog holds. ...:<other>:x gets "Access is denied", a table shaped ARN of any partition, service or region gets the owner only text, a table segment a b gets "Invalid Backup ARN" (the derived row you flag), and an empty region on DescribeBackup and DeleteBackup gets "Invalid Backup ARN" while a restore gets the owner only text. So "The partition, the service, the region, the resource and the table segment do not change the answer" holds for an account that does not exist, and I do not think it holds for one that does. Was DynamoDB sent an x ARN, or a segment outside the pattern, in an account that exists? If not, I would narrow that sentence to the account you measured.

docs/differences-from-dynamodb.md line 125 says DescribeBackup and DeleteBackup answer "Invalid Backup ARN" before any policy for a BackupArn that does not parse as a backup ARN. On this head an S3 ARN, or arn:aws:dynamodb:us-east-1:<other>:x, gets "Access is denied". I think the row needs the account rule.

Control check: if I change fields(trimmed) to fields(backup_arn) in check_backup_arn_account, every unit and gate test still passes. No row sends another account's six field ARN with leading whitespace, or a resource of only whitespace such as arn:aws:dynamodb:us-east-1:000000000000:\n. This head answers both correctly (I ran 400000 mutated ARNs against the rule in the description). A row for each in the gate table would pin the trim.

A caller with no IAM policy who restores arn:aws:s3:::bucket, x or arn:aws:dynamodb:us-east-1:<other>:x gets the IAM denial, where DescribeBackup and DeleteBackup get "Access is denied". You say that order is not measured. The first paragraph of the description reads as if all three operations answer the account first, so I would say there that a restore does it after the IAM decision for ARNs that are not table/ resources.

I checked that a caller of another account cannot tell a real backup from a missing one on any of the three operations (528 pairs over 22 spellings), and that unsigned or wrongly signed requests get the authentication error first. I found nothing to change there.

I will approve once the branch is rebased on the rebased #1353 with CI green, the account sentence is limited to what was measured, and the docs row and the trim rows are added.

The new head of fix/1271-restore-check-order holds the new head of
fix/1272-invalid-backup-arn and main of 2 Dec. On main, #1521 moved the
WebAssembly section of README.md to docs/webassembly.md.

Conflicts:

- README.md: the WebAssembly section. This branch changed two
  BackupArn kind rows of its table of checks, and the paragraph above
  the table. The merge takes the README
  of fix/1271-restore-check-order. It makes the same changes in
  docs/webassembly.md.
- backup/tests.rs: the table of malformed ARNs. This branch added the
  account rows, and fix/1272-invalid-backup-arn added an id in mixed
  case after the upper-case id. The merge keeps both.
check_backup_arn_account trimmed the BackupArn before it read its
account. DynamoDB reads the account from the value as sent. On 3 Dec
2026 it answered these on DescribeBackup, DeleteBackup and
RestoreTableFromBackup, each request sent twice:

- " arn:aws:dynamodb:us-east-1:000000000000:x", with a leading space,
  gets "Invalid Backup ARN". This branch answered "Access is denied".
- "arn:aws:dynamodb:us-east-1:000000000000:" and a newline gets "Access
  is denied". This branch trimmed the newline, saw an empty resource and
  answered "Invalid Backup ARN".

The check now reads the member untrimmed. The shape check and the
lookup still trim it. The gate table, the engine table of malformed ARNs
and _BACKUP_ARN_ACCOUNT_ROWS get a row for each. The docs rows of
BackupArn say that the account check reads the value as sent.

Authorization still reads a BackupArn trimmed. So another account's
backup ARN with a leading space or tab gets "Access is denied", where
DynamoDB answers "Invalid Backup ARN". Main answers it the same way.
The BackupArn row named an issue number that does not exist yet for a
backup ARN of another account with a leading space or tab. The row now
gives the service's answer for it instead, "Invalid Backup ARN".
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

  1. The branch takes the new head of fix(engine): check a restore's override values in DynamoDB's order #1353 with a merge: dca0b9cf02 merged fix(engine): check a restore's override values in DynamoDB's order #1353 at cfab9313cd, and 26bec30a68 merges fix(engine): check a restore's override values in DynamoDB's order #1353 at 9a7483aa04, which holds fix(engine): answer a missing or malformed BackupArn as DynamoDB does #1327's pushed head. The conflicts were the WebAssembly rows of README.md, which go to docs/webassembly.md as on main. The table of malformed ARNs in crates/engine/src/backup/tests.rs conflicted too, and the merge keeps the rows of both sides. git merge-tree of the new head 7de94a14a4 with main at c8e66fb568 shows no conflict. CI runs when the branch is pushed. Before the push, tests/test_backup_restore_fidelity.py, with the 17 account rows, ran against SQLite at 7de94a14a4: 56 passed, and tests/test_authz_cross_account.py 19 passed.
  2. Yes, for an account that exists. DynamoDB answers This action is only supported by accounts that match the resource owner’s account. to arn:aws:dynamodb:us-east-1:<account>:x on the three operations (25 Nov 2026) and on DescribeBackup again on 3 Dec 2026. The same text answers a backup ARN with a table segment outside the pattern. DescribeBackup and RestoreTableFromBackup gave it on 25 Nov, and DescribeBackup gave it for a b on 3 Dec. The description now limits the Access is denied sentence to an account that does not exist, and gives the owner-only text for an account that exists. ExtendDB still answers Access is denied to the x shape in an account that the catalog holds. A BackupArn of an account the catalog holds that is not a table resource gets Access is denied, where DynamoDB answers the owner-only text #1555 tracks that.
  3. 31f083682b and 3668aaa3da changed the BackupArn row of docs/differences-from-dynamodb.md. The refusal before any policy is now for a BackupArn of the caller's account. The row gives the account answers for an account that does not exist and for one that exists, and names the x difference.
  4. I measured both shapes on DynamoDB on 3 Dec 2026, on the three operations, each request twice. The service reads the account as sent. " arn:aws:dynamodb:us-east-1:000000000000:x" with a leading space gets Invalid Backup ARN, and "arn:aws:dynamodb:us-east-1:000000000000:\n" gets Access is denied. The trimmed read answered them the other way round. 6c53ce3774 reads the account from the value as sent, with fields(backup_arn). It adds both rows to the gate table, to the engine table of malformed ARNs and to _BACKUP_ARN_ACCOUNT_ROWS. With the trimmed read put back, the engine row and the gate row fail. Authorization still reads a backup ARN through trim_backup_arn, as on main. So another account's backup ARN with a leading tab gets Access is denied, where DynamoDB answers Invalid Backup ARN (3 Dec 2026). fix(backup): strip only one trailing line terminator from a backup ARN #1328, which fixes BackupArn with leading or trailing whitespace resolves; DynamoDB accepts only one trailing line terminator #617, changes trim_backup_arn to strip one trailing line terminator only. Authorization then reads the value with its leading tab, which does not parse as an ARN.
  5. The first paragraph of the description now covers the restore. For an ARN that is not a table/ resource, a restore answers the account after the IAM decision.

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.

2 participants