GXS: Fix identity validation regression caused by mandatory admin signature#289
Open
jolavillette wants to merge 1 commit intoRetroShare:masterfrom
Open
GXS: Fix identity validation regression caused by mandatory admin signature#289jolavillette wants to merge 1 commit intoRetroShare:masterfrom
jolavillette wants to merge 1 commit intoRetroShare:masterfrom
Conversation
zapek
suggested changes
Apr 25, 2026
Contributor
zapek
left a comment
There was a problem hiding this comment.
createIdentity() calls createGroup() that calls RsGenExchange::publishGroup() -> publishGrps() -> createGroup() which calls getSignature() generating an... admin signature.
Also Cyril's GXS paper, section 4.2 Data authentication marks every Group Meta Data + Group Data's admin signature as required. Author signature is optional, which Identity service might use but it certainly doesn't allow to ignore the admin signature.
If there are validation errors, it means the validation works perfectly as expected and those identities are broken.
Contributor
|
I agree with Zapek. After looking into the code it appears that:
|
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.
GXS: Fix identity validation regression caused by mandatory admin signature
by Gemini under supervision
Report: GXS Identity Resolution Failure ("Not found" bug)
Problem Description
New GXS identities (usernames) were failing to resolve in chat lobbies, leaving users stuck with a permanent "Not found" status for their new friends. Despite the network correctly delivering the identity profile packets, the receiver was silently discarding them. Log analysis revealed that the profiles were being rejected during the validation phase with a "Wrong Signature" error, even when the identity owner's signature was perfectly valid.
Root Cause (Bug Origin)
The issue is a recent regression introduced in commit d82c7b5 (dated April 12, 2026).
The goal of that commit was to improve GXS security by enforcing an Administrator Signature check for every new group received, preventing the system from accepting unverified data (e.g., a forum created without any signature).
However, the change was too broad: it applied this "Admin Signature" requirement to the GXSID service (Personal Identities). Unlike Forums or Channels, a personal identity profile does not have a separate administrator role or an "Admin Signature"—it only relies on the Author's signature. By mandating an Admin Signature for profiles, the commit effectively made it impossible for any new identity to pass validation.
Implemented Solution
The fix involves a surgical modification of the validation logic in libretroshare/src/gxs/rsgenexchange.cc.
Instead of reverting the entire security improvement, we introduced a specific exception for the Identity service. In the validateGrp function, the code now checks if the service type is RS_SERVICE_GXS_TYPE_GXSID.
If the service is an Identity AND the Author's signature is valid, the function returns VALIDATE_SUCCESS immediately.
The redundant (and failing) Administrator Signature check is bypassed only for identities.
Conclusion
This solution is optimal because it:
Restores Identity Resolution: Friends' names now appear correctly as soon as their profile is received.
Preserves Security: The security measures introduced by David Gerber remain active for all other GXS services (Forums, Channels, etc.), protecting them against spoofing.
Minimal Footprint: It is a 2-line logic fix that avoids broader architectural changes.