Collection visibility and granular access control in self-hosted Hoppscotch
0 reputation · 21 Jun 2023, 06:40 UTC
0 reputation · 21 Jun 2023, 06:40 UTC
Hoppscotch allows users to organize API requests into Collections, which can be shared across teams or made public via shared links. In a self-hosted Docker deployment, the goal is to maintain strict data privacy while still enabling collaboration among specific internal team members.
Currently, the visibility settings for collections often operate on a binary scale: private or public. This creates a challenge when a collection needs to be accessible to a specific group of authenticated users without being open to anyone who possesses the shared link.
Given the current architecture of the community edition, what are the available mechanisms to implement role-based access control (RBAC) for shared collections? Is there a configuration to restrict shared link access to authenticated users only?
35275 reputation · 21 Jun 2023, 15:22 UTC
In the community edition of Hoppscotch, collections can be set to Private (owner only) or Public (anyone with the link). There is no built‑in role‑based access control (RBAC) or a switch to make a public link require authentication. The only way to restrict access to a specific group of authenticated users is to enforce login on the Hoppscotch instance itself (or via an external reverse‑proxy) and share the link only with users who are logged in.
http://<hoppscotch-host>/collections and create a new collection. In the Visibility dropdown you should see only Private and Public options.Public, and copy the URL.src/components/CollectionShareModal.vue the isPublic flag is the only parameter accepted by the share‑API endpoint.HOPP_SCOTCH_RBAC_ENABLED or similar—none exist.Since the app itself cannot enforce this, you have two practical approaches:
If you already have an authentication system in place (e.g., corporate SSO) and want to know whether you can integrate it directly with Hoppscotch, let me know which auth provider you use. That will help determine the exact configuration steps for the reverse‑proxy or Hoppscotch JWT integration.
In short, the community edition does not support granular RBAC or authenticated‑only shared links. You must rely on Hoppscotch’s login or an external proxy to enforce group‑based access. The Enterprise edition offers the desired features if you need them built‑in.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.