Skip to content

chore: add S3EC .NET v2 and v3 test server#7

Merged
rishav-karanjit merged 37 commits into
fireegg-test-serversfrom
rishav/dotnet/testserver
Sep 19, 2025
Merged

chore: add S3EC .NET v2 and v3 test server#7
rishav-karanjit merged 37 commits into
fireegg-test-serversfrom
rishav/dotnet/testserver

Conversation

@rishav-karanjit

@rishav-karanjit rishav-karanjit commented Sep 17, 2025

Copy link
Copy Markdown
Member

Issue #, if available:

Description of changes:
Adds dotnet test sever implementation.

Call out
.NET also does not have a way to send EC on encrypt/decrypt path but the tests are configured to send it only on encrypt/decrypt path. So, following tests are skipped:

  • crossLanguageTestKmsWithSubsetEncCtxFails on both encrypt and decrypt path of .NET:

    • On encrypt path because EC is not send on each encrypt request
    • On decrypt path because .NET fetches EC from stored meta data. So, these failure is not expected in .NET.
  • crossLanguageTestKmsWithEncCtx on encrypt path of .NET:

    • .NET does not send EC on encrypt.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rishav-karanjit rishav-karanjit changed the title docs dotnet test server Sep 17, 2025
@rishav-karanjit rishav-karanjit changed the title dotnet test server chore: dotnet test server Sep 18, 2025
@rishav-karanjit rishav-karanjit marked this pull request as ready for review September 18, 2025 23:05
@rishav-karanjit rishav-karanjit changed the title chore: dotnet test server chore: add S3EC .NET v2 and v3 test server Sep 18, 2025

@texastony texastony left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Going to try and call @rishav-karanjit today, I have a few questions.

Comment thread test-server/net-v2-v3-server/Controllers/ObjectController.cs
Comment thread test-server/net-v2-v3-server/Controllers/ObjectController.cs
Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com>

@texastony texastony left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requested Change: Make ClientRequest.cs appear exactly like the Smithy Model for the test service.
This should be a very small change.

@texastony

Copy link
Copy Markdown

Issue #, if available:

Description of changes:
Adds dotnet test sever implementation.

Revising the call out

.NET also does not have a way to send EC on encrypt/decrypt path but the tests are configured > to send it only on encrypt/decrypt path. So, following tests are skipped:

  • crossLanguageTestKmsWithSubsetEncCtxFails on both encrypt and decrypt path of .NET:
    • On encrypt path because EC is not send on each encrypt request
    • On decrypt path because .NET fetches EC from stored meta data. So, these failure is not expected in .NET.
  • On encrypt path because EC is not send on each encrypt request

The above is NOT true; S3EC .NET v2 & v3 to send EC on encrypt, but they send the client's EC.
However, S3EC .NET v2 & v3 only considers the "messages" EC on Decrypt; there is no means to specify the EC from the Decrypt request/outside the context of the message.

  • crossLanguageTestKmsWithEncCtx on encrypt path of .NET:
    • .NET does not send EC on encrypt.

This is completely false.
When the customer configures the S3EC .NET, they can specify an EC, and that EC will be used on all Gets.

Testing EC

This PR does not test EC in the S3EC for .NET v2 & v3 at all.
The current conclusion is that we can add this testing later.
This means this is an incomplete base line with respect to EC and the S3EC .NET.
However, it is a complete base line with respect to Key Commitment and the S3EC in .NET.

var kmsKeyId = request.Config.KeyMaterial.KmsKeyId;
var enableLegacyUnauthenticatedModes = request.Config.EnableLegacyUnauthenticatedModes;
var enableLegacyWrappingAlgorithms = request.Config.EnableLegacyWrappingAlgorithms;
var encryptionContext = request.Config.EncryptionContext;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
var encryptionContext = request.Config.EncryptionContext;


public class ClientConfig
{
public Dictionary<string, string> EncryptionContext { get; set; } = new();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
public Dictionary<string, string> EncryptionContext { get; set; } = new();

Comment thread test-server/net-v2-v3-server/Controllers/ClientController.cs Outdated
@rishav-karanjit rishav-karanjit merged commit 93bd763 into fireegg-test-servers Sep 19, 2025
2 checks passed
@rishav-karanjit rishav-karanjit deleted the rishav/dotnet/testserver branch September 19, 2025 23:04
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