Skip to content

RDBC-1085 Check whether the client node converts values in the request to PascalCase when they should not be in PascalCase.#561

Merged
M4xymm merged 1 commit into
ravendb:v7.2from
M4xymm:RDBC-1085
Jul 9, 2026
Merged

RDBC-1085 Check whether the client node converts values in the request to PascalCase when they should not be in PascalCase.#561
M4xymm merged 1 commit into
ravendb:v7.2from
M4xymm:RDBC-1085

Conversation

@M4xymm

@M4xymm M4xymm commented Jul 8, 2026

Copy link
Copy Markdown
Member

Issue link

https://issues.hibernatingrhinos.com/issue/RDBC-1085

Additional description

The command-payload serializer PascalCases the first letter of every object key, including the keys of the certificate permissions map, which are database names. A lowercase name like "lowercase_db" was sent as "Lowercase_db", and since the server matches permission keys case-sensitively, restored permissions no longer lined up with the database name.

Mirror the C# client, which writes these bodies with PascalCased field names but emits each permission key verbatim: serialize Create/Put/Edit client certificate payloads with the casing-preserving serializer and supply already-PascalCased field names.

Type of change

  • Bug fix
  • Regression bug fix
  • Optimization
  • New feature

How risky is the change?

  • Low
  • Moderate
  • High
  • Not relevant

Backward compatibility

  • Non breaking change
  • Ensured. Please explain how has it been implemented?
  • Breaking change
  • Not relevant

Is it platform specific issue?

  • Yes. Please list the affected platforms.
  • No

Documentation update

  • This change requires a documentation update. Please mark the issue on YouTrack using Documentation Required tag.
  • No documentation update is needed

Testing by Contributor

  • Tests have been added that prove the fix is effective or that the feature works
  • Internal classes added to the test class (e.g. entity or index definition classes) have the lowest possible access modifier (preferable private)
  • It has been verified by manual testing
  • Existing tests verify the correct behavior

Testing by RavenDB QA team

  • This change requires a special QA testing due to possible performance or resources usage implications (CPU, memory, IO). Please mark the issue on YouTrack using QA Required tag.
  • No special testing by RavenDB QA team is needed

Is there any existing behavior change of other features due to this change?

  • Yes. Please list the affected features/subsystems and provide appropriate explanation
  • No

UI work

  • It requires further work in the Studio. Please mark the issue on YouTrack using Studio Required tag.
  • No UI work is needed

@M4xymm
M4xymm requested a review from kalczur July 8, 2026 11:48
@M4xymm M4xymm self-assigned this Jul 8, 2026
The client mangled the casing of certificate permission keys, which are
database names, on both the write and read paths:

- Write: the command-payload serializer PascalCases the first letter of every
  object key, so a permission map like {"myDb": ...} was sent as {"MyDb": ...}.
- Read: the certificate read operations deep-camelCase every response key, so
  {"UPPER_db": ...} was read back as {"uPPER_db": ...}.

Because the server matches permission keys case-sensitively, either transform
broke the alignment between a certificate's permissions and the database name.

Write path (Create/Put/Edit client certificate): serialize the payload with the
casing-preserving serializer and already-PascalCased field names, mirroring the
C# client which writes each permission key verbatim.

Read path (Get certificate / certificates, metadata and full definition): all
four operations now camelCase the response through a shared transform that
ignores the `permissions` map keys, mirroring the existing
GetDatabaseRecordOperation handling of arbitrary-keyed maps. The ignore path
matches everything under `permissions` so database names containing '.' are
also preserved. Factored into a shared constant so the four operations can't
drift.
@M4xymm
M4xymm merged commit c45216c into ravendb:v7.2 Jul 9, 2026
9 checks passed
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