basedosdados / backend

Backend da BD
https://backend.basedosdados.org/graphql
GNU General Public License v3.0
8 stars 1 forks source link

fix: add subscription member decorator for GraphQL que… #623

Closed jhonylucas74 closed 2 months ago

jhonylucas74 commented 2 months ago

Purpose

Increase the info security of GraphQL to sensitive data.

Description

This change aims to modify how the subscriptions in GraphQL are exposed to the public. After these changes, the allSubscription query from GraphQL will check if the user is authenticated. We have 4 main changes here:

Checklist

Testing and evidence

User accessing their own subscription data: https://github.com/basedosdados/backend/assets/5381250/fe921aee-9df5-4ab1-b6b1-61ef371c283e

User accessing others' subscription data: https://github.com/basedosdados/backend/assets/5381250/842f2350-534d-4559-98c7-e7f12cdf5e21

Not logged-in user trying to access subscription data: https://github.com/basedosdados/backend/assets/5381250/4e285c97-7212-4879-a127-f1b5d0b974ba