Skip to content

CLDSRV-1081: test a destination that an assumed role creates - #6384

Draft
tmacro wants to merge 2 commits into
epic/S3C-10971-bnaas-d1from
improvement/CLDSRV-1081-assumed-role-destination-test
Draft

tmacro wants to merge 2 commits into
epic/S3C-10971-bnaas-d1from
improvement/CLDSRV-1081-assumed-role-destination-test

Conversation

@tmacro

@tmacro tmacro commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

What and why

  • A real-Vault test checks that a destination that an assumed role creates has the account ID that Vault gives, in AccountId and Arn, and that the role policy denies another name. Before, only a unit test with a built identity covered a role session.
  • The IAM user that assumes the role has no policy, because in its own account Vault checks only the trust policy of the role. The account records each name before the role's Create and deletes it after the test.
  • makeRequest passes authCredentials.sessionToken to the Arsenal signer, which sends and signs x-amz-security-token, so the raw-node tests can call with the temporary credentials of a role. A caller with no session token gets the same request as before.
  • The test commit alone fails in s3c-ft-tests on the two new cases only, with InvalidAccessKeyId at the Create: red run. With the token signed, both pass: green run.
  • Links: this change answers the assumed-role point of the review of #6381.

- The spec test list asks for a destination that an assumed role
  creates. Only a unit test with a built identity covers it.
- The new block assumes a role on the real Vault. The role session
  creates the destination that the role policy names, and the Get of
  the account shows the account ID in AccountId and Arn. Vault gives
  the account ID of the session, so that CloudServer does not give
  both sides of the check.
- A second name answers AccessDenied and creates nothing.
- The raw-node client does not send the session token yet, so both
  cases fail on this commit.
- makeRequest gives authCredentials.sessionToken to the Arsenal
  signer. The signer sends x-amz-security-token and signs it, so the
  raw-node tests can call with the temporary credentials of a role.
- A caller with no session token gets the same request as before.
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                    @@
##           epic/S3C-10971-bnaas-d1    #6384   +/-   ##
========================================================
  Coverage                    88.30%   88.30%           
========================================================
  Files                          217      217           
  Lines                        14775    14775           
========================================================
  Hits                         13047    13047           
  Misses                        1728     1728           
Flag Coverage Δ
checksums-disabled-tests 35.08% <ø> (ø)
file-ft-tests 71.64% <ø> (ø)
file-ft-tests-null-compat 72.16% <ø> (ø)
kmip-ft-tests 27.94% <ø> (ø)
mongo-v0-ft-tests 70.47% <ø> (-0.04%) ⬇️
mongo-v1-ft-tests 70.49% <ø> (+<0.01%) ⬆️
multiple-backend 35.80% <ø> (ø)
s3c-ft-tests-v0 66.98% <ø> (ø)
s3c-ft-tests-v0-null-compat 67.03% <ø> (ø)
s3c-ft-tests-v1 66.96% <ø> (ø)
sur-tests 37.20% <ø> (+0.88%) ⬆️
sur-tests-inflights 39.14% <ø> (+0.02%) ⬆️
unit 76.41% <ø> (ø)
utapi-v2-tests 35.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.

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