zrok/assets/js/34e1d3b9.fe72e379.js
2024-03-08 20:49:06 +00:00

1 line
5.6 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1360],{3901:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>a,contentTitle:()=>c,default:()=>l,frontMatter:()=>n,metadata:()=>i,toc:()=>h});var o=r(5893),t=r(1151);const n={sidebar_position:0},c="Private Shares",i={id:"concepts/sharing-private",title:"Private Shares",description:"zrok was built to share and access digital resources. A private share allows a resource to be",source:"@site/../docs/concepts/sharing-private.md",sourceDirName:"concepts",slug:"/concepts/sharing-private",permalink:"/docs/concepts/sharing-private",draft:!1,unlisted:!1,editUrl:"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-private.md",tags:[],version:"current",sidebarPosition:0,frontMatter:{sidebar_position:0},sidebar:"tutorialSidebar",previous:{title:"Concepts",permalink:"/docs/concepts/"},next:{title:"Public Shares",permalink:"/docs/concepts/sharing-public"}},a={},h=[];function d(e){const s={a:"a",code:"code",em:"em",h1:"h1",img:"img",p:"p",...(0,t.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h1,{id:"private-shares",children:"Private Shares"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.code,{children:"zrok"})," was built to share and access digital resources. A ",(0,o.jsx)(s.code,{children:"private"})," share allows a resource to be\naccessed on another user's system as if it were local to them. Privately shared resources can only be accessed by another ",(0,o.jsx)(s.code,{children:"zrok"})," user who has the details of your unique share. You are in control of who can access your ",(0,o.jsx)(s.code,{children:"private"})," shares by sharing the the share token."]}),"\n",(0,o.jsxs)(s.p,{children:["Peer-to-peer private resource sharing is one of the things that makes ",(0,o.jsx)(s.code,{children:"zrok"})," unique."]}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.code,{children:"zrok"})," also provides ",(0,o.jsx)(s.code,{children:"public"})," sharing of resources with non-",(0,o.jsx)(s.code,{children:"zrok"})," users. Public resource sharing is limited to only resources that can be accessed over ",(0,o.jsx)(s.code,{children:"HTTP"})," or ",(0,o.jsx)(s.code,{children:"HTTPS"}),". ",(0,o.jsx)(s.code,{children:"private"})," sharing works with all of the resources types that ",(0,o.jsx)(s.code,{children:"zrok"})," supports."]}),"\n",(0,o.jsx)(s.p,{children:"Here's how private sharing works:"}),"\n",(0,o.jsx)(s.h1,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"zrok_public_share",src:r(4371).Z+"",width:"2200",height:"922"})}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.code,{children:"private"})," shares are accessed using the ",(0,o.jsx)(s.code,{children:"zrok access"})," command, and require the accessing user to have a ",(0,o.jsx)(s.code,{children:"zrok enable"}),"-d account on the same service instance where the share was created."]}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"private"})," share is identified by a ",(0,o.jsx)(s.em,{children:"share token"}),". The accessing user will use the share token, along with the ",(0,o.jsx)(s.code,{children:"zrok access"})," command to create a local endpoint on their system, which lets them use the shared resource as if it were local to their system."]}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.code,{children:"zrok"})," does not require you to open any firewall ports or otherwise compromise the security of your local system; there is never an attack surface open to the public internet. As soon as you terminate the ",(0,o.jsx)(s.code,{children:"zrok share"})," process, you immediately terminate any possible access to your shared resource."]}),"\n",(0,o.jsxs)(s.p,{children:["The shared resource can be a development web server to share with friends and colleagues, a webhook from a server running in the cloud which has ",(0,o.jsx)(s.code,{children:"zrok"})," running and has been instructed to ",(0,o.jsx)(s.code,{children:"access"})," the private resource. ",(0,o.jsx)(s.code,{children:"zrok"})," can also share files, websites, and low-level TCP and UDP network connections using the ",(0,o.jsx)(s.code,{children:"tunnel"})," backend. What matters is that the access to the shared resource is not done in a public way, and can only be accessed by other ",(0,o.jsx)(s.code,{children:"zrok"})," users that have access to your share token."]}),"\n",(0,o.jsxs)(s.p,{children:["The peer-to-peer capabilities of ",(0,o.jsx)(s.code,{children:"zrok"})," are an important property of the underlying ",(0,o.jsx)(s.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"OpenZiti"})," network that ",(0,o.jsx)(s.code,{children:"zrok"})," uses to provide connectivity between users and resources."]}),"\n",(0,o.jsxs)(s.p,{children:["Creating ",(0,o.jsx)(s.code,{children:"private"})," shares is easy and is accomplished using the ",(0,o.jsx)(s.code,{children:"zrok share private"})," command. Run ",(0,o.jsx)(s.code,{children:"zrok share private"})," to see the usage output and to further learn how to use the command."]})]})}function l(e={}){const{wrapper:s}={...(0,t.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},4371:(e,s,r)=>{r.d(s,{Z:()=>o});const o=r.p+"assets/images/zrok_private_share-3b4b2f89f7b5e6704d0b9078a701161e.png"},1151:(e,s,r)=>{r.d(s,{Z:()=>i,a:()=>c});var o=r(7294);const t={},n=o.createContext(t);function c(e){const s=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),o.createElement(n.Provider,{value:s},e.children)}}}]);