Skip to content

Hide non-visible operators from public validator endpoints#730

Merged
JoaquinBN merged 2 commits into
devfrom
JoaquinBN/pr-729-security-review
Jun 4, 2026
Merged

Hide non-visible operators from public validator endpoints#730
JoaquinBN merged 2 commits into
devfrom
JoaquinBN/pr-729-security-review

Conversation

@JoaquinBN
Copy link
Copy Markdown
Collaborator

The public Wall of Shame and validator wallet endpoints previously exposed the linked operator's profile identity (name, address, id, avatar) even for users who set their account to non-visible, which contradicted the rest of the API where hidden users are not enumerable. Operator identity is now withheld whenever the linked user is not visible, while the validator still appears identified only by its on-chain operator address, so a misbehaving node cannot disappear by toggling visibility. Two production safeguards are also hardened: session and CSRF cookies are marked Secure outside DEBUG, and the wallet login endpoint no longer echoes raw exception details to clients in production. Adds a regression test covering the hidden-operator case and a CHANGELOG entry.

JoaquinBN added 2 commits June 4, 2026 10:22
The public Wall of Shame and validator wallet endpoints surfaced the
linked operator's profile identity (name, address, id, avatar) even for
users who set their profile to non-visible, which contradicted the rest
of the API where hidden users are not enumerable. Operator identity is
now withheld whenever the linked user is not visible; the validator still
appears, identified only by its on-chain operator address, so a
misbehaving node cannot disappear by toggling visibility. Two production
safeguards are also tightened: session and CSRF cookies are marked Secure
outside DEBUG, and the wallet login endpoint no longer echoes raw
exception details to clients in production.

## Claude Implementation Notes
- backend/validators/serializers.py: Gate operator_user on user.visible in ValidatorWalletSerializer and WallOfShameSerializer.
- backend/validators/views.py: Gate the grouped Wall of Shame _operator_user_payload on user.visible.
- backend/tally/settings.py: Set SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to not DEBUG so cookies are HTTPS-only in production.
- backend/ethereum_auth/views.py: Log the exception and return a generic auth-failure message when DEBUG is off; keep full detail in DEBUG.
- backend/validators/tests/test_grafana_service.py: Add regression test that a non-visible operator's identity is withheld while the validator still appears.
@JoaquinBN JoaquinBN merged commit 20e146e into dev Jun 4, 2026
@JoaquinBN JoaquinBN deleted the JoaquinBN/pr-729-security-review branch June 4, 2026 13:35
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