diff --git a/go.mod b/go.mod index e0fbd4bf73..27896d6e01 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( github.com/blevesearch/bleve/v2 v2.3.10 github.com/coreos/go-oidc v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.6.0 - github.com/cs3org/go-cs3apis v0.0.0-20230516150832-730ac860c71d - github.com/cs3org/reva/v2 v2.16.1-0.20231004143709-c089e31b8175 + github.com/cs3org/go-cs3apis v0.0.0-20230727093620-0f4399be4543 + github.com/cs3org/reva/v2 v2.16.1-0.20231011081722-044d686b88e1 github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/egirna/icap-client v0.1.1 @@ -192,6 +192,9 @@ require ( github.com/go-micro/plugins/v4/events/natsjs v1.2.2-0.20230807070816-bc05fb076ce7 // indirect github.com/go-micro/plugins/v4/store/nats-js v1.1.0 // indirect github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d // indirect + github.com/go-playground/locales v0.13.0 // indirect + github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect @@ -242,6 +245,7 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.17.0 // indirect github.com/klauspost/cpuid/v2 v2.1.0 // indirect + github.com/leodido/go-urn v1.2.0 // indirect github.com/libregraph/oidc-go v1.0.0 // indirect github.com/longsleep/go-metrics v1.0.0 // indirect github.com/longsleep/rndm v1.2.0 // indirect @@ -289,7 +293,6 @@ require ( github.com/rs/xid v1.5.0 // indirect github.com/russellhaering/goxmldsig v1.4.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sciencemesh/meshdirectory-web v1.0.4 // indirect github.com/segmentio/ksuid v1.0.4 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sethvargo/go-password v0.2.0 // indirect @@ -299,6 +302,7 @@ require ( github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect + github.com/studio-b12/gowebdav v0.0.0-20221015232716-17255f2e7423 // indirect github.com/tchap/go-patricia/v2 v2.3.1 // indirect github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 // indirect github.com/trustelem/zxcvbn v1.0.1 // indirect @@ -337,5 +341,4 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -// the replacement build is based on https://github.com/dragonchaser/cs3apis/tree/master -replace github.com/cs3org/go-cs3apis => github.com/dragonchaser/go-cs3apis v0.0.0-20230918130959-ae732d4b8147 +replace github.com/cs3org/go-cs3apis => github.com/aduffeck/go-cs3apis v0.0.0-20231009082215-ad45e19edac0 diff --git a/go.sum b/go.sum index 0cd5fe2e80..5a284871a2 100644 --- a/go.sum +++ b/go.sum @@ -825,6 +825,8 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aduffeck/go-cs3apis v0.0.0-20231009082215-ad45e19edac0 h1:y9gvblZJHMENTzgolQ9sChKONSILkJ4U/j7OqMIF4QM= +github.com/aduffeck/go-cs3apis v0.0.0-20231009082215-ad45e19edac0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= @@ -1011,8 +1013,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4= github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc= github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA= -github.com/cs3org/reva/v2 v2.16.1-0.20231004143709-c089e31b8175 h1:3rWU0bw0q2SlaScyTKX5Xb5usVdznz4ygV2DnHKtlzM= -github.com/cs3org/reva/v2 v2.16.1-0.20231004143709-c089e31b8175/go.mod h1:WFSfkOQNmUggMed4lUQTF2vd9hg0acvsHI6awGwnwxQ= +github.com/cs3org/reva/v2 v2.16.1-0.20231011081722-044d686b88e1 h1:Efy7Yx7zyqtCmGhR6qRhSmvjNSxnPt69LF0UyV9kd9U= +github.com/cs3org/reva/v2 v2.16.1-0.20231011081722-044d686b88e1/go.mod h1:6M5k4UvGUgZh31t4r70RwbesW+w2EM/gd/gpuQZxAPg= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -1044,8 +1046,6 @@ github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dragonchaser/go-cs3apis v0.0.0-20230918130959-ae732d4b8147 h1:DIEKyIGBNDDzdwnHlbX2BFABHol6c9EEHuCDdVKgWsA= -github.com/dragonchaser/go-cs3apis v0.0.0-20230918130959-ae732d4b8147/go.mod h1:TKUgPjk4kNU0KLd9ZxoFE74Wv6PiXckF4RB3749FztA= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -1214,9 +1214,14 @@ github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead5 github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= @@ -1591,6 +1596,7 @@ github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1 h1:k56sFOOJ0CYuQtGoRSeAMhP1R692+iNH+S1dC/CEz0w= github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1/go.mod h1:AT4NpQrOmyj1L/+hLja6aR0lk81yYYL4ePnj2kp7d6M= github.com/libregraph/idm v0.4.1-0.20230221143410-3503963047a5 h1:brLMXSjWoWhGXs8LpK+Lx+FQCtGLUa51Mq/ggHv9AV0= @@ -1898,8 +1904,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= -github.com/sciencemesh/meshdirectory-web v1.0.4 h1:1YSctF6PAXhoHUYCaeRTj7rHaF7b3rYrZf2R0VXBIbo= -github.com/sciencemesh/meshdirectory-web v1.0.4/go.mod h1:fJSThTS3xf+sTdL0iXQoaQJssLI7tn7DetHMHUl4SRk= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= @@ -1974,6 +1978,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/studio-b12/gowebdav v0.0.0-20221015232716-17255f2e7423 h1:Wd8WDEEusB5+En4PiRWJp1cP59QLNsQun+mOTW8+s6s= +github.com/studio-b12/gowebdav v0.0.0-20221015232716-17255f2e7423/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= @@ -2686,6 +2692,7 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/provider_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/provider_api.pb.go index 40a58af86f..d6791a8e85 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/provider_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/provider_api.pb.go @@ -27,58 +27,16 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// REQUIRED. -// View mode. -type OpenInAppRequest_ViewMode int32 - -const ( - OpenInAppRequest_VIEW_MODE_INVALID OpenInAppRequest_ViewMode = 0 - // The resource can be opened but not downloaded. - OpenInAppRequest_VIEW_MODE_VIEW_ONLY OpenInAppRequest_ViewMode = 1 - // The resource can be downloaded. - OpenInAppRequest_VIEW_MODE_READ_ONLY OpenInAppRequest_ViewMode = 2 - // The resource can be downloaded and updated. The underlying application - // MUST be a fully capable editor to support this mode. - OpenInAppRequest_VIEW_MODE_READ_WRITE OpenInAppRequest_ViewMode = 3 - // The resource can be downloaded and updated, but must be shown in - // preview mode. If the underlying application does not support a preview mode, - // or if in a view-only mode users are not allowed to switch to edit mode, - // then this mode MUST fall back to READ_WRITE. - OpenInAppRequest_VIEW_MODE_PREVIEW OpenInAppRequest_ViewMode = 4 -) - -var OpenInAppRequest_ViewMode_name = map[int32]string{ - 0: "VIEW_MODE_INVALID", - 1: "VIEW_MODE_VIEW_ONLY", - 2: "VIEW_MODE_READ_ONLY", - 3: "VIEW_MODE_READ_WRITE", - 4: "VIEW_MODE_PREVIEW", -} - -var OpenInAppRequest_ViewMode_value = map[string]int32{ - "VIEW_MODE_INVALID": 0, - "VIEW_MODE_VIEW_ONLY": 1, - "VIEW_MODE_READ_ONLY": 2, - "VIEW_MODE_READ_WRITE": 3, - "VIEW_MODE_PREVIEW": 4, -} - -func (x OpenInAppRequest_ViewMode) String() string { - return proto.EnumName(OpenInAppRequest_ViewMode_name, int32(x)) -} - -func (OpenInAppRequest_ViewMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c007b70b037097fe, []int{0, 0} -} - type OpenInAppRequest struct { // OPTIONAL. // Opaque information. Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. // The resourceInfo to be opened. The gateway grpc message has a ref instead. - ResourceInfo *v1beta11.ResourceInfo `protobuf:"bytes,2,opt,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"` - ViewMode OpenInAppRequest_ViewMode `protobuf:"varint,3,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.OpenInAppRequest_ViewMode" json:"view_mode,omitempty"` + ResourceInfo *v1beta11.ResourceInfo `protobuf:"bytes,2,opt,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"` + // REQUIRED. + // View mode. + ViewMode ViewMode `protobuf:"varint,3,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.ViewMode" json:"view_mode,omitempty"` // REQUIRED. // The access token this application provider will use when contacting // the storage provider to read and write. @@ -133,11 +91,11 @@ func (m *OpenInAppRequest) GetResourceInfo() *v1beta11.ResourceInfo { return nil } -func (m *OpenInAppRequest) GetViewMode() OpenInAppRequest_ViewMode { +func (m *OpenInAppRequest) GetViewMode() ViewMode { if m != nil { return m.ViewMode } - return OpenInAppRequest_VIEW_MODE_INVALID + return ViewMode_VIEW_MODE_INVALID } func (m *OpenInAppRequest) GetAccessToken() string { @@ -210,7 +168,6 @@ func (m *OpenInAppResponse) GetAppUrl() *OpenInAppURL { } func init() { - proto.RegisterEnum("cs3.app.provider.v1beta1.OpenInAppRequest_ViewMode", OpenInAppRequest_ViewMode_name, OpenInAppRequest_ViewMode_value) proto.RegisterType((*OpenInAppRequest)(nil), "cs3.app.provider.v1beta1.OpenInAppRequest") proto.RegisterType((*OpenInAppResponse)(nil), "cs3.app.provider.v1beta1.OpenInAppResponse") } @@ -220,39 +177,35 @@ func init() { } var fileDescriptor_c007b70b037097fe = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x86, 0x49, 0x3b, 0x95, 0xd5, 0x1d, 0x90, 0x19, 0xd0, 0x42, 0x35, 0xa4, 0xd2, 0x0b, 0x54, - 0x6d, 0xc8, 0x55, 0xdb, 0x07, 0x40, 0xe9, 0xda, 0x8b, 0x48, 0xdd, 0x1a, 0x99, 0xad, 0x13, 0xa8, - 0x52, 0xe4, 0xa5, 0x1e, 0x8a, 0xd8, 0xe2, 0x33, 0x3b, 0xe9, 0xc4, 0x15, 0x37, 0x3c, 0x01, 0x8f, - 0xc0, 0x25, 0x4f, 0xc0, 0x33, 0xf0, 0x54, 0x28, 0x8e, 0x13, 0xba, 0xa1, 0x6a, 0xbd, 0x8b, 0xcf, - 0xff, 0xfd, 0xc7, 0xf6, 0x7f, 0x1c, 0x74, 0x18, 0xaa, 0x41, 0x97, 0x01, 0x74, 0x41, 0x8a, 0x65, - 0xb4, 0xe0, 0xb2, 0xbb, 0xec, 0x5d, 0xf0, 0x84, 0xf5, 0xca, 0x42, 0xc0, 0x20, 0x22, 0x20, 0x45, - 0x22, 0xb0, 0x13, 0xaa, 0x01, 0x61, 0x00, 0xa4, 0xd0, 0x88, 0x81, 0x9b, 0x9d, 0xb5, 0x6d, 0x24, - 0x57, 0x22, 0x95, 0x21, 0x57, 0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 0x00, 0xff, 0xff, 0x27, 0x47, 0xc0, 0x89, 0x2a, 0x04, 0x00, 0x00, + // 438 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x95, 0x0e, 0x15, 0xea, 0x0e, 0x18, 0xbe, 0x10, 0xaa, 0x21, 0x95, 0x1e, 0x50, 0xb5, + 0x21, 0x57, 0x6d, 0x3f, 0xc0, 0x94, 0xee, 0x54, 0x09, 0xd4, 0xc8, 0xb0, 0x1d, 0x50, 0xa5, 0xc8, + 0x73, 0xde, 0xa1, 0x88, 0x2d, 0x7e, 0x67, 0x3b, 0xa9, 0x38, 0xf1, 0x5d, 0x38, 0xf2, 0x09, 0xf8, + 0x0c, 0x7c, 0x24, 0x4e, 0x28, 0x8e, 0x13, 0x55, 0x42, 0x11, 0xbd, 0xc5, 0x7e, 0x7e, 0xcf, 0xfb, + 0xe7, 0x89, 0xc9, 0xb9, 0x34, 0xcb, 0x99, 0x40, 0x9c, 0xa1, 0x56, 0x65, 0x96, 0x82, 0x9e, 0x95, + 0xf3, 0x1b, 0xb0, 0x62, 0xde, 0x5e, 0x24, 0x02, 0x33, 0x86, 0x5a, 0x59, 0x45, 0x43, 0x69, 0x96, + 0x4c, 0x20, 0xb2, 0x46, 0x63, 0x1e, 0x1e, 0x4d, 0x3b, 0xcb, 0x68, 0x30, 0xaa, 0xd0, 0x12, 0x4c, + 0x5d, 0x63, 0x74, 0x5a, 0x91, 0x1a, 0x65, 0x0b, 0x18, 0x2b, 0x6c, 0xd1, 0xa8, 0xef, 0x2a, 0xd5, + 0x58, 0xa5, 0xc5, 0x17, 0xf8, 0x7f, 0xad, 0xd7, 0x15, 0x6d, 0xbf, 0x21, 0x98, 0x16, 0x71, 0xa7, + 0x5a, 0x9e, 0xfc, 0x09, 0xc8, 0xc9, 0x06, 0x21, 0x5f, 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9a, 0x92, + 0x41, 0x8b, 0xd1, 0xb3, 0x03, 0x6a, 0xf9, 0x5f, 0x3d, 0x3a, 0x3f, 0x88, 0xad, 0x93, 0x59, 0x7d, + 0x27, 0xa7, 0x52, 0xdd, 0x77, 0x3a, 0x56, 0x27, 0xed, 0x48, 0x98, 0xc5, 0xd5, 0xf3, 0x8a, 0x83, + 0xcf, 0xcf, 0x1b, 0xca, 0x43, 0x3f, 0x7a, 0x47, 0x97, 0x51, 0xfc, 0xb3, 0x17, 0x5e, 0x9a, 0x25, + 0x8b, 0x10, 0x59, 0xe3, 0x61, 0xd7, 0xf3, 0x55, 0x05, 0xfc, 0x76, 0xd2, 0x36, 0x42, 0xdc, 0x36, + 0xd2, 0xd6, 0x4b, 0x37, 0x7d, 0xf7, 0x68, 0x97, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xb9, + 0x16, 0xb5, 0x92, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/resources.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/resources.pb.go index d6888a7ab2..68bb20e81e 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/resources.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1/resources.pb.go @@ -20,6 +20,80 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// Defines the view modes. +type ViewMode int32 + +const ( + ViewMode_VIEW_MODE_INVALID ViewMode = 0 + // The resource can be opened but not downloaded. + ViewMode_VIEW_MODE_VIEW_ONLY ViewMode = 1 + // The resource can be downloaded. + ViewMode_VIEW_MODE_READ_ONLY ViewMode = 2 + // The resource can be downloaded and updated. The underlying application + // MUST be a fully capable editor to support this mode. + ViewMode_VIEW_MODE_READ_WRITE ViewMode = 3 + // The resource can be downloaded and updated, but must be shown in + // preview mode. If the underlying application does not support a preview mode, + // or if in a view-only mode users are not allowed to switch to edit mode, + // then this mode MUST fall back to READ_WRITE. + ViewMode_VIEW_MODE_PREVIEW ViewMode = 4 +) + +var ViewMode_name = map[int32]string{ + 0: "VIEW_MODE_INVALID", + 1: "VIEW_MODE_VIEW_ONLY", + 2: "VIEW_MODE_READ_ONLY", + 3: "VIEW_MODE_READ_WRITE", + 4: "VIEW_MODE_PREVIEW", +} + +var ViewMode_value = map[string]int32{ + "VIEW_MODE_INVALID": 0, + "VIEW_MODE_VIEW_ONLY": 1, + "VIEW_MODE_READ_ONLY": 2, + "VIEW_MODE_READ_WRITE": 3, + "VIEW_MODE_PREVIEW": 4, +} + +func (x ViewMode) String() string { + return proto.EnumName(ViewMode_name, int32(x)) +} + +func (ViewMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f3a36ae8e74be4dc, []int{0} +} + +// Defines the valid targets for an app URL. +type Target int32 + +const ( + Target_TARGET_INVALID Target = 0 + // The app URL is to be opened within an iframe + Target_TARGET_IFRAME Target = 1 + // The app URL is to be opened on a new blank page + Target_TARGET_BLANK Target = 2 +) + +var Target_name = map[int32]string{ + 0: "TARGET_INVALID", + 1: "TARGET_IFRAME", + 2: "TARGET_BLANK", +} + +var Target_value = map[string]int32{ + "TARGET_INVALID": 0, + "TARGET_IFRAME": 1, + "TARGET_BLANK": 2, +} + +func (x Target) String() string { + return proto.EnumName(Target_name, int32(x)) +} + +func (Target) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f3a36ae8e74be4dc, []int{1} +} + // Represents the information for the app URL to be called by the clients. type OpenInAppURL struct { // REQUIRED. @@ -35,10 +109,13 @@ type OpenInAppURL struct { FormParameters map[string]string `protobuf:"bytes,3,rep,name=form_parameters,json=formParameters,proto3" json:"form_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // OPTIONAL. // The headers to be added to the request. - Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // REQUIRED. + // Whether the target for the app URL is an iframe or a new page. + Target Target `protobuf:"varint,5,opt,name=target,proto3,enum=cs3.app.provider.v1beta1.Target" json:"target,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *OpenInAppURL) Reset() { *m = OpenInAppURL{} } @@ -94,7 +171,16 @@ func (m *OpenInAppURL) GetHeaders() map[string]string { return nil } +func (m *OpenInAppURL) GetTarget() Target { + if m != nil { + return m.Target + } + return Target_TARGET_INVALID +} + func init() { + proto.RegisterEnum("cs3.app.provider.v1beta1.ViewMode", ViewMode_name, ViewMode_value) + proto.RegisterEnum("cs3.app.provider.v1beta1.Target", Target_name, Target_value) proto.RegisterType((*OpenInAppURL)(nil), "cs3.app.provider.v1beta1.OpenInAppURL") proto.RegisterMapType((map[string]string)(nil), "cs3.app.provider.v1beta1.OpenInAppURL.FormParametersEntry") proto.RegisterMapType((map[string]string)(nil), "cs3.app.provider.v1beta1.OpenInAppURL.HeadersEntry") @@ -105,26 +191,34 @@ func init() { } var fileDescriptor_f3a36ae8e74be4dc = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0x4b, 0xf3, 0x40, - 0x10, 0xc6, 0x49, 0xf2, 0xbe, 0x2d, 0xae, 0xa5, 0x95, 0x55, 0x34, 0x14, 0x0f, 0xc5, 0x53, 0x4f, - 0x1b, 0x6a, 0x2e, 0xd2, 0x5b, 0x5a, 0x14, 0x05, 0xc5, 0x10, 0xa8, 0x07, 0x29, 0x94, 0x6d, 0xb2, - 0xa5, 0x62, 0x92, 0x1d, 0x66, 0x93, 0x40, 0x0f, 0x7e, 0x19, 0x8f, 0x7e, 0x14, 0x3f, 0x8e, 0x9f, - 0x40, 0xf2, 0x67, 0xa5, 0x82, 0x05, 0xbd, 0xed, 0xcc, 0x3c, 0xf3, 0x7b, 0x78, 0x98, 0x25, 0xc3, - 0x50, 0xb9, 0x0e, 0x07, 0x70, 0x00, 0x65, 0xf1, 0x14, 0x09, 0x74, 0x8a, 0xd1, 0x52, 0x64, 0x7c, - 0xe4, 0xa0, 0x50, 0x32, 0xc7, 0x50, 0x28, 0x06, 0x28, 0x33, 0x49, 0xed, 0x50, 0xb9, 0x8c, 0x03, - 0x30, 0xad, 0x64, 0x8d, 0xf2, 0xec, 0xc3, 0x24, 0x9d, 0x7b, 0x10, 0xe9, 0x4d, 0xea, 0x01, 0xcc, - 0x82, 0x5b, 0x7a, 0x42, 0xda, 0x1c, 0x60, 0x91, 0x63, 0x6c, 0x1b, 0x03, 0x63, 0xb8, 0x17, 0xb4, - 0x38, 0xc0, 0x0c, 0x63, 0x7a, 0x4c, 0x5a, 0x89, 0xc8, 0xd6, 0x32, 0xb2, 0xcd, 0xba, 0x5f, 0x57, - 0x34, 0x24, 0xbd, 0x95, 0xc4, 0x64, 0x01, 0x1c, 0x79, 0x22, 0x32, 0x81, 0xca, 0xb6, 0x06, 0xd6, - 0x70, 0xff, 0x7c, 0xcc, 0x76, 0xb9, 0xb2, 0x6d, 0x47, 0x76, 0x25, 0x31, 0xf1, 0xbf, 0x96, 0x2f, - 0xd3, 0x0c, 0x37, 0x41, 0x77, 0xf5, 0xad, 0x49, 0xef, 0x48, 0x7b, 0x2d, 0x78, 0x54, 0xc2, 0xff, - 0x55, 0x70, 0xf7, 0x97, 0xf0, 0xeb, 0x7a, 0xab, 0xa6, 0x6a, 0x46, 0xdf, 0x23, 0x87, 0x3f, 0xb8, - 0xd2, 0x03, 0x62, 0x3d, 0x8b, 0x4d, 0x93, 0xbb, 0x7c, 0xd2, 0x23, 0xf2, 0xbf, 0xe0, 0x71, 0x2e, - 0x9a, 0xcc, 0x75, 0x31, 0x36, 0x2f, 0x8c, 0xfe, 0x98, 0x74, 0xb6, 0xd9, 0x7f, 0xd9, 0x9d, 0xbc, - 0x90, 0xd3, 0x50, 0x26, 0x3b, 0x13, 0x4c, 0xba, 0x81, 0xbe, 0x9f, 0x5f, 0x9e, 0xcf, 0x37, 0x1e, - 0x7b, 0x5a, 0xd3, 0x48, 0x5e, 0x4d, 0x6b, 0xea, 0xf9, 0x6f, 0xa6, 0x3d, 0x55, 0x2e, 0xf3, 0x00, - 0x98, 0xaf, 0x19, 0x0f, 0xa3, 0x49, 0x29, 0x78, 0xaf, 0x46, 0x73, 0x0f, 0x60, 0xae, 0x47, 0xf3, - 0x66, 0xb4, 0x6c, 0x55, 0x9f, 0xc2, 0xfd, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xd8, 0x2b, 0xca, - 0x40, 0x02, 0x00, 0x00, + // 458 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xc5, 0x76, 0x9b, 0xc2, 0x10, 0x52, 0x77, 0x5b, 0xa8, 0x55, 0x71, 0x88, 0x38, 0x45, 0x3d, + 0x6c, 0x94, 0xfa, 0x52, 0xe5, 0xb6, 0x69, 0x5c, 0xb0, 0xc8, 0x87, 0xb5, 0x4a, 0x53, 0x81, 0x22, + 0x45, 0x5b, 0x67, 0x4b, 0x2b, 0xe2, 0xec, 0x68, 0xed, 0x04, 0xf5, 0xc0, 0x8d, 0x5f, 0xc2, 0x11, + 0xf1, 0x4b, 0xf8, 0x55, 0xc8, 0x5f, 0x90,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0x6a, 0x52, 0x50, 0x37, 0x95, 0xec, 0x63, 0xb8, 0x3f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x85, 0x9b, 0x05, 0x50, 0x44, 0x03, 0x00, 0x00, } diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/app/registry/v1beta1/resources.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/app/registry/v1beta1/resources.pb.go index 23570f61bf..0f859a349d 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/app/registry/v1beta1/resources.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/app/registry/v1beta1/resources.pb.go @@ -63,7 +63,7 @@ type ProviderInfo struct { MimeTypes []string `protobuf:"bytes,2,rep,name=mime_types,json=mimeTypes,proto3" json:"mime_types,omitempty"` // REQUIRED. // The address where the app provider can be reached. - // For example, tcp://localhost:1099. + // For example, localhost:1099. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Capability ProviderInfo_Capability `protobuf:"varint,4,opt,name=capability,proto3,enum=cs3.app.registry.v1beta1.ProviderInfo_Capability" json:"capability,omitempty"` // OPTIONAL. @@ -79,7 +79,11 @@ type ProviderInfo struct { Icon string `protobuf:"bytes,7,opt,name=icon,proto3" json:"icon,omitempty"` // OPTIONAL. // Whether the app can be opened only on desktop - DesktopOnly bool `protobuf:"varint,8,opt,name=desktop_only,json=desktopOnly,proto3" json:"desktop_only,omitempty"` + DesktopOnly bool `protobuf:"varint,8,opt,name=desktop_only,json=desktopOnly,proto3" json:"desktop_only,omitempty"` + // OPTIONAL. + // The action to be displayed to the user on the context menu. + // By default this is "Open with". + Action string `protobuf:"bytes,9,opt,name=action,proto3" json:"action,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -166,6 +170,13 @@ func (m *ProviderInfo) GetDesktopOnly() bool { return false } +func (m *ProviderInfo) GetAction() string { + if m != nil { + return m.Action + } + return "" +} + // Represents a mime type and its corresponding file extension. type MimeTypeInfo struct { // OPTIONAL. @@ -301,37 +312,38 @@ func init() { } var fileDescriptor_2e6a666226304af3 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto + // 514 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xdd, 0x8e, 0xd2, 0x40, - 0x14, 0xb6, 0x2d, 0xb2, 0x70, 0x60, 0x11, 0xc7, 0x68, 0xc6, 0x9f, 0x4d, 0x2a, 0x89, 0xa6, 0x57, - 0x25, 0xc0, 0x13, 0x14, 0x96, 0x8b, 0xc6, 0x55, 0x70, 0x42, 0x30, 0x1a, 0x92, 0x66, 0x68, 0x67, - 0x4d, 0x63, 0xe9, 0x1c, 0x3b, 0x65, 0x95, 0x0b, 0x5f, 0xc1, 0x87, 0xf0, 0xd2, 0x47, 0xf1, 0x25, - 0x7c, 0x15, 0xd3, 0xa1, 0x65, 0x89, 0xc9, 0x26, 0xc6, 0xec, 0xdd, 0xf4, 0xfb, 0xeb, 0x9c, 0xf9, - 0x72, 0xc0, 0x09, 0xd5, 0xa8, 0xcf, 0x11, 0xfb, 0x99, 0xf8, 0x18, 0xab, 0x3c, 0xdb, 0xf5, 0xaf, - 0x06, 0x6b, 0x91, 0xf3, 0x41, 0x3f, 0x13, 0x4a, 0x6e, 0xb3, 0x50, 0x28, 0x17, 0x33, 0x99, 0x4b, - 0x42, 0x43, 0x35, 0x72, 0x39, 0xa2, 0x5b, 0x29, 0xdd, 0x52, 0xf9, 0xe4, 0xac, 0xc8, 0xc8, 0x77, - 0x28, 0xd4, 0xc1, 0xac, 0xbf, 0xf6, 0xc6, 0xde, 0x77, 0x0b, 0xda, 0xf3, 0x4c, 0x5e, 0xc5, 0x91, - 0xc8, 0xfc, 0xf4, 0x52, 0x92, 0x01, 0xd4, 0x25, 0xf2, 0xcf, 0x5b, 0x41, 0x0d, 0xdb, 0x70, 0x5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 0x01, 0x9e, 0xa0, 0xb0, 0x5c, 0x34, 0xae, 0x82, 0x13, 0x82, 0xd1, 0x90, 0x34, 0x43, 0x3b, + 0x6b, 0x1a, 0x4b, 0x67, 0xec, 0x94, 0x55, 0x2e, 0x7c, 0x19, 0x2f, 0xbc, 0xf0, 0x51, 0x7c, 0x09, + 0x5f, 0xc5, 0x74, 0x98, 0xb2, 0xc4, 0x64, 0x13, 0x63, 0xbc, 0x9b, 0xf9, 0xfe, 0x7a, 0x3a, 0x5f, + 0x0e, 0x78, 0x91, 0x1a, 0xf5, 0x99, 0x94, 0xfd, 0x9c, 0x7f, 0x48, 0x54, 0x91, 0xef, 0xfa, 0xd7, + 0x83, 0x35, 0x2f, 0xd8, 0xa0, 0x9f, 0x73, 0x25, 0xb6, 0x79, 0xc4, 0x15, 0x91, 0xb9, 0x28, 0x04, + 0xc2, 0x91, 0x1a, 0x11, 0x26, 0x25, 0xa9, 0x94, 0xc4, 0x28, 0x1f, 0x9f, 0x97, 0x19, 0xc5, 0x4e, + 0x72, 0x75, 0x30, 0xeb, 0xdb, 0xde, 0xd8, 0xfb, 0xee, 0x40, 0x7b, 0x9e, 0x8b, 0xeb, 0x24, 0xe6, + 0x79, 0x90, 0x5d, 0x09, 0x34, 0x80, 0xba, 0x90, 0xec, 0xd3, 0x96, 0x63, 0xcb, 0xb5, 0xbc, 0xd6, + 0xf0, 0x11, 0x29, 0xa3, 0xf7, 0x16, 0x13, 0x40, 0x66, 0x5a, 0x40, 0x8d, 0x10, 0x9d, 0x03, 0x6c, + 0x92, 0x0d, 0x0f, 0xb5, 0x08, 0xdb, 0xae, 0xe3, 0x35, 0x69, 0xb3, 0x44, 0x16, 0x25, 0x80, 0x30, + 0x9c, 0xb0, 0x38, 0xce, 0xb9, 0x52, 0xd8, 0x71, 0x2d, 0xaf, 0x49, 0xab, 0x2b, 0x7a, 0x03, 0x10, + 0x31, 0xc9, 0xd6, 0x49, 0x9a, 0x14, 0x3b, 0x5c, 0x73, 0x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, + 0xa8, 0xff, 0x58, 0xcc, 0x73, 0xe8, 0xb0, 0x34, 0x15, 0x9f, 0xc3, 0x28, 0xe7, 0x4c, 0x1b, 0xf7, + 0xd5, 0x9c, 0x6a, 0x74, 0x62, 0x40, 0xd4, 0x87, 0x07, 0x31, 0xbf, 0x62, 0xdb, 0xb4, 0x08, 0x99, + 0x94, 0x69, 0x12, 0xb1, 0xa3, 0xa6, 0x90, 0xa1, 0xfc, 0x1b, 0x66, 0xfc, 0x15, 0x9e, 0x46, 0x62, + 0x73, 0xeb, 0xcf, 0x8d, 0x3b, 0xb4, 0x5a, 0xba, 0x79, 0xb9, 0x3a, 0x73, 0xeb, 0xfd, 0xbd, 0x4a, + 0x63, 0x24, 0xdf, 0x6c, 0x67, 0xe2, 0xd3, 0x1f, 0x36, 0x9e, 0xa8, 0x11, 0xf1, 0xa5, 0x24, 0xb4, + 0xca, 0x58, 0x0e, 0xc6, 0xa5, 0xe0, 0xa7, 0xa6, 0x56, 0xbe, 0x94, 0xab, 0x8a, 0x5a, 0x19, 0x6a, + 0x5d, 0xd7, 0x0b, 0x39, 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x25, 0x86, 0x7b, 0x9b, 0xf5, 0x03, + 0x00, 0x00, } diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1/gateway_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1/gateway_api.pb.go index b07d01938c..1b360a7e68 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1/gateway_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1/gateway_api.pb.go @@ -680,179 +680,183 @@ func init() { } var fileDescriptor_2d35d050f2c88549 = []byte{ - // 2740 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x6f, 0xdc, 0xc6, - 0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 0xa1, 0x12, - 0x4d, 0xf1, 0x2b, 0xae, 0x9e, 0xff, 0xab, 0x45, 0x66, 0xaa, 0x5d, 0x76, 0xc0, 0xc7, 0x92, 0xeb, - 0x30, 0x68, 0xc0, 0xf3, 0x2e, 0x44, 0xcc, 0xbe, 0x4d, 0xc6, 0x82, 0xd0, 0x79, 0xde, 0x85, 0x59, - 0xeb, 0x92, 0x75, 0x75, 0x62, 0xf1, 0xcd, 0x0a, 0x9f, 0xc2, 0x31, 0x13, 0xed, 0x54, 0x36, 0x04, - 0xa0, 0x81, 0x40, 0xdb, 0x26, 0xa7, 0x78, 0xfd, 0xec, 0xc8, 0x25, 0xeb, 0xea, 0x78, 0x43, 0xfc, - 0x6d, 0xbf, 0x45, 0xc6, 0xdd, 0xb6, 0x07, 0x3e, 0xdb, 0xf1, 0x5a, 0xb3, 0xa3, 0xa2, 0xe2, 0x74, - 0x5c, 0x50, 0x6f, 0xd9, 0xef, 0x90, 0x49, 0xac, 0x8c, 0xc0, 0xa5, 0xc0, 0x66, 0x4f, 0x09, 0xc0, - 0x99, 0xb8, 0xb0, 0x29, 0xca, 0xe6, 0xff, 0x61, 0x91, 0xf3, 0xba, 0xc0, 0x28, 0x0c, 0xfc, 0x08, - 0xec, 0x05, 0x32, 0x16, 0xf7, 0x37, 0x2a, 0xbc, 0x28, 0x14, 0xd2, 0xd0, 0x4d, 0xf4, 0x35, 0x45, - 0x75, 0x03, 0x61, 0x4a, 0x93, 0x46, 0x4c, 0x9b, 0x74, 0x9e, 0xbc, 0xc6, 0x82, 0x43, 0xf0, 0x51, - 0x7a, 0xfc, 0xc3, 0x5e, 0x22, 0xa7, 0xf8, 0x34, 0x13, 0x72, 0x27, 0x16, 0xbf, 0x27, 0xcc, 0xc8, - 0xd9, 0x58, 0xe1, 0x35, 0x89, 0xb9, 0xad, 0x08, 0x68, 0x43, 0x80, 0xe7, 0x3f, 0x27, 0x93, 0x4f, - 0x0f, 0x82, 0x6a, 0xa7, 0xfe, 0x12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0, 0x64, 0x2b, 0x39, 0x57, 0x03, 0x26, - 0x8b, 0xe3, 0x57, 0xb4, 0xf8, 0xa6, 0x52, 0x21, 0xf7, 0x41, 0xf4, 0x37, 0x95, 0xc3, 0x91, 0x4a, - 0x53, 0x1c, 0xdf, 0x85, 0xf6, 0x90, 0xa6, 0x68, 0xf5, 0x83, 0x9b, 0x92, 0x81, 0xa1, 0x83, 0x67, - 0xf1, 0x19, 0x5f, 0x96, 0x47, 0xf8, 0x04, 0x4b, 0x21, 0x6a, 0xd5, 0xd2, 0xfc, 0xe5, 0x02, 0x54, - 0x6a, 0xbd, 0x01, 0x8c, 0xf6, 0x12, 0xf5, 0x7d, 0xd6, 0xb5, 0xea, 0x81, 0xd6, 0x33, 0x28, 0xb4, - 0xce, 0xc8, 0xd9, 0x95, 0x03, 0x70, 0x0f, 0x37, 0x93, 0xff, 0x8b, 0xc1, 0xd1, 0xa5, 0xfc, 0xa3, - 0x4c, 0xda, 0x7e, 0x1d, 0xa9, 0x8f, 0x2e, 0x23, 0x42, 0xec, 0x75, 0xd9, 0x27, 0x17, 0xdd, 0xa0, - 0x93, 0xb7, 0x57, 0x2e, 0x9f, 0x95, 0x4f, 0x6e, 0x43, 0x4f, 0x3c, 0xd7, 0xde, 0xb4, 0x7e, 0x38, - 0x85, 0x18, 0x84, 0xfc, 0x6d, 0x64, 0x74, 0xa5, 0xf6, 0xf9, 0xdf, 0x47, 0x66, 0x56, 0xa2, 0xa5, - 0x0a, 0xa2, 0x2b, 0xdb, 0xb7, 0x97, 0x79, 0xdd, 0xbf, 0x44, 0xe9, 0x33, 0x2c, 0x7d, 0x86, 0xa5, - 0xbb, 0x63, 0xe2, 0xbd, 0xf7, 0xd2, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x12, 0x3f, 0x74, - 0x36, 0x36, 0x00, 0x00, + // 2813 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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, 0x52, 0x64, 0x37, 0xf6, 0x77, + 0x0b, 0x17, 0x05, 0x2d, 0xf9, 0x99, 0xab, 0x95, 0x0a, 0x00, 0x1c, 0x14, 0xbe, 0xb6, 0xd0, 0xd9, + 0xa2, 0xf4, 0x05, 0x96, 0x91, 0x81, 0x86, 0x8a, 0x53, 0x9e, 0xc4, 0x87, 0x5b, 0x85, 0x9e, 0x0e, + 0x4d, 0x92, 0xbe, 0x42, 0x76, 0x3e, 0xed, 0xb0, 0xdf, 0x33, 0xf7, 0x41, 0x24, 0x2a, 0xf2, 0xa8, + 0x19, 0xe6, 0x81, 0x96, 0xd8, 0xb0, 0xc5, 0x94, 0x2d, 0x2a, 0xe9, 0xe8, 0x6d, 0x53, 0x82, 0x9d, + 0xae, 0xfd, 0xfe, 0x70, 0x0f, 0x0a, 0x28, 0xc2, 0x85, 0x7b, 0xc7, 0x60, 0x26, 0xce, 0xdc, 0xb4, + 0xec, 0x17, 0x68, 0x52, 0x01, 0xd8, 0x8b, 0x15, 0xac, 0x09, 0x0f, 0x96, 0x2a, 0x71, 0x20, 0x10, + 0x3f, 0x87, 0x65, 0x9c, 0xc5, 0xe8, 0x09, 0x26, 0xfc, 0x85, 0xda, 0xbe, 0x53, 0x6e, 0x49, 0xc6, + 0x0b, 0x07, 0xee, 0x56, 0xa5, 0x81, 0x0f, 0xbf, 0xb4, 0xd0, 0x19, 0x56, 0xd9, 0xc2, 0x6e, 0xdf, + 0xf5, 0x31, 0x74, 0x85, 0x81, 0x35, 0x85, 0xa0, 0xee, 0x25, 0x55, 0x78, 0x69, 0x37, 0x10, 0x34, + 0x21, 0x55, 0xdb, 0x37, 0x8d, 0x2d, 0xa9, 0x33, 0xc1, 0x8c, 0x01, 0x8d, 0xff, 0x21, 0x3a, 0xb1, + 0x1e, 0x1e, 0x62, 0xfb, 0xea, 0x70, 0x2a, 0xc3, 0x08, 0x95, 0x77, 0x4d, 0xa0, 0x60, 0xbe, 0x87, + 0x4e, 0x6d, 0xf6, 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, 0xad, 0x80, 0xbd, 0x5d, 0x96, 0x25, 0x7b, 0x09, + 0xca, 0x30, 0xd9, 0x13, 0x60, 0x10, 0x09, 0x11, 0x4a, 0xc6, 0xf9, 0xc7, 0x61, 0x17, 0xdb, 0x0b, + 0x26, 0x33, 0x82, 0x21, 0x85, 0xd8, 0x4d, 0x73, 0x82, 0xb4, 0x44, 0xc1, 0xcc, 0x4a, 0x58, 0xed, + 0xc8, 0x71, 0x71, 0xd9, 0x12, 0x95, 0x67, 0x18, 0x2e, 0x51, 0x45, 0xc4, 0x2c, 0x3b, 0xe4, 0x3b, + 0xb1, 0x5c, 0x19, 0x9b, 0xec, 0xc4, 0x0a, 0xa1, 0xc2, 0x4e, 0xac, 0xf1, 0xa4, 0x80, 0x6c, 0x45, + 0x9d, 0x8a, 0x01, 0xc9, 0x33, 0x0c, 0x03, 0x52, 0x44, 0x94, 0x3c, 0x49, 0xde, 0x05, 0xaa, 0x78, + 0x92, 0x67, 0x18, 0x7a, 0x52, 0x44, 0x04, 0x4f, 0xb6, 0xd1, 0x78, 0x7a, 0x3c, 0x63, 0x5f, 0x32, + 0x3a, 0xbe, 0x99, 0x4b, 0x26, 0x89, 0x13, 0x45, 0x79, 0x25, 0x09, 0x0b, 0x02, 0x5f, 0xa2, 0x09, + 0x18, 0x19, 0xfb, 0x0e, 0xc1, 0x22, 0x07, 0x4c, 0x3e, 0x4d, 0xd4, 0x94, 0x0f, 0x1d, 0xfa, 0x48, + 0x62, 0x78, 0x2d, 0x07, 0x34, 0xa7, 0x65, 0xea, 0x2d, 0xdc, 0x0d, 0x0f, 0x2b, 0xa8, 0x4b, 0xf8, + 0x2a, 0xea, 0x0a, 0x0d, 0xd4, 0x63, 0xfe, 0xde, 0x95, 0x48, 0x2f, 0x1a, 0xd8, 0x10, 0x60, 0x6d, + 0xdb, 0x34, 0xe4, 0x80, 0x68, 0x1f, 0x21, 0x3e, 0x05, 0x58, 0x61, 0x2c, 0x5e, 0xd1, 0x87, 0x9a, +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3, 0xe9, 0x42, + 0x33, 0x3a, 0x36, 0x1f, 0x70, 0x03, 0x0a, 0x48, 0x1f, 0x89, 0x8f, 0x6a, 0x1b, 0x2b, 0xeb, 0x2b, + 0x21, 0xc1, 0xf2, 0xf1, 0x17, 0xb3, 0xe4, 0x86, 0x04, 0xe7, 0x8f, 0x34, 0x52, 0x64, 0x7e, 0xb5, + 0x28, 0x25, 0x64, 0xc2, 0xe9, 0x2b, 0x6e, 0xa9, 0x70, 0x1e, 0x59, 0x22, 0x5c, 0x44, 0xc8, 0x84, + 0x93, 0x01, 0x68, 0x22, 0x9c, 0x47, 0x96, 0x08, 0x17, 0x11, 0xd2, 0x6f, 0x53, 0x70, 0xd8, 0xf4, + 0x98, 0x38, 0x41, 0xbc, 0x8b, 0x09, 0x7c, 0xa0, 0xa2, 0x2f, 0xb4, 0x78, 0x89, 0x7a, 0x21, 0xf5, + 0x4e, 0x19, 0x2c, 0x4d, 0x18, 0xce, 0x34, 0x30, 0x15, 0xc5, 0xc9, 0x55, 0x6d, 0xb8, 0xb8, 0x2b, + 0x91, 0x73, 0x10, 0xf5, 0xe2, 0xee, 0x70, 0xa4, 0xd4, 0x14, 0x27, 0x70, 0xb1, 0x3f, 0xa4, 0x29, + 0x4a, 0xfd, 0xe0, 0xa6, 0x68, 0x30, 0x10, 0x78, 0x96, 0x9c, 0xe4, 0x88, 0xf2, 0x18, 0xee, 0xf9, + 0x49, 0x44, 0xa5, 0x5a, 0x98, 0xbf, 0x54, 0x82, 0xca, 0xac, 0xb7, 0x30, 0x25, 0xfd, 0xd4, 0xfb, + 0x9c, 0x75, 0xa5, 0x7a, 0xa0, 0x75, 0x0d, 0x05, 0xd6, 0x29, 0x3a, 0xbd, 0xb2, 0x8f, 0xdd, 0x83, + 0xcd, 0xf4, 0xcf, 0x57, 0x30, 0xba, 0xa4, 0x7f, 0x63, 0x65, 0xed, 0x57, 0x91, 0xea, 0xe8, 0x32, + 0x22, 0x24, 0xaa, 0xcb, 0x01, 0x3a, 0xef, 0x86, 0xdd, 0xa2, 0x8c, 0x68, 0xf9, 0xb4, 0xb8, 0xd7, + 0x1d, 0x79, 0xfc, 0x3f, 0x01, 0x9b, 0xd6, 0xf7, 0xa7, 0x00, 0x03, 0x90, 0xbf, 0x8d, 0x8c, 0xae, + 0x34, 0x3e, 0xfb, 0xfb, 0xc8, 0xcc, 0x4a, 0xbc, 0x54, 0x03, 0x74, 0xed, 0xc9, 0xad, 0x65, 0x56, + 0xf7, 0x6f, 0x5e, 0xfa, 0x0c, 0x4a, 0x9f, 0x41, 0xe9, 0xce, 0x18, 0xff, 0x53, 0xc1, 0xd2, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xc4, 0x74, 0x60, 0x9b, 0x38, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1060,6 +1064,9 @@ type GatewayAPIClient interface { // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. GetOCMShare(ctx context.Context, in *v1beta19.GetOCMShareRequest, opts ...grpc.CallOption) (*v1beta19.GetOCMShareResponse, error) + // Gets share information for a single share by its unlisted token. + // MUST return CODE_NOT_FOUND if the share does not exist. + GetOCMShareByToken(ctx context.Context, in *v1beta19.GetOCMShareByTokenRequest, opts ...grpc.CallOption) (*v1beta19.GetOCMShareByTokenResponse, error) // List the shares the authproviderenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. @@ -1115,6 +1122,8 @@ type GatewayAPIClient interface { GetHome(ctx context.Context, in *v1beta13.GetHomeRequest, opts ...grpc.CallOption) (*v1beta13.GetHomeResponse, error) // Generates a new token for the user with a validity of 24 hours. GenerateInviteToken(ctx context.Context, in *v1beta113.GenerateInviteTokenRequest, opts ...grpc.CallOption) (*v1beta113.GenerateInviteTokenResponse, error) + // Lists the valid tokens generated by the user. + ListInviteTokens(ctx context.Context, in *v1beta113.ListInviteTokensRequest, opts ...grpc.CallOption) (*v1beta113.ListInviteTokensResponse, error) // Forwards a received invite to the sync'n'share system provider. ForwardInvite(ctx context.Context, in *v1beta113.ForwardInviteRequest, opts ...grpc.CallOption) (*v1beta113.ForwardInviteResponse, error) // Completes an invitation acceptance. @@ -1123,6 +1132,8 @@ type GatewayAPIClient interface { GetAcceptedUser(ctx context.Context, in *v1beta113.GetAcceptedUserRequest, opts ...grpc.CallOption) (*v1beta113.GetAcceptedUserResponse, error) // Finds users who accepted invite tokens by their attributes. FindAcceptedUsers(ctx context.Context, in *v1beta113.FindAcceptedUsersRequest, opts ...grpc.CallOption) (*v1beta113.FindAcceptedUsersResponse, error) + // Delete a previously accepted remote user, that is unfriend that user. + DeleteAcceptedUser(ctx context.Context, in *v1beta113.DeleteAcceptedUserRequest, opts ...grpc.CallOption) (*v1beta113.DeleteAcceptedUserResponse, error) // Check if a given system provider is registered in the mesh or not. // MUST return CODE_UNAUTHENTICATED if the system is not registered IsProviderAllowed(ctx context.Context, in *v1beta114.IsProviderAllowedRequest, opts ...grpc.CallOption) (*v1beta114.IsProviderAllowedResponse, error) @@ -1131,8 +1142,12 @@ type GatewayAPIClient interface { GetInfoByDomain(ctx context.Context, in *v1beta114.GetInfoByDomainRequest, opts ...grpc.CallOption) (*v1beta114.GetInfoByDomainResponse, error) // Get the information of all the providers registered in the mesh. ListAllProviders(ctx context.Context, in *v1beta114.ListAllProvidersRequest, opts ...grpc.CallOption) (*v1beta114.ListAllProvidersResponse, error) - // Creates a new ocm share. + // Creates a new OCM share. CreateOCMCoreShare(ctx context.Context, in *v1beta115.CreateOCMCoreShareRequest, opts ...grpc.CallOption) (*v1beta115.CreateOCMCoreShareResponse, error) + // Updates an OCM share. + UpdateOCMCoreShare(ctx context.Context, in *v1beta115.UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*v1beta115.UpdateOCMCoreShareResponse, error) + // Deletes an OCM share. + DeleteOCMCoreShare(ctx context.Context, in *v1beta115.DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*v1beta115.DeleteOCMCoreShareResponse, error) // Requests creation of a transfer. CreateTransfer(ctx context.Context, in *v1beta116.CreateTransferRequest, opts ...grpc.CallOption) (*v1beta116.CreateTransferResponse, error) // Requests a transfer status. @@ -1696,6 +1711,15 @@ func (c *gatewayAPIClient) GetOCMShare(ctx context.Context, in *v1beta19.GetOCMS return out, nil } +func (c *gatewayAPIClient) GetOCMShareByToken(ctx context.Context, in *v1beta19.GetOCMShareByTokenRequest, opts ...grpc.CallOption) (*v1beta19.GetOCMShareByTokenResponse, error) { + out := new(v1beta19.GetOCMShareByTokenResponse) + err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/GetOCMShareByToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gatewayAPIClient) ListOCMShares(ctx context.Context, in *v1beta19.ListOCMSharesRequest, opts ...grpc.CallOption) (*v1beta19.ListOCMSharesResponse, error) { out := new(v1beta19.ListOCMSharesResponse) err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/ListOCMShares", in, out, opts...) @@ -1903,6 +1927,15 @@ func (c *gatewayAPIClient) GenerateInviteToken(ctx context.Context, in *v1beta11 return out, nil } +func (c *gatewayAPIClient) ListInviteTokens(ctx context.Context, in *v1beta113.ListInviteTokensRequest, opts ...grpc.CallOption) (*v1beta113.ListInviteTokensResponse, error) { + out := new(v1beta113.ListInviteTokensResponse) + err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/ListInviteTokens", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gatewayAPIClient) ForwardInvite(ctx context.Context, in *v1beta113.ForwardInviteRequest, opts ...grpc.CallOption) (*v1beta113.ForwardInviteResponse, error) { out := new(v1beta113.ForwardInviteResponse) err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/ForwardInvite", in, out, opts...) @@ -1939,6 +1972,15 @@ func (c *gatewayAPIClient) FindAcceptedUsers(ctx context.Context, in *v1beta113. return out, nil } +func (c *gatewayAPIClient) DeleteAcceptedUser(ctx context.Context, in *v1beta113.DeleteAcceptedUserRequest, opts ...grpc.CallOption) (*v1beta113.DeleteAcceptedUserResponse, error) { + out := new(v1beta113.DeleteAcceptedUserResponse) + err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/DeleteAcceptedUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gatewayAPIClient) IsProviderAllowed(ctx context.Context, in *v1beta114.IsProviderAllowedRequest, opts ...grpc.CallOption) (*v1beta114.IsProviderAllowedResponse, error) { out := new(v1beta114.IsProviderAllowedResponse) err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/IsProviderAllowed", in, out, opts...) @@ -1975,6 +2017,24 @@ func (c *gatewayAPIClient) CreateOCMCoreShare(ctx context.Context, in *v1beta115 return out, nil } +func (c *gatewayAPIClient) UpdateOCMCoreShare(ctx context.Context, in *v1beta115.UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*v1beta115.UpdateOCMCoreShareResponse, error) { + out := new(v1beta115.UpdateOCMCoreShareResponse) + err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/UpdateOCMCoreShare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayAPIClient) DeleteOCMCoreShare(ctx context.Context, in *v1beta115.DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*v1beta115.DeleteOCMCoreShareResponse, error) { + out := new(v1beta115.DeleteOCMCoreShareResponse) + err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/DeleteOCMCoreShare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gatewayAPIClient) CreateTransfer(ctx context.Context, in *v1beta116.CreateTransferRequest, opts ...grpc.CallOption) (*v1beta116.CreateTransferResponse, error) { out := new(v1beta116.CreateTransferResponse) err := c.cc.Invoke(ctx, "/cs3.gateway.v1beta1.GatewayAPI/CreateTransfer", in, out, opts...) @@ -2224,6 +2284,9 @@ type GatewayAPIServer interface { // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. GetOCMShare(context.Context, *v1beta19.GetOCMShareRequest) (*v1beta19.GetOCMShareResponse, error) + // Gets share information for a single share by its unlisted token. + // MUST return CODE_NOT_FOUND if the share does not exist. + GetOCMShareByToken(context.Context, *v1beta19.GetOCMShareByTokenRequest) (*v1beta19.GetOCMShareByTokenResponse, error) // List the shares the authproviderenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. @@ -2279,6 +2342,8 @@ type GatewayAPIServer interface { GetHome(context.Context, *v1beta13.GetHomeRequest) (*v1beta13.GetHomeResponse, error) // Generates a new token for the user with a validity of 24 hours. GenerateInviteToken(context.Context, *v1beta113.GenerateInviteTokenRequest) (*v1beta113.GenerateInviteTokenResponse, error) + // Lists the valid tokens generated by the user. + ListInviteTokens(context.Context, *v1beta113.ListInviteTokensRequest) (*v1beta113.ListInviteTokensResponse, error) // Forwards a received invite to the sync'n'share system provider. ForwardInvite(context.Context, *v1beta113.ForwardInviteRequest) (*v1beta113.ForwardInviteResponse, error) // Completes an invitation acceptance. @@ -2287,6 +2352,8 @@ type GatewayAPIServer interface { GetAcceptedUser(context.Context, *v1beta113.GetAcceptedUserRequest) (*v1beta113.GetAcceptedUserResponse, error) // Finds users who accepted invite tokens by their attributes. FindAcceptedUsers(context.Context, *v1beta113.FindAcceptedUsersRequest) (*v1beta113.FindAcceptedUsersResponse, error) + // Delete a previously accepted remote user, that is unfriend that user. + DeleteAcceptedUser(context.Context, *v1beta113.DeleteAcceptedUserRequest) (*v1beta113.DeleteAcceptedUserResponse, error) // Check if a given system provider is registered in the mesh or not. // MUST return CODE_UNAUTHENTICATED if the system is not registered IsProviderAllowed(context.Context, *v1beta114.IsProviderAllowedRequest) (*v1beta114.IsProviderAllowedResponse, error) @@ -2295,8 +2362,12 @@ type GatewayAPIServer interface { GetInfoByDomain(context.Context, *v1beta114.GetInfoByDomainRequest) (*v1beta114.GetInfoByDomainResponse, error) // Get the information of all the providers registered in the mesh. ListAllProviders(context.Context, *v1beta114.ListAllProvidersRequest) (*v1beta114.ListAllProvidersResponse, error) - // Creates a new ocm share. + // Creates a new OCM share. CreateOCMCoreShare(context.Context, *v1beta115.CreateOCMCoreShareRequest) (*v1beta115.CreateOCMCoreShareResponse, error) + // Updates an OCM share. + UpdateOCMCoreShare(context.Context, *v1beta115.UpdateOCMCoreShareRequest) (*v1beta115.UpdateOCMCoreShareResponse, error) + // Deletes an OCM share. + DeleteOCMCoreShare(context.Context, *v1beta115.DeleteOCMCoreShareRequest) (*v1beta115.DeleteOCMCoreShareResponse, error) // Requests creation of a transfer. CreateTransfer(context.Context, *v1beta116.CreateTransferRequest) (*v1beta116.CreateTransferResponse, error) // Requests a transfer status. @@ -2480,6 +2551,9 @@ func (*UnimplementedGatewayAPIServer) RemoveOCMShare(ctx context.Context, req *v func (*UnimplementedGatewayAPIServer) GetOCMShare(ctx context.Context, req *v1beta19.GetOCMShareRequest) (*v1beta19.GetOCMShareResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOCMShare not implemented") } +func (*UnimplementedGatewayAPIServer) GetOCMShareByToken(ctx context.Context, req *v1beta19.GetOCMShareByTokenRequest) (*v1beta19.GetOCMShareByTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOCMShareByToken not implemented") +} func (*UnimplementedGatewayAPIServer) ListOCMShares(ctx context.Context, req *v1beta19.ListOCMSharesRequest) (*v1beta19.ListOCMSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOCMShares not implemented") } @@ -2549,6 +2623,9 @@ func (*UnimplementedGatewayAPIServer) GetHome(ctx context.Context, req *v1beta13 func (*UnimplementedGatewayAPIServer) GenerateInviteToken(ctx context.Context, req *v1beta113.GenerateInviteTokenRequest) (*v1beta113.GenerateInviteTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateInviteToken not implemented") } +func (*UnimplementedGatewayAPIServer) ListInviteTokens(ctx context.Context, req *v1beta113.ListInviteTokensRequest) (*v1beta113.ListInviteTokensResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInviteTokens not implemented") +} func (*UnimplementedGatewayAPIServer) ForwardInvite(ctx context.Context, req *v1beta113.ForwardInviteRequest) (*v1beta113.ForwardInviteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ForwardInvite not implemented") } @@ -2561,6 +2638,9 @@ func (*UnimplementedGatewayAPIServer) GetAcceptedUser(ctx context.Context, req * func (*UnimplementedGatewayAPIServer) FindAcceptedUsers(ctx context.Context, req *v1beta113.FindAcceptedUsersRequest) (*v1beta113.FindAcceptedUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAcceptedUsers not implemented") } +func (*UnimplementedGatewayAPIServer) DeleteAcceptedUser(ctx context.Context, req *v1beta113.DeleteAcceptedUserRequest) (*v1beta113.DeleteAcceptedUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAcceptedUser not implemented") +} func (*UnimplementedGatewayAPIServer) IsProviderAllowed(ctx context.Context, req *v1beta114.IsProviderAllowedRequest) (*v1beta114.IsProviderAllowedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IsProviderAllowed not implemented") } @@ -2573,6 +2653,12 @@ func (*UnimplementedGatewayAPIServer) ListAllProviders(ctx context.Context, req func (*UnimplementedGatewayAPIServer) CreateOCMCoreShare(ctx context.Context, req *v1beta115.CreateOCMCoreShareRequest) (*v1beta115.CreateOCMCoreShareResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateOCMCoreShare not implemented") } +func (*UnimplementedGatewayAPIServer) UpdateOCMCoreShare(ctx context.Context, req *v1beta115.UpdateOCMCoreShareRequest) (*v1beta115.UpdateOCMCoreShareResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOCMCoreShare not implemented") +} +func (*UnimplementedGatewayAPIServer) DeleteOCMCoreShare(ctx context.Context, req *v1beta115.DeleteOCMCoreShareRequest) (*v1beta115.DeleteOCMCoreShareResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOCMCoreShare not implemented") +} func (*UnimplementedGatewayAPIServer) CreateTransfer(ctx context.Context, req *v1beta116.CreateTransferRequest) (*v1beta116.CreateTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTransfer not implemented") } @@ -3592,6 +3678,24 @@ func _GatewayAPI_GetOCMShare_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _GatewayAPI_GetOCMShareByToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta19.GetOCMShareByTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayAPIServer).GetOCMShareByToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.gateway.v1beta1.GatewayAPI/GetOCMShareByToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayAPIServer).GetOCMShareByToken(ctx, req.(*v1beta19.GetOCMShareByTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GatewayAPI_ListOCMShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1beta19.ListOCMSharesRequest) if err := dec(in); err != nil { @@ -4006,6 +4110,24 @@ func _GatewayAPI_GenerateInviteToken_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _GatewayAPI_ListInviteTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta113.ListInviteTokensRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayAPIServer).ListInviteTokens(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.gateway.v1beta1.GatewayAPI/ListInviteTokens", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayAPIServer).ListInviteTokens(ctx, req.(*v1beta113.ListInviteTokensRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GatewayAPI_ForwardInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1beta113.ForwardInviteRequest) if err := dec(in); err != nil { @@ -4078,6 +4200,24 @@ func _GatewayAPI_FindAcceptedUsers_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _GatewayAPI_DeleteAcceptedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta113.DeleteAcceptedUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayAPIServer).DeleteAcceptedUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.gateway.v1beta1.GatewayAPI/DeleteAcceptedUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayAPIServer).DeleteAcceptedUser(ctx, req.(*v1beta113.DeleteAcceptedUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GatewayAPI_IsProviderAllowed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1beta114.IsProviderAllowedRequest) if err := dec(in); err != nil { @@ -4150,6 +4290,42 @@ func _GatewayAPI_CreateOCMCoreShare_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _GatewayAPI_UpdateOCMCoreShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta115.UpdateOCMCoreShareRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayAPIServer).UpdateOCMCoreShare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.gateway.v1beta1.GatewayAPI/UpdateOCMCoreShare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayAPIServer).UpdateOCMCoreShare(ctx, req.(*v1beta115.UpdateOCMCoreShareRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GatewayAPI_DeleteOCMCoreShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta115.DeleteOCMCoreShareRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayAPIServer).DeleteOCMCoreShare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.gateway.v1beta1.GatewayAPI/DeleteOCMCoreShare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayAPIServer).DeleteOCMCoreShare(ctx, req.(*v1beta115.DeleteOCMCoreShareRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GatewayAPI_CreateTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1beta116.CreateTransferRequest) if err := dec(in); err != nil { @@ -4474,6 +4650,10 @@ var _GatewayAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "GetOCMShare", Handler: _GatewayAPI_GetOCMShare_Handler, }, + { + MethodName: "GetOCMShareByToken", + Handler: _GatewayAPI_GetOCMShareByToken_Handler, + }, { MethodName: "ListOCMShares", Handler: _GatewayAPI_ListOCMShares_Handler, @@ -4566,6 +4746,10 @@ var _GatewayAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "GenerateInviteToken", Handler: _GatewayAPI_GenerateInviteToken_Handler, }, + { + MethodName: "ListInviteTokens", + Handler: _GatewayAPI_ListInviteTokens_Handler, + }, { MethodName: "ForwardInvite", Handler: _GatewayAPI_ForwardInvite_Handler, @@ -4582,6 +4766,10 @@ var _GatewayAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "FindAcceptedUsers", Handler: _GatewayAPI_FindAcceptedUsers_Handler, }, + { + MethodName: "DeleteAcceptedUser", + Handler: _GatewayAPI_DeleteAcceptedUser_Handler, + }, { MethodName: "IsProviderAllowed", Handler: _GatewayAPI_IsProviderAllowed_Handler, @@ -4598,6 +4786,14 @@ var _GatewayAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateOCMCoreShare", Handler: _GatewayAPI_CreateOCMCoreShare_Handler, }, + { + MethodName: "UpdateOCMCoreShare", + Handler: _GatewayAPI_UpdateOCMCoreShare_Handler, + }, + { + MethodName: "DeleteOCMCoreShare", + Handler: _GatewayAPI_DeleteOCMCoreShare_Handler, + }, { MethodName: "CreateTransfer", Handler: _GatewayAPI_CreateTransfer_Handler, diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/ocm_core_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/ocm_core_api.pb.go index cb8c82c4e4..eb0c28eb32 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/ocm_core_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/ocm_core_api.pb.go @@ -7,7 +7,9 @@ import ( context "context" fmt "fmt" v1beta11 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" - v1beta12 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + v1beta14 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + v1beta13 "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + v1beta12 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" v1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" @@ -27,7 +29,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// https://rawgit.com/GEANT/OCM-API/v1/docs.html#null%2Fpaths%2F~1shares%2Fpost type CreateOCMCoreShareRequest struct { // OPTIONAL. // Opaque information. @@ -40,22 +41,37 @@ type CreateOCMCoreShareRequest struct { Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // REQUIRED. // Identifier to identify the resource at the provider side. This is unique per provider. - ProviderId string `protobuf:"bytes,4,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"` + ResourceId string `protobuf:"bytes,4,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // REQUIRED. + // Provider specific identifier of the owner of the resource. + Owner *v1beta11.UserId `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` // REQUIRED. // Provider specific identifier of the user that wants to share the resource. - Owner *v1beta11.UserId `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Sender *v1beta11.UserId `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"` // REQUIRED. // Consumer specific identifier of the user or group the provider wants to share the resource with. // This is known in advance, for example using the OCM invitation flow. // Please note that the consumer service endpoint is known in advance as well, so this is no part of the request body. // TODO: this field needs to represent either a user or group in the future, not only a user. - ShareWith *v1beta11.UserId `protobuf:"bytes,6,opt,name=share_with,json=shareWith,proto3" json:"share_with,omitempty"` + ShareWith *v1beta11.UserId `protobuf:"bytes,7,opt,name=share_with,json=shareWith,proto3" json:"share_with,omitempty"` // REQUIRED. - // The protocol which is used to establish synchronisation. - Protocol *Protocol `protobuf:"bytes,7,opt,name=protocol,proto3" json:"protocol,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Resource type. + ResourceType v1beta12.ResourceType `protobuf:"varint,8,opt,name=resource_type,json=resourceType,proto3,enum=cs3.storage.provider.v1beta1.ResourceType" json:"resource_type,omitempty"` + // REQUIRED. + // Recipient share type. + ShareType v1beta13.ShareType `protobuf:"varint,9,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.ShareType" json:"share_type,omitempty"` + // OPTIONAL. + // The expiration time for the OCM share. + Expiration *v1beta1.Timestamp `protobuf:"bytes,10,opt,name=expiration,proto3" json:"expiration,omitempty"` + // REQUIRED. + // The protocols which are used to establish synchronisation, + // with their access rights. + // See also cs3/sharing/ocm/v1beta1/resources.proto for how to map + // this to the OCM share payload. + Protocols []*v1beta13.Protocol `protobuf:"bytes,11,rep,name=protocols,proto3" json:"protocols,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateOCMCoreShareRequest) Reset() { *m = CreateOCMCoreShareRequest{} } @@ -104,9 +120,9 @@ func (m *CreateOCMCoreShareRequest) GetName() string { return "" } -func (m *CreateOCMCoreShareRequest) GetProviderId() string { +func (m *CreateOCMCoreShareRequest) GetResourceId() string { if m != nil { - return m.ProviderId + return m.ResourceId } return "" } @@ -118,6 +134,13 @@ func (m *CreateOCMCoreShareRequest) GetOwner() *v1beta11.UserId { return nil } +func (m *CreateOCMCoreShareRequest) GetSender() *v1beta11.UserId { + if m != nil { + return m.Sender + } + return nil +} + func (m *CreateOCMCoreShareRequest) GetShareWith() *v1beta11.UserId { if m != nil { return m.ShareWith @@ -125,9 +148,30 @@ func (m *CreateOCMCoreShareRequest) GetShareWith() *v1beta11.UserId { return nil } -func (m *CreateOCMCoreShareRequest) GetProtocol() *Protocol { +func (m *CreateOCMCoreShareRequest) GetResourceType() v1beta12.ResourceType { if m != nil { - return m.Protocol + return m.ResourceType + } + return v1beta12.ResourceType_RESOURCE_TYPE_INVALID +} + +func (m *CreateOCMCoreShareRequest) GetShareType() v1beta13.ShareType { + if m != nil { + return m.ShareType + } + return v1beta13.ShareType_SHARE_TYPE_INVALID +} + +func (m *CreateOCMCoreShareRequest) GetExpiration() *v1beta1.Timestamp { + if m != nil { + return m.Expiration + } + return nil +} + +func (m *CreateOCMCoreShareRequest) GetProtocols() []*v1beta13.Protocol { + if m != nil { + return m.Protocols } return nil } @@ -135,7 +179,7 @@ func (m *CreateOCMCoreShareRequest) GetProtocol() *Protocol { type CreateOCMCoreShareResponse struct { // REQUIRED. // The response status. - Status *v1beta12.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Status *v1beta14.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // OPTIONAL. // Opaque information. Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` @@ -174,7 +218,7 @@ func (m *CreateOCMCoreShareResponse) XXX_DiscardUnknown() { var xxx_messageInfo_CreateOCMCoreShareResponse proto.InternalMessageInfo -func (m *CreateOCMCoreShareResponse) GetStatus() *v1beta12.Status { +func (m *CreateOCMCoreShareResponse) GetStatus() *v1beta14.Status { if m != nil { return m.Status } @@ -202,9 +246,258 @@ func (m *CreateOCMCoreShareResponse) GetCreated() *v1beta1.Timestamp { return nil } +type UpdateOCMCoreShareRequest struct { + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` + // REQUIRED. + // Unique ID to identify the share at the consumer side. + OcmShareId string `protobuf:"bytes,2,opt,name=ocm_share_id,json=ocmShareId,proto3" json:"ocm_share_id,omitempty"` + // OPTIONAL. + // Description for the share. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // OPTIONAL. + // Recipient share type. + ShareType v1beta13.ShareType `protobuf:"varint,5,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.ShareType" json:"share_type,omitempty"` + // OPTIONAL. + // The expiration time for the OCM share. + Expiration *v1beta1.Timestamp `protobuf:"bytes,6,opt,name=expiration,proto3" json:"expiration,omitempty"` + // OPTIONAL. + // The protocols which are used to establish synchronisation, + // with their access rights. + Protocols []*v1beta13.Protocol `protobuf:"bytes,7,rep,name=protocols,proto3" json:"protocols,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateOCMCoreShareRequest) Reset() { *m = UpdateOCMCoreShareRequest{} } +func (m *UpdateOCMCoreShareRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateOCMCoreShareRequest) ProtoMessage() {} +func (*UpdateOCMCoreShareRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4e8f411283db0fc7, []int{2} +} + +func (m *UpdateOCMCoreShareRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateOCMCoreShareRequest.Unmarshal(m, b) +} +func (m *UpdateOCMCoreShareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateOCMCoreShareRequest.Marshal(b, m, deterministic) +} +func (m *UpdateOCMCoreShareRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateOCMCoreShareRequest.Merge(m, src) +} +func (m *UpdateOCMCoreShareRequest) XXX_Size() int { + return xxx_messageInfo_UpdateOCMCoreShareRequest.Size(m) +} +func (m *UpdateOCMCoreShareRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateOCMCoreShareRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateOCMCoreShareRequest proto.InternalMessageInfo + +func (m *UpdateOCMCoreShareRequest) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + +func (m *UpdateOCMCoreShareRequest) GetOcmShareId() string { + if m != nil { + return m.OcmShareId + } + return "" +} + +func (m *UpdateOCMCoreShareRequest) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *UpdateOCMCoreShareRequest) GetShareType() v1beta13.ShareType { + if m != nil { + return m.ShareType + } + return v1beta13.ShareType_SHARE_TYPE_INVALID +} + +func (m *UpdateOCMCoreShareRequest) GetExpiration() *v1beta1.Timestamp { + if m != nil { + return m.Expiration + } + return nil +} + +func (m *UpdateOCMCoreShareRequest) GetProtocols() []*v1beta13.Protocol { + if m != nil { + return m.Protocols + } + return nil +} + +type UpdateOCMCoreShareResponse struct { + // REQUIRED. + // The response status. + Status *v1beta14.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateOCMCoreShareResponse) Reset() { *m = UpdateOCMCoreShareResponse{} } +func (m *UpdateOCMCoreShareResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateOCMCoreShareResponse) ProtoMessage() {} +func (*UpdateOCMCoreShareResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4e8f411283db0fc7, []int{3} +} + +func (m *UpdateOCMCoreShareResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateOCMCoreShareResponse.Unmarshal(m, b) +} +func (m *UpdateOCMCoreShareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateOCMCoreShareResponse.Marshal(b, m, deterministic) +} +func (m *UpdateOCMCoreShareResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateOCMCoreShareResponse.Merge(m, src) +} +func (m *UpdateOCMCoreShareResponse) XXX_Size() int { + return xxx_messageInfo_UpdateOCMCoreShareResponse.Size(m) +} +func (m *UpdateOCMCoreShareResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateOCMCoreShareResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateOCMCoreShareResponse proto.InternalMessageInfo + +func (m *UpdateOCMCoreShareResponse) GetStatus() *v1beta14.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *UpdateOCMCoreShareResponse) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + +type DeleteOCMCoreShareRequest struct { + // REQUIRED. + // Unique ID to identify the share at the consumer side. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteOCMCoreShareRequest) Reset() { *m = DeleteOCMCoreShareRequest{} } +func (m *DeleteOCMCoreShareRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteOCMCoreShareRequest) ProtoMessage() {} +func (*DeleteOCMCoreShareRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4e8f411283db0fc7, []int{4} +} + +func (m *DeleteOCMCoreShareRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteOCMCoreShareRequest.Unmarshal(m, b) +} +func (m *DeleteOCMCoreShareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteOCMCoreShareRequest.Marshal(b, m, deterministic) +} +func (m *DeleteOCMCoreShareRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteOCMCoreShareRequest.Merge(m, src) +} +func (m *DeleteOCMCoreShareRequest) XXX_Size() int { + return xxx_messageInfo_DeleteOCMCoreShareRequest.Size(m) +} +func (m *DeleteOCMCoreShareRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteOCMCoreShareRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteOCMCoreShareRequest proto.InternalMessageInfo + +func (m *DeleteOCMCoreShareRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *DeleteOCMCoreShareRequest) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + +type DeleteOCMCoreShareResponse struct { + // REQUIRED. + // The response status. + Status *v1beta14.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteOCMCoreShareResponse) Reset() { *m = DeleteOCMCoreShareResponse{} } +func (m *DeleteOCMCoreShareResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteOCMCoreShareResponse) ProtoMessage() {} +func (*DeleteOCMCoreShareResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4e8f411283db0fc7, []int{5} +} + +func (m *DeleteOCMCoreShareResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteOCMCoreShareResponse.Unmarshal(m, b) +} +func (m *DeleteOCMCoreShareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteOCMCoreShareResponse.Marshal(b, m, deterministic) +} +func (m *DeleteOCMCoreShareResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteOCMCoreShareResponse.Merge(m, src) +} +func (m *DeleteOCMCoreShareResponse) XXX_Size() int { + return xxx_messageInfo_DeleteOCMCoreShareResponse.Size(m) +} +func (m *DeleteOCMCoreShareResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteOCMCoreShareResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteOCMCoreShareResponse proto.InternalMessageInfo + +func (m *DeleteOCMCoreShareResponse) GetStatus() *v1beta14.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *DeleteOCMCoreShareResponse) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + func init() { proto.RegisterType((*CreateOCMCoreShareRequest)(nil), "cs3.ocm.core.v1beta1.CreateOCMCoreShareRequest") proto.RegisterType((*CreateOCMCoreShareResponse)(nil), "cs3.ocm.core.v1beta1.CreateOCMCoreShareResponse") + proto.RegisterType((*UpdateOCMCoreShareRequest)(nil), "cs3.ocm.core.v1beta1.UpdateOCMCoreShareRequest") + proto.RegisterType((*UpdateOCMCoreShareResponse)(nil), "cs3.ocm.core.v1beta1.UpdateOCMCoreShareResponse") + proto.RegisterType((*DeleteOCMCoreShareRequest)(nil), "cs3.ocm.core.v1beta1.DeleteOCMCoreShareRequest") + proto.RegisterType((*DeleteOCMCoreShareResponse)(nil), "cs3.ocm.core.v1beta1.DeleteOCMCoreShareResponse") } func init() { @@ -212,38 +505,52 @@ func init() { } var fileDescriptor_4e8f411283db0fc7 = []byte{ - // 484 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xdd, 0x6a, 0xd4, 0x40, - 0x14, 0x26, 0x69, 0xbb, 0xb5, 0x27, 0xa0, 0x30, 0x14, 0x4c, 0x97, 0xaa, 0x6b, 0x11, 0xac, 0x37, - 0x13, 0x77, 0x17, 0x14, 0xbc, 0xd2, 0xcd, 0x55, 0x2f, 0x24, 0x4b, 0xea, 0x0f, 0xc8, 0xc2, 0x92, - 0x4e, 0x0e, 0xec, 0x80, 0xc9, 0x4c, 0x67, 0x26, 0x5d, 0xfa, 0x00, 0xbe, 0x88, 0x97, 0x3e, 0x89, - 0xf8, 0x0c, 0x3e, 0x8c, 0xcc, 0x64, 0x12, 0x8a, 0x46, 0xd8, 0xbb, 0xe4, 0xfb, 0x39, 0x39, 0xe7, - 0xfb, 0x02, 0xcf, 0x99, 0x9e, 0x27, 0x82, 0x55, 0x09, 0x13, 0x0a, 0x93, 0x9b, 0xe9, 0x15, 0x9a, - 0x62, 0x6a, 0x81, 0xb5, 0x05, 0xd6, 0x85, 0xe4, 0x54, 0x2a, 0x61, 0x04, 0x39, 0x66, 0x7a, 0x4e, - 0x05, 0xab, 0xa8, 0xc5, 0xa9, 0x17, 0x8e, 0x5f, 0x58, 0x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, 0xc0, 0x3d, 0x97, 0x15, 0x13, 0x5f, 0xe3, 0x43, 0xe7, 0x7f, 0x4c, 0x87, 0x9a, 0xa5, 0x4b, - 0xaf, 0xca, 0x7b, 0xfd, 0xd9, 0xcf, 0x00, 0xc6, 0x43, 0xf1, 0x6a, 0x29, 0x6a, 0x8d, 0x24, 0x81, - 0x51, 0x5b, 0x96, 0xcf, 0xf7, 0xa1, 0x1b, 0xac, 0x24, 0xeb, 0x67, 0x5e, 0x3a, 0x3a, 0xf7, 0xb2, - 0x3b, 0x85, 0x84, 0xbb, 0x16, 0x72, 0x1f, 0x42, 0x5e, 0xfa, 0xb0, 0x43, 0x5e, 0x92, 0x57, 0x70, - 0xc8, 0xdc, 0x46, 0x6d, 0xcc, 0xd1, 0xec, 0x74, 0x60, 0xc6, 0x07, 0x5e, 0xa1, 0x36, 0x45, 0x25, - 0xf3, 0x4e, 0x3c, 0xfb, 0x16, 0x00, 0x64, 0xac, 0xb2, 0x47, 0xbc, 0x5b, 0x5e, 0x90, 0x2d, 0x90, - 0x7f, 0x0f, 0x23, 0xc9, 0x70, 0x32, 0xff, 0xfd, 0xc3, 0xc6, 0x2f, 0x77, 0x37, 0xb4, 0x99, 0x2d, - 0x6a, 0x88, 0x99, 0xa8, 0x06, 0x6d, 0x8b, 0x07, 0xdd, 0x82, 0x92, 0xbb, 0x32, 0x96, 0xc1, 0x97, - 0xc8, 0x0a, 0x3c, 0xff, 0x3d, 0xdc, 0x4b, 0xb3, 0xf4, 0x47, 0x78, 0x9c, 0xea, 0x39, 0xcd, 0x58, - 0x45, 0xad, 0x96, 0x7e, 0x9a, 0x2e, 0x2c, 0xf9, 0xcb, 0xc1, 0xab, 0x8c, 0x55, 0x2b, 0x0b, 0xaf, - 0x3c, 0x7c, 0x35, 0x72, 0x65, 0xce, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x27, 0xaa, 0xb1, - 0xf7, 0x03, 0x00, 0x00, + // 711 bytes of a gzipped FileDescri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, 0xac, 0x5d, 0xc3, 0x21, 0x1f, 0x2c, 0x68, 0x97, 0xad, 0xf5, 0xf6, 0x1c, 0xd2, 0x7d, + 0x07, 0xad, 0x17, 0xec, 0x94, 0x95, 0x0b, 0x9b, 0xd9, 0xc7, 0x2a, 0xec, 0x73, 0x0d, 0x7e, 0xfd, + 0xc4, 0xb2, 0x06, 0xb7, 0xf7, 0xc4, 0x9d, 0xef, 0x36, 0x80, 0x47, 0x23, 0xdd, 0x7c, 0x77, 0x7f, + 0x44, 0x66, 0x40, 0x16, 0xaf, 0x92, 0xf4, 0xdc, 0xb2, 0x6f, 0x9e, 0x5b, 0xf9, 0xc1, 0x68, 0x3f, + 0x5c, 0xbe, 0xc0, 0xbc, 0x75, 0x06, 0x64, 0x51, 0xec, 0xaa, 0xc6, 0x95, 0xd7, 0x56, 0xd5, 0xf8, + 0x0a, 0x1f, 0xcd, 0x80, 0x2c, 0x4a, 0x50, 0xd5, 0xb8, 0xd2, 0x0d, 0x55, 0x8d, 0xab, 0xd5, 0xdd, + 0x8b, 0xc1, 0xa1, 0x22, 0x2a, 0x2d, 0xdb, 0xfb, 0x27, 0x97, 0x24, 0xe1, 0x78, 0x1a, 0xfb, 0xd6, + 0xdb, 0xa6, 0x06, 0x98, 0xfc, 0x47, 0xbb, 0x36, 0xf4, 0x86, 0x9f, 0xec, 0xcd, 0xa1, 0x1a, 0xb8, + 0x1e, 0x8d, 0x5c, 0x8d, 0x75, 0x5f, 0xf7, 0xf7, 0x74, 0xf2, 0x0b, 0x86, 0x8f, 0x3c, 0x1a, 0x1d, + 0xe9, 0xf0, 0x91, 0x09, 0x1f, 0xd7, 0xf1, 0xb4, 0x06, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd8, + 0xa2, 0xd7, 0x40, 0xe9, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -258,8 +565,15 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type OcmCoreAPIClient interface { - // Creates a new ocm share. + // Creates a new OCM share, in response to a call from remote to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post CreateOCMCoreShare(ctx context.Context, in *CreateOCMCoreShareRequest, opts ...grpc.CallOption) (*CreateOCMCoreShareResponse, error) + // Updates an OCM share, in response to a notification from the remote system to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post + UpdateOCMCoreShare(ctx context.Context, in *UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*UpdateOCMCoreShareResponse, error) + // Deletes an OCM share, in response to a notification from the remote system to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post + DeleteOCMCoreShare(ctx context.Context, in *DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*DeleteOCMCoreShareResponse, error) } type ocmCoreAPIClient struct { @@ -279,10 +593,35 @@ func (c *ocmCoreAPIClient) CreateOCMCoreShare(ctx context.Context, in *CreateOCM return out, nil } +func (c *ocmCoreAPIClient) UpdateOCMCoreShare(ctx context.Context, in *UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*UpdateOCMCoreShareResponse, error) { + out := new(UpdateOCMCoreShareResponse) + err := c.cc.Invoke(ctx, "/cs3.ocm.core.v1beta1.OcmCoreAPI/UpdateOCMCoreShare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ocmCoreAPIClient) DeleteOCMCoreShare(ctx context.Context, in *DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*DeleteOCMCoreShareResponse, error) { + out := new(DeleteOCMCoreShareResponse) + err := c.cc.Invoke(ctx, "/cs3.ocm.core.v1beta1.OcmCoreAPI/DeleteOCMCoreShare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // OcmCoreAPIServer is the server API for OcmCoreAPI service. type OcmCoreAPIServer interface { - // Creates a new ocm share. + // Creates a new OCM share, in response to a call from remote to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post CreateOCMCoreShare(context.Context, *CreateOCMCoreShareRequest) (*CreateOCMCoreShareResponse, error) + // Updates an OCM share, in response to a notification from the remote system to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post + UpdateOCMCoreShare(context.Context, *UpdateOCMCoreShareRequest) (*UpdateOCMCoreShareResponse, error) + // Deletes an OCM share, in response to a notification from the remote system to: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post + DeleteOCMCoreShare(context.Context, *DeleteOCMCoreShareRequest) (*DeleteOCMCoreShareResponse, error) } // UnimplementedOcmCoreAPIServer can be embedded to have forward compatible implementations. @@ -292,6 +631,12 @@ type UnimplementedOcmCoreAPIServer struct { func (*UnimplementedOcmCoreAPIServer) CreateOCMCoreShare(ctx context.Context, req *CreateOCMCoreShareRequest) (*CreateOCMCoreShareResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateOCMCoreShare not implemented") } +func (*UnimplementedOcmCoreAPIServer) UpdateOCMCoreShare(ctx context.Context, req *UpdateOCMCoreShareRequest) (*UpdateOCMCoreShareResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOCMCoreShare not implemented") +} +func (*UnimplementedOcmCoreAPIServer) DeleteOCMCoreShare(ctx context.Context, req *DeleteOCMCoreShareRequest) (*DeleteOCMCoreShareResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOCMCoreShare not implemented") +} func RegisterOcmCoreAPIServer(s *grpc.Server, srv OcmCoreAPIServer) { s.RegisterService(&_OcmCoreAPI_serviceDesc, srv) @@ -315,6 +660,42 @@ func _OcmCoreAPI_CreateOCMCoreShare_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _OcmCoreAPI_UpdateOCMCoreShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateOCMCoreShareRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OcmCoreAPIServer).UpdateOCMCoreShare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.ocm.core.v1beta1.OcmCoreAPI/UpdateOCMCoreShare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OcmCoreAPIServer).UpdateOCMCoreShare(ctx, req.(*UpdateOCMCoreShareRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OcmCoreAPI_DeleteOCMCoreShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteOCMCoreShareRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OcmCoreAPIServer).DeleteOCMCoreShare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.ocm.core.v1beta1.OcmCoreAPI/DeleteOCMCoreShare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OcmCoreAPIServer).DeleteOCMCoreShare(ctx, req.(*DeleteOCMCoreShareRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _OcmCoreAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "cs3.ocm.core.v1beta1.OcmCoreAPI", HandlerType: (*OcmCoreAPIServer)(nil), @@ -323,6 +704,14 @@ var _OcmCoreAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateOCMCoreShare", Handler: _OcmCoreAPI_CreateOCMCoreShare_Handler, }, + { + MethodName: "UpdateOCMCoreShare", + Handler: _OcmCoreAPI_UpdateOCMCoreShare_Handler, + }, + { + MethodName: "DeleteOCMCoreShare", + Handler: _OcmCoreAPI_DeleteOCMCoreShare_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cs3/ocm/core/v1beta1/ocm_core_api.proto", diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/resources.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/resources.pb.go deleted file mode 100644 index 44cf64ea13..0000000000 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1/resources.pb.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: cs3/ocm/core/v1beta1/resources.proto - -package corev1beta1 - -import ( - fmt "fmt" - v1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - proto "github.com/golang/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// The protocol which is used to establish synchronisation. -type Protocol struct { - // REQUIRED. - // The name of the protocol to use. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // REQUIRED. - // JSON object with protocol specific options, - // e.g. uri, access_token, password, permissions etc. - Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Protocol) Reset() { *m = Protocol{} } -func (m *Protocol) String() string { return proto.CompactTextString(m) } -func (*Protocol) ProtoMessage() {} -func (*Protocol) Descriptor() ([]byte, []int) { - return fileDescriptor_2e4d9c6821c1d4ee, []int{0} -} - -func (m *Protocol) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Protocol.Unmarshal(m, b) -} -func (m *Protocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Protocol.Marshal(b, m, deterministic) -} -func (m *Protocol) XXX_Merge(src proto.Message) { - xxx_messageInfo_Protocol.Merge(m, src) -} -func (m *Protocol) XXX_Size() int { - return xxx_messageInfo_Protocol.Size(m) -} -func (m *Protocol) XXX_DiscardUnknown() { - xxx_messageInfo_Protocol.DiscardUnknown(m) -} - -var xxx_messageInfo_Protocol proto.InternalMessageInfo - -func (m *Protocol) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Protocol) GetOpaque() *v1beta1.Opaque { - if m != nil { - return m.Opaque - } - return nil -} - -func init() { - proto.RegisterType((*Protocol)(nil), "cs3.ocm.core.v1beta1.Protocol") -} - -func init() { - proto.RegisterFile("cs3/ocm/core/v1beta1/resources.proto", fileDescriptor_2e4d9c6821c1d4ee) -} - -var fileDescriptor_2e4d9c6821c1d4ee = []byte{ - // 219 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2e, 0x36, 0xd6, - 0xcf, 0x4f, 0xce, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, - 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x12, 0x49, 0x2e, 0x36, 0xd6, 0xcb, 0x4f, 0xce, 0xd5, 0x03, 0xa9, 0xd2, 0x83, 0xaa, 0x92, - 0x92, 0x05, 0xe9, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x6b, 0x04, 0xf3, 0x20, 0x9a, 0x94, 0x02, - 0xb9, 0x38, 0x02, 0x40, 0x8c, 0xe4, 0xfc, 0x1c, 0x21, 0x21, 0x2e, 0x96, 0xbc, 0xc4, 0xdc, 0x54, - 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0xc8, 0x90, 0x8b, 0x2d, 0xbf, 0x20, 0xb1, - 0xb0, 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x52, 0x0f, 0x64, 0x0b, 0xc4, 0x04, - 0xa8, 0x79, 0x7a, 0xfe, 0x60, 0x05, 0x41, 0x50, 0x85, 0x4e, 0xb9, 0x5c, 0x12, 0xc9, 0xf9, 0xb9, - 0x7a, 0xd8, 0x5c, 0xe3, 0xc4, 0x17, 0x04, 0x73, 0x34, 0xd8, 0xd6, 0x00, 0xc6, 0x28, 0x6e, 0x90, - 0x3c, 0x54, 0x7a, 0x11, 0x13, 0xb3, 0xb3, 0xbf, 0xf3, 0x2a, 0x26, 0x11, 0xe7, 0x62, 0x63, 0x3d, - 0xff, 0xe4, 0x5c, 0x3d, 0x67, 0x90, 0xde, 0x30, 0x43, 0x27, 0x90, 0xe4, 0x29, 0xb0, 0x70, 0x8c, - 0x7f, 0x72, 0x6e, 0x0c, 0x48, 0x38, 0x06, 0x2a, 0x9c, 0xc4, 0x06, 0xf6, 0x88, 0x31, 0x20, 0x00, - 0x00, 0xff, 0xff, 0x20, 0x4f, 0x98, 0x27, 0x25, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1/invite_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1/invite_api.pb.go index 463262c083..9014bfc0f2 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1/invite_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1/invite_api.pb.go @@ -140,6 +140,88 @@ func (m *GenerateInviteTokenResponse) GetInviteToken() *InviteToken { return nil } +type ListInviteTokensRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListInviteTokensRequest) Reset() { *m = ListInviteTokensRequest{} } +func (m *ListInviteTokensRequest) String() string { return proto.CompactTextString(m) } +func (*ListInviteTokensRequest) ProtoMessage() {} +func (*ListInviteTokensRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b0e70953130e3677, []int{2} +} + +func (m *ListInviteTokensRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListInviteTokensRequest.Unmarshal(m, b) +} +func (m *ListInviteTokensRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListInviteTokensRequest.Marshal(b, m, deterministic) +} +func (m *ListInviteTokensRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListInviteTokensRequest.Merge(m, src) +} +func (m *ListInviteTokensRequest) XXX_Size() int { + return xxx_messageInfo_ListInviteTokensRequest.Size(m) +} +func (m *ListInviteTokensRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListInviteTokensRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListInviteTokensRequest proto.InternalMessageInfo + +type ListInviteTokensResponse struct { + // REQUIRED. + // The response status. + Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // REQUIRED. + // The list of valid tokens. + InviteTokens []*InviteToken `protobuf:"bytes,2,rep,name=invite_tokens,json=inviteTokens,proto3" json:"invite_tokens,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListInviteTokensResponse) Reset() { *m = ListInviteTokensResponse{} } +func (m *ListInviteTokensResponse) String() string { return proto.CompactTextString(m) } +func (*ListInviteTokensResponse) ProtoMessage() {} +func (*ListInviteTokensResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b0e70953130e3677, []int{3} +} + +func (m *ListInviteTokensResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListInviteTokensResponse.Unmarshal(m, b) +} +func (m *ListInviteTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListInviteTokensResponse.Marshal(b, m, deterministic) +} +func (m *ListInviteTokensResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListInviteTokensResponse.Merge(m, src) +} +func (m *ListInviteTokensResponse) XXX_Size() int { + return xxx_messageInfo_ListInviteTokensResponse.Size(m) +} +func (m *ListInviteTokensResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListInviteTokensResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListInviteTokensResponse proto.InternalMessageInfo + +func (m *ListInviteTokensResponse) GetStatus() *v1beta11.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *ListInviteTokensResponse) GetInviteTokens() []*InviteToken { + if m != nil { + return m.InviteTokens + } + return nil +} + type ForwardInviteRequest struct { // OPTIONAL. // Opaque information. @@ -159,7 +241,7 @@ func (m *ForwardInviteRequest) Reset() { *m = ForwardInviteRequest{} } func (m *ForwardInviteRequest) String() string { return proto.CompactTextString(m) } func (*ForwardInviteRequest) ProtoMessage() {} func (*ForwardInviteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{2} + return fileDescriptor_b0e70953130e3677, []int{4} } func (m *ForwardInviteRequest) XXX_Unmarshal(b []byte) error { @@ -226,7 +308,7 @@ func (m *ForwardInviteResponse) Reset() { *m = ForwardInviteResponse{} } func (m *ForwardInviteResponse) String() string { return proto.CompactTextString(m) } func (*ForwardInviteResponse) ProtoMessage() {} func (*ForwardInviteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{3} + return fileDescriptor_b0e70953130e3677, []int{5} } func (m *ForwardInviteResponse) XXX_Unmarshal(b []byte) error { @@ -301,7 +383,7 @@ func (m *AcceptInviteRequest) Reset() { *m = AcceptInviteRequest{} } func (m *AcceptInviteRequest) String() string { return proto.CompactTextString(m) } func (*AcceptInviteRequest) ProtoMessage() {} func (*AcceptInviteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{4} + return fileDescriptor_b0e70953130e3677, []int{6} } func (m *AcceptInviteRequest) XXX_Unmarshal(b []byte) error { @@ -368,7 +450,7 @@ func (m *AcceptInviteResponse) Reset() { *m = AcceptInviteResponse{} } func (m *AcceptInviteResponse) String() string { return proto.CompactTextString(m) } func (*AcceptInviteResponse) ProtoMessage() {} func (*AcceptInviteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{5} + return fileDescriptor_b0e70953130e3677, []int{7} } func (m *AcceptInviteResponse) XXX_Unmarshal(b []byte) error { @@ -440,7 +522,7 @@ func (m *GetAcceptedUserRequest) Reset() { *m = GetAcceptedUserRequest{} func (m *GetAcceptedUserRequest) String() string { return proto.CompactTextString(m) } func (*GetAcceptedUserRequest) ProtoMessage() {} func (*GetAcceptedUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{6} + return fileDescriptor_b0e70953130e3677, []int{8} } func (m *GetAcceptedUserRequest) XXX_Unmarshal(b []byte) error { @@ -494,7 +576,7 @@ func (m *GetAcceptedUserResponse) Reset() { *m = GetAcceptedUserResponse func (m *GetAcceptedUserResponse) String() string { return proto.CompactTextString(m) } func (*GetAcceptedUserResponse) ProtoMessage() {} func (*GetAcceptedUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{7} + return fileDescriptor_b0e70953130e3677, []int{9} } func (m *GetAcceptedUserResponse) XXX_Unmarshal(b []byte) error { @@ -552,7 +634,7 @@ func (m *FindAcceptedUsersRequest) Reset() { *m = FindAcceptedUsersReque func (m *FindAcceptedUsersRequest) String() string { return proto.CompactTextString(m) } func (*FindAcceptedUsersRequest) ProtoMessage() {} func (*FindAcceptedUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{8} + return fileDescriptor_b0e70953130e3677, []int{10} } func (m *FindAcceptedUsersRequest) XXX_Unmarshal(b []byte) error { @@ -606,7 +688,7 @@ func (m *FindAcceptedUsersResponse) Reset() { *m = FindAcceptedUsersResp func (m *FindAcceptedUsersResponse) String() string { return proto.CompactTextString(m) } func (*FindAcceptedUsersResponse) ProtoMessage() {} func (*FindAcceptedUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b0e70953130e3677, []int{9} + return fileDescriptor_b0e70953130e3677, []int{11} } func (m *FindAcceptedUsersResponse) XXX_Unmarshal(b []byte) error { @@ -648,9 +730,113 @@ func (m *FindAcceptedUsersResponse) GetAcceptedUsers() []*v1beta13.User { return nil } +type DeleteAcceptedUserRequest struct { + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` + // REQUIRED. + // The id of the user. + RemoteUserId *v1beta13.UserId `protobuf:"bytes,2,opt,name=remote_user_id,json=remoteUserId,proto3" json:"remote_user_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteAcceptedUserRequest) Reset() { *m = DeleteAcceptedUserRequest{} } +func (m *DeleteAcceptedUserRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteAcceptedUserRequest) ProtoMessage() {} +func (*DeleteAcceptedUserRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b0e70953130e3677, []int{12} +} + +func (m *DeleteAcceptedUserRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteAcceptedUserRequest.Unmarshal(m, b) +} +func (m *DeleteAcceptedUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteAcceptedUserRequest.Marshal(b, m, deterministic) +} +func (m *DeleteAcceptedUserRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAcceptedUserRequest.Merge(m, src) +} +func (m *DeleteAcceptedUserRequest) XXX_Size() int { + return xxx_messageInfo_DeleteAcceptedUserRequest.Size(m) +} +func (m *DeleteAcceptedUserRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAcceptedUserRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAcceptedUserRequest proto.InternalMessageInfo + +func (m *DeleteAcceptedUserRequest) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + +func (m *DeleteAcceptedUserRequest) GetRemoteUserId() *v1beta13.UserId { + if m != nil { + return m.RemoteUserId + } + return nil +} + +type DeleteAcceptedUserResponse struct { + // REQUIRED. + // The response status. + Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // OPTIONAL. + // Opaque information. + Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteAcceptedUserResponse) Reset() { *m = DeleteAcceptedUserResponse{} } +func (m *DeleteAcceptedUserResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteAcceptedUserResponse) ProtoMessage() {} +func (*DeleteAcceptedUserResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b0e70953130e3677, []int{13} +} + +func (m *DeleteAcceptedUserResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteAcceptedUserResponse.Unmarshal(m, b) +} +func (m *DeleteAcceptedUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteAcceptedUserResponse.Marshal(b, m, deterministic) +} +func (m *DeleteAcceptedUserResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAcceptedUserResponse.Merge(m, src) +} +func (m *DeleteAcceptedUserResponse) XXX_Size() int { + return xxx_messageInfo_DeleteAcceptedUserResponse.Size(m) +} +func (m *DeleteAcceptedUserResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAcceptedUserResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAcceptedUserResponse proto.InternalMessageInfo + +func (m *DeleteAcceptedUserResponse) GetStatus() *v1beta11.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *DeleteAcceptedUserResponse) GetOpaque() *v1beta1.Opaque { + if m != nil { + return m.Opaque + } + return nil +} + func init() { proto.RegisterType((*GenerateInviteTokenRequest)(nil), "cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest") proto.RegisterType((*GenerateInviteTokenResponse)(nil), "cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse") + proto.RegisterType((*ListInviteTokensRequest)(nil), "cs3.ocm.invite.v1beta1.ListInviteTokensRequest") + proto.RegisterType((*ListInviteTokensResponse)(nil), "cs3.ocm.invite.v1beta1.ListInviteTokensResponse") proto.RegisterType((*ForwardInviteRequest)(nil), "cs3.ocm.invite.v1beta1.ForwardInviteRequest") proto.RegisterType((*ForwardInviteResponse)(nil), "cs3.ocm.invite.v1beta1.ForwardInviteResponse") proto.RegisterType((*AcceptInviteRequest)(nil), "cs3.ocm.invite.v1beta1.AcceptInviteRequest") @@ -659,6 +845,8 @@ func init() { proto.RegisterType((*GetAcceptedUserResponse)(nil), "cs3.ocm.invite.v1beta1.GetAcceptedUserResponse") proto.RegisterType((*FindAcceptedUsersRequest)(nil), "cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest") proto.RegisterType((*FindAcceptedUsersResponse)(nil), "cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse") + proto.RegisterType((*DeleteAcceptedUserRequest)(nil), "cs3.ocm.invite.v1beta1.DeleteAcceptedUserRequest") + proto.RegisterType((*DeleteAcceptedUserResponse)(nil), "cs3.ocm.invite.v1beta1.DeleteAcceptedUserResponse") } func init() { @@ -666,53 +854,59 @@ func init() { } var fileDescriptor_b0e70953130e3677 = []byte{ - // 733 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x4e, 0x13, 0x41, - 0x18, 0xcf, 0xb6, 0x50, 0xc3, 0xd7, 0x82, 0x71, 0xc1, 0x52, 0x56, 0x8d, 0xa5, 0x26, 0x88, 0x11, - 0xb7, 0x96, 0xde, 0x3c, 0x09, 0x24, 0x90, 0x5e, 0x6c, 0x53, 0xd4, 0x83, 0x69, 0xd2, 0x2c, 0xbb, - 0x1f, 0x66, 0x62, 0x77, 0x67, 0x99, 0x99, 0xa2, 0xbd, 0xf8, 0x14, 0x3e, 0x81, 0x47, 0x5f, 0xc2, - 0xa3, 0xd1, 0x23, 0x2f, 0xa2, 0x8f, 0x60, 0x76, 0x66, 0xba, 0x2c, 0x65, 0x57, 0x0b, 0x24, 0xc4, - 0x78, 0x6a, 0x67, 0x7e, 0xbf, 0xef, 0xfb, 0x7d, 0xff, 0x66, 0x66, 0xe1, 0xa1, 0xcb, 0x9b, 0x75, - 0xea, 0xfa, 0x75, 0x12, 0x1c, 0x13, 0x81, 0xf5, 0xe3, 0xc6, 0x01, 0x0a, 0xa7, 0xa1, 0x97, 0x7d, - 0x27, 0x24, 0x76, 0xc8, 0xa8, 0xa0, 0x66, 0xd9, 0xe5, 0x4d, 0x9b, 0xba, 0xbe, 0xad, 0x10, 0x5b, - 0x13, 0xad, 0x47, 0x91, 0x03, 0xe2, 0x61, 0x20, 0x88, 0x18, 0xd5, 0x87, 0x1c, 0x59, 0xec, 0x83, - 0x21, 0xa7, 0x43, 0xe6, 0x22, 0x57, 0x2e, 0xac, 0xb5, 0x0c, 0xad, 0x49, 0xde, 0xfa, 0x98, 0x17, - 0x32, 0x7a, 0x4c, 0xbc, 0x3f, 0x78, 0xbc, 0x1b, 0x31, 0x59, 0xe8, 0xc6, 0x04, 0x2e, 0x1c, 0x31, - 0x1c, 0xa3, 0xf7, 0x22, 0x54, 0x8c, 0x42, 0xe4, 0x31, 0x2e, 0x57, 0x0a, 0xae, 0x1d, 0x81, 0xb5, - 0x87, 0x01, 0x32, 0x47, 0x60, 0x4b, 0x06, 0xf4, 0x92, 0xbe, 0xc3, 0xa0, 0x8b, 0x47, 0x43, 0xe4, - 0xc2, 0x6c, 0x40, 0x81, 0x86, 0xce, 0xd1, 0x10, 0x2b, 0x46, 0xd5, 0x58, 0x2f, 0x6e, 0xae, 0xd8, - 0x51, 0x01, 0x94, 0xbd, 0xf6, 0x66, 0xb7, 0x25, 0xa1, 0xab, 0x89, 0x66, 0x15, 0x8a, 0x1e, 0x72, - 0x97, 0x91, 0x50, 0x10, 0x1a, 0x54, 0x72, 0x55, 0x63, 0x7d, 0xae, 0x9b, 0xdc, 0xaa, 0x7d, 0x37, - 0xe0, 0x4e, 0xaa, 0x26, 0x0f, 0x69, 0xc0, 0xd1, 0xac, 0x43, 0x41, 0x65, 0xa0, 0x45, 0x97, 0xa5, - 0x28, 0x0b, 0xdd, 0x58, 0x72, 0x5f, 0xc2, 0x5d, 0x4d, 0x4b, 0x44, 0x99, 0x9b, 0x36, 0xca, 0x5d, - 0x28, 0xe9, 0xe6, 0x8a, 0x48, 0xbb, 0x92, 0x97, 0x86, 0x0f, 0xec, 0xf4, 0xfe, 0xda, 0xc9, 0x30, - 0x8b, 0xe4, 0x74, 0x51, 0xfb, 0x69, 0xc0, 0xd2, 0x2e, 0x65, 0xef, 0x1d, 0xe6, 0x29, 0xce, 0x15, - 0x2a, 0x37, 0x19, 0x53, 0xee, 0x72, 0x31, 0x99, 0x3d, 0x28, 0x53, 0x46, 0xde, 0x92, 0xa0, 0xcf, - 0x47, 0x5c, 0xa0, 0xdf, 0x1f, 0x4f, 0x90, 0xce, 0x72, 0x2d, 0xf6, 0x38, 0x06, 0x62, 0x9f, 0x1d, - 0xbd, 0xd1, 0x0a, 0x0e, 0x69, 0x77, 0x49, 0x79, 0xd9, 0x97, 0x4e, 0xc6, 0x48, 0xed, 0x97, 0x01, - 0xb7, 0x27, 0x32, 0xbe, 0xc6, 0xbe, 0x3d, 0x83, 0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, - 0xde, 0x3c, 0x99, 0x81, 0x39, 0x75, 0xea, 0xb6, 0x3a, 0x2d, 0xf3, 0x23, 0x2c, 0xa6, 0x3c, 0x87, - 0xe6, 0x66, 0xd6, 0xa5, 0x90, 0xfd, 0x5e, 0x5b, 0xcd, 0x0b, 0xd9, 0xe8, 0xca, 0x0d, 0x60, 0xfe, - 0xcc, 0x85, 0x6e, 0x6e, 0x64, 0x79, 0x49, 0x7b, 0xe9, 0xac, 0x27, 0x53, 0xb2, 0xb5, 0x1a, 0x81, - 0x52, 0xf2, 0xda, 0x31, 0x1f, 0x67, 0x99, 0xa7, 0xdc, 0xb8, 0xd6, 0xc6, 0x74, 0x64, 0x2d, 0xc5, - 0xe0, 0xe6, 0xc4, 0xc1, 0x32, 0xed, 0xec, 0x02, 0xa5, 0x5d, 0x0c, 0x56, 0x7d, 0x6a, 0xbe, 0xd6, - 0xfc, 0x00, 0xb7, 0xce, 0xcd, 0xa8, 0xf9, 0x34, 0xb3, 0x44, 0x19, 0xc7, 0xc6, 0x6a, 0x5c, 0xc0, - 0x42, 0x29, 0x6f, 0x0f, 0xc1, 0x72, 0xa9, 0x9f, 0x61, 0xb7, 0xbd, 0xa0, 0xe7, 0x2d, 0x24, 0x9d, - 0xe8, 0xbb, 0xaf, 0x63, 0xbc, 0x99, 0x57, 0x0c, 0x4d, 0xf8, 0x9c, 0xcb, 0xef, 0xb4, 0x5b, 0x5f, - 0x72, 0xe5, 0x1d, 0xde, 0xb4, 0xdb, 0xae, 0xaf, 0x9f, 0x1e, 0xfb, 0x75, 0x63, 0x3b, 0x82, 0x7f, - 0x48, 0xa0, 0xd7, 0x76, 0xfd, 0x9e, 0x02, 0x7a, 0x1a, 0x38, 0x28, 0xc8, 0xef, 0xc8, 0xe6, 0xef, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xbe, 0x67, 0xda, 0x44, 0x0b, 0x00, 0x00, + // 828 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcd, 0x6e, 0xd3, 0x4e, + 0x10, 0x97, 0x93, 0x7f, 0xf3, 0x57, 0x27, 0x69, 0x81, 0x6d, 0x49, 0x1d, 0x03, 0x22, 0x35, 0x52, + 0x29, 0xa2, 0x38, 0x24, 0xb9, 0x71, 0xa2, 0x2d, 0x6a, 0x89, 0x84, 0x48, 0x94, 0x02, 0x07, 0x14, + 0x29, 0x72, 0xed, 0x2d, 0x5a, 0x11, 0x7f, 0x74, 0x77, 0x5d, 0x88, 0x90, 0x10, 0x0f, 0x01, 0xe2, + 0xce, 0x91, 0x97, 0xe0, 0x06, 0x82, 0x23, 0x2f, 0x02, 0x8f, 0x80, 0xbc, 0xde, 0xa4, 0x6e, 0x62, + 0xd3, 0xb4, 0x95, 0xa2, 0x8a, 0x53, 0xb2, 0xfb, 0x9b, 0x99, 0xdf, 0x7c, 0xec, 0xce, 0x8e, 0xe1, + 0xa6, 0xc5, 0xea, 0x15, 0xcf, 0x72, 0x2a, 0xc4, 0x3d, 0x20, 0x1c, 0x57, 0x0e, 0xaa, 0xbb, 0x98, + 0x9b, 0x55, 0xb9, 0xec, 0x9a, 0x3e, 0x31, 0x7c, 0xea, 0x71, 0x0f, 0x15, 0x2d, 0x56, 0x37, 0x3c, + 0xcb, 0x31, 0x22, 0xc4, 0x90, 0x82, 0xda, 0xad, 0xd0, 0x00, 0xb1, 0xb1, 0xcb, 0x09, 0xef, 0x57, + 0x02, 0x86, 0xe9, 0xd0, 0x06, 0xc5, 0xcc, 0x0b, 0xa8, 0x85, 0x59, 0x64, 0x42, 0x5b, 0x49, 0xe1, + 0x1a, 0x95, 0x5b, 0x1d, 0xc8, 0xf9, 0xd4, 0x3b, 0x20, 0xf6, 0x5f, 0x2c, 0x5e, 0x0d, 0x25, 0xa9, + 0x6f, 0x0d, 0x05, 0x18, 0x37, 0x79, 0x30, 0x40, 0xaf, 0x85, 0x28, 0xef, 0xfb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x7e, 0x03, 0x68, 0xfc, 0x36, 0xa1, 0x54, 0x43, 0xa9, 0x3d, 0x41, 0xab, 0x9d, 0x44, 0x25, + 0x22, 0xdf, 0x08, 0x40, 0xb3, 0x3c, 0x27, 0x45, 0x71, 0x63, 0x5e, 0xde, 0x31, 0x9f, 0xb4, 0xc2, + 0x6f, 0x97, 0x96, 0xf2, 0x5c, 0xce, 0xc4, 0x52, 0xe0, 0x53, 0x26, 0xbb, 0xd9, 0x6c, 0x7c, 0xce, + 0x14, 0x37, 0x59, 0xdd, 0x68, 0x5a, 0x8e, 0x9c, 0x45, 0x8c, 0x67, 0xd5, 0x8d, 0x10, 0xfe, 0x21, + 0x80, 0x4e, 0xd3, 0x72, 0x3a, 0x11, 0xd0, 0x91, 0xc0, 0x6e, 0x4e, 0x7c, 0x0b, 0xd5, 0xff, 0x04, + 0x00, 0x00, 0xff, 0xff, 0x18, 0x8d, 0xb3, 0xd2, 0x08, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -729,7 +923,11 @@ const _ = grpc.SupportPackageIsVersion4 type InviteAPIClient interface { // Generates a new token for the user with a validity of 24 hours. GenerateInviteToken(ctx context.Context, in *GenerateInviteTokenRequest, opts ...grpc.CallOption) (*GenerateInviteTokenResponse, error) - // Forwards a received invite to the sync'n'share system provider. + // Lists the valid tokens generated by the user. + ListInviteTokens(ctx context.Context, in *ListInviteTokensRequest, opts ...grpc.CallOption) (*ListInviteTokensResponse, error) + // Forwards a received invite to the remote sync'n'share system provider. The remote + // system SHALL get an `invite-accepted` call as follows: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post // MUST return CODE_NOT_FOUND if the token does not exist. // MUST return CODE_INVALID_ARGUMENT if the token expired. // MUST return CODE_ALREADY_EXISTS if the user already accepted an invite. @@ -745,6 +943,9 @@ type InviteAPIClient interface { GetAcceptedUser(ctx context.Context, in *GetAcceptedUserRequest, opts ...grpc.CallOption) (*GetAcceptedUserResponse, error) // Finds users who accepted invite tokens by their attributes. FindAcceptedUsers(ctx context.Context, in *FindAcceptedUsersRequest, opts ...grpc.CallOption) (*FindAcceptedUsersResponse, error) + // Delete a previously accepted remote user, that is unfriend that user. + // MUST return CODE_NOT_FOUND if the user does not exist. + DeleteAcceptedUser(ctx context.Context, in *DeleteAcceptedUserRequest, opts ...grpc.CallOption) (*DeleteAcceptedUserResponse, error) } type inviteAPIClient struct { @@ -764,6 +965,15 @@ func (c *inviteAPIClient) GenerateInviteToken(ctx context.Context, in *GenerateI return out, nil } +func (c *inviteAPIClient) ListInviteTokens(ctx context.Context, in *ListInviteTokensRequest, opts ...grpc.CallOption) (*ListInviteTokensResponse, error) { + out := new(ListInviteTokensResponse) + err := c.cc.Invoke(ctx, "/cs3.ocm.invite.v1beta1.InviteAPI/ListInviteTokens", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *inviteAPIClient) ForwardInvite(ctx context.Context, in *ForwardInviteRequest, opts ...grpc.CallOption) (*ForwardInviteResponse, error) { out := new(ForwardInviteResponse) err := c.cc.Invoke(ctx, "/cs3.ocm.invite.v1beta1.InviteAPI/ForwardInvite", in, out, opts...) @@ -800,11 +1010,24 @@ func (c *inviteAPIClient) FindAcceptedUsers(ctx context.Context, in *FindAccepte return out, nil } +func (c *inviteAPIClient) DeleteAcceptedUser(ctx context.Context, in *DeleteAcceptedUserRequest, opts ...grpc.CallOption) (*DeleteAcceptedUserResponse, error) { + out := new(DeleteAcceptedUserResponse) + err := c.cc.Invoke(ctx, "/cs3.ocm.invite.v1beta1.InviteAPI/DeleteAcceptedUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // InviteAPIServer is the server API for InviteAPI service. type InviteAPIServer interface { // Generates a new token for the user with a validity of 24 hours. GenerateInviteToken(context.Context, *GenerateInviteTokenRequest) (*GenerateInviteTokenResponse, error) - // Forwards a received invite to the sync'n'share system provider. + // Lists the valid tokens generated by the user. + ListInviteTokens(context.Context, *ListInviteTokensRequest) (*ListInviteTokensResponse, error) + // Forwards a received invite to the remote sync'n'share system provider. The remote + // system SHALL get an `invite-accepted` call as follows: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post // MUST return CODE_NOT_FOUND if the token does not exist. // MUST return CODE_INVALID_ARGUMENT if the token expired. // MUST return CODE_ALREADY_EXISTS if the user already accepted an invite. @@ -820,6 +1043,9 @@ type InviteAPIServer interface { GetAcceptedUser(context.Context, *GetAcceptedUserRequest) (*GetAcceptedUserResponse, error) // Finds users who accepted invite tokens by their attributes. FindAcceptedUsers(context.Context, *FindAcceptedUsersRequest) (*FindAcceptedUsersResponse, error) + // Delete a previously accepted remote user, that is unfriend that user. + // MUST return CODE_NOT_FOUND if the user does not exist. + DeleteAcceptedUser(context.Context, *DeleteAcceptedUserRequest) (*DeleteAcceptedUserResponse, error) } // UnimplementedInviteAPIServer can be embedded to have forward compatible implementations. @@ -829,6 +1055,9 @@ type UnimplementedInviteAPIServer struct { func (*UnimplementedInviteAPIServer) GenerateInviteToken(ctx context.Context, req *GenerateInviteTokenRequest) (*GenerateInviteTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateInviteToken not implemented") } +func (*UnimplementedInviteAPIServer) ListInviteTokens(ctx context.Context, req *ListInviteTokensRequest) (*ListInviteTokensResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInviteTokens not implemented") +} func (*UnimplementedInviteAPIServer) ForwardInvite(ctx context.Context, req *ForwardInviteRequest) (*ForwardInviteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ForwardInvite not implemented") } @@ -841,6 +1070,9 @@ func (*UnimplementedInviteAPIServer) GetAcceptedUser(ctx context.Context, req *G func (*UnimplementedInviteAPIServer) FindAcceptedUsers(ctx context.Context, req *FindAcceptedUsersRequest) (*FindAcceptedUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAcceptedUsers not implemented") } +func (*UnimplementedInviteAPIServer) DeleteAcceptedUser(ctx context.Context, req *DeleteAcceptedUserRequest) (*DeleteAcceptedUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAcceptedUser not implemented") +} func RegisterInviteAPIServer(s *grpc.Server, srv InviteAPIServer) { s.RegisterService(&_InviteAPI_serviceDesc, srv) @@ -864,6 +1096,24 @@ func _InviteAPI_GenerateInviteToken_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _InviteAPI_ListInviteTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInviteTokensRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InviteAPIServer).ListInviteTokens(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.ocm.invite.v1beta1.InviteAPI/ListInviteTokens", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InviteAPIServer).ListInviteTokens(ctx, req.(*ListInviteTokensRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _InviteAPI_ForwardInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ForwardInviteRequest) if err := dec(in); err != nil { @@ -936,6 +1186,24 @@ func _InviteAPI_FindAcceptedUsers_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _InviteAPI_DeleteAcceptedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAcceptedUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InviteAPIServer).DeleteAcceptedUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.ocm.invite.v1beta1.InviteAPI/DeleteAcceptedUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InviteAPIServer).DeleteAcceptedUser(ctx, req.(*DeleteAcceptedUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _InviteAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "cs3.ocm.invite.v1beta1.InviteAPI", HandlerType: (*InviteAPIServer)(nil), @@ -944,6 +1212,10 @@ var _InviteAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "GenerateInviteToken", Handler: _InviteAPI_GenerateInviteToken_Handler, }, + { + MethodName: "ListInviteTokens", + Handler: _InviteAPI_ListInviteTokens_Handler, + }, { MethodName: "ForwardInvite", Handler: _InviteAPI_ForwardInvite_Handler, @@ -960,6 +1232,10 @@ var _InviteAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "FindAcceptedUsers", Handler: _InviteAPI_FindAcceptedUsers_Handler, }, + { + MethodName: "DeleteAcceptedUser", + Handler: _InviteAPI_DeleteAcceptedUser_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cs3/ocm/invite/v1beta1/invite_api.proto", diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/link_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/link_api.pb.go index 3882b25e5c..f53cdab463 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/link_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/link_api.pb.go @@ -32,12 +32,14 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type UpdatePublicShareRequest_Update_Type int32 const ( - UpdatePublicShareRequest_Update_TYPE_INVALID UpdatePublicShareRequest_Update_Type = 0 - UpdatePublicShareRequest_Update_TYPE_PERMISSIONS UpdatePublicShareRequest_Update_Type = 1 - UpdatePublicShareRequest_Update_TYPE_PASSWORD UpdatePublicShareRequest_Update_Type = 2 - UpdatePublicShareRequest_Update_TYPE_EXPIRATION UpdatePublicShareRequest_Update_Type = 3 - UpdatePublicShareRequest_Update_TYPE_DISPLAYNAME UpdatePublicShareRequest_Update_Type = 4 - UpdatePublicShareRequest_Update_TYPE_DESCRIPTION UpdatePublicShareRequest_Update_Type = 5 + UpdatePublicShareRequest_Update_TYPE_INVALID UpdatePublicShareRequest_Update_Type = 0 + UpdatePublicShareRequest_Update_TYPE_PERMISSIONS UpdatePublicShareRequest_Update_Type = 1 + UpdatePublicShareRequest_Update_TYPE_PASSWORD UpdatePublicShareRequest_Update_Type = 2 + UpdatePublicShareRequest_Update_TYPE_EXPIRATION UpdatePublicShareRequest_Update_Type = 3 + UpdatePublicShareRequest_Update_TYPE_DISPLAYNAME UpdatePublicShareRequest_Update_Type = 4 + UpdatePublicShareRequest_Update_TYPE_DESCRIPTION UpdatePublicShareRequest_Update_Type = 5 + UpdatePublicShareRequest_Update_TYPE_NOTIFYUPLOADS UpdatePublicShareRequest_Update_Type = 6 + UpdatePublicShareRequest_Update_TYPE_NOTIFYUPLOADSEXTRARECIPIENTS UpdatePublicShareRequest_Update_Type = 7 ) var UpdatePublicShareRequest_Update_Type_name = map[int32]string{ @@ -47,15 +49,19 @@ var UpdatePublicShareRequest_Update_Type_name = map[int32]string{ 3: "TYPE_EXPIRATION", 4: "TYPE_DISPLAYNAME", 5: "TYPE_DESCRIPTION", + 6: "TYPE_NOTIFYUPLOADS", + 7: "TYPE_NOTIFYUPLOADSEXTRARECIPIENTS", } var UpdatePublicShareRequest_Update_Type_value = map[string]int32{ - "TYPE_INVALID": 0, - "TYPE_PERMISSIONS": 1, - "TYPE_PASSWORD": 2, - "TYPE_EXPIRATION": 3, - "TYPE_DISPLAYNAME": 4, - "TYPE_DESCRIPTION": 5, + "TYPE_INVALID": 0, + "TYPE_PERMISSIONS": 1, + "TYPE_PASSWORD": 2, + "TYPE_EXPIRATION": 3, + "TYPE_DISPLAYNAME": 4, + "TYPE_DESCRIPTION": 5, + "TYPE_NOTIFYUPLOADS": 6, + "TYPE_NOTIFYUPLOADSEXTRARECIPIENTS": 7, } func (x UpdatePublicShareRequest_Update_Type) String() string { @@ -114,10 +120,17 @@ type CreatePublicShareRequest struct { // OPTIONAL // Indicates a share used for internal usage, // not exposed by a ListPublicShares. - Internal bool `protobuf:"varint,5,opt,name=internal,proto3" json:"internal,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Internal bool `protobuf:"varint,5,opt,name=internal,proto3" json:"internal,omitempty"` + // OPTIONAL + // Whether to notify the owner of a share when a file is uploaded to it. + NotifyUploads bool `protobuf:"varint,6,opt,name=notify_uploads,json=notifyUploads,proto3" json:"notify_uploads,omitempty"` + // OPTIONAL + // Comma-separated list of extra email addresses to notify when a file is + // uploaded to the share. + NotifyUploadsExtraRecipients string `protobuf:"bytes,7,opt,name=notify_uploads_extra_recipients,json=notifyUploadsExtraRecipients,proto3" json:"notify_uploads_extra_recipients,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreatePublicShareRequest) Reset() { *m = CreatePublicShareRequest{} } @@ -180,6 +193,20 @@ func (m *CreatePublicShareRequest) GetInternal() bool { return false } +func (m *CreatePublicShareRequest) GetNotifyUploads() bool { + if m != nil { + return m.NotifyUploads + } + return false +} + +func (m *CreatePublicShareRequest) GetNotifyUploadsExtraRecipients() string { + if m != nil { + return m.NotifyUploadsExtraRecipients + } + return "" +} + type CreatePublicShareResponse struct { // REQUIRED. // The response status. @@ -313,10 +340,17 @@ type UpdatePublicShareRequest_Update struct { DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // OPTIONAL // Defines the public link description. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + // OPTIONAL + // Whether to notify the owner of a share when a file is uploaded to it. + NotifyUploads bool `protobuf:"varint,7,opt,name=notify_uploads,json=notifyUploads,proto3" json:"notify_uploads,omitempty"` + // OPTIONAL + // Comma-separated list of extra email addresses to notify when a file is + // uploaded to the share. + NotifyUploadsExtraRecipients string `protobuf:"bytes,8,opt,name=notify_uploads_extra_recipients,json=notifyUploadsExtraRecipients,proto3" json:"notify_uploads_extra_recipients,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpdatePublicShareRequest_Update) Reset() { *m = UpdatePublicShareRequest_Update{} } @@ -372,6 +406,20 @@ func (m *UpdatePublicShareRequest_Update) GetDescription() string { return "" } +func (m *UpdatePublicShareRequest_Update) GetNotifyUploads() bool { + if m != nil { + return m.NotifyUploads + } + return false +} + +func (m *UpdatePublicShareRequest_Update) GetNotifyUploadsExtraRecipients() string { + if m != nil { + return m.NotifyUploadsExtraRecipients + } + return "" +} + type UpdatePublicShareResponse struct { // REQUIRED. // The response status. @@ -1086,79 +1134,86 @@ func init() { } var fileDescriptor_fd835bb71eb73d1e = []byte{ - // 1149 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xef, 0xae, 0xff, 0x34, 0x7d, 0xf9, 0xd3, 0xcd, 0x50, 0xe8, 0xc6, 0x24, 0x22, 0xb5, 0x04, - 0x35, 0x08, 0xad, 0x89, 0x2d, 0xfe, 0x54, 0xa8, 0x08, 0xdb, 0x31, 0xed, 0x8a, 0xd4, 0xde, 0xce, - 0xa6, 0x2d, 0x85, 0x48, 0xd6, 0x66, 0x3d, 0x89, 0x57, 0x49, 0x76, 0xb7, 0x33, 0xeb, 0x04, 0x57, - 0x95, 0x90, 0x38, 0x71, 0xe3, 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3, 0x52, 0xf2, 0xbe, 0x49, 0x7f, 0x28, 0xb9, 0xf2, 0x54, 0x18, 0x19, - 0xd3, 0x27, 0xb0, 0x38, 0x32, 0x30, 0xc6, 0xed, 0x9e, 0x34, 0xee, 0xc6, 0xed, 0x9e, 0x3c, 0x91, - 0x18, 0x2c, 0x9c, 0x4c, 0x39, 0x2a, 0x8e, 0x79, 0x5b, 0x9e, 0x35, 0x56, 0x72, 0x6f, 0x4d, 0x0e, - 0x90, 0x9b, 0x7e, 0x35, 0x32, 0xa2, 0x64, 0xa1, 0xa1, 0x77, 0x26, 0xf5, 0x75, 0xb2, 0xe9, 0x72, - 0xef, 0x4e, 0x8d, 0x93, 0x54, 0x7a, 0xa0, 0x9d, 0xbe, 0x25, 0xd1, 0xda, 0xd4, 0x0f, 0x94, 0x5c, - 0x69, 0x1a, 0xc8, 0x71, 0xe2, 0x47, 0x5e, 0xb4, 0xe3, 0x12, 0x9f, 0xf4, 0xbb, 0x30, 0x2e, 0xf1, - 0x89, 0x4f, 0xe6, 0xea, 0x11, 0x2c, 0xbb, 0xc1, 0x41, 0x22, 0xb2, 0x3a, 0x27, 0xba, 0x23, 0xf4, - 0x2c, 0xfe, 0x63, 0x6e, 0x29, 0x9f, 0xce, 0x72, 0xad, 0x54, 0x7e, 0xa7, 0xa6, 0x6a, 0xf6, 0xc6, - 0xf7, 0xaa, 0x5e, 0x63, 0x65, 0xc3, 0x96, 0x68, 0x6e, 0x6f, 0xdc, 0x5f, 0xab, 0x72, 0x83, 0x9f, - 0x85, 0x6a, 0x4b, 0xaa, 0xb6, 0xb8, 0x6a, 0x4b, 0xaa, 0xb6, 0xb3, 0xe2, 0x57, 0xbf, 0xfc, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x49, 0x45, 0x11, 0xef, 0x10, 0x00, 0x00, + // 1249 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x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0x32, 0xe0, 0xe2, 0x38, 0xac, 0x49, 0x9e, 0x71, + 0xea, 0x34, 0x29, 0x71, 0xbd, 0xd0, 0x23, 0x3e, 0x67, 0xda, 0x82, 0xd8, 0x78, 0x6d, 0x8c, 0x67, + 0x44, 0x20, 0x3c, 0xc4, 0x14, 0x7e, 0x54, 0xe0, 0xfc, 0x11, 0x39, 0x60, 0x61, 0xe0, 0x33, 0x82, + 0x8a, 0x90, 0x8b, 0x0b, 0x45, 0x26, 0xe1, 0x9c, 0x88, 0x00, 0x0d, 0xdd, 0xe1, 0xc1, 0x6d, 0xa1, + 0xc6, 0x12, 0x36, 0x92, 0xb5, 0xd4, 0xac, 0x59, 0xfb, 0x08, 0xb2, 0x51, 0x48, 0x89, 0x0c, 0xf2, + 0xe5, 0xe4, 0x20, 0x8f, 0x7a, 0x18, 0x73, 0x0a, 0xbf, 0x67, 0x41, 0xdb, 0x0d, 0x5b, 0xff, 0x58, + 0x09, 0x7d, 0x02, 0x69, 0x4a, 0xda, 0xd2, 0x79, 0x7d, 0x36, 0x57, 0x48, 0x9b, 0x50, 0xe2, 0xbb, + 0x04, 0x47, 0x54, 0x74, 0x1b, 0x72, 0x3d, 0xe1, 0x90, 0x3c, 0xcf, 0xd5, 0x64, 0x23, 0x49, 0x8e, + 0x4b, 0x05, 0x96, 0x86, 0xf2, 0x5f, 0x67, 0x20, 0x17, 0x8b, 0x10, 0x86, 0x4c, 0xe4, 0xbf, 0xb0, + 0xbd, 0xba, 0xf5, 0xf1, 0x4b, 0xdb, 0xd6, 0x1b, 0xfd, 0x90, 0x60, 0x61, 0xeb, 0xa0, 0xca, 0x33, + 0x73, 0x55, 0xf9, 0x25, 0x58, 0x6e, 0x79, 0x2c, 0xec, 0x3a, 0xfd, 0xa6, 0xef, 0xec, 0x13, 0x51, + 0xc7, 0x51, 0x99, 0xc7, 0xb2, 0x9a, 0xb3, 0x4f, 0x0e, 0x37, 0x42, 0x6e, 0xb2, 0x11, 0x26, 0x8b, + 0x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62, 0xf1, 0x1b, 0xbd, 0x01, 0x27, 0x43, 0x67, 0x8f, + 0x34, 0x99, 0xf7, 0x9c, 0x88, 0x3e, 0xc9, 0xe2, 0xc5, 0x48, 0x60, 0x7b, 0xcf, 0x09, 0xba, 0x00, + 0x20, 0x94, 0x3c, 0x78, 0x44, 0x7c, 0xd9, 0x07, 0x02, 0xde, 0x88, 0x04, 0xf9, 0x3f, 0x52, 0x90, + 0x8b, 0xf7, 0x40, 0xb7, 0x65, 0xfb, 0xa6, 0x44, 0xfb, 0x5e, 0x7b, 0x59, 0x5f, 0x47, 0xbb, 0xf7, + 0x53, 0x58, 0x3a, 0xb8, 0xf4, 0x5a, 0x32, 0x27, 0x1b, 0x33, 0x5e, 0x79, 0xad, 0x9b, 0x27, 0x30, + 0x0c, 0xaf, 0xbc, 0x16, 0xba, 0x0a, 0xd9, 0xe0, 0xa9, 0x4f, 0xa8, 0x1c, 0x05, 0x97, 0x84, 0x99, + 0xc1, 0x0b, 0x43, 0x8f, 0x5e, 0x18, 0x07, 0x03, 0x86, 0x11, 0x2a, 0xf8, 0x31, 0x03, 0x5d, 0x83, + 0x05, 0x37, 0xba, 0x47, 0x02, 0x2a, 0x22, 0x30, 0x23, 0x79, 0xc0, 0x29, 0x58, 0x7f, 0xdb, 0x99, + 0xd8, 0xb0, 0xeb, 0xbb, 0xb8, 0x62, 0x34, 0xcd, 0x1d, 0x55, 0x41, 0xab, 0x00, 0x42, 0x5a, 0xbf, + 0x5b, 0x33, 0xb0, 0x9a, 0x1a, 0xf2, 0x2a, 0xd8, 0x28, 0x35, 0xea, 0x58, 0x4d, 0x97, 0x73, 0x90, + 0xe1, 0x84, 0xee, 0x17, 0x7e, 0x55, 0x40, 0x9b, 0x0c, 0xe7, 0x7f, 0xd3, 0x2f, 0xe9, 0x79, 0xfb, + 0x05, 0xbd, 0x09, 0xa7, 0x7c, 0xf2, 0x8c, 0x37, 0x47, 0x0a, 0x2c, 0x7e, 0x4f, 0xac, 0x44, 0x62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, 0xac, 0x8e, 0xa7, 0x1c, 0x15, 0xa7, 0x3c, 0x84, 0x8f, 0x1a, 0x2b, 0xf9, + 0x77, 0x67, 0x27, 0xc8, 0x4d, 0xbf, 0x9a, 0x18, 0x51, 0xb2, 0xd0, 0xd0, 0xfb, 0xb3, 0xda, 0x1a, + 0x6f, 0xba, 0xfc, 0x07, 0x73, 0xf3, 0xa4, 0x2b, 0x7d, 0x50, 0x0f, 0xdf, 0x92, 0x68, 0x73, 0xee, + 0x07, 0x4a, 0x7e, 0x6b, 0x1e, 0xca, 0x41, 0xe2, 0x27, 0x5e, 0xb4, 0xd3, 0x12, 0x9f, 0xf4, 0x6d, + 0x33, 0x2d, 0xf1, 0x89, 0x4f, 0xe6, 0xf2, 0x53, 0x58, 0x73, 0x83, 0xfd, 0x44, 0x66, 0x79, 0x59, + 0x74, 0x47, 0xe8, 0x59, 0x34, 0xe0, 0x81, 0xa5, 0x7c, 0xb6, 0x14, 0x69, 0xa5, 0xf2, 0xbb, 0x54, + 0xba, 0x62, 0x57, 0xbf, 0x4f, 0x69, 0x15, 0xb6, 0xad, 0xdb, 0x92, 0x1d, 0xe1, 0xf5, 0x3b, 0x9b, + 0xe5, 0x08, 0xf0, 0xb3, 0x50, 0x3d, 0x90, 0xaa, 0x07, 0x91, 0xea, 0x81, 0x54, 0x3d, 0xcc, 0x89, + 0x7f, 0x41, 0xb6, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xcd, 0x0c, 0x89, 0x0a, 0x12, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/resources.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/resources.pb.go index ef7f0a6404..52718a1c01 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/resources.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1/resources.pb.go @@ -86,10 +86,17 @@ type PublicShare struct { Quicklink bool `protobuf:"varint,13,opt,name=quicklink,proto3" json:"quicklink,omitempty"` // OPTIONAL // Description of the share. - Description string `protobuf:"bytes,14,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Description string `protobuf:"bytes,14,opt,name=description,proto3" json:"description,omitempty"` + // OPTIONAL + // Whether to notify the owner of a share when a file is uploaded to it. + NotifyUploads bool `protobuf:"varint,15,opt,name=notify_uploads,json=notifyUploads,proto3" json:"notify_uploads,omitempty"` + // OPTIONAL + // Comma-separated list of extra email addresses to notify when a file is + // uploaded to the share. + NotifyUploadsExtraRecipients string `protobuf:"bytes,16,opt,name=notify_uploads_extra_recipients,json=notifyUploadsExtraRecipients,proto3" json:"notify_uploads_extra_recipients,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PublicShare) Reset() { *m = PublicShare{} } @@ -215,6 +222,20 @@ func (m *PublicShare) GetDescription() string { return "" } +func (m *PublicShare) GetNotifyUploads() bool { + if m != nil { + return m.NotifyUploads + } + return false +} + +func (m *PublicShare) GetNotifyUploadsExtraRecipients() string { + if m != nil { + return m.NotifyUploadsExtraRecipients + } + return "" +} + // The permissions for a share. type PublicSharePermissions struct { Permissions *v1beta1.ResourcePermissions `protobuf:"bytes,1,opt,name=permissions,proto3" json:"permissions,omitempty"` @@ -597,49 +618,53 @@ func init() { } var fileDescriptor_2f13c61869aaebc4 = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0xad, 0xdd, 0xa6, 0x4d, 0xae, 0xdb, 0x4a, 0x0c, 0x55, 0x35, 0x94, 0x20, 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 0x55, 0x3c, 0x8c, 0x4b, 0x06, 0xb6, 0x17, 0x30, 0xf0, 0xdd, 0x82, 0xf9, 0xb2, 0x20, - 0x36, 0x7f, 0x58, 0x50, 0x79, 0x2d, 0x48, 0xa4, 0xfe, 0xfc, 0xe4, 0x58, 0xff, 0xe3, 0x93, 0xb3, - 0x53, 0x7a, 0x9d, 0x99, 0xf6, 0xc5, 0xcb, 0x9c, 0x4d, 0xe0, 0xf2, 0xed, 0x12, 0xd8, 0x9b, 0x40, - 0xdd, 0xe7, 0xe1, 0xdc, 0xed, 0x7a, 0x9b, 0xb9, 0x53, 0xa5, 0xce, 0x3c, 0x1f, 0x5a, 0x1f, 0x1d, - 0xdd, 0xcf, 0xda, 0xdf, 0xec, 0xe5, 0xc3, 0xd1, 0xd1, 0x77, 0x1b, 0x1f, 0xca, 0xae, 0xd1, 0x49, - 0xf3, 0x8f, 0x34, 0xff, 0x43, 0xa7, 0xa7, 0x01, 0x3f, 0x4d, 0xeb, 0x38, 0x6b, 0x1d, 0xeb, 0xd6, - 0x71, 0xd6, 0x3a, 0x59, 0x35, 0x7f, 0x26, 0xdd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xa3, - 0xf1, 0xe1, 0x0a, 0x07, 0x00, 0x00, + // 753 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xdd, 0x4e, 0x1b, 0x47, + 0x14, 0x66, 0x0d, 0x36, 0xf6, 0x59, 0x70, 0xdb, 0x29, 0x42, 0x53, 0xea, 0xaa, 0xc6, 0x52, 0x55, + 0x57, 0xa2, 0xeb, 0x1a, 0x5f, 0xa0, 0xaa, 0xbd, 0xa9, 0x11, 0xad, 0x2d, 0xa1, 0xc6, 0x5a, 0x87, + 0x5c, 0x44, 0x48, 0xd6, 0xb0, 0x3b, 0xc0, 0x08, 0xef, 0xce, 0x32, 0x33, 0x0b, 0xf8, 0x2a, 0x0f, + 0x90, 0xb7, 0xc8, 0x65, 0xee, 0xf3, 0x12, 0x79, 0x89, 0xbc, 0x4a, 0x34, 0xb3, 0x3f, 0x5e, 0x47, + 0x38, 0x32, 0x51, 0xee, 0x3c, 0xe7, 0x7c, 0xdf, 0x37, 0x67, 0xf6, 0x7c, 0xe7, 0x18, 0xda, 0x9e, + 0xec, 0x75, 0xe4, 0x35, 0x11, 0x2c, 0xbc, 0xea, 0x4c, 0x59, 0x78, 0xd3, 0xb9, 0xeb, 0x5e, 0x50, + 0x45, 0xba, 0x1d, 0x41, 0x25, 0x8f, 0x85, 0x47, 0xa5, 0x13, 0x09, 0xae, 0x38, 0xc2, 0x9e, 0xec, + 0x39, 0x29, 0xd2, 0xd1, 0x48, 0x27, 0x45, 0xee, 0xfd, 0xa6, 0x35, 0x98, 0x4f, 0x43, 0xc5, 0xd4, + 0xac, 0x13, 0x4b, 0x2a, 0x96, 0x89, 0xec, 0x1d, 0x98, 0xeb, 0x14, 0x17, 0xe4, 0x8a, 0x76, 0x22, + 0xc1, 0xef, 0x98, 0xff, 0x19, 0xf4, 0x4f, 0x1a, 0xad, 0x66, 0x11, 0x95, 0x39, 0xc4, 0x9c, 0x92, + 0x74, 0xeb, 0x43, 0x05, 0xec, 0x51, 0x7c, 0x31, 0x65, 0xde, 0xf8, 0x9a, 0x08, 0x8a, 0x8e, 0xa0, + 0xc4, 0x7c, 0x6c, 0x35, 0xad, 0xb6, 0x7d, 0xf8, 0xab, 0xb3, 0xac, 0x5c, 0xa7, 0x40, 0x19, 0xfa, + 0x6e, 0x89, 0xf9, 0x68, 0x07, 0xca, 0x8a, 0xdf, 0xd0, 0x10, 0x97, 0x9a, 0x56, 0xbb, 0xe6, 0x26, + 0x07, 0x34, 0x04, 0x3b, 0x2b, 0x68, 0xc2, 0x7c, 0xbc, 0x6e, 0x74, 0xdb, 0x89, 0x6e, 0xf2, 0x02, + 0x27, 0x7b, 0x41, 0xae, 0xed, 0xa6, 0x84, 0xa1, 0xef, 0x82, 0xc8, 0x7f, 0x23, 0x17, 0xec, 0x88, + 0x8a, 0x80, 0x49, 0xc9, 0x78, 0x28, 0xf1, 0x86, 0x91, 0xfa, 0x63, 0xa5, 0x12, 0x47, 0x73, 0x9e, + 0x5b, 0x14, 0x41, 0x47, 0x50, 0xe6, 0xf7, 0x21, 0x15, 0xb8, 0x6c, 0xd4, 0xf6, 0x8d, 0x5a, 0xd6, + 0x05, 0x47, 0x77, 0x21, 0x97, 0x3b, 0x93, 0x54, 0x0c, 0x7d, 0x37, 0xc1, 0xa3, 0xbf, 0x60, 0xd3, + 0x13, 0x94, 0x28, 0x2e, 0x70, 0x65, 0x55, 0x6a, 0xc6, 0x40, 0x87, 0x50, 0xf6, 0x14, 0x0b, 0x28, + 0xde, 0x34, 0xd4, 0x86, 0xa1, 0x26, 0x4d, 0xc9, 0x28, 0xcf, 0x59, 0x40, 0xa5, 0x22, 0x41, 0xe4, + 0x26, 0x50, 0xcd, 0x09, 0x0c, 0xa7, 0xba, 0x0a, 0xc7, 0x40, 0xd1, 0xef, 0x80, 0x22, 0x22, 0xe5, + 0x3d, 0x17, 0xfe, 0x44, 0x77, 0x9b, 0x7a, 0x8a, 0xfa, 0xb8, 0xd6, 0xb4, 0xda, 0x55, 0xf7, 0xbb, + 0x2c, 0x33, 0xca, 0x12, 0xe8, 0x6f, 0x00, 0xfa, 0x10, 0x31, 0x41, 0x14, 0xe3, 0x21, 0x86, 0x15, + 0xee, 0x29, 0xe0, 0xd1, 0x3e, 0x6c, 0xf9, 0x4c, 0x46, 0x53, 0x32, 0x9b, 0x84, 0x24, 0xa0, 0xd8, + 0x36, 0x36, 0xb0, 0xd3, 0xd8, 0xff, 0x24, 0xa0, 0xe8, 0x5f, 0xa8, 0x49, 0x76, 0x15, 0x12, 0x15, + 0x0b, 0x8a, 0xb7, 0x8a, 0x56, 0x78, 0xac, 0x7f, 0xa6, 0x73, 0xe3, 0x0c, 0xef, 0xce, 0xa9, 0xa8, + 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, 0xd6, 0x0a, 0x1e, 0xca, 0xab, 0x79, 0x05, 0xf5, + 0x45, 0x98, 0x76, 0xd7, 0xfc, 0x0e, 0x53, 0x42, 0xd1, 0x7b, 0xcf, 0x60, 0x27, 0x3f, 0x4c, 0x0a, + 0xe3, 0x52, 0x5a, 0x61, 0x5c, 0xbe, 0xcf, 0x99, 0x27, 0x39, 0xb1, 0xf5, 0xce, 0x82, 0xf2, 0x7f, + 0x82, 0x84, 0xea, 0xd3, 0x05, 0x67, 0x7d, 0x8d, 0x05, 0xb7, 0x57, 0xf8, 0x9c, 0x69, 0xef, 0xf3, + 0x8f, 0xb9, 0x38, 0xef, 0xeb, 0x4f, 0x9b, 0xf7, 0xfe, 0x0c, 0x1a, 0x1e, 0x0f, 0x96, 0x56, 0xd7, + 0xaf, 0x67, 0x4e, 0x95, 0x7a, 0xc3, 0xf0, 0x91, 0xf5, 0xd2, 0xd6, 0xf9, 0x34, 0xfd, 0xa6, 0xb4, + 0x7e, 0x3c, 0x3e, 0x7d, 0x5b, 0xc2, 0xc7, 0xb2, 0x67, 0xfa, 0xa4, 0xf9, 0xa7, 0x9a, 0xff, 0xa2, + 0xdb, 0xd7, 0x80, 0xf7, 0x26, 0x75, 0x9e, 0xa6, 0xce, 0x75, 0xea, 0x3c, 0x4d, 0x5d, 0x54, 0xcc, + 0x5f, 0x57, 0xef, 0x63, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x46, 0xa1, 0x6b, 0x78, 0x07, 0x00, + 0x00, } diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/ocm_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/ocm_api.pb.go index e80eed2220..4335b67e5d 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/ocm_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/ocm_api.pb.go @@ -80,14 +80,19 @@ type CreateOCMShareRequest struct { // The unique identifier for the shared storage resource. ResourceId *v1beta11.ResourceId `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // REQUIRED. - // The share grant for the share. - Grant *ShareGrant `protobuf:"bytes,3,opt,name=grant,proto3" json:"grant,omitempty"` + // The grantee for the share. + Grantee *v1beta11.Grantee `protobuf:"bytes,3,opt,name=grantee,proto3" json:"grantee,omitempty"` // REQUIRED. // The details of the recipient user's mesh provider. RecipientMeshProvider *v1beta12.ProviderInfo `protobuf:"bytes,4,opt,name=recipient_mesh_provider,json=recipientMeshProvider,proto3" json:"recipient_mesh_provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // REQUIRED. + AccessMethods []*AccessMethod `protobuf:"bytes,5,rep,name=access_methods,json=accessMethods,proto3" json:"access_methods,omitempty"` + // OPTIONAL. + // The expiration time for the ocm share. + Expiration *v1beta1.Timestamp `protobuf:"bytes,6,opt,name=expiration,proto3" json:"expiration,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateOCMShareRequest) Reset() { *m = CreateOCMShareRequest{} } @@ -129,9 +134,9 @@ func (m *CreateOCMShareRequest) GetResourceId() *v1beta11.ResourceId { return nil } -func (m *CreateOCMShareRequest) GetGrant() *ShareGrant { +func (m *CreateOCMShareRequest) GetGrantee() *v1beta11.Grantee { if m != nil { - return m.Grant + return m.Grantee } return nil } @@ -143,6 +148,20 @@ func (m *CreateOCMShareRequest) GetRecipientMeshProvider() *v1beta12.ProviderInf return nil } +func (m *CreateOCMShareRequest) GetAccessMethods() []*AccessMethod { + if m != nil { + return m.AccessMethods + } + return nil +} + +func (m *CreateOCMShareRequest) GetExpiration() *v1beta1.Timestamp { + if m != nil { + return m.Expiration + } + return nil +} + type CreateOCMShareResponse struct { // REQUIRED. // The response status. @@ -152,7 +171,10 @@ type CreateOCMShareResponse struct { Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. // The created share. - Share *Share `protobuf:"bytes,3,opt,name=share,proto3" json:"share,omitempty"` + Share *Share `protobuf:"bytes,3,opt,name=share,proto3" json:"share,omitempty"` + // OPTIONAL. + // Display name of the recipient of the share. + RecipientDisplayName string `protobuf:"bytes,4,opt,name=recipient_display_name,json=recipientDisplayName,proto3" json:"recipient_display_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -204,16 +226,23 @@ func (m *CreateOCMShareResponse) GetShare() *Share { return nil } +func (m *CreateOCMShareResponse) GetRecipientDisplayName() string { + if m != nil { + return m.RecipientDisplayName + } + return "" +} + type UpdateOCMShareRequest struct { // OPTIONAL. // Opaque information. Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. - Ref *ShareReference `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` - Field *UpdateOCMShareRequest_UpdateField `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Ref *ShareReference `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` + Field []*UpdateOCMShareRequest_UpdateField `protobuf:"bytes,3,rep,name=field,proto3" json:"field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpdateOCMShareRequest) Reset() { *m = UpdateOCMShareRequest{} } @@ -255,7 +284,7 @@ func (m *UpdateOCMShareRequest) GetRef() *ShareReference { return nil } -func (m *UpdateOCMShareRequest) GetField() *UpdateOCMShareRequest_UpdateField { +func (m *UpdateOCMShareRequest) GetField() []*UpdateOCMShareRequest_UpdateField { if m != nil { return m.Field } @@ -267,8 +296,8 @@ type UpdateOCMShareRequest_UpdateField struct { // One of the update fields MUST be specified. // // Types that are valid to be assigned to Field: - // *UpdateOCMShareRequest_UpdateField_Permissions - // *UpdateOCMShareRequest_UpdateField_DisplayName + // *UpdateOCMShareRequest_UpdateField_Expiration + // *UpdateOCMShareRequest_UpdateField_AccessMethods Field isUpdateOCMShareRequest_UpdateField_Field `protobuf_oneof:"field"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -304,17 +333,17 @@ type isUpdateOCMShareRequest_UpdateField_Field interface { isUpdateOCMShareRequest_UpdateField_Field() } -type UpdateOCMShareRequest_UpdateField_Permissions struct { - Permissions *SharePermissions `protobuf:"bytes,2,opt,name=permissions,proto3,oneof"` +type UpdateOCMShareRequest_UpdateField_Expiration struct { + Expiration *v1beta1.Timestamp `protobuf:"bytes,1,opt,name=expiration,proto3,oneof"` } -type UpdateOCMShareRequest_UpdateField_DisplayName struct { - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3,oneof"` +type UpdateOCMShareRequest_UpdateField_AccessMethods struct { + AccessMethods *AccessMethod `protobuf:"bytes,2,opt,name=access_methods,json=accessMethods,proto3,oneof"` } -func (*UpdateOCMShareRequest_UpdateField_Permissions) isUpdateOCMShareRequest_UpdateField_Field() {} +func (*UpdateOCMShareRequest_UpdateField_Expiration) isUpdateOCMShareRequest_UpdateField_Field() {} -func (*UpdateOCMShareRequest_UpdateField_DisplayName) isUpdateOCMShareRequest_UpdateField_Field() {} +func (*UpdateOCMShareRequest_UpdateField_AccessMethods) isUpdateOCMShareRequest_UpdateField_Field() {} func (m *UpdateOCMShareRequest_UpdateField) GetField() isUpdateOCMShareRequest_UpdateField_Field { if m != nil { @@ -323,25 +352,25 @@ func (m *UpdateOCMShareRequest_UpdateField) GetField() isUpdateOCMShareRequest_U return nil } -func (m *UpdateOCMShareRequest_UpdateField) GetPermissions() *SharePermissions { - if x, ok := m.GetField().(*UpdateOCMShareRequest_UpdateField_Permissions); ok { - return x.Permissions +func (m *UpdateOCMShareRequest_UpdateField) GetExpiration() *v1beta1.Timestamp { + if x, ok := m.GetField().(*UpdateOCMShareRequest_UpdateField_Expiration); ok { + return x.Expiration } return nil } -func (m *UpdateOCMShareRequest_UpdateField) GetDisplayName() string { - if x, ok := m.GetField().(*UpdateOCMShareRequest_UpdateField_DisplayName); ok { - return x.DisplayName +func (m *UpdateOCMShareRequest_UpdateField) GetAccessMethods() *AccessMethod { + if x, ok := m.GetField().(*UpdateOCMShareRequest_UpdateField_AccessMethods); ok { + return x.AccessMethods } - return "" + return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*UpdateOCMShareRequest_UpdateField) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*UpdateOCMShareRequest_UpdateField_Permissions)(nil), - (*UpdateOCMShareRequest_UpdateField_DisplayName)(nil), + (*UpdateOCMShareRequest_UpdateField_Expiration)(nil), + (*UpdateOCMShareRequest_UpdateField_AccessMethods)(nil), } } @@ -863,6 +892,98 @@ func (m *GetOCMShareResponse) GetShare() *Share { return nil } +type GetOCMShareByTokenRequest struct { + // REQUIRED. + // The unlisted token to identify the public share. + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetOCMShareByTokenRequest) Reset() { *m = GetOCMShareByTokenRequest{} } +func (m *GetOCMShareByTokenRequest) String() string { return proto.CompactTextString(m) } +func (*GetOCMShareByTokenRequest) ProtoMessage() {} +func (*GetOCMShareByTokenRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3b1231a7f0a479a0, []int{10} +} + +func (m *GetOCMShareByTokenRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetOCMShareByTokenRequest.Unmarshal(m, b) +} +func (m *GetOCMShareByTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetOCMShareByTokenRequest.Marshal(b, m, deterministic) +} +func (m *GetOCMShareByTokenRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOCMShareByTokenRequest.Merge(m, src) +} +func (m *GetOCMShareByTokenRequest) XXX_Size() int { + return xxx_messageInfo_GetOCMShareByTokenRequest.Size(m) +} +func (m *GetOCMShareByTokenRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetOCMShareByTokenRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetOCMShareByTokenRequest proto.InternalMessageInfo + +func (m *GetOCMShareByTokenRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type GetOCMShareByTokenResponse struct { + // REQUIRED. + // The response status. + Status *v1beta13.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // REQUIRED. + // The share. + Share *Share `protobuf:"bytes,2,opt,name=share,proto3" json:"share,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetOCMShareByTokenResponse) Reset() { *m = GetOCMShareByTokenResponse{} } +func (m *GetOCMShareByTokenResponse) String() string { return proto.CompactTextString(m) } +func (*GetOCMShareByTokenResponse) ProtoMessage() {} +func (*GetOCMShareByTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3b1231a7f0a479a0, []int{11} +} + +func (m *GetOCMShareByTokenResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetOCMShareByTokenResponse.Unmarshal(m, b) +} +func (m *GetOCMShareByTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetOCMShareByTokenResponse.Marshal(b, m, deterministic) +} +func (m *GetOCMShareByTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOCMShareByTokenResponse.Merge(m, src) +} +func (m *GetOCMShareByTokenResponse) XXX_Size() int { + return xxx_messageInfo_GetOCMShareByTokenResponse.Size(m) +} +func (m *GetOCMShareByTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetOCMShareByTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetOCMShareByTokenResponse proto.InternalMessageInfo + +func (m *GetOCMShareByTokenResponse) GetStatus() *v1beta13.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *GetOCMShareByTokenResponse) GetShare() *Share { + if m != nil { + return m.Share + } + return nil +} + type ListReceivedOCMSharesRequest struct { // OPTIONAL. // Opaque information. @@ -885,7 +1006,7 @@ func (m *ListReceivedOCMSharesRequest) Reset() { *m = ListReceivedOCMSha func (m *ListReceivedOCMSharesRequest) String() string { return proto.CompactTextString(m) } func (*ListReceivedOCMSharesRequest) ProtoMessage() {} func (*ListReceivedOCMSharesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{10} + return fileDescriptor_3b1231a7f0a479a0, []int{12} } func (m *ListReceivedOCMSharesRequest) XXX_Unmarshal(b []byte) error { @@ -951,7 +1072,7 @@ func (m *ListReceivedOCMSharesResponse) Reset() { *m = ListReceivedOCMSh func (m *ListReceivedOCMSharesResponse) String() string { return proto.CompactTextString(m) } func (*ListReceivedOCMSharesResponse) ProtoMessage() {} func (*ListReceivedOCMSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{11} + return fileDescriptor_3b1231a7f0a479a0, []int{13} } func (m *ListReceivedOCMSharesResponse) XXX_Unmarshal(b []byte) error { @@ -1020,7 +1141,7 @@ func (m *UpdateReceivedOCMShareRequest) Reset() { *m = UpdateReceivedOCM func (m *UpdateReceivedOCMShareRequest) String() string { return proto.CompactTextString(m) } func (*UpdateReceivedOCMShareRequest) ProtoMessage() {} func (*UpdateReceivedOCMShareRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{12} + return fileDescriptor_3b1231a7f0a479a0, []int{14} } func (m *UpdateReceivedOCMShareRequest) XXX_Unmarshal(b []byte) error { @@ -1078,7 +1199,7 @@ func (m *UpdateReceivedOCMShareResponse) Reset() { *m = UpdateReceivedOC func (m *UpdateReceivedOCMShareResponse) String() string { return proto.CompactTextString(m) } func (*UpdateReceivedOCMShareResponse) ProtoMessage() {} func (*UpdateReceivedOCMShareResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{13} + return fileDescriptor_3b1231a7f0a479a0, []int{15} } func (m *UpdateReceivedOCMShareResponse) XXX_Unmarshal(b []byte) error { @@ -1129,7 +1250,7 @@ func (m *GetReceivedOCMShareRequest) Reset() { *m = GetReceivedOCMShareR func (m *GetReceivedOCMShareRequest) String() string { return proto.CompactTextString(m) } func (*GetReceivedOCMShareRequest) ProtoMessage() {} func (*GetReceivedOCMShareRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{14} + return fileDescriptor_3b1231a7f0a479a0, []int{16} } func (m *GetReceivedOCMShareRequest) XXX_Unmarshal(b []byte) error { @@ -1183,7 +1304,7 @@ func (m *GetReceivedOCMShareResponse) Reset() { *m = GetReceivedOCMShare func (m *GetReceivedOCMShareResponse) String() string { return proto.CompactTextString(m) } func (*GetReceivedOCMShareResponse) ProtoMessage() {} func (*GetReceivedOCMShareResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3b1231a7f0a479a0, []int{15} + return fileDescriptor_3b1231a7f0a479a0, []int{17} } func (m *GetReceivedOCMShareResponse) XXX_Unmarshal(b []byte) error { @@ -1239,6 +1360,8 @@ func init() { proto.RegisterType((*RemoveOCMShareResponse)(nil), "cs3.sharing.ocm.v1beta1.RemoveOCMShareResponse") proto.RegisterType((*GetOCMShareRequest)(nil), "cs3.sharing.ocm.v1beta1.GetOCMShareRequest") proto.RegisterType((*GetOCMShareResponse)(nil), "cs3.sharing.ocm.v1beta1.GetOCMShareResponse") + proto.RegisterType((*GetOCMShareByTokenRequest)(nil), "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest") + proto.RegisterType((*GetOCMShareByTokenResponse)(nil), "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse") proto.RegisterType((*ListReceivedOCMSharesRequest)(nil), "cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesRequest") proto.RegisterType((*ListReceivedOCMSharesResponse)(nil), "cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesResponse") proto.RegisterType((*UpdateReceivedOCMShareRequest)(nil), "cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest") @@ -1252,83 +1375,91 @@ func init() { } var fileDescriptor_3b1231a7f0a479a0 = []byte{ - // 1210 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0xb1, 0x43, 0x9e, 0xdb, 0x60, 0x4d, 0xeb, 0xc6, 0x75, 0x9a, 0xaa, 0xb8, 0x22, - 0x4d, 0x45, 0x59, 0x2b, 0x3f, 0x08, 0x0a, 0x14, 0xa4, 0xc4, 0x71, 0x53, 0x8b, 0x26, 0x6b, 0x4d, - 0xd2, 0x20, 0x50, 0xc4, 0x6a, 0xb3, 0x1e, 0x3b, 0xab, 0x64, 0x7f, 0x64, 0x66, 0x1d, 0x48, 0xc5, - 0x01, 0x21, 0x40, 0xa2, 0x12, 0x07, 0xf8, 0x13, 0x38, 0x72, 0x01, 0x71, 0xe4, 0xc2, 0x1d, 0x89, - 0x13, 0x47, 0xae, 0xdc, 0xf8, 0x27, 0xd0, 0xcc, 0xce, 0xfa, 0x57, 0xbc, 0x4e, 0xdc, 0x44, 0x2e, - 0x37, 0x7b, 0xde, 0xf7, 0xde, 0x7c, 0xf3, 0xed, 0x9b, 0x6f, 0x66, 0xe0, 0x75, 0x93, 0x2d, 0x14, - 0xd8, 0xbe, 0x41, 0x2d, 0xa7,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+ // 1333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcb, 0x8e, 0x1b, 0x45, + 0x17, 0x4e, 0xdb, 0x63, 0x4f, 0x72, 0xfc, 0x67, 0x7e, 0xab, 0x32, 0xce, 0x38, 0x9d, 0x4c, 0x14, + 0x5a, 0xca, 0x05, 0x11, 0xda, 0x9a, 0x0b, 0x41, 0x81, 0x10, 0x34, 0xf6, 0x38, 0x89, 0x45, 0xc6, + 0xb6, 0x6a, 0x26, 0x41, 0xa0, 0x88, 0x56, 0xa7, 0x5d, 0xb6, 0x5b, 0x99, 0xbe, 0x4c, 0x57, 0x7b, + 0xc8, 0x44, 0x20, 0x45, 0xdc, 0x24, 0x90, 0x58, 0xc0, 0x23, 0xb0, 0x60, 0xc1, 0x86, 0x3d, 0x1b, + 0x24, 0x96, 0x48, 0x6c, 0xd8, 0xf2, 0x02, 0x48, 0xbc, 0x04, 0xaa, 0xea, 0x6a, 0xdb, 0x6d, 0xbb, + 0x7d, 0x49, 0x22, 0x87, 0x5d, 0x77, 0x9d, 0xef, 0x9c, 0xfa, 0xaa, 0xce, 0x57, 0xe7, 0x54, 0xc1, + 0x45, 0x83, 0x6e, 0x14, 0x68, 0x5b, 0xf7, 0x4c, 0xbb, 0x55, 0x70, 0x0c, 0xab, 0x70, 0xb8, 0xf6, + 0x90, 0xf8, 0xfa, 0x1a, 0xfb, 0xd6, 0x74, 0xd7, 0x54, 0x5d, 0xcf, 0xf1, 0x1d, 0xb4, 0x62, 0xd0, + 0x0d, 0x55, 0xc0, 0x54, 0xc7, 0xb0, 0x54, 0x01, 0x93, 0x5f, 0x65, 0xfe, 0x66, 0x83, 0xd8, 0xbe, + 0xe9, 0x1f, 0x15, 0x3a, 0x94, 0x78, 0xdd, 0x08, 0x1e, 0xa1, 0x4e, 0xc7, 0x33, 0x08, 0x0d, 0x62, + 0xc8, 0x57, 0x18, 0x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b, 0xac, 0xdf, 0xd4, 0xa5, 0x0f, 0xc1, 0x31, 0x2c, 0x61, 0xfa, + 0x21, 0x91, 0x2c, 0xed, 0xd6, 0x7e, 0x4a, 0xac, 0x94, 0xe8, 0x06, 0x2f, 0xb8, 0xcc, 0xb5, 0x66, + 0x58, 0xea, 0xfd, 0xb5, 0x22, 0xb3, 0xff, 0xce, 0x2d, 0x0f, 0x84, 0xe5, 0x41, 0xcd, 0xb0, 0x1e, + 0x08, 0xcb, 0xc3, 0x34, 0x6f, 0x5f, 0x1b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x14, 0xd1, 0x72, + 0x91, 0x5a, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1347,20 +1478,31 @@ type OcmAPIClient interface { // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of // (owner, shared_resource, grantee). - // New shares MUST be created in the state SHARE_STATE_PENDING. + // New shares MUST be created in the state SHARE_STATE_PENDING, and MUST be sent + // to the remote system using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post CreateOCMShare(ctx context.Context, in *CreateOCMShareRequest, opts ...grpc.CallOption) (*CreateOCMShareResponse, error) // Removes a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. + // This action SHALL be notified to the remote system + // using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post RemoveOCMShare(ctx context.Context, in *RemoveOCMShareRequest, opts ...grpc.CallOption) (*RemoveOCMShareResponse, error) // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. GetOCMShare(ctx context.Context, in *GetOCMShareRequest, opts ...grpc.CallOption) (*GetOCMShareResponse, error) + // Gets share information for a single share by its unlisted token. + // MUST return CODE_NOT_FOUND if the share does not exist. + GetOCMShareByToken(ctx context.Context, in *GetOCMShareByTokenRequest, opts ...grpc.CallOption) (*GetOCMShareByTokenResponse, error) // List the shares the authenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. ListOCMShares(ctx context.Context, in *ListOCMSharesRequest, opts ...grpc.CallOption) (*ListOCMSharesResponse, error) // Updates a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. + // This action SHALL be notified to the remote system + // using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post UpdateOCMShare(ctx context.Context, in *UpdateOCMShareRequest, opts ...grpc.CallOption) (*UpdateOCMShareResponse, error) // List all shares the authenticated principal has received. ListReceivedOCMShares(ctx context.Context, in *ListReceivedOCMSharesRequest, opts ...grpc.CallOption) (*ListReceivedOCMSharesResponse, error) @@ -1407,6 +1549,15 @@ func (c *ocmAPIClient) GetOCMShare(ctx context.Context, in *GetOCMShareRequest, return out, nil } +func (c *ocmAPIClient) GetOCMShareByToken(ctx context.Context, in *GetOCMShareByTokenRequest, opts ...grpc.CallOption) (*GetOCMShareByTokenResponse, error) { + out := new(GetOCMShareByTokenResponse) + err := c.cc.Invoke(ctx, "/cs3.sharing.ocm.v1beta1.OcmAPI/GetOCMShareByToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *ocmAPIClient) ListOCMShares(ctx context.Context, in *ListOCMSharesRequest, opts ...grpc.CallOption) (*ListOCMSharesResponse, error) { out := new(ListOCMSharesResponse) err := c.cc.Invoke(ctx, "/cs3.sharing.ocm.v1beta1.OcmAPI/ListOCMShares", in, out, opts...) @@ -1458,20 +1609,31 @@ type OcmAPIServer interface { // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of // (owner, shared_resource, grantee). - // New shares MUST be created in the state SHARE_STATE_PENDING. + // New shares MUST be created in the state SHARE_STATE_PENDING, and MUST be sent + // to the remote system using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post CreateOCMShare(context.Context, *CreateOCMShareRequest) (*CreateOCMShareResponse, error) // Removes a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. + // This action SHALL be notified to the remote system + // using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post RemoveOCMShare(context.Context, *RemoveOCMShareRequest) (*RemoveOCMShareResponse, error) // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. GetOCMShare(context.Context, *GetOCMShareRequest) (*GetOCMShareResponse, error) + // Gets share information for a single share by its unlisted token. + // MUST return CODE_NOT_FOUND if the share does not exist. + GetOCMShareByToken(context.Context, *GetOCMShareByTokenRequest) (*GetOCMShareByTokenResponse, error) // List the shares the authenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. ListOCMShares(context.Context, *ListOCMSharesRequest) (*ListOCMSharesResponse, error) // Updates a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. + // This action SHALL be notified to the remote system + // using the OCM API at: + // https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post UpdateOCMShare(context.Context, *UpdateOCMShareRequest) (*UpdateOCMShareResponse, error) // List all shares the authenticated principal has received. ListReceivedOCMShares(context.Context, *ListReceivedOCMSharesRequest) (*ListReceivedOCMSharesResponse, error) @@ -1496,6 +1658,9 @@ func (*UnimplementedOcmAPIServer) RemoveOCMShare(ctx context.Context, req *Remov func (*UnimplementedOcmAPIServer) GetOCMShare(ctx context.Context, req *GetOCMShareRequest) (*GetOCMShareResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOCMShare not implemented") } +func (*UnimplementedOcmAPIServer) GetOCMShareByToken(ctx context.Context, req *GetOCMShareByTokenRequest) (*GetOCMShareByTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOCMShareByToken not implemented") +} func (*UnimplementedOcmAPIServer) ListOCMShares(ctx context.Context, req *ListOCMSharesRequest) (*ListOCMSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOCMShares not implemented") } @@ -1570,6 +1735,24 @@ func _OcmAPI_GetOCMShare_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _OcmAPI_GetOCMShareByToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOCMShareByTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OcmAPIServer).GetOCMShareByToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cs3.sharing.ocm.v1beta1.OcmAPI/GetOCMShareByToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OcmAPIServer).GetOCMShareByToken(ctx, req.(*GetOCMShareByTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _OcmAPI_ListOCMShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListOCMSharesRequest) if err := dec(in); err != nil { @@ -1676,6 +1859,10 @@ var _OcmAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "GetOCMShare", Handler: _OcmAPI_GetOCMShare_Handler, }, + { + MethodName: "GetOCMShareByToken", + Handler: _OcmAPI_GetOCMShareByToken_Handler, + }, { MethodName: "ListOCMShares", Handler: _OcmAPI_ListOCMShares_Handler, diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/resources.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/resources.pb.go index f568ff80e1..283dbc9500 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/resources.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1/resources.pb.go @@ -5,6 +5,7 @@ package ocmv1beta1 import ( fmt "fmt" + v1beta13 "github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1" v1beta11 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" v1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" v1beta12 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" @@ -63,40 +64,41 @@ func (ShareState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_b8b387acee7aaf43, []int{0} } -// Defines the type of share based on its origin. -type Share_ShareType int32 +// Defines the type of share based on its recipient. +type ShareType int32 const ( - Share_SHARE_TYPE_INVALID Share_ShareType = 0 - // A regular file or folder share. - Share_SHARE_TYPE_REGULAR Share_ShareType = 1 - // A file or folder transfer. - Share_SHARE_TYPE_TRANSFER Share_ShareType = 2 + ShareType_SHARE_TYPE_INVALID ShareType = 0 + // Share of type user. + ShareType_SHARE_TYPE_USER ShareType = 1 + // Share of type group. + ShareType_SHARE_TYPE_GROUP ShareType = 2 ) -var Share_ShareType_name = map[int32]string{ +var ShareType_name = map[int32]string{ 0: "SHARE_TYPE_INVALID", - 1: "SHARE_TYPE_REGULAR", - 2: "SHARE_TYPE_TRANSFER", + 1: "SHARE_TYPE_USER", + 2: "SHARE_TYPE_GROUP", } -var Share_ShareType_value = map[string]int32{ - "SHARE_TYPE_INVALID": 0, - "SHARE_TYPE_REGULAR": 1, - "SHARE_TYPE_TRANSFER": 2, +var ShareType_value = map[string]int32{ + "SHARE_TYPE_INVALID": 0, + "SHARE_TYPE_USER": 1, + "SHARE_TYPE_GROUP": 2, } -func (x Share_ShareType) String() string { - return proto.EnumName(Share_ShareType_name, int32(x)) +func (x ShareType) String() string { + return proto.EnumName(ShareType_name, int32(x)) } -func (Share_ShareType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b8b387acee7aaf43, []int{0, 0} +func (ShareType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{1} } // Shares are relationships between a resource owner -// (usually the authenticated user) who grants permissions to a recipient (grantee) -// on a specified resource (resource_id). UserShares represents both user and groups. +// (usually the authenticated user) who grants permissions to a recipient +// (grantee) on a specified resource (resource_id). UserShares represents both +// user and groups. type Share struct { // REQUIRED. // Opaque unique identifier of the share. @@ -108,9 +110,8 @@ type Share struct { // Name of the shared resource. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // REQUIRED. - // Permissions for the grantee to use - // the resource. - Permissions *SharePermissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` + // The unlisted token to give access to the ocm share. + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // REQUIRED. // The receiver of the share, like a user, group ... Grantee *v1beta1.Grantee `protobuf:"bytes,5,opt,name=grantee,proto3" json:"grantee,omitempty"` @@ -132,11 +133,19 @@ type Share struct { // REQUIRED. // Last modification time of the share. Mtime *v1beta12.Timestamp `protobuf:"bytes,9,opt,name=mtime,proto3" json:"mtime,omitempty"` - // Specifies the type of the share. - ShareType Share_ShareType `protobuf:"varint,10,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.Share_ShareType" json:"share_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // OPTIONAL. + // The expiration time for the OCM share. + Expiration *v1beta12.Timestamp `protobuf:"bytes,10,opt,name=expiration,proto3" json:"expiration,omitempty"` + // REQUIRED. + // Recipient share type. + ShareType ShareType `protobuf:"varint,11,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.ShareType" json:"share_type,omitempty"` + // REQUIRED. + AccessMethods []*AccessMethod `protobuf:"bytes,12,rep,name=access_methods,json=accessMethods,proto3" json:"access_methods,omitempty"` + // OPTIONAL. + Opaque *v1beta12.Opaque `protobuf:"bytes,13,opt,name=opaque,proto3" json:"opaque,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Share) Reset() { *m = Share{} } @@ -185,11 +194,11 @@ func (m *Share) GetName() string { return "" } -func (m *Share) GetPermissions() *SharePermissions { +func (m *Share) GetToken() string { if m != nil { - return m.Permissions + return m.Token } - return nil + return "" } func (m *Share) GetGrantee() *v1beta1.Grantee { @@ -227,11 +236,32 @@ func (m *Share) GetMtime() *v1beta12.Timestamp { return nil } -func (m *Share) GetShareType() Share_ShareType { +func (m *Share) GetExpiration() *v1beta12.Timestamp { + if m != nil { + return m.Expiration + } + return nil +} + +func (m *Share) GetShareType() ShareType { if m != nil { return m.ShareType } - return Share_SHARE_TYPE_INVALID + return ShareType_SHARE_TYPE_INVALID +} + +func (m *Share) GetAccessMethods() []*AccessMethod { + if m != nil { + return m.AccessMethods + } + return nil +} + +func (m *Share) GetOpaque() *v1beta12.Opaque { + if m != nil { + return m.Opaque + } + return nil } // The permissions for a share. @@ -283,22 +313,65 @@ func (m *SharePermissions) GetReshare() bool { } // A received share is the share that a grantee will receive. -// It expands the original share by adding state to the share, -// a display name from the perspective of the grantee and a -// resource mount point in case the share will be mounted -// in a storage provider. type ReceivedShare struct { // REQUIRED. - Share *Share `protobuf:"bytes,1,opt,name=share,proto3" json:"share,omitempty"` + // Opaque unique identifier of the share. + Id *ShareId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // REQUIRED. + // Name of the shared resource. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // REQUIRED. + // Identifier to identify the shared resource at the provider side. + // This is unique per provider such that if the same resource is shared twice, this will not be repeated. + // This correspond to the `providerId` in the OCM API specs. + RemoteShareId string `protobuf:"bytes,3,opt,name=remote_share_id,json=remoteShareId,proto3" json:"remote_share_id,omitempty"` + // REQUIRED. + // The receiver of the share, like a user, group ... + Grantee *v1beta1.Grantee `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` + // REQUIRED. + // Uniquely identifies the owner of the share + // (the resource owner at the time of creating the share). + // In case the ownership of the underlying resource changes + // the share owner field MAY change to reflect the change of ownsership. + Owner *v1beta11.UserId `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + // REQUIRED. + // Uniquely identifies a principal who initiates the share creation. + // A creator can create shares on behalf of the owner (because of re-sharing, + // because belonging to special groups, ...). + // Creator and owner often result in being the same principal. + Creator *v1beta11.UserId `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` + // REQUIRED. + // Creation time of the share. + Ctime *v1beta12.Timestamp `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime,omitempty"` + // REQUIRED. + // Last modification time of the share. + Mtime *v1beta12.Timestamp `protobuf:"bytes,8,opt,name=mtime,proto3" json:"mtime,omitempty"` + // OPTIONAL. + // The expiration time for the ocm share. + Expiration *v1beta12.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"` + // REQUIRED. + // Recipient share type. + ShareType ShareType `protobuf:"varint,10,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.ShareType" json:"share_type,omitempty"` + // REQUIRED. + // List of protocols offered for this share. + // In the OCM specifications, this corresponds to the `protocol` + // property, to maintain backwards compatibility with OCM v1 where + // only a single protocol was implemented. Furthermore, + // `protocol.name` MAY be set to `multi` and `protocol.options` + // MAY be left empty in the OCM share payload, in order to use + // the `protocol.webdav` and similar properties. + Protocols []*Protocol `protobuf:"bytes,11,rep,name=protocols,proto3" json:"protocols,omitempty"` // REQUIRED. // The state of the share. - State ShareState `protobuf:"varint,2,opt,name=state,proto3,enum=cs3.sharing.ocm.v1beta1.ShareState" json:"state,omitempty"` + State ShareState `protobuf:"varint,12,opt,name=state,proto3,enum=cs3.sharing.ocm.v1beta1.ShareState" json:"state,omitempty"` + // OPTIONAL. + Opaque *v1beta12.Opaque `protobuf:"bytes,13,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. - // The mount point of the share. - MountPoint *v1beta1.Reference `protobuf:"bytes,3,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Resource type. + ResourceType v1beta1.ResourceType `protobuf:"varint,14,opt,name=resource_type,json=resourceType,proto3,enum=cs3.storage.provider.v1beta1.ResourceType" json:"resource_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ReceivedShare) Reset() { *m = ReceivedShare{} } @@ -326,9 +399,79 @@ func (m *ReceivedShare) XXX_DiscardUnknown() { var xxx_messageInfo_ReceivedShare proto.InternalMessageInfo -func (m *ReceivedShare) GetShare() *Share { +func (m *ReceivedShare) GetId() *ShareId { if m != nil { - return m.Share + return m.Id + } + return nil +} + +func (m *ReceivedShare) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ReceivedShare) GetRemoteShareId() string { + if m != nil { + return m.RemoteShareId + } + return "" +} + +func (m *ReceivedShare) GetGrantee() *v1beta1.Grantee { + if m != nil { + return m.Grantee + } + return nil +} + +func (m *ReceivedShare) GetOwner() *v1beta11.UserId { + if m != nil { + return m.Owner + } + return nil +} + +func (m *ReceivedShare) GetCreator() *v1beta11.UserId { + if m != nil { + return m.Creator + } + return nil +} + +func (m *ReceivedShare) GetCtime() *v1beta12.Timestamp { + if m != nil { + return m.Ctime + } + return nil +} + +func (m *ReceivedShare) GetMtime() *v1beta12.Timestamp { + if m != nil { + return m.Mtime + } + return nil +} + +func (m *ReceivedShare) GetExpiration() *v1beta12.Timestamp { + if m != nil { + return m.Expiration + } + return nil +} + +func (m *ReceivedShare) GetShareType() ShareType { + if m != nil { + return m.ShareType + } + return ShareType_SHARE_TYPE_INVALID +} + +func (m *ReceivedShare) GetProtocols() []*Protocol { + if m != nil { + return m.Protocols } return nil } @@ -340,13 +483,20 @@ func (m *ReceivedShare) GetState() ShareState { return ShareState_SHARE_STATE_INVALID } -func (m *ReceivedShare) GetMountPoint() *v1beta1.Reference { +func (m *ReceivedShare) GetOpaque() *v1beta12.Opaque { if m != nil { - return m.MountPoint + return m.Opaque } return nil } +func (m *ReceivedShare) GetResourceType() v1beta1.ResourceType { + if m != nil { + return m.ResourceType + } + return v1beta1.ResourceType_RESOURCE_TYPE_INVALID +} + // Uniquely identifies a share in the share provider. // A share MUST be uniquely identify by four (4) elements: // 1) The share provider id @@ -362,11 +512,11 @@ func (m *ReceivedShare) GetMountPoint() *v1beta1.Reference { // 4) The grantee for the share = Grantee("type" = "user", "" => "Bob") type ShareKey struct { // REQUIRED. - Owner *v1beta11.UserId `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Owner *v1beta11.UserId `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // REQUIRED. - ResourceId *v1beta1.ResourceId `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ResourceId *v1beta1.ResourceId `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // REQUIRED. - Grantee *v1beta1.Grantee `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` + Grantee *v1beta1.Grantee `protobuf:"bytes,3,opt,name=grantee,proto3" json:"grantee,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -418,14 +568,15 @@ func (m *ShareKey) GetGrantee() *v1beta1.Grantee { return nil } -// A share id identifies uniquely a // share in the share provider namespace. +// A share id identifies uniquely a share in the share provider namespace. // A ShareId MUST be unique inside the share provider. type ShareId struct { // REQUIRED. // The internal id used by service implementor to - // uniquely identity the share in the internal + // uniquely identify the share in the internal // implementation of the service. - OpaqueId string `protobuf:"bytes,2,opt,name=opaque_id,json=opaqueId,proto3" json:"opaque_id,omitempty"` + // In the OCM specifications, this corresponds to the `providerId`. + OpaqueId string `protobuf:"bytes,1,opt,name=opaque_id,json=opaqueId,proto3" json:"opaque_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -472,6 +623,7 @@ type ShareReference struct { // Types that are valid to be assigned to Spec: // *ShareReference_Id // *ShareReference_Key + // *ShareReference_Token Spec isShareReference_Spec `protobuf_oneof:"spec"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -515,10 +667,16 @@ type ShareReference_Key struct { Key *ShareKey `protobuf:"bytes,2,opt,name=key,proto3,oneof"` } +type ShareReference_Token struct { + Token string `protobuf:"bytes,3,opt,name=token,proto3,oneof"` +} + func (*ShareReference_Id) isShareReference_Spec() {} func (*ShareReference_Key) isShareReference_Spec() {} +func (*ShareReference_Token) isShareReference_Spec() {} + func (m *ShareReference) GetSpec() isShareReference_Spec { if m != nil { return m.Spec @@ -540,11 +698,19 @@ func (m *ShareReference) GetKey() *ShareKey { return nil } +func (m *ShareReference) GetToken() string { + if x, ok := m.GetSpec().(*ShareReference_Token); ok { + return x.Token + } + return "" +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*ShareReference) XXX_OneofWrappers() []interface{} { return []interface{}{ (*ShareReference_Id)(nil), (*ShareReference_Key)(nil), + (*ShareReference_Token)(nil), } } @@ -601,9 +767,539 @@ func (m *ShareGrant) GetPermissions() *SharePermissions { return nil } +// The protocol which is used to give access to a remote OCM user. +type Protocol struct { + // REQUIRED. + // One of the protocols MUST be specified. + // + // Types that are valid to be assigned to Term: + // *Protocol_WebdavOptions + // *Protocol_WebappOptions + // *Protocol_TransferOptions + // *Protocol_GenericOptions + Term isProtocol_Term `protobuf_oneof:"term"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Protocol) Reset() { *m = Protocol{} } +func (m *Protocol) String() string { return proto.CompactTextString(m) } +func (*Protocol) ProtoMessage() {} +func (*Protocol) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{7} +} + +func (m *Protocol) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Protocol.Unmarshal(m, b) +} +func (m *Protocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Protocol.Marshal(b, m, deterministic) +} +func (m *Protocol) XXX_Merge(src proto.Message) { + xxx_messageInfo_Protocol.Merge(m, src) +} +func (m *Protocol) XXX_Size() int { + return xxx_messageInfo_Protocol.Size(m) +} +func (m *Protocol) XXX_DiscardUnknown() { + xxx_messageInfo_Protocol.DiscardUnknown(m) +} + +var xxx_messageInfo_Protocol proto.InternalMessageInfo + +type isProtocol_Term interface { + isProtocol_Term() +} + +type Protocol_WebdavOptions struct { + WebdavOptions *WebDAVProtocol `protobuf:"bytes,1,opt,name=webdav_options,json=webdavOptions,proto3,oneof"` +} + +type Protocol_WebappOptions struct { + WebappOptions *WebappProtocol `protobuf:"bytes,2,opt,name=webapp_options,json=webappOptions,proto3,oneof"` +} + +type Protocol_TransferOptions struct { + TransferOptions *TransferProtocol `protobuf:"bytes,3,opt,name=transfer_options,json=transferOptions,proto3,oneof"` +} + +type Protocol_GenericOptions struct { + GenericOptions *v1beta12.Opaque `protobuf:"bytes,4,opt,name=generic_options,json=genericOptions,proto3,oneof"` +} + +func (*Protocol_WebdavOptions) isProtocol_Term() {} + +func (*Protocol_WebappOptions) isProtocol_Term() {} + +func (*Protocol_TransferOptions) isProtocol_Term() {} + +func (*Protocol_GenericOptions) isProtocol_Term() {} + +func (m *Protocol) GetTerm() isProtocol_Term { + if m != nil { + return m.Term + } + return nil +} + +func (m *Protocol) GetWebdavOptions() *WebDAVProtocol { + if x, ok := m.GetTerm().(*Protocol_WebdavOptions); ok { + return x.WebdavOptions + } + return nil +} + +func (m *Protocol) GetWebappOptions() *WebappProtocol { + if x, ok := m.GetTerm().(*Protocol_WebappOptions); ok { + return x.WebappOptions + } + return nil +} + +func (m *Protocol) GetTransferOptions() *TransferProtocol { + if x, ok := m.GetTerm().(*Protocol_TransferOptions); ok { + return x.TransferOptions + } + return nil +} + +func (m *Protocol) GetGenericOptions() *v1beta12.Opaque { + if x, ok := m.GetTerm().(*Protocol_GenericOptions); ok { + return x.GenericOptions + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Protocol) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Protocol_WebdavOptions)(nil), + (*Protocol_WebappOptions)(nil), + (*Protocol_TransferOptions)(nil), + (*Protocol_GenericOptions)(nil), + } +} + +// Defines the options for the WebDAV protocol. +type WebDAVProtocol struct { + // REQUIRED. + // Secret used to access the resource. + SharedSecret string `protobuf:"bytes,1,opt,name=shared_secret,json=sharedSecret,proto3" json:"shared_secret,omitempty"` + // REQUIRED. + // Permissions of the shared resource. + Permissions *SharePermissions `protobuf:"bytes,2,opt,name=permissions,proto3" json:"permissions,omitempty"` + // REQUIRED. + // WebDAV URI used to access the resource. + Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebDAVProtocol) Reset() { *m = WebDAVProtocol{} } +func (m *WebDAVProtocol) String() string { return proto.CompactTextString(m) } +func (*WebDAVProtocol) ProtoMessage() {} +func (*WebDAVProtocol) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{8} +} + +func (m *WebDAVProtocol) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebDAVProtocol.Unmarshal(m, b) +} +func (m *WebDAVProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebDAVProtocol.Marshal(b, m, deterministic) +} +func (m *WebDAVProtocol) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebDAVProtocol.Merge(m, src) +} +func (m *WebDAVProtocol) XXX_Size() int { + return xxx_messageInfo_WebDAVProtocol.Size(m) +} +func (m *WebDAVProtocol) XXX_DiscardUnknown() { + xxx_messageInfo_WebDAVProtocol.DiscardUnknown(m) +} + +var xxx_messageInfo_WebDAVProtocol proto.InternalMessageInfo + +func (m *WebDAVProtocol) GetSharedSecret() string { + if m != nil { + return m.SharedSecret + } + return "" +} + +func (m *WebDAVProtocol) GetPermissions() *SharePermissions { + if m != nil { + return m.Permissions + } + return nil +} + +func (m *WebDAVProtocol) GetUri() string { + if m != nil { + return m.Uri + } + return "" +} + +// Defines the options for the Webapp protocol. +type WebappProtocol struct { + // REQUIRED. + // Template URI to open the resource with a remote app. + UriTemplate string `protobuf:"bytes,1,opt,name=uri_template,json=uriTemplate,proto3" json:"uri_template,omitempty"` + // REQUIRED. + // View mode for the remote app. + ViewMode v1beta13.ViewMode `protobuf:"varint,2,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.ViewMode" json:"view_mode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebappProtocol) Reset() { *m = WebappProtocol{} } +func (m *WebappProtocol) String() string { return proto.CompactTextString(m) } +func (*WebappProtocol) ProtoMessage() {} +func (*WebappProtocol) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{9} +} + +func (m *WebappProtocol) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebappProtocol.Unmarshal(m, b) +} +func (m *WebappProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebappProtocol.Marshal(b, m, deterministic) +} +func (m *WebappProtocol) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebappProtocol.Merge(m, src) +} +func (m *WebappProtocol) XXX_Size() int { + return xxx_messageInfo_WebappProtocol.Size(m) +} +func (m *WebappProtocol) XXX_DiscardUnknown() { + xxx_messageInfo_WebappProtocol.DiscardUnknown(m) +} + +var xxx_messageInfo_WebappProtocol proto.InternalMessageInfo + +func (m *WebappProtocol) GetUriTemplate() string { + if m != nil { + return m.UriTemplate + } + return "" +} + +func (m *WebappProtocol) GetViewMode() v1beta13.ViewMode { + if m != nil { + return m.ViewMode + } + return v1beta13.ViewMode_VIEW_MODE_INVALID +} + +// Defines the options for the Transfer protocol. +type TransferProtocol struct { + // REQUIRED. + // Secret used to access the source of the data transfer. + SharedSecret string `protobuf:"bytes,1,opt,name=shared_secret,json=sharedSecret,proto3" json:"shared_secret,omitempty"` + // REQUIRED. + // Source URI for the data transfer. + SourceUri string `protobuf:"bytes,2,opt,name=source_uri,json=sourceUri,proto3" json:"source_uri,omitempty"` + // REQUIRED. + // Size in bytes of the source. + Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferProtocol) Reset() { *m = TransferProtocol{} } +func (m *TransferProtocol) String() string { return proto.CompactTextString(m) } +func (*TransferProtocol) ProtoMessage() {} +func (*TransferProtocol) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{10} +} + +func (m *TransferProtocol) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferProtocol.Unmarshal(m, b) +} +func (m *TransferProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferProtocol.Marshal(b, m, deterministic) +} +func (m *TransferProtocol) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferProtocol.Merge(m, src) +} +func (m *TransferProtocol) XXX_Size() int { + return xxx_messageInfo_TransferProtocol.Size(m) +} +func (m *TransferProtocol) XXX_DiscardUnknown() { + xxx_messageInfo_TransferProtocol.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferProtocol proto.InternalMessageInfo + +func (m *TransferProtocol) GetSharedSecret() string { + if m != nil { + return m.SharedSecret + } + return "" +} + +func (m *TransferProtocol) GetSourceUri() string { + if m != nil { + return m.SourceUri + } + return "" +} + +func (m *TransferProtocol) GetSize() uint64 { + if m != nil { + return m.Size + } + return 0 +} + +// Defines how the recipient accesses an incoming remote OCM share. +type AccessMethod struct { + // REQUIRED. + // One of the access method MUST be specified. + // + // Types that are valid to be assigned to Term: + // *AccessMethod_WebdavOptions + // *AccessMethod_WebappOptions + // *AccessMethod_TransferOptions + // *AccessMethod_GenericOptions + Term isAccessMethod_Term `protobuf_oneof:"term"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AccessMethod) Reset() { *m = AccessMethod{} } +func (m *AccessMethod) String() string { return proto.CompactTextString(m) } +func (*AccessMethod) ProtoMessage() {} +func (*AccessMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{11} +} + +func (m *AccessMethod) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AccessMethod.Unmarshal(m, b) +} +func (m *AccessMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AccessMethod.Marshal(b, m, deterministic) +} +func (m *AccessMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessMethod.Merge(m, src) +} +func (m *AccessMethod) XXX_Size() int { + return xxx_messageInfo_AccessMethod.Size(m) +} +func (m *AccessMethod) XXX_DiscardUnknown() { + xxx_messageInfo_AccessMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessMethod proto.InternalMessageInfo + +type isAccessMethod_Term interface { + isAccessMethod_Term() +} + +type AccessMethod_WebdavOptions struct { + WebdavOptions *WebDAVAccessMethod `protobuf:"bytes,1,opt,name=webdav_options,json=webdavOptions,proto3,oneof"` +} + +type AccessMethod_WebappOptions struct { + WebappOptions *WebappAccessMethod `protobuf:"bytes,2,opt,name=webapp_options,json=webappOptions,proto3,oneof"` +} + +type AccessMethod_TransferOptions struct { + TransferOptions *TransferAccessMethod `protobuf:"bytes,3,opt,name=transfer_options,json=transferOptions,proto3,oneof"` +} + +type AccessMethod_GenericOptions struct { + GenericOptions *v1beta12.Opaque `protobuf:"bytes,4,opt,name=generic_options,json=genericOptions,proto3,oneof"` +} + +func (*AccessMethod_WebdavOptions) isAccessMethod_Term() {} + +func (*AccessMethod_WebappOptions) isAccessMethod_Term() {} + +func (*AccessMethod_TransferOptions) isAccessMethod_Term() {} + +func (*AccessMethod_GenericOptions) isAccessMethod_Term() {} + +func (m *AccessMethod) GetTerm() isAccessMethod_Term { + if m != nil { + return m.Term + } + return nil +} + +func (m *AccessMethod) GetWebdavOptions() *WebDAVAccessMethod { + if x, ok := m.GetTerm().(*AccessMethod_WebdavOptions); ok { + return x.WebdavOptions + } + return nil +} + +func (m *AccessMethod) GetWebappOptions() *WebappAccessMethod { + if x, ok := m.GetTerm().(*AccessMethod_WebappOptions); ok { + return x.WebappOptions + } + return nil +} + +func (m *AccessMethod) GetTransferOptions() *TransferAccessMethod { + if x, ok := m.GetTerm().(*AccessMethod_TransferOptions); ok { + return x.TransferOptions + } + return nil +} + +func (m *AccessMethod) GetGenericOptions() *v1beta12.Opaque { + if x, ok := m.GetTerm().(*AccessMethod_GenericOptions); ok { + return x.GenericOptions + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AccessMethod) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AccessMethod_WebdavOptions)(nil), + (*AccessMethod_WebappOptions)(nil), + (*AccessMethod_TransferOptions)(nil), + (*AccessMethod_GenericOptions)(nil), + } +} + +// Defines the options for the WebDAV access method. +type WebDAVAccessMethod struct { + // REQUIRED. + // The permissions for the share. + Permissions *v1beta1.ResourcePermissions `protobuf:"bytes,1,opt,name=permissions,proto3" json:"permissions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebDAVAccessMethod) Reset() { *m = WebDAVAccessMethod{} } +func (m *WebDAVAccessMethod) String() string { return proto.CompactTextString(m) } +func (*WebDAVAccessMethod) ProtoMessage() {} +func (*WebDAVAccessMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{12} +} + +func (m *WebDAVAccessMethod) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebDAVAccessMethod.Unmarshal(m, b) +} +func (m *WebDAVAccessMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebDAVAccessMethod.Marshal(b, m, deterministic) +} +func (m *WebDAVAccessMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebDAVAccessMethod.Merge(m, src) +} +func (m *WebDAVAccessMethod) XXX_Size() int { + return xxx_messageInfo_WebDAVAccessMethod.Size(m) +} +func (m *WebDAVAccessMethod) XXX_DiscardUnknown() { + xxx_messageInfo_WebDAVAccessMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_WebDAVAccessMethod proto.InternalMessageInfo + +func (m *WebDAVAccessMethod) GetPermissions() *v1beta1.ResourcePermissions { + if m != nil { + return m.Permissions + } + return nil +} + +// Defines the options for the Webapp access method. +type WebappAccessMethod struct { + // REQUIRED. + // The view mode for the share. + ViewMode v1beta13.ViewMode `protobuf:"varint,1,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.ViewMode" json:"view_mode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebappAccessMethod) Reset() { *m = WebappAccessMethod{} } +func (m *WebappAccessMethod) String() string { return proto.CompactTextString(m) } +func (*WebappAccessMethod) ProtoMessage() {} +func (*WebappAccessMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{13} +} + +func (m *WebappAccessMethod) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebappAccessMethod.Unmarshal(m, b) +} +func (m *WebappAccessMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebappAccessMethod.Marshal(b, m, deterministic) +} +func (m *WebappAccessMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebappAccessMethod.Merge(m, src) +} +func (m *WebappAccessMethod) XXX_Size() int { + return xxx_messageInfo_WebappAccessMethod.Size(m) +} +func (m *WebappAccessMethod) XXX_DiscardUnknown() { + xxx_messageInfo_WebappAccessMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_WebappAccessMethod proto.InternalMessageInfo + +func (m *WebappAccessMethod) GetViewMode() v1beta13.ViewMode { + if m != nil { + return m.ViewMode + } + return v1beta13.ViewMode_VIEW_MODE_INVALID +} + +// Defines the options for the Transfer access method. +type TransferAccessMethod struct { + // REQUIRED. + // The destination path of the data transfer. + Destination *v1beta1.Reference `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferAccessMethod) Reset() { *m = TransferAccessMethod{} } +func (m *TransferAccessMethod) String() string { return proto.CompactTextString(m) } +func (*TransferAccessMethod) ProtoMessage() {} +func (*TransferAccessMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_b8b387acee7aaf43, []int{14} +} + +func (m *TransferAccessMethod) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferAccessMethod.Unmarshal(m, b) +} +func (m *TransferAccessMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferAccessMethod.Marshal(b, m, deterministic) +} +func (m *TransferAccessMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferAccessMethod.Merge(m, src) +} +func (m *TransferAccessMethod) XXX_Size() int { + return xxx_messageInfo_TransferAccessMethod.Size(m) +} +func (m *TransferAccessMethod) XXX_DiscardUnknown() { + xxx_messageInfo_TransferAccessMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferAccessMethod proto.InternalMessageInfo + +func (m *TransferAccessMethod) GetDestination() *v1beta1.Reference { + if m != nil { + return m.Destination + } + return nil +} + func init() { proto.RegisterEnum("cs3.sharing.ocm.v1beta1.ShareState", ShareState_name, ShareState_value) - proto.RegisterEnum("cs3.sharing.ocm.v1beta1.Share_ShareType", Share_ShareType_name, Share_ShareType_value) + proto.RegisterEnum("cs3.sharing.ocm.v1beta1.ShareType", ShareType_name, ShareType_value) proto.RegisterType((*Share)(nil), "cs3.sharing.ocm.v1beta1.Share") proto.RegisterType((*SharePermissions)(nil), "cs3.sharing.ocm.v1beta1.SharePermissions") proto.RegisterType((*ReceivedShare)(nil), "cs3.sharing.ocm.v1beta1.ReceivedShare") @@ -611,6 +1307,14 @@ func init() { proto.RegisterType((*ShareId)(nil), "cs3.sharing.ocm.v1beta1.ShareId") proto.RegisterType((*ShareReference)(nil), "cs3.sharing.ocm.v1beta1.ShareReference") proto.RegisterType((*ShareGrant)(nil), "cs3.sharing.ocm.v1beta1.ShareGrant") + proto.RegisterType((*Protocol)(nil), "cs3.sharing.ocm.v1beta1.Protocol") + proto.RegisterType((*WebDAVProtocol)(nil), "cs3.sharing.ocm.v1beta1.WebDAVProtocol") + proto.RegisterType((*WebappProtocol)(nil), "cs3.sharing.ocm.v1beta1.WebappProtocol") + proto.RegisterType((*TransferProtocol)(nil), "cs3.sharing.ocm.v1beta1.TransferProtocol") + proto.RegisterType((*AccessMethod)(nil), "cs3.sharing.ocm.v1beta1.AccessMethod") + proto.RegisterType((*WebDAVAccessMethod)(nil), "cs3.sharing.ocm.v1beta1.WebDAVAccessMethod") + proto.RegisterType((*WebappAccessMethod)(nil), "cs3.sharing.ocm.v1beta1.WebappAccessMethod") + proto.RegisterType((*TransferAccessMethod)(nil), "cs3.sharing.ocm.v1beta1.TransferAccessMethod") } func init() { @@ -618,53 +1322,82 @@ func init() { } var fileDescriptor_b8b387acee7aaf43 = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x6e, 0xda, 0x4a, - 0x14, 0xc7, 0x63, 0x03, 0x01, 0x0e, 0xba, 0x08, 0xcd, 0xbd, 0xba, 0xb1, 0x92, 0x7b, 0x2b, 0xea, - 0xaa, 0x0d, 0xa9, 0x2a, 0x53, 0xa0, 0x55, 0x55, 0x75, 0x51, 0x01, 0x71, 0xc1, 0x4d, 0x44, 0xd0, - 0xe0, 0x44, 0x6a, 0x15, 0x09, 0x39, 0xf6, 0x34, 0xb1, 0x2a, 0x7f, 0x74, 0xc6, 0xa4, 0x62, 0x59, - 0xf5, 0x2d, 0xba, 0x6c, 0x77, 0x7d, 0x94, 0x6c, 0xfa, 0x4a, 0x95, 0x67, 0x6c, 0x42, 0x90, 0xa0, - 0xf9, 0xd8, 0xa0, 0x61, 0xce, 0xff, 0x77, 0xe6, 0xcc, 0x9c, 0x0f, 0xc3, 0xb6, 0xcd, 0x5a, 0x75, - 0x76, 0x66, 0x51, 0xd7, 0x3f, 0xad, 0x07, 0xb6, 0x57, 0x3f, 0x6f, 0x9c, 0x90, 0xc8, 0x6a, 0xd4, - 0x29, 0x61, 0xc1, 0x84, 0xda, 0x84, 0x69, 0x21, 0x0d, 0xa2, 0x00, 0x6d, 0xd8, 0xac, 0xa5, 0x25, - 0x42, 0x2d, 0xb0, 0x3d, 0x2d, 0x11, 0x6e, 0xee, 0xc4, 0x1e, 0x5c, 0x87, 0xf8, 0x91, 0x1b, 0x4d, - 0xeb, 0x13, 0x46, 0xe8, 0x32, 0x1f, 0x9b, 0x4f, 0xf8, 0x61, 0x51, 0x40, 0xad, 0x53, 0x52, 0x0f, - 0x69, 0x70, 0xee, 0x3a, 0x2b, 0xd4, 0xff, 0xc7, 0xea, 0x68, 0x1a, 0x12, 0x36, 0x93, 0xf0, 0x7f, - 0xc2, 0xac, 0xfe, 0xc8, 0x41, 0x6e, 0x74, 0x66, 0x51, 0x82, 0x9e, 0x82, 0xec, 0x3a, 0x8a, 0x54, - 0x95, 0x6a, 0xa5, 0x66, 0x55, 0x5b, 0x12, 0xa7, 0xc6, 0xb5, 0x86, 0x83, 0x65, 0xd7, 0x41, 0x06, - 0x94, 0xd2, 0xd3, 0xc6, 0xae, 0xa3, 0xc8, 0x1c, 0xad, 0x09, 0x54, 0x84, 0xa7, 0xa5, 0xe1, 0xcd, - 0x78, 0x9c, 0x00, 0x86, 0x83, 0x81, 0xce, 0xd6, 0x08, 0x41, 0xd6, 0xb7, 0x3c, 0xa2, 0x64, 0xaa, - 0x52, 0xad, 0x88, 0xf9, 0x1a, 0xed, 0x41, 0x29, 0x24, 0xd4, 0x73, 0x19, 0x73, 0x03, 0x9f, 0x29, - 0x59, 0xee, 0x7e, 0x67, 0x75, 0x64, 0xc3, 0x4b, 0x00, 0xcf, 0xd3, 0xe8, 0x35, 0xe4, 0x4f, 0xa9, - 0xe5, 0x47, 0x84, 0x28, 0x39, 0xee, 0xe8, 0xe1, 0xea, 0x38, 0x7b, 0x42, 0x8c, 0x53, 0x0a, 0xbd, - 0x80, 0x5c, 0xf0, 0xd9, 0x27, 0x54, 0x59, 0xe7, 0xf8, 0x7d, 0x8e, 0xa7, 0x09, 0xd3, 0xe2, 0x84, - 0xcd, 0xd8, 0x43, 0x46, 0xa8, 0xe1, 0x60, 0xa1, 0x47, 0xaf, 0x20, 0x6f, 0x53, 0x62, 0x45, 0x01, - 0x55, 0xf2, 0xd7, 0x45, 0x53, 0x02, 0x35, 0x21, 0x67, 0x47, 0xae, 0x47, 0x94, 0x02, 0x47, 0xff, - 0xe3, 0xa8, 0xc8, 0x5f, 0x8a, 0x98, 0xae, 0x47, 0x58, 0x64, 0x79, 0x21, 0x16, 0xd2, 0x98, 0xf1, - 0x38, 0x53, 0xbc, 0x0e, 0xc3, 0xa5, 0xa8, 0x07, 0x10, 0xbf, 0x29, 0x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0xfd, 0x82, 0x5b, 0x8e, 0x13, 0xcb, 0xf1, 0x81, - 0xed, 0x1d, 0x27, 0x96, 0x93, 0x75, 0xfe, 0x15, 0x6c, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcb, - 0xf0, 0x8f, 0x6e, 0xc1, 0x07, 0x00, 0x00, + // 1231 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x6f, 0x13, 0x47, + 0x17, 0xce, 0xda, 0x71, 0x62, 0x9f, 0xc4, 0x8e, 0x35, 0x44, 0xb0, 0x2f, 0xbc, 0x48, 0xc9, 0xa2, + 0x42, 0x80, 0xd6, 0x69, 0x88, 0xaa, 0xaa, 0x6a, 0x25, 0xe4, 0x24, 0x16, 0x76, 0x81, 0xd8, 0x1a, + 0x3b, 0xa9, 0x8a, 0x90, 0xac, 0xcd, 0xee, 0x21, 0x4c, 0x61, 0x3f, 0x3a, 0xb3, 0x76, 0xea, 0xde, + 0xf5, 0x3f, 0xf4, 0xaa, 0x55, 0x6f, 0x7a, 0xd9, 0x9f, 0xd2, 0x1b, 0x6e, 0xfa, 0x13, 0xfa, 0x43, + 0xaa, 0x9d, 0x99, 0x75, 0x36, 0x26, 0xfe, 0xc0, 0xc0, 0xdd, 0x7c, 0x3c, 0xcf, 0x33, 0x33, 0x67, + 0xce, 0x73, 0x66, 0xe0, 0x8e, 0x23, 0x76, 0xb7, 0xc5, 0x4b, 0x9b, 0x33, 0xff, 0x74, 0x3b, 0x70, + 0xbc, 0xed, 0xfe, 0xce, 0x09, 0x46, 0xf6, 0xce, 0x36, 0x47, 0x11, 0xf4, 0xb8, 0x83, 0xa2, 0x12, + 0xf2, 0x20, 0x0a, 0xc8, 0x35, 0x47, 0xec, 0x56, 0x34, 0xb0, 0x12, 0x38, 0x5e, 0x45, 0x03, 0xaf, + 0x6f, 0xc5, 0x0a, 0x76, 0x18, 0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3c, 0x2b, 0x35, 0x61, 0x90, 0x07, + 0x90, 0x73, 0x22, 0xe6, 0xa1, 0x99, 0x97, 0xd4, 0xff, 0x4b, 0xaa, 0xba, 0x88, 0x84, 0xd2, 0x61, + 0x1e, 0x8a, 0xc8, 0xf6, 0x42, 0xaa, 0xa0, 0x31, 0xc7, 0x93, 0x9c, 0xc2, 0x2c, 0x1c, 0x09, 0x25, + 0xdf, 0x00, 0xe0, 0x4f, 0x21, 0xe3, 0x76, 0xc4, 0x02, 0xdf, 0x84, 0x19, 0x88, 0x29, 0x3c, 0xa9, + 0x02, 0xc4, 0x97, 0x8e, 0xdd, 0x18, 0x6c, 0xae, 0x6c, 0x18, 0x5b, 0xa5, 0x07, 0xd6, 0xe4, 0x5c, + 0xe8, 0x0c, 0x42, 0xa4, 0x05, 0x91, 0x34, 0xc9, 0x13, 0x28, 0xd9, 0x8e, 0x83, 0x42, 0x74, 0x3d, + 0x8c, 0x5e, 0x06, 0xae, 0x30, 0x57, 0x37, 0xb2, 0xe7, 0xd7, 0x74, 0x89, 0x4c, 0x55, 0xc2, 0x9f, + 0x4a, 0x34, 0x2d, 0xda, 0xa9, 0x9e, 0x20, 0x3b, 0xb0, 0x14, 0x84, 0xf6, 0x8f, 0x3d, 0x34, 0x8b, + 0xf2, 0x28, 0xff, 0xbb, 0xe4, 0x28, 0x4d, 0x09, 0xa0, 0x1a, 0x68, 0xfd, 0x62, 0x40, 0x59, 0xee, + 0xac, 0x85, 0xdc, 0x63, 0x42, 0xb0, 0xc0, 0x17, 0xa4, 0x0d, 0x2b, 0xe1, 0x79, 0x57, 0x67, 0xf9, + 0xce, 0x6c, 0xa9, 0x9a, 0xd2, 0xa1, 0x69, 0x15, 0x62, 0xc2, 0x32, 0x47, 0x79, 0x72, 0x99, 0xfb, + 0x79, 0x9a, 0x74, 0xad, 0x3f, 0x96, 0xa0, 0x48, 0xd1, 0x41, 0xd6, 0x47, 0x77, 0x5e, 0x77, 0x25, + 0x96, 0xc8, 0xa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 0xea, 0x0b, 0x34, 0xc6, 0x93, 0xab, 0xc9, 0x93, + 0x2a, 0xab, 0x46, 0x7d, 0x41, 0x3f, 0xaa, 0x7b, 0x4b, 0xb0, 0x28, 0x42, 0x74, 0xac, 0xdf, 0x0c, + 0x00, 0xc9, 0x91, 0xe7, 0x4b, 0x47, 0xc5, 0x98, 0xab, 0x8c, 0x3c, 0xbe, 0x58, 0x76, 0xd5, 0x76, + 0xef, 0x4e, 0xde, 0xee, 0xb8, 0x72, 0x6b, 0xfd, 0x93, 0x81, 0x7c, 0xe2, 0x05, 0xd2, 0x82, 0xd2, + 0x19, 0x9e, 0xb8, 0x76, 0xbf, 0x1b, 0x84, 0x51, 0xaa, 0xa6, 0xdf, 0x19, 0x2b, 0xfe, 0x1d, 0x9e, + 0x1c, 0x54, 0x8f, 0x13, 0x81, 0xfa, 0x02, 0x2d, 0x2a, 0x81, 0xa6, 0xe2, 0x6b, 0x45, 0x3b, 0x0c, + 0x87, 0x8a, 0x99, 0xe9, 0x8a, 0x76, 0x18, 0x8e, 0x28, 0xda, 0x61, 0x98, 0x28, 0x1e, 0x43, 0x39, + 0xe2, 0xb6, 0x2f, 0x5e, 0x20, 0x1f, 0x6a, 0x66, 0xa7, 0x84, 0xa0, 0xa3, 0x09, 0x29, 0xd5, 0xb5, + 0x44, 0x24, 0xd1, 0x3d, 0x80, 0xb5, 0x53, 0xf4, 0x91, 0x33, 0x67, 0x28, 0xbb, 0x38, 0xc5, 0xca, + 0xf5, 0x05, 0x5a, 0xd2, 0x1c, 0xad, 0x12, 0xdf, 0x79, 0x84, 0xdc, 0xb3, 0x7e, 0x35, 0xa0, 0x74, + 0x31, 0x36, 0xe4, 0x16, 0x14, 0x65, 0xad, 0x72, 0xbb, 0x02, 0x1d, 0x8e, 0x91, 0xce, 0xe2, 0x55, + 0x35, 0xd8, 0x96, 0x63, 0x1f, 0xf4, 0x6e, 0x49, 0x19, 0xb2, 0x3d, 0xce, 0xf4, 0x63, 0x16, 0x37, +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0x20, 0xd7, 0xe0, 0x4a, 0xbb, 0x5e, 0xa5, 0xb5, 0x6e, 0xbb, 0x53, + 0xed, 0xd4, 0xba, 0x8d, 0xc3, 0xe3, 0xea, 0x93, 0xc6, 0x41, 0x79, 0x61, 0x74, 0xa2, 0x55, 0x3b, + 0x3c, 0x68, 0x1c, 0x3e, 0x2a, 0x1b, 0xc4, 0x84, 0xf5, 0xf4, 0x44, 0x75, 0x7f, 0xbf, 0xd6, 0xea, + 0xd4, 0x0e, 0xca, 0x99, 0xd1, 0x19, 0x5a, 0xfb, 0xb6, 0xb6, 0x1f, 0xcf, 0x64, 0xef, 0x1d, 0x42, + 0x61, 0xf8, 0x39, 0x22, 0x57, 0x81, 0x28, 0x58, 0xe7, 0xfb, 0x56, 0x7a, 0xc5, 0x2b, 0xb0, 0x96, + 0x1a, 0x3f, 0x6a, 0xd7, 0x68, 0xd9, 0x20, 0xeb, 0x50, 0x4e, 0x0d, 0x3e, 0xa2, 0xcd, 0xa3, 0x56, + 0x39, 0xb3, 0xd7, 0x83, 0x1b, 0x4e, 0xe0, 0x8d, 0xcb, 0xbe, 0xbd, 0x52, 0x72, 0x7d, 0x42, 0x3a, + 0xbb, 0x65, 0x3c, 0x83, 0xc0, 0xf1, 0xf4, 0xec, 0x9f, 0x99, 0xec, 0x7e, 0xbb, 0xf9, 0x57, 0xe6, + 0xda, 0xbe, 0xd8, 0x95, 0xa5, 0x2a, 0x66, 0x37, 0x1d, 0xaf, 0x72, 0xbc, 0xb3, 0x17, 0xcf, 0xff, + 0x2d, 0x67, 0x9e, 0xeb, 0x99, 0xe7, 0x4d, 0xc7, 0x7b, 0xae, 0x67, 0x4e, 0x96, 0xe4, 0xaf, 0x6c, + 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x69, 0x6a, 0x2e, 0x2e, 0x10, 0x00, 0x00, } diff --git a/vendor/github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1/provider_api.pb.go b/vendor/github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1/provider_api.pb.go index 6ca258759b..70e81e2b5d 100644 --- a/vendor/github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1/provider_api.pb.go +++ b/vendor/github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1/provider_api.pb.go @@ -2639,7 +2639,7 @@ type RestoreRecycleItemRequest struct { // Opaque information. Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. - // The reference to which the action should be performed. + // The reference to the user's home directory. Ref *Reference `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` // REQUIRED. // The key for the recycle item to be restored. @@ -4086,10 +4086,12 @@ func (m *UnlockResponse) GetOpaque() *v1beta1.Opaque { type CreateHomeRequest struct { // OPTIONAL. // Opaque information. - Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` + // OPTIONAL. + Quota *Quota `protobuf:"bytes,2,opt,name=quota,proto3" json:"quota,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateHomeRequest) Reset() { *m = CreateHomeRequest{} } @@ -4124,6 +4126,13 @@ func (m *CreateHomeRequest) GetOpaque() *v1beta1.Opaque { return nil } +func (m *CreateHomeRequest) GetQuota() *Quota { + if m != nil { + return m.Quota + } + return nil +} + type CreateHomeResponse struct { // REQUIRED. // The response status. @@ -4900,179 +4909,179 @@ func init() { } var fileDescriptor_d1968a7258bd7add = []byte{ - // 2745 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff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, 0x8a, 0x6d, 0xd5, 0x34, 0xea, 0x08, 0x65, 0x7b, 0x86, 0xa7, 0x6a, 0x86, 0x4d, 0xde, - 0x62, 0x10, 0x8d, 0x52, 0x4b, 0xa3, 0x8e, 0xf0, 0x5e, 0xbd, 0x89, 0xd2, 0xd4, 0xda, 0x72, 0x3c, - 0xd3, 0x48, 0xef, 0xc3, 0x34, 0x72, 0x30, 0xb2, 0x4b, 0x9a, 0x22, 0xf6, 0x65, 0x97, 0x61, 0x63, - 0xc9, 0xf4, 0x34, 0x96, 0xb1, 0x76, 0x63, 0xf9, 0x27, 0x82, 0x83, 0x21, 0xf0, 0x12, 0x0d, 0x91, - 0xa7, 0x6c, 0x77, 0x59, 0xcd, 0xa0, 0xa4, 0x16, 0xd3, 0x58, 0x84, 0xa4, 0xeb, 0x94, 0xd4, 0xd4, - 0x49, 0xbb, 0x75, 0x13, 0xdf, 0x60, 0x7e, 0x99, 0x72, 0x0f, 0x88, 0xe0, 0x34, 0x70, 0xa8, 0xf0, - 0x3e, 0x34, 0x9b, 0x7f, 0x21, 0x98, 0x8b, 0x80, 0x30, 0x41, 0xe3, 0xb9, 0x0e, 0x93, 0x41, 0xe3, - 0x11, 0x20, 0xf6, 0x61, 0x3b, 0xd9, 0x80, 0xed, 0xc4, 0x36, 0x9d, 0x77, 0x10, 0x64, 0x6f, 0x58, - 0x7b, 0x83, 0x38, 0x99, 0x17, 0x21, 0xe3, 0xbe, 0xa1, 0xfa, 0x7d, 0x31, 0x08, 0x32, 0xbc, 0x0e, - 0xd9, 0x32, 0x71, 0xa8, 0x61, 0xea, 0xec, 0x63, 0x57, 0x28, 0x1e, 0x9b, 0x4b, 0x90, 0xb6, 0x7b, - 0x92, 0xd9, 0x86, 0x49, 0x57, 0xcd, 0x04, 0x93, 0x69, 0x5f, 0x47, 0x70, 0xb0, 0xd8, 0xb0, 0x77, - 0xc8, 0xe0, 0x8e, 0x7c, 0x80, 0x37, 0xaf, 0x38, 0x27, 0x23, 0xfe,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 0x97, 0x7d, 0x4f, 0xb4, 0x25, 0xdd, 0x2d, 0x80, 0x56, - 0x22, 0x5b, 0x16, 0xf4, 0x75, 0xa4, 0xce, 0x65, 0x41, 0x5f, 0x44, 0x8e, 0xdc, 0xdd, 0x31, 0xbe, - 0x9a, 0x7c, 0xc7, 0x82, 0x4b, 0x9d, 0x8d, 0x39, 0x3b, 0xe0, 0xfe, 0x3b, 0x93, 0xc7, 0x32, 0xf7, - 0xdf, 0x35, 0xb3, 0x2e, 0x73, 0xff, 0x3d, 0xf2, 0xd4, 0x8f, 0x44, 0x64, 0x15, 0xca, 0x82, 0xc5, - 0x89, 0xac, 0xa2, 0xf2, 0x99, 0x71, 0x22, 0xab, 0xe8, 0x74, 0xdb, 0x1b, 0x7e, 0xd7, 0x51, 0x3f, - 0x80, 0x74, 0xcd, 0x60, 0xc9, 0x00, 0xe9, 0x91, 0x58, 0x62, 0x92, 0x74, 0x26, 0x45, 0x64, 0x92, - 0x74, 0xcd, 0xea, 0xc8, 0x24, 0xe9, 0x9e, 0x7f, 0x59, 0xfe, 0x32, 0x82, 0x53, 0x25, 0xab, 0xd6, - 0x93, 0x7e, 0x39, 0xe7, 0x67, 0x4f, 0xea, 0x06, 0xff, 0xfd, 0xb3, 0x88, 0x3e, 0x3d, 0xe3, 0xcd, - 0x12, 0x93, 0xbe, 0x93, 0x1a, 0x59, 0xd9, 0x2c, 0x7e, 0x3f, 0x75, 0x7c, 0xc5, 0xb9, 0xe0, 0xe5, - 0x81, 0x0a, 0x1e, 0x5d, 0xe1, 0xd6, 0xf9, 0x65, 0x36, 0xe9, 0x6d, 0x3e, 0x7c, 0x5b, 0x0c, 0xdf, - 0xf6, 0x86, 0x6f, 0x8b, 0xe1, 0x3b, 0x19, 0x9e, 0x56, 0xbf, 0xf0, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xbd, 0x6f, 0xe6, 0xea, 0xc8, 0x47, 0x00, 0x00, + // 2749 bytes of a gzipped FileDescriptorProto + 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0x88, 0x4d, 0xaa, 0x42, + 0x94, 0x8f, 0x16, 0xfb, 0xad, 0x7d, 0x51, 0x25, 0x55, 0x62, 0x13, 0xb3, 0x4c, 0x54, 0x46, 0x83, + 0x2f, 0x41, 0x66, 0x9b, 0xcd, 0xce, 0xc5, 0xca, 0x2d, 0x7c, 0xa8, 0x3f, 0xb1, 0x2b, 0xa8, 0x4b, + 0x81, 0x0f, 0xc3, 0x68, 0xcd, 0x2a, 0xef, 0x68, 0x46, 0xe5, 0x48, 0x9a, 0xeb, 0x94, 0x65, 0xaf, + 0x6b, 0x95, 0xc2, 0x2e, 0xe4, 0xdb, 0x4a, 0x25, 0x87, 0x70, 0xe1, 0x8f, 0x08, 0xf2, 0x97, 0x89, + 0xd9, 0x1a, 0x22, 0x9c, 0x2f, 0xc0, 0x28, 0x07, 0x87, 0x10, 0x01, 0xe8, 0x87, 0x63, 0x00, 0x4a, + 0x88, 0xea, 0x51, 0xf5, 0x06, 0xf5, 0x1e, 0xcc, 0x04, 0x74, 0x4b, 0x10, 0xd5, 0xd7, 0x11, 0x3c, + 0xb9, 0x6c, 0x13, 0x9d, 0x92, 0x65, 0xcb, 0xa4, 0xba, 0x61, 0x12, 0x7b, 0x28, 0xd8, 0x16, 0xbe, + 0x00, 0x87, 0xbb, 0xe4, 0x48, 0x10, 0x87, 0x57, 0x11, 0xe4, 0x37, 0xad, 0x66, 0xf9, 0xce, 0x15, + 0xa3, 0x46, 0x86, 0x83, 0xc0, 0x3d, 0x98, 0x09, 0x48, 0x90, 0xa0, 0xee, 0xdf, 0x44, 0x30, 0x79, + 0x99, 0xd4, 0x08, 0x1d, 0x8e, 0xe2, 0xc1, 0x5d, 0x31, 0x12, 0xda, 0x15, 0x14, 0xa6, 0x3c, 0xb9, + 0x12, 0x84, 0xe3, 0x6b, 0x88, 0x7f, 0x88, 0x4a, 0x3a, 0xbd, 0xb3, 0x0f, 0x3c, 0xd6, 0x20, 0xe7, + 0x7d, 0x21, 0x99, 0x62, 0xee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5, 0x80, 0xaf, 0x22, 0x38, + 0x14, 0x55, 0xbf, 0x8c, 0x2f, 0xf5, 0x67, 0xd4, 0xa7, 0x34, 0x5b, 0xf9, 0xc4, 0x5e, 0x48, 0x85, + 0x3c, 0x6f, 0x20, 0xc0, 0xdd, 0x95, 0xec, 0xf8, 0x62, 0x7c, 0x96, 0xa1, 0xcb, 0x03, 0xca, 0x33, + 0x83, 0x13, 0x0a, 0x49, 0x2c, 0x80, 0x76, 0x05, 0x31, 0x9e, 0x97, 0xc7, 0x5b, 0xa1, 0x5a, 0x69, + 0xe5, 0x6c, 0x7c, 0x02, 0x31, 0xe1, 0x9b, 0xa2, 0x34, 0xa9, 0xa3, 0x2e, 0x15, 0x3f, 0x23, 0xe7, + 0x14, 0x5d, 0x06, 0xac, 0x5c, 0xda, 0x03, 0xa5, 0x2b, 0xcc, 0x59, 0x84, 0xef, 0xc3, 0x64, 0x68, + 0x00, 0x5e, 0x18, 0x80, 0x9b, 0x27, 0xc1, 0xf9, 0x81, 0x68, 0x04, 0x10, 0xaf, 0x21, 0xc8, 0x77, + 0x16, 0xf4, 0xe1, 0x0b, 0x72, 0x4e, 0x11, 0x65, 0x8c, 0xca, 0xd3, 0x83, 0x92, 0x09, 0x19, 0x5e, + 0x17, 0x05, 0xf0, 0xa1, 0x82, 0x1f, 0x1c, 0x83, 0x5b, 0x54, 0x91, 0x95, 0x72, 0x71, 0x60, 0x3a, + 0x7f, 0x19, 0x6c, 0xc8, 0x05, 0xba, 0xf1, 0xd9, 0xd8, 0x9c, 0xbc, 0xb9, 0xcf, 0x0d, 0x40, 0x21, + 0x94, 0x7f, 0x19, 0xd2, 0xd7, 0xad, 0x5d, 0x82, 0x25, 0xd5, 0x45, 0x81, 0xc2, 0x20, 0xe5, 0x54, + 0x9c, 0xa1, 0x82, 0xbd, 0x0d, 0xb9, 0x40, 0x36, 0x59, 0xa6, 0x52, 0x77, 0x42, 0x5d, 0xa6, 0x52, + 0x54, 0xaa, 0xba, 0x09, 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, 0x00, 0x00, 0xff, 0xff, 0x58, 0x37, 0x60, 0xa0, 0x04, 0x48, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/cs3org/reva/v2/cmd/revad/runtime/loader.go b/vendor/github.com/cs3org/reva/v2/cmd/revad/runtime/loader.go index 486a00518c..658ed85223 100644 --- a/vendor/github.com/cs3org/reva/v2/cmd/revad/runtime/loader.go +++ b/vendor/github.com/cs3org/reva/v2/cmd/revad/runtime/loader.go @@ -36,9 +36,9 @@ import ( _ "github.com/cs3org/reva/v2/pkg/datatx/manager/loader" _ "github.com/cs3org/reva/v2/pkg/group/manager/loader" _ "github.com/cs3org/reva/v2/pkg/metrics/driver/loader" - _ "github.com/cs3org/reva/v2/pkg/ocm/invite/manager/loader" + _ "github.com/cs3org/reva/v2/pkg/ocm/invite/repository/loader" _ "github.com/cs3org/reva/v2/pkg/ocm/provider/authorizer/loader" - _ "github.com/cs3org/reva/v2/pkg/ocm/share/manager/loader" + _ "github.com/cs3org/reva/v2/pkg/ocm/share/repository/loader" _ "github.com/cs3org/reva/v2/pkg/permission/manager/loader" _ "github.com/cs3org/reva/v2/pkg/preferences/loader" _ "github.com/cs3org/reva/v2/pkg/publicshare/manager/loader" diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go index 44c2e6d5b2..1b5edd9f20 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go @@ -32,6 +32,7 @@ import ( rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1" + ocmv1beta1 "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" registry "github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1" "github.com/cs3org/reva/v2/pkg/appctx" @@ -83,6 +84,10 @@ func expandAndVerifyScope(ctx context.Context, req interface{}, tokenScope map[s if err = resolveLightweightScope(ctx, ref, tokenScope[k], user, client, mgr); err == nil { return nil } + case strings.HasPrefix(k, "ocmshare"): + if err = resolveOCMShare(ctx, ref, tokenScope[k], client, mgr); err == nil { + return nil + } } log.Err(err).Msgf("error resolving reference %s under scope %+v", ref.String(), k) } @@ -168,6 +173,21 @@ func resolvePublicShare(ctx context.Context, ref *provider.Reference, scope *aut return checkRelativeReference(ctx, ref, share.ResourceId, client) } +func resolveOCMShare(ctx context.Context, ref *provider.Reference, scope *authpb.Scope, client gateway.GatewayAPIClient, mgr token.Manager) error { + var share ocmv1beta1.Share + if err := utils.UnmarshalJSONToProtoV1(scope.Resource.Value, &share); err != nil { + return err + } + + if err := checkCacheForNestedResource(ctx, ref, share.ResourceId, client, mgr); err == nil { + return nil + } + + // Some services like wopi don't access the shared resource relative to the + // share root but instead relative to the shared resources parent. + return checkRelativeReference(ctx, ref, share.ResourceId, client) +} + // checkRelativeReference checks if the shared resource is being accessed via a relative reference // e.g.: // storage: abcd, space: efgh diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/appprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/appprovider.go index 8119118d78..3a91e12a0d 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/appprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/appprovider.go @@ -171,7 +171,7 @@ func (s *svc) openLocalResources(ctx context.Context, ri *storageprovider.Resour appProviderReq := &providerpb.OpenInAppRequest{ ResourceInfo: ri, - ViewMode: providerpb.OpenInAppRequest_ViewMode(vm), + ViewMode: providerpb.ViewMode(vm), AccessToken: accessToken, Opaque: opaque, } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmcore.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmcore.go index 9d47f28098..8c47bdc76b 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmcore.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmcore.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,3 +42,35 @@ func (s *svc) CreateOCMCoreShare(ctx context.Context, req *ocmcore.CreateOCMCore return res, nil } + +func (s *svc) UpdateOCMCoreShare(ctx context.Context, req *ocmcore.UpdateOCMCoreShareRequest) (*ocmcore.UpdateOCMCoreShareResponse, error) { + c, err := pool.GetOCMCoreClient(s.c.OCMCoreEndpoint) + if err != nil { + return &ocmcore.UpdateOCMCoreShareResponse{ + Status: status.NewInternal(ctx, "error getting ocm core client"), + }, nil + } + + res, err := c.UpdateOCMCoreShare(ctx, req) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling UpdateOCMCoreShare") + } + + return res, nil +} + +func (s *svc) DeleteOCMCoreShare(ctx context.Context, req *ocmcore.DeleteOCMCoreShareRequest) (*ocmcore.DeleteOCMCoreShareResponse, error) { + c, err := pool.GetOCMCoreClient(s.c.OCMCoreEndpoint) + if err != nil { + return &ocmcore.DeleteOCMCoreShareResponse{ + Status: status.NewInternal(ctx, "error getting ocm core client"), + }, nil + } + + res, err := c.DeleteOCMCoreShare(ctx, req) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling UpdateOCMCoreShare") + } + + return res, nil +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocminvitemanager.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocminvitemanager.go index bbbc67961d..24df79eb64 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocminvitemanager.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocminvitemanager.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -43,6 +43,22 @@ func (s *svc) GenerateInviteToken(ctx context.Context, req *invitepb.GenerateInv return res, nil } +func (s *svc) ListInviteTokens(ctx context.Context, req *invitepb.ListInviteTokensRequest) (*invitepb.ListInviteTokensResponse, error) { + c, err := pool.GetOCMInviteManagerClient(s.c.OCMInviteManagerEndpoint) + if err != nil { + return &invitepb.ListInviteTokensResponse{ + Status: status.NewInternal(ctx, "error getting user invite provider client"), + }, nil + } + + res, err := c.ListInviteTokens(ctx, req) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling ListInviteTokens") + } + + return res, nil +} + func (s *svc) ForwardInvite(ctx context.Context, req *invitepb.ForwardInviteRequest) (*invitepb.ForwardInviteResponse, error) { c, err := pool.GetOCMInviteManagerClient(s.c.OCMInviteManagerEndpoint) if err != nil { @@ -106,3 +122,19 @@ func (s *svc) FindAcceptedUsers(ctx context.Context, req *invitepb.FindAcceptedU return res, nil } + +func (s *svc) DeleteAcceptedUser(ctx context.Context, req *invitepb.DeleteAcceptedUserRequest) (*invitepb.DeleteAcceptedUserResponse, error) { + c, err := pool.GetOCMInviteManagerClient(s.c.OCMInviteManagerEndpoint) + if err != nil { + return &invitepb.DeleteAcceptedUserResponse{ + Status: status.NewInternal(ctx, "error getting user invite provider client"), + }, nil + } + + res, err := c.DeleteAcceptedUser(ctx, req) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling FindAcceptedUsers") + } + + return res, nil +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmproviderauthorizer.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmproviderauthorizer.go index 91a3d83dba..23077912d2 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmproviderauthorizer.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmproviderauthorizer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmshareprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmshareprovider.go index cd42d68079..6ee1182c4e 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmshareprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/ocmshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,12 +25,10 @@ import ( "path" "strings" - ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" datatx "github.com/cs3org/go-cs3apis/cs3/tx/v1beta1" - types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/v2/pkg/appctx" ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/errtypes" @@ -53,16 +51,22 @@ func (s *svc) CreateOCMShare(ctx context.Context, req *ocm.CreateOCMShareRequest return nil, errors.Wrap(err, "gateway: error calling CreateShare") } - if s.c.CommitShareToStorageGrant { - addGrantStatus, err := s.addGrant(ctx, req.ResourceId, req.Grant.Grantee, req.Grant.Permissions.Permissions, nil, nil) - if err != nil { - return nil, errors.Wrap(err, "gateway: error adding OCM grant to storage") - } - if addGrantStatus.Code != rpc.Code_CODE_OK { - return &ocm.CreateOCMShareResponse{ - Status: addGrantStatus, - }, err - } + status, err := s.addGrant(ctx, req.ResourceId, req.Grantee, req.AccessMethods[0].GetWebdavOptions().Permissions, req.Expiration, nil) + if err != nil { + appctx.GetLogger(ctx).Debug().Interface("status", status).Interface("req", req).Msg(err.Error()) + return nil, errors.Wrap(err, "gateway: error adding grant to storage") + } + + switch status.Code { + case rpc.Code_CODE_OK: + s.statCache.RemoveStatContext(ctx, ctxpkg.ContextMustGetUser(ctx).GetId(), req.ResourceId) + case rpc.Code_CODE_UNIMPLEMENTED: + appctx.GetLogger(ctx).Debug().Interface("status", status).Interface("req", req).Msg("storing grants not supported, ignoring") + default: + appctx.GetLogger(ctx).Debug().Interface("status", status).Interface("req", req).Msg("storing grants is not successful") + return &ocm.CreateOCMShareResponse{ + Status: status, + }, err } return res, nil @@ -76,44 +80,11 @@ func (s *svc) RemoveOCMShare(ctx context.Context, req *ocm.RemoveOCMShareRequest }, nil } - // if we need to commit the share, we need the resource it points to. - var share *ocm.Share - if s.c.CommitShareToStorageGrant { - getShareReq := &ocm.GetOCMShareRequest{ - Ref: req.Ref, - } - getShareRes, err := c.GetOCMShare(ctx, getShareReq) - if err != nil { - return nil, errors.Wrap(err, "gateway: error calling GetShare") - } - - if getShareRes.Status.Code != rpc.Code_CODE_OK { - res := &ocm.RemoveOCMShareResponse{ - Status: status.NewInternal(ctx, - "error getting share when committing to the storage"), - } - return res, nil - } - share = getShareRes.Share - } - res, err := c.RemoveOCMShare(ctx, req) if err != nil { return nil, errors.Wrap(err, "gateway: error calling RemoveShare") } - if s.c.CommitShareToStorageGrant { - removeGrantStatus, err := s.removeGrant(ctx, share.ResourceId, share.Grantee, share.Permissions.Permissions, nil) - if err != nil { - return nil, errors.Wrap(err, "gateway: error removing OCM grant from storage") - } - if removeGrantStatus.Code != rpc.Code_CODE_OK { - return &ocm.RemoveOCMShareResponse{ - Status: removeGrantStatus, - }, err - } - } - return res, nil } @@ -127,6 +98,7 @@ func (s *svc) GetOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest) (*oc func (s *svc) getOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest) (*ocm.GetOCMShareResponse, error) { c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.GetOCMShareResponse{ Status: status.NewInternal(ctx, "error getting user share provider client"), }, nil @@ -140,10 +112,25 @@ func (s *svc) getOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest) (*oc return res, nil } +func (s *svc) GetOCMShareByToken(ctx context.Context, req *ocm.GetOCMShareByTokenRequest) (*ocm.GetOCMShareByTokenResponse, error) { + c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling GetOCMShareProviderClient") + } + + res, err := c.GetOCMShareByToken(ctx, req) + if err != nil { + return nil, errors.Wrap(err, "gateway: error calling GetOCMShareByToken") + } + + return res, nil +} + // TODO(labkode): read GetShare comment. func (s *svc) ListOCMShares(ctx context.Context, req *ocm.ListOCMSharesRequest) (*ocm.ListOCMSharesResponse, error) { c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.ListOCMSharesResponse{ Status: status.NewInternal(ctx, "error getting user share provider client"), }, nil @@ -160,6 +147,7 @@ func (s *svc) ListOCMShares(ctx context.Context, req *ocm.ListOCMSharesRequest) func (s *svc) UpdateOCMShare(ctx context.Context, req *ocm.UpdateOCMShareRequest) (*ocm.UpdateOCMShareResponse, error) { c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.UpdateOCMShareResponse{ Status: status.NewInternal(ctx, "error getting share provider client"), }, nil @@ -176,6 +164,7 @@ func (s *svc) UpdateOCMShare(ctx context.Context, req *ocm.UpdateOCMShareRequest func (s *svc) ListReceivedOCMShares(ctx context.Context, req *ocm.ListReceivedOCMSharesRequest) (*ocm.ListReceivedOCMSharesResponse, error) { c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.ListReceivedOCMSharesResponse{ Status: status.NewInternal(ctx, "error getting share provider client"), }, nil @@ -193,11 +182,49 @@ func (s *svc) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateReceive log := appctx.GetLogger(ctx) c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.UpdateReceivedOCMShareResponse{ Status: status.NewInternal(ctx, "error getting share provider client"), }, nil } + // retrieve the current received share + getShareReq := &ocm.GetReceivedOCMShareRequest{ + Ref: &ocm.ShareReference{ + Spec: &ocm.ShareReference_Id{ + Id: req.Share.Id, + }, + }, + } + getShareRes, err := s.GetReceivedOCMShare(ctx, getShareReq) + if err != nil { + log.Error().Err(err).Msg("gateway: error calling GetReceivedOCMShare") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_INTERNAL, + }, + }, nil + } + if getShareRes.Status.Code != rpc.Code_CODE_OK { + log.Error().Msg("gateway: error calling GetReceivedOCMShare") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_INTERNAL, + Message: "gateway: error calling GetReceivedOCMShare", + }, + }, nil + } + share := getShareRes.Share + if share == nil { + log.Error().Err(err).Msg("gateway: got a nil share from GetReceivedOCMShare") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_INTERNAL, + Message: "gateway: got a nil share from GetReceivedOCMShare", + }, + }, nil + } + res, err := c.UpdateReceivedOCMShare(ctx, req) if err != nil { log.Err(err).Msg("gateway: error calling UpdateReceivedShare") @@ -208,175 +235,17 @@ func (s *svc) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateReceive }, nil } - // if we don't need to create/delete references then we return early. - if !s.c.CommitShareToStorageGrant { - return res, nil - } - - // properties are updated in the order they appear in the field mask - // when an error occurs the request ends and no further fields are updated for i := range req.UpdateMask.Paths { switch req.UpdateMask.Paths[i] { case "state": switch req.GetShare().GetState() { case ocm.ShareState_SHARE_STATE_ACCEPTED: - getShareReq := &ocm.GetReceivedOCMShareRequest{ - Ref: &ocm.ShareReference{ - Spec: &ocm.ShareReference_Id{ - Id: req.Share.Share.Id, - }, - }, - } - getShareRes, err := s.GetReceivedOCMShare(ctx, getShareReq) - if err != nil { - log.Err(err).Msg("gateway: error calling GetReceivedShare") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{ - Code: rpc.Code_CODE_INTERNAL, - }, - }, nil - } - - if getShareRes.Status.Code != rpc.Code_CODE_OK { - log.Error().Msg("gateway: error calling GetReceivedShare") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{ - Code: rpc.Code_CODE_INTERNAL, - }, - }, nil - } - - share := getShareRes.Share - if share == nil { - panic("gateway: error updating a received share: the share is nil") - } - - if share.GetShare().ShareType == ocm.Share_SHARE_TYPE_TRANSFER { - srcIdp := share.GetShare().GetOwner().GetIdp() - meshProvider, err := s.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ - Domain: srcIdp, - }) - if err != nil { - log.Err(err).Msg("gateway: error calling GetInfoByDomain") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, - }, nil - } - var srcEndpoint string - var srcEndpointBaseURI string - // target URI scheme will be the webdav endpoint scheme - var srcEndpointScheme string - for _, s := range meshProvider.ProviderInfo.Services { - if strings.ToLower(s.Endpoint.Type.Name) == "webdav" { - url, err := url.Parse(s.Endpoint.Path) - if err != nil { - log.Err(err).Msg("gateway: error calling UpdateReceivedShare: unable to parse webdav endpoint " + s.Endpoint.Path) - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, - }, nil - } - srcEndpoint = url.Host - srcEndpointBaseURI = url.Path - srcEndpointScheme = url.Scheme - break - } - } - - var srcToken string - srcTokenOpaque, ok := share.GetShare().Grantee.Opaque.Map["token"] - if !ok { - return &ocm.UpdateReceivedOCMShareResponse{ - Status: status.NewNotFound(ctx, "token not found"), - }, nil - } - switch srcTokenOpaque.Decoder { - case "plain": - srcToken = string(srcTokenOpaque.Value) - default: - return &ocm.UpdateReceivedOCMShareResponse{ - Status: status.NewInternal(ctx, "error updating received share"), - }, nil - } - - srcPath := path.Join(srcEndpointBaseURI, share.GetShare().Name) - srcTargetURI := fmt.Sprintf("%s://%s@%s?name=%s", srcEndpointScheme, srcToken, srcEndpoint, srcPath) - - // get the webdav endpoint of the grantee's idp - var granteeIdp string - if share.GetShare().GetGrantee().Type == provider.GranteeType_GRANTEE_TYPE_USER { - granteeIdp = share.GetShare().GetGrantee().GetUserId().Idp - } - if share.GetShare().GetGrantee().Type == provider.GranteeType_GRANTEE_TYPE_GROUP { - granteeIdp = share.GetShare().GetGrantee().GetGroupId().Idp - } - destWebdavEndpoint, err := s.getWebdavEndpoint(ctx, granteeIdp) - if err != nil { - log.Err(err).Msg("gateway: error calling UpdateReceivedShare") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, - }, nil - } - url, err := url.Parse(destWebdavEndpoint) - if err != nil { - log.Err(err).Msg("gateway: error calling UpdateReceivedShare: unable to parse webdav endpoint " + destWebdavEndpoint) - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, - }, nil - } - destEndpoint := url.Host - destEndpointBaseURI := url.Path - destEndpointScheme := url.Scheme - destToken := ctxpkg.ContextMustGetToken(ctx) - homeRes, err := s.GetHome(ctx, &provider.GetHomeRequest{}) - if err != nil { - log.Err(err).Msg("gateway: error calling UpdateReceivedShare") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, - }, nil - } - destPath := path.Join(destEndpointBaseURI, homeRes.Path, s.c.DataTransfersFolder, path.Base(share.GetShare().Name)) - destTargetURI := fmt.Sprintf("%s://%s@%s?name=%s", destEndpointScheme, destToken, destEndpoint, destPath) - - opaqueObj := &types.Opaque{ - Map: map[string]*types.OpaqueEntry{ - "shareId": { - Decoder: "plain", - Value: []byte(share.GetShare().GetId().OpaqueId), - }, - }, - } - req := &datatx.CreateTransferRequest{ - SrcTargetUri: srcTargetURI, - DestTargetUri: destTargetURI, - Opaque: opaqueObj, - } - res, err := s.CreateTransfer(ctx, req) - if err != nil { - log.Err(err).Msg("gateway: error calling PullTransfer") - return &ocm.UpdateReceivedOCMShareResponse{ - Status: &rpc.Status{ - Code: rpc.Code_CODE_INTERNAL, - }, - }, err - } - - log.Info().Msgf("gateway: PullTransfer: %v", res.TxInfo) - - // do not create an OCM reference, just return - return &ocm.UpdateReceivedOCMShareResponse{ - Status: status.NewOK(ctx), - }, nil - } - - createRefStatus, err := s.createOCMReference(ctx, share.Share) - return &ocm.UpdateReceivedOCMShareResponse{ - Status: createRefStatus, - }, err + // for a transfer this is handled elsewhere + case ocm.ShareState_SHARE_STATE_PENDING: + // currently no consequences case ocm.ShareState_SHARE_STATE_REJECTED: - return &ocm.UpdateReceivedOCMShareResponse{ - Status: status.NewUnimplemented(ctx, err, "ocm share rejection not supported at the moment"), - }, nil - + // TODO + return res, nil } case "mount_point": // TODO(labkode): implementing updating mount point @@ -388,12 +257,139 @@ func (s *svc) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateReceive return nil, errtypes.NotSupported("updating " + req.UpdateMask.Paths[i] + " is not supported") } } + // handle transfer in case it has not already been accepted + if s.isTransferShare(share) && req.GetShare().State == ocm.ShareState_SHARE_STATE_ACCEPTED { + if share.State == ocm.ShareState_SHARE_STATE_ACCEPTED { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare, share already accepted.") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_FAILED_PRECONDITION, + Message: "Share already accepted.", + }, + }, err + } + // get provided destination path + transferDestinationPath, err := s.getTransferDestinationPath(ctx, req) + if err != nil { + if err != nil { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_INTERNAL, + }, + }, err + } + } + + error := s.handleTransfer(ctx, share, transferDestinationPath) + if error != nil { + log.Err(error).Msg("gateway: error handling transfer in UpdateReceivedShare") + return &ocm.UpdateReceivedOCMShareResponse{ + Status: &rpc.Status{ + Code: rpc.Code_CODE_INTERNAL, + }, + }, error + } + } return res, nil } +func (s *svc) handleTransfer(ctx context.Context, share *ocm.ReceivedShare, transferDestinationPath string) error { + log := appctx.GetLogger(ctx) + + protocol, ok := s.getTransferProtocol(share) + if !ok { + return errors.New("gateway: unable to retrieve transfer protocol") + } + sourceURI := protocol.SourceUri + + // get the webdav endpoint of the grantee's idp + var granteeIdp string + if share.GetGrantee().Type == provider.GranteeType_GRANTEE_TYPE_USER { + granteeIdp = share.GetGrantee().GetUserId().Idp + } + if share.GetGrantee().Type == provider.GranteeType_GRANTEE_TYPE_GROUP { + granteeIdp = share.GetGrantee().GetGroupId().Idp + } + destWebdavEndpoint, err := s.getWebdavEndpoint(ctx, granteeIdp) + if err != nil { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare") + return err + } + destWebdavEndpointURL, err := url.Parse(destWebdavEndpoint) + if err != nil { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare: unable to parse webdav endpoint \"" + destWebdavEndpoint + "\" into URL structure") + return err + } + destWebdavHost, err := s.getWebdavHost(ctx, granteeIdp) + if err != nil { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare") + return err + } + var dstWebdavURLString string + if strings.Contains(destWebdavHost, "://") { + dstWebdavURLString = destWebdavHost + } else { + dstWebdavURLString = "http://" + destWebdavHost + } + dstWebdavHostURL, err := url.Parse(dstWebdavURLString) + if err != nil { + log.Err(err).Msg("gateway: error calling UpdateReceivedShare: unable to parse webdav service host \"" + dstWebdavURLString + "\" into URL structure") + return err + } + destServiceHost := dstWebdavHostURL.Host + dstWebdavHostURL.Path + // optional prefix must only appear in target url path: + // http://...token...@reva.eu/prefix/?name=remote.php/webdav/home/... + destEndpointPath := strings.TrimPrefix(destWebdavEndpointURL.Path, dstWebdavHostURL.Path) + destEndpointScheme := destWebdavEndpointURL.Scheme + destToken := ctxpkg.ContextMustGetToken(ctx) + destPath := path.Join(destEndpointPath, transferDestinationPath, path.Base(share.Name)) + destTargetURI := fmt.Sprintf("%s://%s@%s?name=%s", destEndpointScheme, destToken, destServiceHost, destPath) + // var destUri string + req := &datatx.CreateTransferRequest{ + SrcTargetUri: sourceURI, + DestTargetUri: destTargetURI, + ShareId: share.Id, + } + + res, err := s.CreateTransfer(ctx, req) + if err != nil { + return err + } + log.Info().Msgf("gateway: CreateTransfer: %v", res.TxInfo) + return nil +} + +func (s *svc) isTransferShare(share *ocm.ReceivedShare) bool { + _, ok := s.getTransferProtocol(share) + return ok +} + +func (s *svc) getTransferDestinationPath(ctx context.Context, req *ocm.UpdateReceivedOCMShareRequest) (string, error) { + log := appctx.GetLogger(ctx) + // the destination path is not part of any protocol, but an opaque field + destPathOpaque, ok := req.GetOpaque().GetMap()["transfer_destination_path"] + if ok { + switch destPathOpaque.Decoder { + case "plain": + if string(destPathOpaque.Value) != "" { + return string(destPathOpaque.Value), nil + } + default: + return "", errtypes.NotSupported("decoder of opaque entry 'transfer_destination_path' not recognized: " + destPathOpaque.Decoder) + } + } + log.Info().Msg("destination path not provided, trying default transfer destination folder") + if s.c.DataTransfersFolder == "" { + return "", errtypes.NotSupported("no destination path provided and default transfer destination folder is not set") + } + return s.c.DataTransfersFolder, nil +} + func (s *svc) GetReceivedOCMShare(ctx context.Context, req *ocm.GetReceivedOCMShareRequest) (*ocm.GetReceivedOCMShareResponse, error) { c, err := pool.GetOCMShareProviderClient(s.c.OCMShareProviderEndpoint) if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Msg("error calling GetOCMShareProviderClient") return &ocm.GetReceivedOCMShareResponse{ Status: status.NewInternal(ctx, "error getting share provider client"), }, nil @@ -407,96 +403,11 @@ func (s *svc) GetReceivedOCMShare(ctx context.Context, req *ocm.GetReceivedOCMSh return res, nil } -func (s *svc) createOCMReference(ctx context.Context, share *ocm.Share) (*rpc.Status, error) { - - log := appctx.GetLogger(ctx) - - var token string - tokenOpaque, ok := share.Grantee.Opaque.Map["token"] - if !ok { - log.Debug().Msg("createOCMReference: token not found in opaque map") - return status.NewNotFound(ctx, "token not found"), nil - } - switch tokenOpaque.Decoder { - case "plain": - token = string(tokenOpaque.Value) - default: - log.Error().Str("decoder", tokenOpaque.Decoder).Msg("createOCMReference: opaque entry decoder not recognized") - return status.NewInternal(ctx, "invalid opaque entry decoder"), nil - } - - homeRes, err := s.GetHome(ctx, &provider.GetHomeRequest{}) - if err != nil { - log.Error().Err(err).Msg("createOCMReference: error calling GetHome") - return status.NewInternal(ctx, "error updating received share"), nil - } - - var refPath, targetURI string - if share.ShareType == ocm.Share_SHARE_TYPE_TRANSFER { - createTransferDir, err := s.CreateContainer(ctx, &provider.CreateContainerRequest{ - Ref: &provider.Reference{ - Path: path.Join(homeRes.Path, s.c.DataTransfersFolder), - }, - }) - if err != nil { - log.Error().Err(err).Msg("createOCMReference: error creating transfers directory") - return status.NewInternal(ctx, "error creating transfers directory"), nil +func (s *svc) getTransferProtocol(share *ocm.ReceivedShare) (*ocm.TransferProtocol, bool) { + for _, p := range share.Protocols { + if d, ok := p.Term.(*ocm.Protocol_TransferOptions); ok { + return d.TransferOptions, true } - if createTransferDir.Status.Code != rpc.Code_CODE_OK && createTransferDir.Status.Code != rpc.Code_CODE_ALREADY_EXISTS { - log.Error().Interface("status", createTransferDir.Status).Msg("createOCMReference: error creating transfers directory") - return status.NewInternal(ctx, "error creating transfers directory"), nil - } - - refPath = path.Join(homeRes.Path, s.c.DataTransfersFolder, path.Base(share.Name)) - targetURI = fmt.Sprintf("datatx://%s@%s?name=%s", token, share.Creator.Idp, share.Name) - } else { - // reference path is the home path + some name on the corresponding - // mesh provider (/home/MyShares/x) - // It is the responsibility of the gateway to resolve these references and merge the response back - // from the main request. - refPath = path.Join(homeRes.Path, s.c.ShareFolder, path.Base(share.Name)) - // webdav is the scheme, token@host the opaque part and the share name the query of the URL. - targetURI = fmt.Sprintf("webdav://%s@%s?name=%s", token, share.Creator.Idp, share.Name) } - - log.Info().Msg("mount path will be:" + refPath) - - c, p, err := s.findByPath(ctx, refPath) - if err != nil { - log.Error().Err(err).Msg("createOCMReference: could not find storage provider") - if _, ok := err.(errtypes.IsNotFound); ok { - return status.NewNotFound(ctx, "storage provider not found"), nil - } - return status.NewInternal(ctx, "error finding storage provider"), nil - } - - var ( - root *provider.ResourceId - mountPath string - ) - for _, space := range decodeSpaces(p) { - mountPath = decodePath(space) - root = space.Root - break // TODO can there be more than one space for a path? - } - - pRef := unwrap(&provider.Reference{Path: refPath}, mountPath, root) - createRefReq := &provider.CreateReferenceRequest{ - Ref: pRef, - TargetUri: targetURI, - } - createRefRes, err := c.CreateReference(ctx, createRefReq) - if err != nil { - log.Err(err).Msg("createOCMReference: error calling CreateReference") - return &rpc.Status{ - Code: rpc.Code_CODE_INTERNAL, - }, nil - } - - if createRefRes.Status.Code != rpc.Code_CODE_OK { - log.Error().Interface("status", createRefRes.Status).Msg("createOCMReference: error calling CreateReference") - return status.NewInternal(ctx, "error updating received share"), nil - } - - return status.NewOK(ctx), nil + return nil, false } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go index 0c8d0425cc..a4ad2af393 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go @@ -1030,11 +1030,6 @@ func (s *svc) GetQuota(ctx context.Context, req *gateway.GetQuotaRequest) (*prov return res, nil } -func (s *svc) findByPath(ctx context.Context, path string) (provider.ProviderAPIClient, *registry.ProviderInfo, error) { - ref := &provider.Reference{Path: path} - return s.find(ctx, ref) -} - // find looks up the provider that is responsible for the given request // It will return a client that the caller can use to make the call, as well as the ProviderInfo. It: // - contains the provider path, which is the mount point of the provider diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/webdavstorageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/webdavstorageprovider.go index 0bc75685ec..e0835f8acc 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/webdavstorageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/webdavstorageprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -60,21 +60,6 @@ func (s *svc) extractEndpointInfo(ctx context.Context, targetURL string) (*webda }, nil } -func appendNameQuery(targetURL string, nameQueries ...string) (string, error) { - uri, err := url.Parse(targetURL) - if err != nil { - return "", err - } - q, err := url.ParseQuery(uri.RawQuery) - if err != nil { - return "", err - } - name := append([]string{q["name"][0]}, nameQueries...) - q.Set("name", path.Join(name...)) - uri.RawQuery = q.Encode() - return uri.String(), nil -} - func (s *svc) getWebdavEndpoint(ctx context.Context, domain string) (string, error) { meshProvider, err := s.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ Domain: domain, @@ -89,3 +74,33 @@ func (s *svc) getWebdavEndpoint(ctx context.Context, domain string) (string, err } return "", errtypes.NotFound(domain) } + +func (s *svc) getWebdavHost(ctx context.Context, domain string) (string, error) { + meshProvider, err := s.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ + Domain: domain, + }) + if err != nil { + return "", errors.Wrap(err, "gateway: error calling GetInfoByDomain") + } + for _, s := range meshProvider.ProviderInfo.Services { + if strings.ToLower(s.Endpoint.Type.Name) == "webdav" { + return s.Host, nil + } + } + return "", errtypes.NotFound(domain) +} + +func appendNameQuery(targetURL string, nameQueries ...string) (string, error) { + uri, err := url.Parse(targetURL) + if err != nil { + return "", err + } + q, err := url.ParseQuery(uri.RawQuery) + if err != nil { + return "", err + } + name := append([]string{q["name"][0]}, nameQueries...) + q.Set("name", path.Join(name...)) + uri.RawQuery = q.Encode() + return uri.String(), nil +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmcore/ocmcore.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmcore/ocmcore.go index 9782688f3d..f3d7e7813b 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmcore/ocmcore.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmcore/ocmcore.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,20 +20,19 @@ package ocmcore import ( "context" - "encoding/json" "fmt" + "time" ocmcore "github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" - provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" - typespb "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/ocm/share" - "github.com/cs3org/reva/v2/pkg/ocm/share/manager/registry" + "github.com/cs3org/reva/v2/pkg/ocm/share/repository/registry" "github.com/cs3org/reva/v2/pkg/rgrpc" "github.com/cs3org/reva/v2/pkg/rgrpc/status" - "github.com/mitchellh/mapstructure" - "github.com/pkg/errors" + "github.com/cs3org/reva/v2/pkg/utils/cfg" "google.golang.org/grpc" ) @@ -48,10 +47,10 @@ type config struct { type service struct { conf *config - sm share.Manager + repo share.Repository } -func (c *config) init() { +func (c *config) ApplyDefaults() { if c.Driver == "" { c.Driver = "json" } @@ -61,39 +60,28 @@ func (s *service) Register(ss *grpc.Server) { ocmcore.RegisterOcmCoreAPIServer(ss, s) } -func getShareManager(c *config) (share.Manager, error) { +func getShareRepository(c *config) (share.Repository, error) { if f, ok := registry.NewFuncs[c.Driver]; ok { return f(c.Drivers[c.Driver]) } return nil, errtypes.NotFound(fmt.Sprintf("driver not found: %s", c.Driver)) } -func parseConfig(m map[string]interface{}) (*config, error) { - c := &config{} - if err := mapstructure.Decode(m, c); err != nil { - err = errors.Wrap(err, "error decoding conf") - return nil, err - } - return c, nil -} - -// New creates a new ocm core svc +// New creates a new ocm core svc. func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { - - c, err := parseConfig(m) - if err != nil { + var c config + if err := cfg.Decode(m, &c); err != nil { return nil, err } - c.init() - sm, err := getShareManager(c) + repo, err := getShareRepository(&c) if err != nil { return nil, err } service := &service{ - conf: c, - sm: sm, + conf: &c, + repo: repo, } return service, nil @@ -107,91 +95,53 @@ func (s *service) UnprotectedEndpoints() []string { return []string{"/cs3.ocm.core.v1beta1.OcmCoreAPI/CreateOCMCoreShare"} } -// CreateOCMCoreShare is called when an OCM request comes into this reva instance from +// CreateOCMCoreShare is called when an OCM request comes into this reva instance from. func (s *service) CreateOCMCoreShare(ctx context.Context, req *ocmcore.CreateOCMCoreShareRequest) (*ocmcore.CreateOCMCoreShareResponse, error) { - resource := &provider.ResourceId{ - StorageId: "remote", - OpaqueId: req.Name, + if req.ShareType != ocm.ShareType_SHARE_TYPE_USER { + return nil, errtypes.NotSupported("share type not supported") } - var resourcePermissions *provider.ResourcePermissions - permOpaque, ok := req.Protocol.Opaque.Map["permissions"] - if !ok { - return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "resource permissions not set"), - }, nil - } - switch permOpaque.Decoder { - case "json": - err := json.Unmarshal(permOpaque.Value, &resourcePermissions) - if err != nil { - return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "error decoding resource permissions"), - }, nil - } - default: - return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "invalid opaque entry decoder"), - }, nil + now := &typesv1beta1.Timestamp{ + Seconds: uint64(time.Now().Unix()), } - var token string - tokenOpaque, ok := req.Protocol.Opaque.Map["token"] - if !ok { - return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "token not set"), - }, nil - } - switch tokenOpaque.Decoder { - case "plain": - token = string(tokenOpaque.Value) - default: - return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "invalid opaque entry decoder"), - }, nil - } - - grant := &ocm.ShareGrant{ - Grantee: &provider.Grantee{ - Type: provider.GranteeType_GRANTEE_TYPE_USER, - // For now, we only support user shares. - // TODO (ishank011): To be updated once this is decided. - Id: &provider.Grantee_UserId{UserId: req.ShareWith}, - // passing this in grant.Grantee.Opaque because ShareGrant itself doesn't have a root opaque. - Opaque: &typespb.Opaque{ - Map: map[string]*typespb.OpaqueEntry{ - "remoteShareId": { - Decoder: "plain", - Value: []byte(req.ProviderId), - }, - }, + share, err := s.repo.StoreReceivedShare(ctx, &ocm.ReceivedShare{ + RemoteShareId: req.ResourceId, + Name: req.Name, + Grantee: &providerpb.Grantee{ + Type: providerpb.GranteeType_GRANTEE_TYPE_USER, + Id: &providerpb.Grantee_UserId{ + UserId: req.ShareWith, }, }, - Permissions: &ocm.SharePermissions{ - Permissions: resourcePermissions, - }, - } - - var shareType ocm.Share_ShareType - switch req.Protocol.Name { - case "datatx": - shareType = ocm.Share_SHARE_TYPE_TRANSFER - default: - shareType = ocm.Share_SHARE_TYPE_REGULAR - } - - share, err := s.sm.Share(ctx, resource, grant, req.Name, nil, "", req.Owner, token, shareType) - + ResourceType: req.ResourceType, + ShareType: req.ShareType, + Owner: req.Owner, + Creator: req.Sender, + Protocols: req.Protocols, + Ctime: now, + Mtime: now, + Expiration: req.Expiration, + State: ocm.ShareState_SHARE_STATE_PENDING, + }) if err != nil { + // TODO: identify errors return &ocmcore.CreateOCMCoreShareResponse{ - Status: status.NewInternal(ctx, "error creating ocm core share"), + Status: status.NewInternal(ctx, err.Error()), }, nil } - res := &ocmcore.CreateOCMCoreShareResponse{ + return &ocmcore.CreateOCMCoreShareResponse{ Status: status.NewOK(ctx), Id: share.Id.OpaqueId, Created: share.Ctime, - } - return res, nil + }, nil +} + +func (s *service) UpdateOCMCoreShare(ctx context.Context, req *ocmcore.UpdateOCMCoreShareRequest) (*ocmcore.UpdateOCMCoreShareResponse, error) { + return nil, errtypes.NotSupported("not implemented") +} + +func (s *service) DeleteOCMCoreShare(ctx context.Context, req *ocmcore.DeleteOCMCoreShareRequest) (*ocmcore.DeleteOCMCoreShareResponse, error) { + return nil, errtypes.NotSupported("not implemented") } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/ocminvitemanager.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/ocminvitemanager.go index 7af7125c28..671f864098 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/ocminvitemanager.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/ocminvitemanager.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,14 +20,24 @@ package ocminvitemanager import ( "context" + "time" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" invitepb "github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1" + ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/errtypes" + "github.com/cs3org/reva/v2/pkg/ocm/client" "github.com/cs3org/reva/v2/pkg/ocm/invite" - "github.com/cs3org/reva/v2/pkg/ocm/invite/manager/registry" + "github.com/cs3org/reva/v2/pkg/ocm/invite/repository/registry" "github.com/cs3org/reva/v2/pkg/rgrpc" "github.com/cs3org/reva/v2/pkg/rgrpc/status" - "github.com/mitchellh/mapstructure" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/sharedconf" + "github.com/cs3org/reva/v2/pkg/utils" + "github.com/cs3org/reva/v2/pkg/utils/cfg" "github.com/pkg/errors" "google.golang.org/grpc" ) @@ -37,58 +47,77 @@ func init() { } type config struct { - Driver string `mapstructure:"driver"` - Drivers map[string]map[string]interface{} `mapstructure:"drivers"` + Driver string `mapstructure:"driver"` + Drivers map[string]map[string]interface{} `mapstructure:"drivers"` + TokenExpiration string `mapstructure:"token_expiration"` + OCMClientTimeout int `mapstructure:"ocm_timeout"` + OCMClientInsecure bool `mapstructure:"ocm_insecure"` + GatewaySVC string `mapstructure:"gatewaysvc" validate:"required"` + ProviderDomain string `mapstructure:"provider_domain" validate:"required" docs:"The same domain registered in the provider authorizer"` + + tokenExpiration time.Duration } type service struct { - conf *config - im invite.Manager + conf *config + repo invite.Repository + ocmClient *client.OCMClient + gatewaySelector *pool.Selector[gateway.GatewayAPIClient] } -func (c *config) init() { +func (c *config) ApplyDefaults() { if c.Driver == "" { c.Driver = "json" } + if c.TokenExpiration == "" { + c.TokenExpiration = "24h" + } + + c.GatewaySVC = sharedconf.GetGatewaySVC(c.GatewaySVC) } func (s *service) Register(ss *grpc.Server) { invitepb.RegisterInviteAPIServer(ss, s) } -func getInviteManager(c *config) (invite.Manager, error) { +func getInviteRepository(c *config) (invite.Repository, error) { if f, ok := registry.NewFuncs[c.Driver]; ok { return f(c.Drivers[c.Driver]) } return nil, errtypes.NotFound("driver not found: " + c.Driver) } -func parseConfig(m map[string]interface{}) (*config, error) { - c := &config{} - if err := mapstructure.Decode(m, c); err != nil { - err = errors.Wrap(err, "error decoding conf") +// New creates a new OCM invite manager svc. +func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { + var c config + if err := cfg.Decode(m, &c); err != nil { return nil, err } - return c, nil -} -// New creates a new OCM invite manager svc -func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { - - c, err := parseConfig(m) + p, err := time.ParseDuration(c.TokenExpiration) if err != nil { return nil, err } - c.init() + c.tokenExpiration = p - im, err := getInviteManager(c) + repo, err := getInviteRepository(&c) + if err != nil { + return nil, err + } + + gatewaySelector, err := pool.GatewaySelector(c.GatewaySVC) if err != nil { return nil, err } service := &service{ - conf: c, - im: im, + conf: &c, + repo: repo, + ocmClient: client.New(&client.Config{ + Timeout: time.Duration(c.OCMClientTimeout) * time.Second, + Insecure: c.OCMClientInsecure, + }), + gatewaySelector: gatewaySelector, } return service, nil } @@ -98,12 +127,14 @@ func (s *service) Close() error { } func (s *service) UnprotectedEndpoints() []string { - return []string{"/cs3.ocm.invite.v1beta1.InviteAPI/AcceptInvite"} + return []string{"/cs3.ocm.invite.v1beta1.InviteAPI/AcceptInvite", "/cs3.ocm.invite.v1beta1.InviteAPI/GetAcceptedUser"} } func (s *service) GenerateInviteToken(ctx context.Context, req *invitepb.GenerateInviteTokenRequest) (*invitepb.GenerateInviteTokenResponse, error) { - token, err := s.im.GenerateToken(ctx) - if err != nil { + user := ctxpkg.ContextMustGetUser(ctx) + token := CreateToken(s.conf.tokenExpiration, user.GetId(), req.Description) + + if err := s.repo.AddToken(ctx, token); err != nil { return &invitepb.GenerateInviteTokenResponse{ Status: status.NewInternal(ctx, "error generating invite token"), }, nil @@ -115,34 +146,175 @@ func (s *service) GenerateInviteToken(ctx context.Context, req *invitepb.Generat }, nil } -func (s *service) ForwardInvite(ctx context.Context, req *invitepb.ForwardInviteRequest) (*invitepb.ForwardInviteResponse, error) { - err := s.im.ForwardInvite(ctx, req.InviteToken, req.OriginSystemProvider) +func (s *service) ListInviteTokens(ctx context.Context, req *invitepb.ListInviteTokensRequest) (*invitepb.ListInviteTokensResponse, error) { + user := ctxpkg.ContextMustGetUser(ctx) + tokens, err := s.repo.ListTokens(ctx, user.Id) if err != nil { - return &invitepb.ForwardInviteResponse{ - Status: status.NewInternal(ctx, "error forwarding invite"), + return &invitepb.ListInviteTokensResponse{ + Status: status.NewInternal(ctx, "error listing tokens"), }, nil } - - return &invitepb.ForwardInviteResponse{ - Status: status.NewOK(ctx), + return &invitepb.ListInviteTokensResponse{ + Status: status.NewOK(ctx), + InviteTokens: tokens, }, nil } +func (s *service) ForwardInvite(ctx context.Context, req *invitepb.ForwardInviteRequest) (*invitepb.ForwardInviteResponse, error) { + user := ctxpkg.ContextMustGetUser(ctx) + + ocmEndpoint, err := getOCMEndpoint(req.GetOriginSystemProvider()) + if err != nil { + return nil, err + } + + remoteUser, err := s.ocmClient.InviteAccepted(ctx, ocmEndpoint, &client.InviteAcceptedRequest{ + Token: req.InviteToken.GetToken(), + RecipientProvider: s.conf.ProviderDomain, + UserID: user.GetId().GetOpaqueId(), + Email: user.GetMail(), + Name: user.GetDisplayName(), + }) + if err != nil { + switch { + case errors.Is(err, client.ErrTokenInvalid): + return &invitepb.ForwardInviteResponse{ + Status: status.NewInvalid(ctx, "token not valid"), + }, nil + case errors.Is(err, client.ErrTokenNotFound): + return &invitepb.ForwardInviteResponse{ + Status: status.NewNotFound(ctx, "token not found"), + }, nil + case errors.Is(err, client.ErrUserAlreadyAccepted): + return &invitepb.ForwardInviteResponse{ + Status: status.NewAlreadyExists(ctx, err, err.Error()), + }, nil + case errors.Is(err, client.ErrServiceNotTrusted): + return &invitepb.ForwardInviteResponse{ + Status: status.NewPermissionDenied(ctx, err, err.Error()), + }, nil + default: + return &invitepb.ForwardInviteResponse{ + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + } + + // create a link between the user that accepted the share (in ctx) + // and the remote one (the initiator), so at the end of the invitation workflow they + // know each other + + remoteUserID := &userpb.UserId{ + Type: userpb.UserType_USER_TYPE_FEDERATED, + Idp: req.GetOriginSystemProvider().Domain, + OpaqueId: remoteUser.UserID, + } + + if err := s.repo.AddRemoteUser(ctx, user.Id, &userpb.User{ + Id: remoteUserID, + Mail: remoteUser.Email, + DisplayName: remoteUser.Name, + }); err != nil { + if !errors.Is(err, invite.ErrUserAlreadyAccepted) { + // skip error if user was already accepted + return &invitepb.ForwardInviteResponse{ + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + } + + return &invitepb.ForwardInviteResponse{ + Status: status.NewOK(ctx), + UserId: remoteUserID, + Email: remoteUser.Email, + DisplayName: remoteUser.Name, + }, nil +} + +func getOCMEndpoint(originProvider *ocmprovider.ProviderInfo) (string, error) { + for _, s := range originProvider.Services { + if s.Endpoint.Type.Name == "OCM" { + return s.Endpoint.Path, nil + } + } + return "", errors.New("ocm endpoint not specified for mesh provider") +} + func (s *service) AcceptInvite(ctx context.Context, req *invitepb.AcceptInviteRequest) (*invitepb.AcceptInviteResponse, error) { - err := s.im.AcceptInvite(ctx, req.InviteToken, req.RemoteUser) + token, err := s.repo.GetToken(ctx, req.InviteToken.Token) + if err != nil { + if errors.Is(err, invite.ErrTokenNotFound) { + return &invitepb.AcceptInviteResponse{ + Status: status.NewNotFound(ctx, "token not found"), + }, nil + } + return &invitepb.AcceptInviteResponse{ + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + + if !isTokenValid(token) { + return &invitepb.AcceptInviteResponse{ + Status: status.NewInvalid(ctx, "token is not valid"), + }, nil + } + + initiator, err := s.getUserInfo(ctx, token.UserId) if err != nil { return &invitepb.AcceptInviteResponse{ - Status: status.NewInternal(ctx, "error accepting invite"), + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + + if err := s.repo.AddRemoteUser(ctx, token.GetUserId(), req.GetRemoteUser()); err != nil { + if errors.Is(err, invite.ErrUserAlreadyAccepted) { + return &invitepb.AcceptInviteResponse{ + Status: status.NewAlreadyExists(ctx, err, err.Error()), + }, nil + } + return &invitepb.AcceptInviteResponse{ + Status: status.NewInternal(ctx, err.Error()), }, nil } return &invitepb.AcceptInviteResponse{ - Status: status.NewOK(ctx), + Status: status.NewOK(ctx), + UserId: initiator.GetId(), + Email: initiator.Mail, + DisplayName: initiator.DisplayName, }, nil } +func (s *service) getUserInfo(ctx context.Context, id *userpb.UserId) (*userpb.User, error) { + gw, err := s.gatewaySelector.Next() + if err != nil { + return nil, nil + } + res, err := gw.GetUser(ctx, &userpb.GetUserRequest{ + UserId: id, + }) + if err != nil { + return nil, err + } + if res.Status.Code != rpcv1beta1.Code_CODE_OK { + return nil, errors.New(res.Status.Message) + } + + return res.User, nil +} + +func isTokenValid(token *invitepb.InviteToken) bool { + return time.Now().Unix() < int64(token.Expiration.Seconds) +} + func (s *service) GetAcceptedUser(ctx context.Context, req *invitepb.GetAcceptedUserRequest) (*invitepb.GetAcceptedUserResponse, error) { - remoteUser, err := s.im.GetAcceptedUser(ctx, req.RemoteUserId) + user, ok := getUserFilter(ctx, req) + if !ok { + return &invitepb.GetAcceptedUserResponse{ + Status: status.NewInvalidArg(ctx, "user not found"), + }, nil + } + remoteUser, err := s.repo.GetRemoteUser(ctx, user.GetId(), req.GetRemoteUserId()) if err != nil { return &invitepb.GetAcceptedUserResponse{ Status: status.NewInternal(ctx, "error fetching remote user details"), @@ -155,11 +327,34 @@ func (s *service) GetAcceptedUser(ctx context.Context, req *invitepb.GetAccepted }, nil } +func getUserFilter(ctx context.Context, req *invitepb.GetAcceptedUserRequest) (*userpb.User, bool) { + user, ok := ctxpkg.ContextGetUser(ctx) + if ok { + return user, true + } + + if req.Opaque == nil || req.Opaque.Map == nil { + return nil, false + } + + v, ok := req.Opaque.Map["user-filter"] + if !ok { + return nil, false + } + + var u userpb.UserId + if err := utils.UnmarshalJSONToProtoV1(v.Value, &u); err != nil { + return nil, false + } + return &userpb.User{Id: &u}, true +} + func (s *service) FindAcceptedUsers(ctx context.Context, req *invitepb.FindAcceptedUsersRequest) (*invitepb.FindAcceptedUsersResponse, error) { - acceptedUsers, err := s.im.FindAcceptedUsers(ctx, req.Filter) + user := ctxpkg.ContextMustGetUser(ctx) + acceptedUsers, err := s.repo.FindRemoteUsers(ctx, user.GetId(), req.GetFilter()) if err != nil { return &invitepb.FindAcceptedUsersResponse{ - Status: status.NewInternal(ctx, "error finding remote users"), + Status: status.NewInternal(ctx, "error finding remote users: "+err.Error()), }, nil } @@ -168,3 +363,16 @@ func (s *service) FindAcceptedUsers(ctx context.Context, req *invitepb.FindAccep AcceptedUsers: acceptedUsers, }, nil } + +func (s *service) DeleteAcceptedUser(ctx context.Context, req *invitepb.DeleteAcceptedUserRequest) (*invitepb.DeleteAcceptedUserResponse, error) { + user := ctxpkg.ContextMustGetUser(ctx) + if err := s.repo.DeleteRemoteUser(ctx, user.Id, req.RemoteUserId); err != nil { + return &invitepb.DeleteAcceptedUserResponse{ + Status: status.NewInternal(ctx, "error deleting remote users: "+err.Error()), + }, nil + } + + return &invitepb.DeleteAcceptedUserResponse{ + Status: status.NewOK(ctx), + }, nil +} diff --git a/vendor/github.com/cs3org/reva/v2/pkg/ocm/invite/token/token.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/token.go similarity index 70% rename from vendor/github.com/cs3org/reva/v2/pkg/ocm/invite/token/token.go rename to vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/token.go index 9c7dd3460a..d91243c1d5 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/ocm/invite/token/token.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocminvitemanager/token.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package token +package ocminvitemanager import ( "time" @@ -25,33 +25,21 @@ import ( invitepb "github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1" typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/google/uuid" - "github.com/pkg/errors" ) -// DefaultExpirationTime is the expiration time to be used when unspecified in the config. -const DefaultExpirationTime = "24h" - // CreateToken creates a InviteToken object for the userID indicated by userID. -func CreateToken(expiration string, userID *userpb.UserId) (*invitepb.InviteToken, error) { - - // Parse time of expiration - duration, err := time.ParseDuration(expiration) - if err != nil { - return nil, errors.Wrap(err, "error parsing time of expiration") - } - +func CreateToken(expiration time.Duration, userID *userpb.UserId, description string) *invitepb.InviteToken { tokenID := uuid.New().String() now := time.Now() - expirationTime := now.Add(duration) + expirationTime := now.Add(expiration) - token := invitepb.InviteToken{ + return &invitepb.InviteToken{ Token: tokenID, UserId: userID, Expiration: &typesv1beta1.Timestamp{ Seconds: uint64(expirationTime.Unix()), Nanos: 0, }, + Description: description, } - - return &token, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmshareprovider/ocmshareprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmshareprovider/ocmshareprovider.go index 09d9c70510..88d775eafe 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmshareprovider/ocmshareprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/ocmshareprovider/ocmshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,14 +20,33 @@ package ocmshareprovider import ( "context" + "fmt" + "net/url" + "path/filepath" + "strings" + "text/template" + "time" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" + ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + typespb "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/ocmd" + ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/errtypes" + "github.com/cs3org/reva/v2/pkg/ocm/client" "github.com/cs3org/reva/v2/pkg/ocm/share" - "github.com/cs3org/reva/v2/pkg/ocm/share/manager/registry" + "github.com/cs3org/reva/v2/pkg/ocm/share/repository/registry" "github.com/cs3org/reva/v2/pkg/rgrpc" "github.com/cs3org/reva/v2/pkg/rgrpc/status" - "github.com/mitchellh/mapstructure" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/sharedconf" + "github.com/cs3org/reva/v2/pkg/storage/utils/walker" + "github.com/cs3org/reva/v2/pkg/utils" + "github.com/cs3org/reva/v2/pkg/utils/cfg" "github.com/pkg/errors" "google.golang.org/grpc" ) @@ -37,58 +56,85 @@ func init() { } type config struct { - Driver string `mapstructure:"driver"` - Drivers map[string]map[string]interface{} `mapstructure:"drivers"` + Driver string `mapstructure:"driver"` + Drivers map[string]map[string]interface{} `mapstructure:"drivers"` + ClientTimeout int `mapstructure:"client_timeout"` + ClientInsecure bool `mapstructure:"client_insecure"` + GatewaySVC string `mapstructure:"gatewaysvc" validate:"required"` + ProviderDomain string `mapstructure:"provider_domain" validate:"required" docs:"The same domain registered in the provider authorizer"` + WebDAVEndpoint string `mapstructure:"webdav_endpoint" validate:"required"` + WebappTemplate string `mapstructure:"webapp_template"` } type service struct { - conf *config - sm share.Manager + conf *config + repo share.Repository + client *client.OCMClient + gatewaySelector *pool.Selector[gateway.GatewayAPIClient] + webappTmpl *template.Template + walker walker.Walker } -func (c *config) init() { +func (c *config) ApplyDefaults() { if c.Driver == "" { c.Driver = "json" } + if c.ClientTimeout == 0 { + c.ClientTimeout = 10 + } + if c.WebappTemplate == "" { + c.WebappTemplate = "https://cernbox.cern.ch/external/sciencemesh/{{.Token}}{relative-path-to-shared-resource}" + } + + c.GatewaySVC = sharedconf.GetGatewaySVC(c.GatewaySVC) } func (s *service) Register(ss *grpc.Server) { ocm.RegisterOcmAPIServer(ss, s) } -func getShareManager(c *config) (share.Manager, error) { +func getShareRepository(c *config) (share.Repository, error) { if f, ok := registry.NewFuncs[c.Driver]; ok { return f(c.Drivers[c.Driver]) } return nil, errtypes.NotFound("driver not found: " + c.Driver) } -func parseConfig(m map[string]interface{}) (*config, error) { - c := &config{} - if err := mapstructure.Decode(m, c); err != nil { - err = errors.Wrap(err, "error decoding conf") - return nil, err - } - return c, nil -} - -// New creates a new ocm share provider svc +// New creates a new ocm share provider svc. func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { + var c config + if err := cfg.Decode(m, &c); err != nil { + return nil, err + } - c, err := parseConfig(m) + repo, err := getShareRepository(&c) if err != nil { return nil, err } - c.init() - sm, err := getShareManager(c) + client := client.New(&client.Config{ + Timeout: time.Duration(c.ClientTimeout) * time.Second, + Insecure: c.ClientInsecure, + }) + + gatewaySelector, err := pool.GatewaySelector(c.GatewaySVC) if err != nil { return nil, err } + tpl, err := template.New("webapp_template").Parse(c.WebappTemplate) + if err != nil { + return nil, err + } + walker := walker.NewWalker(gatewaySelector) + service := &service{ - conf: c, - sm: sm, + conf: &c, + repo: repo, + client: client, + gatewaySelector: gatewaySelector, + webappTmpl: tpl, + walker: walker, } return service, nil @@ -99,98 +145,240 @@ func (s *service) Close() error { } func (s *service) UnprotectedEndpoints() []string { - return []string{} + return []string{"/cs3.sharing.ocm.v1beta1.OcmAPI/GetOCMShareByToken"} +} + +func getOCMEndpoint(originProvider *ocmprovider.ProviderInfo) (string, error) { + for _, s := range originProvider.Services { + if s.Endpoint.Type.Name == "OCM" { + return s.Endpoint.Path, nil + } + } + return "", errors.New("ocm endpoint not specified for mesh provider") +} + +func formatOCMUser(u *userpb.UserId) string { + return fmt.Sprintf("%s@%s", u.OpaqueId, u.Idp) +} + +func getResourceType(info *providerpb.ResourceInfo) string { + switch info.Type { + case providerpb.ResourceType_RESOURCE_TYPE_FILE: + return "file" + case providerpb.ResourceType_RESOURCE_TYPE_CONTAINER: + return "folder" + } + return "unknown" +} + +func (s *service) webdavURL(ctx context.Context, share *ocm.Share) string { + // the url is in the form of https://cernbox.cern.ch/remote.php/dav/ocm/token + p, _ := url.JoinPath(s.conf.WebDAVEndpoint, "/dav/ocm", share.Token) + return p +} + +func (s *service) getWebdavProtocol(ctx context.Context, share *ocm.Share, m *ocm.AccessMethod_WebdavOptions) *ocmd.WebDAV { + var perms []string + if m.WebdavOptions.Permissions.InitiateFileDownload { + perms = append(perms, "read") + } + if m.WebdavOptions.Permissions.InitiateFileUpload { + perms = append(perms, "write") + } + + return &ocmd.WebDAV{ + Permissions: perms, + URL: s.webdavURL(ctx, share), + SharedSecret: share.Token, + } +} + +func (s *service) getWebappProtocol(share *ocm.Share) *ocmd.Webapp { + var b strings.Builder + if err := s.webappTmpl.Execute(&b, share); err != nil { + return nil + } + return &ocmd.Webapp{ + URITemplate: b.String(), + } +} + +func (s *service) getDataTransferProtocol(ctx context.Context, share *ocm.Share) *ocmd.Datatx { + var size uint64 + + gatewayClient, err := s.gatewaySelector.Next() + if err != nil { + return nil + } + // get the path of the share + statRes, err := gatewayClient.Stat(ctx, &providerpb.StatRequest{ + Ref: &providerpb.Reference{ + ResourceId: share.ResourceId, + }, + }) + if err != nil { + return nil + } + + err = s.walker.Walk(ctx, statRes.GetInfo().GetId(), func(path string, info *providerpb.ResourceInfo, err error) error { + if info.Type == providerpb.ResourceType_RESOURCE_TYPE_FILE { + size += info.Size + } + return nil + }) + if err != nil { + return nil + } + return &ocmd.Datatx{ + SourceURI: s.webdavURL(ctx, share), + Size: size, + } +} + +func (s *service) getProtocols(ctx context.Context, share *ocm.Share) ocmd.Protocols { + var p ocmd.Protocols + for _, m := range share.AccessMethods { + var newProtocol ocmd.Protocol + switch t := m.Term.(type) { + case *ocm.AccessMethod_WebdavOptions: + newProtocol = s.getWebdavProtocol(ctx, share, t) + case *ocm.AccessMethod_WebappOptions: + newProtocol = s.getWebappProtocol(share) + case *ocm.AccessMethod_TransferOptions: + newProtocol = s.getDataTransferProtocol(ctx, share) + } + if newProtocol != nil { + p = append(p, newProtocol) + } + } + return p } -// Note: this is for outgoing OCM shares -// This function is used when you for instance -// call `ocm-share-create` in reva-cli. -// For incoming OCM shares from internal/http/services/ocmd/shares.go -// there is the very similar but slightly different function -// CreateOCMCoreShare (the "Core" somehow means "incoming"). -// So make sure to keep in mind the difference between this file for outgoing: -// internal/grpc/services/ocmshareprovider/ocmshareprovider.go -// and the other one for incoming: -// internal/grpc/service/ocmcore/ocmcore.go -// Both functions end up calling the same s.sm.Share function -// on the OCM share manager: -// pkg/ocm/share/manager/{json|nextcloud|...} func (s *service) CreateOCMShare(ctx context.Context, req *ocm.CreateOCMShareRequest) (*ocm.CreateOCMShareResponse, error) { - if req.Opaque == nil { - return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "can't find resource permissions"), - }, nil + gatewayClient, err := s.gatewaySelector.Next() + if err != nil { + return nil, err + } + statRes, err := gatewayClient.Stat(ctx, &providerpb.StatRequest{ + Ref: &providerpb.Reference{ + ResourceId: req.ResourceId, + }, + }) + if err != nil { + return nil, err } - var permissions string - permOpaque, ok := req.Opaque.Map["permissions"] - if !ok { - return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "resource permissions not set"), - }, nil - } - switch permOpaque.Decoder { - case "plain": - permissions = string(permOpaque.Value) - default: - return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "invalid opaque entry decoder"), - }, nil - } - - var name string - nameOpaque, ok := req.Opaque.Map["name"] - if !ok { - return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "resource name not set"), - }, nil - } - switch nameOpaque.Decoder { - case "plain": - name = string(nameOpaque.Value) - default: - return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "invalid opaque entry decoder"), - }, nil - } - - // discover share type - sharetype := ocm.Share_SHARE_TYPE_REGULAR - // FIXME: https://github.com/cs3org/reva/issues/2402 - protocol, ok := req.Opaque.Map["protocol"] - if ok { - switch protocol.Decoder { - case "plain": - if string(protocol.Value) == "datatx" { - sharetype = ocm.Share_SHARE_TYPE_TRANSFER - } - default: + if statRes.Status.Code != rpc.Code_CODE_OK { + if statRes.Status.Code == rpc.Code_CODE_NOT_FOUND { return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "error creating share"), + Status: status.NewNotFound(ctx, statRes.Status.Message), }, nil } - // token = protocol FIXME! + return &ocm.CreateOCMShareResponse{ + Status: status.NewInternal(ctx, statRes.Status.Message), + }, nil } - var sharedSecret string - share, err := s.sm.Share(ctx, req.ResourceId, req.Grant, name, req.RecipientMeshProvider, permissions, nil, sharedSecret, sharetype) + info := statRes.Info + user := ctxpkg.ContextMustGetUser(ctx) + tkn := utils.RandString(32) + now := time.Now().UnixNano() + ts := &typespb.Timestamp{ + Seconds: uint64(now / 1000000000), + Nanos: uint32(now % 1000000000), + } + ocmshare := &ocm.Share{ + Token: tkn, + Name: filepath.Base(info.Path), + ResourceId: req.ResourceId, + Grantee: req.Grantee, + ShareType: ocm.ShareType_SHARE_TYPE_USER, + Owner: info.Owner, + Creator: user.Id, + Ctime: ts, + Mtime: ts, + Expiration: req.Expiration, + AccessMethods: req.AccessMethods, + } + + ocmshare, err = s.repo.StoreShare(ctx, ocmshare) + if err != nil { + if errors.Is(err, share.ErrShareAlreadyExisting) { + return &ocm.CreateOCMShareResponse{ + Status: status.NewAlreadyExists(ctx, err, "share already exists"), + }, nil + } + return &ocm.CreateOCMShareResponse{ + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + + ocmEndpoint, err := getOCMEndpoint(req.RecipientMeshProvider) if err != nil { return &ocm.CreateOCMShareResponse{ - Status: status.NewInternal(ctx, "error creating share"), + Status: status.NewInvalidArg(ctx, "the selected provider does not have an OCM endpoint"), }, nil } + newShareReq := &client.NewShareRequest{ + ShareWith: formatOCMUser(req.Grantee.GetUserId()), + Name: ocmshare.Name, + ProviderID: ocmshare.Id.OpaqueId, + Owner: formatOCMUser(&userpb.UserId{ + OpaqueId: info.Owner.OpaqueId, + Idp: s.conf.ProviderDomain, // FIXME: this is not generally true in case of resharing + }), + Sender: formatOCMUser(&userpb.UserId{ + OpaqueId: user.Id.OpaqueId, + Idp: s.conf.ProviderDomain, + }), + SenderDisplayName: user.DisplayName, + ShareType: "user", + ResourceType: getResourceType(info), + Protocols: s.getProtocols(ctx, ocmshare), + } + + if req.Expiration != nil { + newShareReq.Expiration = req.Expiration.Seconds + } + + newShareRes, err := s.client.NewShare(ctx, ocmEndpoint, newShareReq) + if err != nil { + switch { + case errors.Is(err, client.ErrInvalidParameters): + return &ocm.CreateOCMShareResponse{ + Status: status.NewInvalidArg(ctx, err.Error()), + }, nil + case errors.Is(err, client.ErrServiceNotTrusted): + return &ocm.CreateOCMShareResponse{ + Status: status.NewInvalidArg(ctx, err.Error()), + }, nil + default: + return &ocm.CreateOCMShareResponse{ + Status: status.NewInternal(ctx, err.Error()), + }, nil + } + } + res := &ocm.CreateOCMShareResponse{ - Status: status.NewOK(ctx), - Share: share, + Status: status.NewOK(ctx), + Share: ocmshare, + RecipientDisplayName: newShareRes.RecipientDisplayName, } return res, nil } func (s *service) RemoveOCMShare(ctx context.Context, req *ocm.RemoveOCMShareRequest) (*ocm.RemoveOCMShareResponse, error) { - err := s.sm.Unshare(ctx, req.Ref) - if err != nil { + // TODO (gdelmont): notify the remote provider using the /notification ocm endpoint + // https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1notifications/post + user := ctxpkg.ContextMustGetUser(ctx) + if err := s.repo.DeleteShare(ctx, user, req.Ref); err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.RemoveOCMShareResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } return &ocm.RemoveOCMShareResponse{ Status: status.NewInternal(ctx, "error removing share"), }, nil @@ -202,8 +390,18 @@ func (s *service) RemoveOCMShare(ctx context.Context, req *ocm.RemoveOCMShareReq } func (s *service) GetOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest) (*ocm.GetOCMShareResponse, error) { - share, err := s.sm.GetShare(ctx, req.Ref) + // if the request is by token, the user does not need to be in the ctx + var user *userpb.User + if req.Ref.GetToken() == "" { + user = ctxpkg.ContextMustGetUser(ctx) + } + ocmshare, err := s.repo.GetShare(ctx, user, req.Ref) if err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.GetOCMShareResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } return &ocm.GetOCMShareResponse{ Status: status.NewInternal(ctx, "error getting share"), }, nil @@ -211,12 +409,36 @@ func (s *service) GetOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest) return &ocm.GetOCMShareResponse{ Status: status.NewOK(ctx), - Share: share, + Share: ocmshare, + }, nil +} + +func (s *service) GetOCMShareByToken(ctx context.Context, req *ocm.GetOCMShareByTokenRequest) (*ocm.GetOCMShareByTokenResponse, error) { + ocmshare, err := s.repo.GetShare(ctx, nil, &ocm.ShareReference{ + Spec: &ocm.ShareReference_Token{ + Token: req.Token, + }, + }) + if err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.GetOCMShareByTokenResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } + return &ocm.GetOCMShareByTokenResponse{ + Status: status.NewInternal(ctx, "error getting share"), + }, nil + } + + return &ocm.GetOCMShareByTokenResponse{ + Status: status.NewOK(ctx), + Share: ocmshare, }, nil } func (s *service) ListOCMShares(ctx context.Context, req *ocm.ListOCMSharesRequest) (*ocm.ListOCMSharesResponse, error) { - shares, err := s.sm.ListShares(ctx, req.Filters) // TODO(labkode): add filter to share manager + user := ctxpkg.ContextMustGetUser(ctx) + shares, err := s.repo.ListShares(ctx, user, req.Filters) if err != nil { return &ocm.ListOCMSharesResponse{ Status: status.NewInternal(ctx, "error listing shares"), @@ -231,8 +453,19 @@ func (s *service) ListOCMShares(ctx context.Context, req *ocm.ListOCMSharesReque } func (s *service) UpdateOCMShare(ctx context.Context, req *ocm.UpdateOCMShareRequest) (*ocm.UpdateOCMShareResponse, error) { - _, err := s.sm.UpdateShare(ctx, req.Ref, req.Field.GetPermissions()) // TODO(labkode): check what to update + user := ctxpkg.ContextMustGetUser(ctx) + if len(req.Field) == 0 { + return &ocm.UpdateOCMShareResponse{ + Status: status.NewOK(ctx), + }, nil + } + _, err := s.repo.UpdateShare(ctx, user, req.Ref, req.Field...) if err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.UpdateOCMShareResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } return &ocm.UpdateOCMShareResponse{ Status: status.NewInternal(ctx, "error updating share"), }, nil @@ -245,7 +478,8 @@ func (s *service) UpdateOCMShare(ctx context.Context, req *ocm.UpdateOCMShareReq } func (s *service) ListReceivedOCMShares(ctx context.Context, req *ocm.ListReceivedOCMSharesRequest) (*ocm.ListReceivedOCMSharesResponse, error) { - shares, err := s.sm.ListReceivedShares(ctx) + user := ctxpkg.ContextMustGetUser(ctx) + shares, err := s.repo.ListReceivedShares(ctx, user) if err != nil { return &ocm.ListReceivedOCMSharesResponse{ Status: status.NewInternal(ctx, "error listing received shares"), @@ -260,8 +494,14 @@ func (s *service) ListReceivedOCMShares(ctx context.Context, req *ocm.ListReceiv } func (s *service) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateReceivedOCMShareRequest) (*ocm.UpdateReceivedOCMShareResponse, error) { - _, err := s.sm.UpdateReceivedShare(ctx, req.Share, req.UpdateMask) // TODO(labkode): check what to update + user := ctxpkg.ContextMustGetUser(ctx) + _, err := s.repo.UpdateReceivedShare(ctx, user, req.Share, req.UpdateMask) if err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.UpdateReceivedOCMShareResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } return &ocm.UpdateReceivedOCMShareResponse{ Status: status.NewInternal(ctx, "error updating received share"), }, nil @@ -274,8 +514,14 @@ func (s *service) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateRec } func (s *service) GetReceivedOCMShare(ctx context.Context, req *ocm.GetReceivedOCMShareRequest) (*ocm.GetReceivedOCMShareResponse, error) { - share, err := s.sm.GetReceivedShare(ctx, req.Ref) + user := ctxpkg.ContextMustGetUser(ctx) + ocmshare, err := s.repo.GetReceivedShare(ctx, user, req.Ref) if err != nil { + if errors.Is(err, share.ErrShareNotFound) { + return &ocm.GetReceivedOCMShareResponse{ + Status: status.NewNotFound(ctx, "share does not exist"), + }, nil + } return &ocm.GetReceivedOCMShareResponse{ Status: status.NewInternal(ctx, "error getting received share"), }, nil @@ -283,7 +529,7 @@ func (s *service) GetReceivedOCMShare(ctx context.Context, req *ocm.GetReceivedO res := &ocm.GetReceivedOCMShareResponse{ Status: status.NewOK(ctx), - Share: share, + Share: ocmshare, } return res, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/publicstorageprovider/publicstorageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/publicstorageprovider/publicstorageprovider.go index 48fb777919..4704c5e02a 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/publicstorageprovider/publicstorageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/publicstorageprovider/publicstorageprovider.go @@ -30,10 +30,12 @@ import ( userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1" + ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/v2/pkg/appctx" ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" + "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/rgrpc" "github.com/cs3org/reva/v2/pkg/rgrpc/status" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" @@ -105,13 +107,10 @@ func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { } func (s *service) SetArbitraryMetadata(ctx context.Context, req *provider.SetArbitraryMetadataRequest) (*provider.SetArbitraryMetadataResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.SetArbitraryMetadataResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -127,13 +126,10 @@ func (s *service) UnsetArbitraryMetadata(ctx context.Context, req *provider.Unse // SetLock puts a lock on the given reference func (s *service) SetLock(ctx context.Context, req *provider.SetLockRequest) (*provider.SetLockResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.SetLockResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -145,13 +141,10 @@ func (s *service) SetLock(ctx context.Context, req *provider.SetLockRequest) (*p // GetLock returns an existing lock on the given reference func (s *service) GetLock(ctx context.Context, req *provider.GetLockRequest) (*provider.GetLockResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.GetLockResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -163,13 +156,10 @@ func (s *service) GetLock(ctx context.Context, req *provider.GetLockRequest) (*p // RefreshLock refreshes an existing lock on the given reference func (s *service) RefreshLock(ctx context.Context, req *provider.RefreshLockRequest) (*provider.RefreshLockResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.RefreshLockResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -181,13 +171,10 @@ func (s *service) RefreshLock(ctx context.Context, req *provider.RefreshLockRequ // Unlock removes an existing lock from the given reference func (s *service) Unlock(ctx context.Context, req *provider.UnlockRequest) (*provider.UnlockResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.UnlockResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -220,26 +207,16 @@ func (s *service) InitiateFileDownload(ctx context.Context, req *provider.Initia return s.initiateFileDownload(ctx, req) } -func (s *service) translatePublicRefToCS3Ref(ctx context.Context, ref *provider.Reference) (*provider.Reference, string, *link.PublicShare, *rpc.Status, error) { +func (s *service) translatePublicRefToCS3Ref(ctx context.Context, ref *provider.Reference) (*provider.Reference, *provider.ResourceInfo, string, error) { log := appctx.GetLogger(ctx) - share, ok := extractLinkFromScope(ctx) - if !ok { - return nil, "", nil, nil, gstatus.Errorf(codes.NotFound, "share or token not found") - } - - // the share is minimally populated, we need more than the token - // look up complete share - ls, shareInfo, st, err := s.resolveToken(ctx, share.Token) - switch { - case err != nil: - return nil, "", nil, nil, err - case st != nil: - return nil, "", nil, st, nil + info, _, _, token, err := s.extractLinkFromScope(ctx) + if err != nil { + return nil, nil, "", err } var path string - switch shareInfo.Type { + switch info.Type { case provider.ResourceType_RESOURCE_TYPE_CONTAINER: // folders point to the folder -> path needs to be added path = utils.MakeRelativePath(ref.Path) @@ -252,37 +229,34 @@ func (s *service) translatePublicRefToCS3Ref(ctx context.Context, ref *provider. } cs3Ref := &provider.Reference{ - ResourceId: shareInfo.Id, + ResourceId: info.Id, Path: path, } log.Debug(). Interface("sourceRef", ref). Interface("cs3Ref", cs3Ref). - Interface("share", ls). - Str("tkn", share.Token). - Str("originalPath", shareInfo.Path). + Str("tkn", token). + Str("originalPath", info.Path). Str("relativePath", path). Msg("translatePublicRefToCS3Ref") - return cs3Ref, share.Token, ls, nil, nil + return cs3Ref, info, token, nil } func (s *service) initiateFileDownload(ctx context.Context, req *provider.InitiateFileDownloadRequest) (*provider.InitiateFileDownloadResponse, error) { - cs3Ref, _, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + ref, info, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) switch { case err != nil: - return nil, err - case st != nil: return &provider.InitiateFileDownloadResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil - case ls.GetPermissions() == nil || !ls.GetPermissions().Permissions.InitiateFileDownload: + case info.PermissionSet == nil || !info.PermissionSet.InitiateFileDownload: return &provider.InitiateFileDownloadResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant InitiateFileDownload permission"), }, nil } dReq := &provider.InitiateFileDownloadRequest{ - Ref: cs3Ref, + Ref: ref, } gatewayClient, err := s.gatewaySelector.Next() @@ -325,15 +299,13 @@ func (s *service) initiateFileDownload(ctx context.Context, req *provider.Initia } func (s *service) InitiateFileUpload(ctx context.Context, req *provider.InitiateFileUploadRequest) (*provider.InitiateFileUploadResponse, error) { - cs3Ref, _, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + cs3Ref, info, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) switch { case err != nil: - return nil, err - case st != nil: return &provider.InitiateFileUploadResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil - case ls.GetPermissions() == nil || !ls.GetPermissions().Permissions.InitiateFileUpload: + case info.PermissionSet == nil || !info.PermissionSet.InitiateFileUpload: return &provider.InitiateFileUploadResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant InitiateFileUpload permission"), }, nil @@ -443,12 +415,19 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora } } - // if there is no public scope there are no publicstorage spaces - share, ok := extractLinkFromScope(ctx) - if !ok { - return &provider.ListStorageSpacesResponse{ - Status: &rpc.Status{Code: rpc.Code_CODE_OK}, - }, nil + info, _, grantee, token, err := s.extractLinkFromScope(ctx) + if err != nil { + switch err.(type) { + case errtypes.NotFound: + // if there is no public scope there are no publicstorage spaces + return &provider.ListStorageSpacesResponse{ + Status: &rpc.Status{Code: rpc.Code_CODE_OK}, + }, nil + default: + return &provider.ListStorageSpacesResponse{ + Status: &rpc.Status{Code: rpc.Code_CODE_INTERNAL}, + }, nil + } } if len(spaceTypes) == 0 { @@ -466,7 +445,7 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora case "grant": // when a list storage space with the resourceid of an external // resource is made we may have a grant for it - root := share.ResourceId + root := info.Id if spaceID != nil && !utils.ResourceIDEqual(spaceID, root) { // none of our business continue @@ -477,7 +456,7 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora OpaqueId: storagespace.FormatResourceID(*root), }, SpaceType: "grant", - Owner: &userv1beta1.User{Id: share.Owner}, + Owner: &userv1beta1.User{Id: grantee}, // the publicstorageprovider keeps track of mount points Root: root, } @@ -487,15 +466,15 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora root := &provider.ResourceId{ StorageId: utils.PublicStorageProviderID, SpaceId: utils.PublicStorageSpaceID, - OpaqueId: share.Token, // the link share has no id, only the token + OpaqueId: token, // the link share has no id, only the token } if spaceID != nil { switch { case utils.ResourceIDEqual(spaceID, root): // we have a virtual node - case utils.ResourceIDEqual(spaceID, share.ResourceId): + case utils.ResourceIDEqual(spaceID, info.Id): // we have a mount point - root = share.ResourceId + root = info.Id default: // none of our business continue @@ -506,7 +485,7 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora OpaqueId: storagespace.FormatResourceID(*root), }, SpaceType: "mountpoint", - Owner: &userv1beta1.User{Id: share.Owner}, // FIXME actually, the mount point belongs to no one? + Owner: &userv1beta1.User{Id: grantee}, // FIXME actually, the mount point belongs to no one? // the publicstorageprovider keeps track of mount points Root: root, } @@ -517,27 +496,44 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora return res, nil } -func extractLinkFromScope(ctx context.Context) (*link.PublicShare, bool) { +func (s *service) extractLinkFromScope(ctx context.Context) (*provider.ResourceInfo, interface{}, *userv1beta1.UserId, string, error) { scopes, ok := ctxpkg.ContextGetScopes(ctx) if !ok { - return nil, false + return nil, nil, nil, "", errtypes.NotFound("No scopes found in context") } - var share *link.PublicShare for k, v := range scopes { - if strings.HasPrefix(k, "publicshare:") && v.Resource.Decoder == "json" { - share = &link.PublicShare{} + if strings.HasPrefix(k, "ocmshare:") && v.Resource.Decoder == "json" { + share := &ocm.Share{} err := utils.UnmarshalJSONToProtoV1(v.Resource.Value, share) if err != nil { - continue + return nil, nil, nil, "", errtypes.InternalError("failed to unmarshal public share") } + + // the share is minimally populated, we need more than the token + // look up complete share + info, resolvedShare, err := s.resolveToken(ctx, share) + if err != nil { + return nil, nil, nil, "", err + } + return info, resolvedShare, share.Owner, share.Token, nil + } else if strings.HasPrefix(k, "publicshare:") && v.Resource.Decoder == "json" { + share := &link.PublicShare{} + err := utils.UnmarshalJSONToProtoV1(v.Resource.Value, share) + if err != nil { + return nil, nil, nil, "", errtypes.InternalError("failed to unmarshal public share") + } + + // the share is minimally populated, we need more than the token + // look up complete share + info, resolvedShare, err := s.resolveToken(ctx, share) + if err != nil { + return nil, nil, nil, "", err + } + return info, resolvedShare, share.Owner, share.Token, nil } } - if share == nil { - return nil, false - } - return share, true + return nil, nil, nil, "", errtypes.NotFound("No public storage info found in scopes") } - func (s *service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateStorageSpaceRequest) (*provider.UpdateStorageSpaceResponse, error) { return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented") } @@ -555,15 +551,13 @@ func (s *service) CreateContainer(ctx context.Context, req *provider.CreateConta Value: attribute.StringValue(req.Ref.String()), }) - cs3Ref, _, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + cs3Ref, info, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) switch { case err != nil: - return nil, err - case st != nil: return &provider.CreateContainerResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil - case ls.GetPermissions() == nil || !ls.GetPermissions().Permissions.CreateContainer: + case info.PermissionSet == nil || !info.PermissionSet.CreateContainer: return &provider.CreateContainerResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant CreateContainer permission"), }, nil @@ -591,13 +585,10 @@ func (s *service) CreateContainer(ctx context.Context, req *provider.CreateConta } func (s *service) TouchFile(ctx context.Context, req *provider.TouchFileRequest) (*provider.TouchFileResponse, error) { - ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) - switch { - case err != nil: - return nil, err - case st != nil: + ref, _, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + if err != nil { return &provider.TouchFileResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil } gatewayClient, err := s.gatewaySelector.Next() @@ -616,15 +607,13 @@ func (s *service) Delete(ctx context.Context, req *provider.DeleteRequest) (*pro Value: attribute.StringValue(req.Ref.String()), }) - cs3Ref, _, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) + cs3Ref, info, _, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) switch { case err != nil: - return nil, err - case st != nil: return &provider.DeleteResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve reference", err), }, nil - case ls.GetPermissions() == nil || !ls.GetPermissions().Permissions.Delete: + case info.PermissionSet == nil || !info.PermissionSet.Delete: return &provider.DeleteResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant Delete permission"), }, nil @@ -666,27 +655,22 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide }, ) - cs3RefSource, tknSource, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Source) + cs3RefSource, info, tknSource, err := s.translatePublicRefToCS3Ref(ctx, req.Source) switch { case err != nil: - return nil, err - case st != nil: return &provider.MoveResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve source reference", err), }, nil - case ls.GetPermissions() == nil || !ls.GetPermissions().Permissions.Move: + case info.PermissionSet == nil || !info.PermissionSet.Move: return &provider.MoveResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant Move permission"), }, nil } // FIXME: maybe there's a shortcut possible here using the source path - cs3RefDestination, tknDest, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Destination) - switch { - case err != nil: - return nil, err - case st != nil: + cs3RefDestination, _, tknDest, err := s.translatePublicRefToCS3Ref(ctx, req.Destination) + if err != nil { return &provider.MoveResponse{ - Status: st, + Status: status.NewStatusFromErrType(ctx, "failed to resolve destination reference", err), }, nil } @@ -728,40 +712,31 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide Value: attribute.StringValue(req.Ref.String()), }) - share, ok := extractLinkFromScope(ctx) - if !ok { - return &provider.StatResponse{ - Status: status.NewNotFound(ctx, "share or token not found"), - }, nil + info, share, _, token, err := s.extractLinkFromScope(ctx) + if err != nil { + switch err.(type) { + case errtypes.NotFound: + return &provider.StatResponse{ + Status: status.NewNotFound(ctx, "share or token not found"), + }, nil + default: + return &provider.StatResponse{ + Status: status.NewInternal(ctx, "share or token not found"), + }, nil + } } - // the share is minimally populated, we need more than the token - // look up complete share - share, shareInfo, st, err := s.resolveToken(ctx, share.Token) - switch { - case err != nil: - return nil, err - case st != nil: - return &provider.StatResponse{ - Status: st, - }, nil - case share.GetPermissions() == nil || !share.GetPermissions().Permissions.Stat: - return &provider.StatResponse{ - Status: status.NewPermissionDenied(ctx, nil, "share does not grant Stat permission"), - }, nil - } - - if shareInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE || req.Ref.Path == "" { + if info.Type == provider.ResourceType_RESOURCE_TYPE_FILE || req.Ref.Path == "" { res := &provider.StatResponse{ Status: status.NewOK(ctx), - Info: shareInfo, + Info: info, } - s.augmentStatResponse(ctx, res, shareInfo, share, share.Token) + s.augmentStatResponse(ctx, res.Info, info, share, token) return res, nil } ref := &provider.Reference{ - ResourceId: share.ResourceId, + ResourceId: info.Id, Path: utils.MakeRelativePath(req.Ref.Path), } @@ -776,38 +751,38 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide }, nil } - s.augmentStatResponse(ctx, statResponse, shareInfo, share, share.Token) + s.augmentStatResponse(ctx, statResponse.Info, info, share, token) return statResponse, nil } -func (s *service) augmentStatResponse(ctx context.Context, res *provider.StatResponse, shareInfo *provider.ResourceInfo, share *link.PublicShare, tkn string) { +func (s *service) augmentStatResponse(ctx context.Context, statInfo *provider.ResourceInfo, shareInfo *provider.ResourceInfo, share interface{}, tkn string) { // prevent leaking internal paths - if res.Info != nil { - if err := addShare(res.Info, share); err != nil { - appctx.GetLogger(ctx).Error().Err(err).Interface("share", share).Interface("info", res.Info).Msg("error when adding share") + if statInfo != nil { + if err := addShare(statInfo, share); err != nil { + appctx.GetLogger(ctx).Error().Err(err).Interface("share", share).Interface("info", statInfo).Msg("error when adding share") } var sharePath string if shareInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE { sharePath = path.Base(shareInfo.Path) } else { - sharePath = strings.TrimPrefix(res.Info.Path, shareInfo.Path) + sharePath = strings.TrimPrefix(statInfo.Path, shareInfo.Path) } - res.Info.Path = path.Join("/", sharePath) - filterPermissions(res.Info.PermissionSet, share.GetPermissions().Permissions) + statInfo.Path = path.Join("/", sharePath) + filterPermissions(statInfo.PermissionSet, shareInfo.PermissionSet) } } -func addShare(i *provider.ResourceInfo, ls *link.PublicShare) error { +func addShare(i *provider.ResourceInfo, share interface{}) error { if i.Opaque == nil { i.Opaque = &typesv1beta1.Opaque{} } if i.Opaque.Map == nil { i.Opaque.Map = map[string]*typesv1beta1.OpaqueEntry{} } - val, err := json.Marshal(ls) + val, err := json.Marshal(share) if err != nil { return err } @@ -820,25 +795,20 @@ func (s *service) ListContainerStream(req *provider.ListContainerStreamRequest, } func (s *service) ListContainer(ctx context.Context, req *provider.ListContainerRequest) (*provider.ListContainerResponse, error) { - - share, ok := extractLinkFromScope(ctx) - if !ok { - return &provider.ListContainerResponse{ - Status: status.NewNotFound(ctx, "share or token not found"), - }, nil + info, share, _, _, err := s.extractLinkFromScope(ctx) + if err != nil { + switch err.(type) { + case errtypes.NotFound: + return &provider.ListContainerResponse{ + Status: status.NewNotFound(ctx, "share or token not found"), + }, nil + default: + return &provider.ListContainerResponse{ + Status: status.NewInternal(ctx, "share or token not found"), + }, nil + } } - // the share is minimally populated, we need more than the token - // look up complete share - share, _, st, err := s.resolveToken(ctx, share.Token) - switch { - case err != nil: - return nil, err - case st != nil: - return &provider.ListContainerResponse{ - Status: st, - }, nil - } - if share.GetPermissions() == nil || !share.GetPermissions().Permissions.ListContainer { + if info.PermissionSet == nil || !info.PermissionSet.ListContainer { return &provider.ListContainerResponse{ Status: status.NewPermissionDenied(ctx, nil, "share does not grant ListContainer permission"), }, nil @@ -852,7 +822,7 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer ctx, &provider.ListContainerRequest{ Ref: &provider.Reference{ - ResourceId: share.ResourceId, + ResourceId: info.Id, // prefix relative path with './' to make it a CS3 relative path Path: utils.MakeRelativePath(req.Ref.Path), }, @@ -867,7 +837,7 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer for i := range listContainerR.Infos { // FIXME how do we reduce permissions to what is granted by the public link? // only a problem for id based access -> middleware - filterPermissions(listContainerR.Infos[i].PermissionSet, share.GetPermissions().Permissions) + filterPermissions(listContainerR.Infos[i].PermissionSet, info.PermissionSet) if err := addShare(listContainerR.Infos[i], share); err != nil { appctx.GetLogger(ctx).Error().Err(err).Interface("share", share).Interface("info", listContainerR.Infos[i]).Msg("error when adding share") } @@ -953,45 +923,70 @@ func (s *service) GetQuota(ctx context.Context, req *provider.GetQuotaRequest) ( return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented") } -// resolveToken returns the path and share for the publicly shared resource. -func (s *service) resolveToken(ctx context.Context, token string) (*link.PublicShare, *provider.ResourceInfo, *rpc.Status, error) { - driver, err := pool.GetGatewayServiceClient(s.conf.GatewayAddr) - if err != nil { - return nil, nil, nil, err - } - - publicShareResponse, err := driver.GetPublicShare( - ctx, - &link.GetPublicShareRequest{ - Ref: &link.PublicShareReference{ - Spec: &link.PublicShareReference_Token{ - Token: token, - }, - }, - Sign: true, - }, - ) - switch { - case err != nil: - return nil, nil, nil, err - case publicShareResponse.Status.Code != rpc.Code_CODE_OK: - return nil, nil, publicShareResponse.Status, nil - } - +// resolveToken returns the resource info for the publicly shared resource. +func (s *service) resolveToken(ctx context.Context, share interface{}) (*provider.ResourceInfo, interface{}, error) { gatewayClient, err := s.gatewaySelector.Next() if err != nil { - return nil, nil, nil, err + return nil, nil, err } + + resourceID := &provider.ResourceId{} + perms := &provider.ResourcePermissions{} + var resolvedShare interface{} + switch v := share.(type) { + case *link.PublicShare: + publicShareResponse, err := gatewayClient.GetPublicShare( + ctx, + &link.GetPublicShareRequest{ + Ref: &link.PublicShareReference{ + Spec: &link.PublicShareReference_Token{ + Token: v.Token, + }, + }, + Sign: true, + }, + ) + switch { + case err != nil: + return nil, nil, err + case publicShareResponse.Status.Code != rpc.Code_CODE_OK: + return nil, nil, errtypes.NewErrtypeFromStatus(publicShareResponse.Status) + } + resolvedShare = publicShareResponse.GetShare() + resourceID = publicShareResponse.GetShare().GetResourceId() + perms = publicShareResponse.GetShare().GetPermissions().GetPermissions() + case *ocm.Share: + gsr, err := gatewayClient.GetOCMShareByToken(ctx, &ocm.GetOCMShareByTokenRequest{ + Token: v.Token, + }) + switch { + case err != nil: + return nil, nil, err + case gsr.Status.Code != rpc.Code_CODE_OK: + return nil, nil, errtypes.NewErrtypeFromStatus(gsr.Status) + } + accessMethods := gsr.GetShare().GetAccessMethods() + if len(accessMethods) == 0 { + return nil, nil, errtypes.PermissionDenied("failed to get access to the requested resource") + } + resolvedShare = gsr.GetShare() + resourceID = gsr.GetShare().GetResourceId() + perms = accessMethods[0].GetWebdavOptions().Permissions + } + sRes, err := gatewayClient.Stat(ctx, &provider.StatRequest{ Ref: &provider.Reference{ - ResourceId: publicShareResponse.GetShare().GetResourceId(), + ResourceId: resourceID, }, }) switch { case err != nil: - return nil, nil, nil, err + return nil, nil, err case sRes.Status.Code != rpc.Code_CODE_OK: - return nil, nil, sRes.Status, nil + return nil, nil, errtypes.NewErrtypeFromStatus(sRes.Status) } - return publicShareResponse.GetShare(), sRes.Info, nil, nil + + // Set permissions + sRes.Info.PermissionSet = perms + return sRes.Info, resolvedShare, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/usershareprovider/usershareprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/usershareprovider/usershareprovider.go index b850b5f4df..2486031118 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/usershareprovider/usershareprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/usershareprovider/usershareprovider.go @@ -246,7 +246,10 @@ func (s *service) ListReceivedShares(ctx context.Context, req *collaboration.Lis if !foundExclude { req.Filters = append(req.Filters, &collaboration.Filter{Type: collaboration.Filter_TYPE_EXCLUDE_DENIALS}) } - shares, err := s.sm.ListReceivedShares(ctx, req.Filters) // TODO(labkode): check what to update + + var uid userpb.UserId + _ = utils.ReadJSONFromOpaque(req.Opaque, "userid", &uid) + shares, err := s.sm.ListReceivedShares(ctx, req.Filters, &uid) // TODO(labkode): check what to update if err != nil { return &collaboration.ListReceivedSharesResponse{ Status: status.NewInternal(ctx, "error listing received shares"), diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/auth.go b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/auth.go index 14027fc348..c830570d8c 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/auth.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/auth.go @@ -27,6 +27,7 @@ import ( "time" "github.com/bluele/gcache" + authpb "github.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" @@ -69,7 +70,7 @@ type config struct { CredentialsByUserAgent map[string]string `mapstructure:"credentials_by_user_agent"` CredentialChain []string `mapstructure:"credential_chain"` CredentialStrategies map[string]map[string]interface{} `mapstructure:"credential_strategies"` - TokenStrategy string `mapstructure:"token_strategy"` + TokenStrategyChain []string `mapstructure:"token_strategy_chain"` TokenStrategies map[string]map[string]interface{} `mapstructure:"token_strategies"` TokenManager string `mapstructure:"token_manager"` TokenManagers map[string]map[string]interface{} `mapstructure:"token_managers"` @@ -97,8 +98,8 @@ func New(m map[string]interface{}, unprotected []string, tp trace.TracerProvider conf.GatewaySvc = sharedconf.GetGatewaySVC(conf.GatewaySvc) // set defaults - if conf.TokenStrategy == "" { - conf.TokenStrategy = "header" + if len(conf.TokenStrategyChain) == 0 { + conf.TokenStrategyChain = []string{"header"} } if conf.TokenWriter == "" { @@ -109,10 +110,6 @@ func New(m map[string]interface{}, unprotected []string, tp trace.TracerProvider conf.TokenManager = "jwt" } - if len(conf.CredentialChain) == 0 { - conf.CredentialChain = []string{"basic", "bearer"} - } - if conf.CredentialsByUserAgent == nil { conf.CredentialsByUserAgent = map[string]string{} } @@ -139,19 +136,22 @@ func New(m map[string]interface{}, unprotected []string, tp trace.TracerProvider credChain[key] = credStrategy } - g, ok := tokenregistry.NewTokenFuncs[conf.TokenStrategy] - if !ok { - return nil, fmt.Errorf("token strategy not found: %s", conf.TokenStrategy) - } - - tokenStrategy, err := g(conf.TokenStrategies[conf.TokenStrategy]) - if err != nil { - return nil, err + tokenStrategyChain := make([]auth.TokenStrategy, 0, len(conf.TokenStrategyChain)) + for _, strategy := range conf.TokenStrategyChain { + g, ok := tokenregistry.NewTokenFuncs[strategy] + if !ok { + return nil, fmt.Errorf("token strategy not found: %s", strategy) + } + tokenStrategy, err := g(conf.TokenStrategies[strategy]) + if err != nil { + return nil, err + } + tokenStrategyChain = append(tokenStrategyChain, tokenStrategy) } h, ok := tokenmgr.NewFuncs[conf.TokenManager] if !ok { - return nil, fmt.Errorf("token manager not found: %s", conf.TokenStrategy) + return nil, fmt.Errorf("token manager not found: %s", conf.TokenManager) } tokenManager, err := h(conf.TokenManagers[conf.TokenManager]) @@ -196,7 +196,7 @@ func New(m map[string]interface{}, unprotected []string, tp trace.TracerProvider isUnprotectedEndpoint = true } - ctx, err := authenticateUser(w, r, conf, tokenStrategy, tokenManager, tokenWriter, credChain, isUnprotectedEndpoint) + ctx, err := authenticateUser(w, r, conf, tokenStrategyChain, tokenManager, tokenWriter, credChain, isUnprotectedEndpoint) if err != nil { if !isUnprotectedEndpoint { return @@ -216,7 +216,7 @@ func New(m map[string]interface{}, unprotected []string, tp trace.TracerProvider return chain, nil } -func authenticateUser(w http.ResponseWriter, r *http.Request, conf *config, tokenStrategy auth.TokenStrategy, tokenManager token.Manager, tokenWriter auth.TokenWriter, credChain map[string]auth.CredentialStrategy, isUnprotectedEndpoint bool) (context.Context, error) { +func authenticateUser(w http.ResponseWriter, r *http.Request, conf *config, tokenStrategies []auth.TokenStrategy, tokenManager token.Manager, tokenWriter auth.TokenWriter, credChain map[string]auth.CredentialStrategy, isUnprotectedEndpoint bool) (context.Context, error) { ctx := r.Context() log := appctx.GetLogger(ctx) @@ -229,71 +229,85 @@ func authenticateUser(w http.ResponseWriter, r *http.Request, conf *config, toke return nil, err } - tkn := tokenStrategy.GetToken(r) - if tkn == "" { - log.Warn().Msg("core access token not set") - - userAgentCredKeys := getCredsForUserAgent(r.UserAgent(), conf.CredentialsByUserAgent, conf.CredentialChain) - - // obtain credentials (basic auth, bearer token, ...) based on user agent - var creds *auth.Credentials - for _, k := range userAgentCredKeys { - creds, err = credChain[k].GetCredentials(w, r) - if err != nil { - log.Debug().Err(err).Msg("error retrieving credentials") - } - - if creds != nil { - log.Debug().Msgf("credentials obtained from credential strategy: type: %s, client_id: %s", creds.Type, creds.ClientID) - break - } - } - - // if no credentials are found, reply with authentication challenge depending on user agent - if creds == nil { - if !isUnprotectedEndpoint { - for _, key := range userAgentCredKeys { - if cred, ok := credChain[key]; ok { - cred.AddWWWAuthenticate(w, r, conf.Realm) - } else { - panic("auth credential strategy: " + key + "must have been loaded in init method") - } + // reva token or auth token can be passed using the same technique (for example bearer) + // before validating it against an auth provider, we can check directly if it's a reva + // token and if not try to use it for authenticating the user. + for _, tokenStrategy := range tokenStrategies { + token := tokenStrategy.GetToken(r) + if token != "" { + if user, tokenScope, ok := isTokenValid(r, tokenManager, token); ok { + if err := insertGroupsInUser(ctx, userGroupsCache, client, user); err != nil { + logError(isUnprotectedEndpoint, log, err, "got an error retrieving groups for user "+user.Username, http.StatusInternalServerError, w) + return nil, err } - w.WriteHeader(http.StatusUnauthorized) + return ctxWithUserInfo(ctx, r, user, token, tokenScope), nil } - return nil, errtypes.PermissionDenied("no credentials found") } - - req := &gateway.AuthenticateRequest{ - Type: creds.Type, - ClientId: creds.ClientID, - ClientSecret: creds.ClientSecret, - } - - log.Debug().Msgf("AuthenticateRequest: type: %s, client_id: %s against %s", req.Type, req.ClientId, conf.GatewaySvc) - - res, err := client.Authenticate(ctx, req) - if err != nil { - logError(isUnprotectedEndpoint, log, err, "error calling Authenticate", http.StatusUnauthorized, w) - return nil, err - } - - if res.Status.Code != rpc.Code_CODE_OK { - err := status.NewErrorFromCode(res.Status.Code, "auth") - logError(isUnprotectedEndpoint, log, err, "error generating access token from credentials", http.StatusUnauthorized, w) - return nil, err - } - - log.Info().Msg("core access token generated") - // write token to response - tkn = res.Token - tokenWriter.WriteToken(tkn, w) - } else { - log.Debug().Msg("access token is already provided") } + log.Warn().Msg("core access token not set") + + userAgentCredKeys := getCredsForUserAgent(r.UserAgent(), conf.CredentialsByUserAgent, conf.CredentialChain) + + // obtain credentials (basic auth, bearer token, ...) based on user agent + var creds *auth.Credentials + for _, k := range userAgentCredKeys { + creds, err = credChain[k].GetCredentials(w, r) + if err != nil { + log.Debug().Err(err).Msg("error retrieving credentials") + } + + if creds != nil { + log.Debug().Msgf("credentials obtained from credential strategy: type: %s, client_id: %s", creds.Type, creds.ClientID) + break + } + } + + // if no credentials are found, reply with authentication challenge depending on user agent + if creds == nil { + if !isUnprotectedEndpoint { + for _, key := range userAgentCredKeys { + if cred, ok := credChain[key]; ok { + cred.AddWWWAuthenticate(w, r, conf.Realm) + } else { + log.Error().Msg("auth credential strategy: " + key + "must have been loaded in init method") + w.WriteHeader(http.StatusInternalServerError) + return nil, errtypes.InternalError("no credentials found") + } + } + w.WriteHeader(http.StatusUnauthorized) + } + return nil, errtypes.PermissionDenied("no credentials found") + } + + req := &gateway.AuthenticateRequest{ + Type: creds.Type, + ClientId: creds.ClientID, + ClientSecret: creds.ClientSecret, + } + + log.Debug().Msgf("AuthenticateRequest: type: %s, client_id: %s against %s", req.Type, req.ClientId, conf.GatewaySvc) + + res, err := client.Authenticate(ctx, req) + if err != nil { + logError(isUnprotectedEndpoint, log, err, "error calling Authenticate", http.StatusUnauthorized, w) + return nil, err + } + + if res.Status.Code != rpc.Code_CODE_OK { + err := status.NewErrorFromCode(res.Status.Code, "auth") + logError(isUnprotectedEndpoint, log, err, "error generating access token from credentials", http.StatusUnauthorized, w) + return nil, err + } + + log.Info().Msg("core access token generated") // write token to response + + // write token to response + token := res.Token + tokenWriter.WriteToken(token, w) + // validate token - u, tokenScope, err := tokenManager.DismantleToken(r.Context(), tkn) + u, tokenScope, err := tokenManager.DismantleToken(r.Context(), token) if err != nil { logError(isUnprotectedEndpoint, log, err, "error dismantling token", http.StatusUnauthorized, w) return nil, err @@ -329,15 +343,59 @@ func authenticateUser(w http.ResponseWriter, r *http.Request, conf *config, toke // store user and core access token in context. ctx = ctxpkg.ContextSetUser(ctx, u) - ctx = ctxpkg.ContextSetToken(ctx, tkn) - ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.TokenHeader, tkn) // TODO(jfd): hardcoded metadata key. use PerRPCCredentials? + ctx = ctxpkg.ContextSetToken(ctx, token) + ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.TokenHeader, token) // TODO(jfd): hardcoded metadata key. use PerRPCCredentials? ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.UserAgentHeader, r.UserAgent()) // store scopes in context ctx = ctxpkg.ContextSetScopes(ctx, tokenScope) - return ctx, nil + return ctxWithUserInfo(ctx, r, u, token, tokenScope), nil +} + +func ctxWithUserInfo(ctx context.Context, r *http.Request, user *userpb.User, token string, tokenScope map[string]*authpb.Scope) context.Context { + ctx = ctxpkg.ContextSetUser(ctx, user) + ctx = ctxpkg.ContextSetToken(ctx, token) + ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.TokenHeader, token) + ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.UserAgentHeader, r.UserAgent()) + ctx = ctxpkg.ContextSetScopes(ctx, tokenScope) + return ctx +} + +func insertGroupsInUser(ctx context.Context, userGroupsCache gcache.Cache, client gateway.GatewayAPIClient, user *userpb.User) error { + if sharedconf.SkipUserGroupsInToken() { + var groups []string + if groupsIf, err := userGroupsCache.Get(user.Id.OpaqueId); err == nil { + groups = groupsIf.([]string) + } else { + groupsRes, err := client.GetUserGroups(ctx, &userpb.GetUserGroupsRequest{UserId: user.Id}) + if err != nil { + return err + } + groups = groupsRes.Groups + _ = userGroupsCache.SetWithExpire(user.Id.OpaqueId, groupsRes.Groups, 3600*time.Second) + } + user.Groups = groups + } + return nil +} + +func isTokenValid(r *http.Request, tokenManager token.Manager, token string) (*userpb.User, map[string]*authpb.Scope, bool) { + ctx := r.Context() + + u, tokenScope, err := tokenManager.DismantleToken(ctx, token) + if err != nil { + return nil, nil, false + } + + // ensure access to the resource is allowed + ok, err := scope.VerifyScope(ctx, tokenScope, r.URL.Path) + if err != nil { + return nil, nil, false + } + + return u, tokenScope, ok } func logError(isUnprotectedEndpoint bool, log *zerolog.Logger, err error, msg string, status int, w http.ResponseWriter) { diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/loader/loader.go b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/loader/loader.go index dd1bbf328d..52761fbc6a 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/loader/loader.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/loader/loader.go @@ -22,5 +22,6 @@ import ( // Load core authentication strategies. _ "github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/basic" _ "github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/bearer" + _ "github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/ocmshares" // Add your own here. ) diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/ocmshares/ocmshares.go b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/ocmshares/ocmshares.go new file mode 100644 index 0000000000..4e7b26c98e --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/strategy/ocmshares/ocmshares.go @@ -0,0 +1,58 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package ocmshares + +import ( + "fmt" + "net/http" + + "github.com/cs3org/reva/v2/internal/http/interceptors/auth/credential/registry" + "github.com/cs3org/reva/v2/pkg/auth" +) + +func init() { + registry.Register("ocmshares", New) +} + +const ( + headerShareToken = "ocm-token" +) + +type strategy struct{} + +// New returns a new auth strategy that handles public share verification. +func New(m map[string]interface{}) (auth.CredentialStrategy, error) { + return &strategy{}, nil +} + +func (s *strategy) GetCredentials(w http.ResponseWriter, r *http.Request) (*auth.Credentials, error) { + token := r.Header.Get(headerShareToken) + if token == "" { + token = r.URL.Query().Get(headerShareToken) + } + if token == "" { + return nil, fmt.Errorf("no ocm token provided") + } + + return &auth.Credentials{Type: "ocmshares", ClientID: token}, nil +} + +func (s *strategy) AddWWWAuthenticate(w http.ResponseWriter, r *http.Request, realm string) { + // TODO read realm from forwarded header? +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/loader/loader.go b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/loader/loader.go index ff03781f58..2c1b4590bf 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/loader/loader.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/loader/loader.go @@ -20,6 +20,7 @@ package loader import ( // Load core token strategies. + _ "github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/strategy/bearer" _ "github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/strategy/header" // Add your own here. ) diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/strategy/bearer/bearer.go b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/strategy/bearer/bearer.go new file mode 100644 index 0000000000..4b0a8fc227 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/strategy/bearer/bearer.go @@ -0,0 +1,84 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package header + +import ( + "mime" + "net/http" + "strings" + + "github.com/cs3org/reva/v2/internal/http/interceptors/auth/token/registry" + "github.com/cs3org/reva/v2/pkg/auth" +) + +func init() { + registry.Register("bearer", New) +} + +type b struct{} + +// New returns a new auth strategy that checks for bearer auth. +func New(m map[string]interface{}) (auth.TokenStrategy, error) { + return b{}, nil +} + +func (b) GetToken(r *http.Request) string { + // Authorization Request Header Field: https://www.rfc-editor.org/rfc/rfc6750#section-2.1 + if tkn, ok := getFromAuthorizationHeader(r); ok { + return tkn + } + + // Form-Encoded Body Parameter: https://www.rfc-editor.org/rfc/rfc6750#section-2.2 + if tkn, ok := getFromBody(r); ok { + return tkn + } + + // URI Query Parameter: https://www.rfc-editor.org/rfc/rfc6750#section-2.3 + if tkn, ok := getFromQueryParam(r); ok { + return tkn + } + + return "" +} + +func getFromAuthorizationHeader(r *http.Request) (string, bool) { + auth := r.Header.Get("Authorization") + tkn := strings.TrimPrefix(auth, "Bearer ") + return tkn, tkn != "" +} + +func getFromBody(r *http.Request) (string, bool) { + mediatype, _, err := mime.ParseMediaType(r.Header.Get("content-type")) + if err != nil { + return "", false + } + if mediatype != "application/x-www-form-urlencoded" { + return "", false + } + if err = r.ParseForm(); err != nil { + return "", false + } + tkn := r.Form.Get("access-token") + return tkn, tkn != "" +} + +func getFromQueryParam(r *http.Request) (string, bool) { + tkn := r.URL.Query().Get("access_token") + return tkn, tkn != "" +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/datagateway/datagateway.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/datagateway/datagateway.go index 69fe36f5ea..2a571d2cf4 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/datagateway/datagateway.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/datagateway/datagateway.go @@ -44,7 +44,7 @@ import ( var tracer trace.Tracer func init() { - tracer = otel.Tracer("github.com/cs3org/reva/pkg/storage/utils/decomposedfs/tree") + tracer = otel.Tracer("github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree") } const ( @@ -324,6 +324,7 @@ func (s *svc) doPut(w http.ResponseWriter, r *http.Request) { return } httpReq.Header = r.Header + httpReq.ContentLength = r.ContentLength httpRes, err := httpClient.Do(httpReq) if err != nil { diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/loader/loader.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/loader/loader.go index b4a963e17f..4368eaec86 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/loader/loader.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/loader/loader.go @@ -26,7 +26,6 @@ import ( _ "github.com/cs3org/reva/v2/internal/http/services/dataprovider" _ "github.com/cs3org/reva/v2/internal/http/services/helloworld" _ "github.com/cs3org/reva/v2/internal/http/services/mentix" - _ "github.com/cs3org/reva/v2/internal/http/services/meshdirectory" _ "github.com/cs3org/reva/v2/internal/http/services/metrics" _ "github.com/cs3org/reva/v2/internal/http/services/ocmd" _ "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav" @@ -34,6 +33,7 @@ import ( _ "github.com/cs3org/reva/v2/internal/http/services/preferences" _ "github.com/cs3org/reva/v2/internal/http/services/prometheus" _ "github.com/cs3org/reva/v2/internal/http/services/reverseproxy" + _ "github.com/cs3org/reva/v2/internal/http/services/sciencemesh" _ "github.com/cs3org/reva/v2/internal/http/services/siteacc" _ "github.com/cs3org/reva/v2/internal/http/services/sysinfo" _ "github.com/cs3org/reva/v2/internal/http/services/wellknown" diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/meshdirectory/meshdirectory.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/meshdirectory/meshdirectory.go deleted file mode 100644 index 120e7f2c52..0000000000 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/meshdirectory/meshdirectory.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2018-2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -package meshdirectory - -import ( - "encoding/json" - "fmt" - "net/http" - - meshdirectoryweb "github.com/sciencemesh/meshdirectory-web" - - gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" - providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" - - "github.com/cs3org/reva/v2/internal/http/services/ocmd" - "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" - "github.com/cs3org/reva/v2/pkg/rhttp/router" - "github.com/cs3org/reva/v2/pkg/sharedconf" - "github.com/pkg/errors" - "github.com/rs/zerolog" - - "github.com/cs3org/reva/v2/pkg/rhttp/global" - "github.com/mitchellh/mapstructure" -) - -func init() { - global.Register("meshdirectory", New) -} - -type config struct { - Prefix string `mapstructure:"prefix"` - GatewaySvc string `mapstructure:"gatewaysvc"` -} - -func (c *config) init() { - c.GatewaySvc = sharedconf.GetGatewaySVC(c.GatewaySvc) - - if c.Prefix == "" { - c.Prefix = "meshdir" - } -} - -type svc struct { - conf *config -} - -func parseConfig(m map[string]interface{}) (*config, error) { - c := &config{} - if err := mapstructure.Decode(m, c); err != nil { - err = errors.Wrap(err, "error decoding conf") - return nil, err - } - return c, nil -} - -// New returns a new Mesh Directory HTTP service -func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) { - c, err := parseConfig(m) - if err != nil { - return nil, err - } - - c.init() - - service := &svc{ - conf: c, - } - return service, nil -} - -// Service prefix -func (s *svc) Prefix() string { - return s.conf.Prefix -} - -// Unprotected endpoints -func (s *svc) Unprotected() []string { - return []string{"/"} -} - -// Close performs cleanup. -func (s *svc) Close() error { - return nil -} - -func (s *svc) getClient() (gateway.GatewayAPIClient, error) { - return pool.GetGatewayServiceClient(s.conf.GatewaySvc) -} - -func (s *svc) serveJSON(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - - ctx := r.Context() - - gatewayClient, err := s.getClient() - if err != nil { - ocmd.WriteError(w, r, ocmd.APIErrorServerError, - fmt.Sprintf("error getting grpc client on addr: %v", s.conf.GatewaySvc), err) - return - } - - providers, err := gatewayClient.ListAllProviders(ctx, &providerv1beta1.ListAllProvidersRequest{}) - if err != nil { - ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error listing all providers", err) - return - } - - jsonResponse, err := json.Marshal(providers.Providers) - if err != nil { - ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error marshalling providers data", err) - return - } - - // Write response - _, err = w.Write(jsonResponse) - if err != nil { - ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error writing providers data", err) - return - } - - w.WriteHeader(http.StatusOK) -} - -// HTTP service handler -func (s *svc) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var head string - head, r.URL.Path = router.ShiftPath(r.URL.Path) - switch head { - case "providers": - s.serveJSON(w, r) - return - default: - r.URL.Path = head + r.URL.Path - meshdirectoryweb.ServeMeshDirectorySPA(w, r) - return - } - }) -} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/config.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/config.go deleted file mode 100644 index 8d7b0b419a..0000000000 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/config.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2018-2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -package ocmd - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/cs3org/reva/v2/pkg/appctx" -) - -type configData struct { - Enabled bool `json:"enabled" xml:"enabled"` - APIVersion string `json:"apiVersion" xml:"apiVersion"` - Host string `json:"host" xml:"host"` - Endpoint string `json:"endPoint" xml:"endPoint"` - Provider string `json:"provider" xml:"provider"` - ResourceTypes []resourceTypes `json:"resourceTypes" xml:"resourceTypes"` -} - -type resourceTypes struct { - Name string `json:"name"` - ShareTypes []string `json:"shareTypes"` - Protocols resourceTypesProtocols `json:"protocols"` -} - -type resourceTypesProtocols struct { - Webdav string `json:"webdav"` -} - -type configHandler struct { - c configData -} - -func (h *configHandler) init(c *Config) { - h.c = c.Config - if h.c.APIVersion == "" { - h.c.APIVersion = "1.0-proposal1" - } - if h.c.Host == "" { - h.c.Host = "localhost" - } - if h.c.Provider == "" { - h.c.Provider = "cernbox" - } - h.c.Enabled = true - if len(c.Prefix) > 0 { - h.c.Endpoint = fmt.Sprintf("https://%s/%s", h.c.Host, c.Prefix) - } else { - h.c.Endpoint = fmt.Sprintf("https://%s", h.c.Host) - } - h.c.ResourceTypes = []resourceTypes{{ - Name: "file", - ShareTypes: []string{"user"}, - Protocols: resourceTypesProtocols{ - Webdav: fmt.Sprintf("/%s/ocm_webdav", h.c.Provider), - }, - }} -} - -func (h *configHandler) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - indentedConf, _ := json.MarshalIndent(h.c, "", " ") - if _, err := w.Write(indentedConf); err != nil { - log.Err(err).Msg("Error writing to ResponseWriter") - } - - }) -} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/invites.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/invites.go index 6f15c1ee6a..439d40a3c9 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/invites.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/invites.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,323 +22,158 @@ import ( "encoding/json" "errors" "fmt" - "io" "mime" "net/http" - "net/url" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" invitepb "github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1" ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/reqres" "github.com/cs3org/reva/v2/pkg/appctx" - ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" - "github.com/cs3org/reva/v2/pkg/rhttp/router" - "github.com/cs3org/reva/v2/pkg/smtpclient" "github.com/cs3org/reva/v2/pkg/utils" ) type invitesHandler struct { - smtpCredentials *smtpclient.SMTPCredentials - gatewayAddr string - meshDirectoryURL string + gatewaySelector *pool.Selector[gateway.GatewayAPIClient] } -func (h *invitesHandler) init(c *Config) { - h.gatewayAddr = c.GatewaySvc - if c.SMTPCredentials != nil { - h.smtpCredentials = smtpclient.NewSMTPCredentials(c.SMTPCredentials) +func (h *invitesHandler) init(c *config) error { + var err error + + gatewaySelector, err := pool.GatewaySelector(c.GatewaySvc) + if err != nil { + return err } - h.meshDirectoryURL = c.MeshDirectoryURL + h.gatewaySelector = gatewaySelector + return nil } -func (h *invitesHandler) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) - var head string - head, r.URL.Path = router.ShiftPath(r.URL.Path) - log.Debug().Str("head", head).Str("tail", r.URL.Path).Msg("http routing") - - switch head { - case "": - h.generateInviteToken(w, r) - case "forward": - h.forwardInvite(w, r) - case "accept": - h.acceptInvite(w, r) - case "find-accepted-users": - h.findAcceptedUsers(w, r) - case "generate": - h.generate(w, r) - default: - w.WriteHeader(http.StatusNotFound) - } - }) +type acceptInviteRequest struct { + Token string `json:"token"` + UserID string `json:"userID"` + RecipientProvider string `json:"recipientProvider"` + Name string `json:"name"` + Email string `json:"email"` } -func (h *invitesHandler) generateInviteToken(w http.ResponseWriter, r *http.Request) { - - ctx := r.Context() - - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) - if err != nil { - WriteError(w, r, APIErrorServerError, "error getting gateway grpc client", err) - return - } - - token, err := gatewayClient.GenerateInviteToken(ctx, &invitepb.GenerateInviteTokenRequest{}) - if err != nil { - WriteError(w, r, APIErrorServerError, "error generating token", err) - return - } - - if r.FormValue("recipient") != "" && h.smtpCredentials != nil { - - usr := ctxpkg.ContextMustGetUser(ctx) - - // TODO: the message body needs to point to the meshdirectory service - subject := fmt.Sprintf("ScienceMesh: %s wants to collaborate with you", usr.DisplayName) - body := "Hi,\n\n" + - usr.DisplayName + " (" + usr.Mail + ") wants to start sharing OCM resources with you. " + - "To accept the invite, please visit the following URL:\n" + - h.meshDirectoryURL + "?token=" + token.InviteToken.Token + "&providerDomain=" + usr.Id.Idp + "\n\n" + - "Alternatively, you can visit your mesh provider and use the following details:\n" + - "Token: " + token.InviteToken.Token + "\n" + - "ProviderDomain: " + usr.Id.Idp + "\n\n" + - "Best,\nThe ScienceMesh team" - - err = h.smtpCredentials.SendMail(r.FormValue("recipient"), subject, body) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending token by mail", err) - return - } - } - - jsonResponse, err := json.Marshal(token.InviteToken) - if err != nil { - WriteError(w, r, APIErrorServerError, "error marshalling token data", err) - return - } - - // Write response - _, err = w.Write(jsonResponse) - if err != nil { - WriteError(w, r, APIErrorServerError, "error writing token data", err) - return - } - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) -} - -func (h *invitesHandler) forwardInvite(w http.ResponseWriter, r *http.Request) { +// AcceptInvite informs avout an accepted invitation so that the users +// can initiate the OCM share creation. +func (h *invitesHandler) AcceptInvite(w http.ResponseWriter, r *http.Request) { ctx := r.Context() log := appctx.GetLogger(ctx) - contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - var token, providerDomain string - if err == nil && contentType == "application/json" { - defer r.Body.Close() - reqBody, err := io.ReadAll(r.Body) - if err == nil { - reqMap := make(map[string]string) - err = json.Unmarshal(reqBody, &reqMap) - if err == nil { - token, providerDomain = reqMap["token"], reqMap["providerDomain"] - } - } - } else { - token, providerDomain = r.FormValue("token"), r.FormValue("providerDomain") - } - if token == "" || providerDomain == "" { - WriteError(w, r, APIErrorInvalidParameter, "token and providerDomain must not be null", nil) - return - } - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) + req, err := getAcceptInviteRequest(r) if err != nil { - WriteError(w, r, APIErrorServerError, "error getting gateway grpc client", err) + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "missing parameters in request", err) return } - inviteToken := &invitepb.InviteToken{ - Token: token, - } - - providerInfo, err := gatewayClient.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ - Domain: providerDomain, - }) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc get invite by domain info request", err) - return - } - if providerInfo.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorServerError, "grpc forward invite request failed", errors.New(providerInfo.Status.Message)) - return - } - - forwardInviteReq := &invitepb.ForwardInviteRequest{ - InviteToken: inviteToken, - OriginSystemProvider: providerInfo.ProviderInfo, - } - forwardInviteResponse, err := gatewayClient.ForwardInvite(ctx, forwardInviteReq) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc forward invite request", err) - return - } - if forwardInviteResponse.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorServerError, "grpc forward invite request failed", errors.New(forwardInviteResponse.Status.Message)) - return - } - - _, err = w.Write([]byte("Accepted invite from: " + providerDomain)) - if err != nil { - WriteError(w, r, APIErrorServerError, "error writing token data", err) - return - } - w.WriteHeader(http.StatusOK) - - log.Info().Msgf("Invite forwarded to: %s", providerDomain) -} - -func (h *invitesHandler) acceptInvite(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() - log := appctx.GetLogger(ctx) - contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - var token, userID, recipientProvider, name, email string - if err == nil && contentType == "application/json" { - defer r.Body.Close() - reqBody, err := io.ReadAll(r.Body) - if err == nil { - reqMap := make(map[string]string) - err = json.Unmarshal(reqBody, &reqMap) - if err == nil { - token, userID, recipientProvider = reqMap["token"], reqMap["userID"], reqMap["recipientProvider"] - name, email = reqMap["name"], reqMap["email"] - } - } - } else { - token, userID, recipientProvider = r.FormValue("token"), r.FormValue("userID"), r.FormValue("recipientProvider") - name, email = r.FormValue("name"), r.FormValue("email") - } - if token == "" || userID == "" || recipientProvider == "" { - WriteError(w, r, APIErrorInvalidParameter, "missing parameters in request", nil) - return - } - - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) - if err != nil { - WriteError(w, r, APIErrorServerError, "error getting gateway grpc client", err) + if req.Token == "" || req.UserID == "" || req.RecipientProvider == "" { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "token, userID and recipiendProvider must not be null", nil) return } clientIP, err := utils.GetClientIP(r) if err != nil { - WriteError(w, r, APIErrorServerError, fmt.Sprintf("error retrieving client IP from request: %s", r.RemoteAddr), err) - return - } - - recipientProviderURL, err := url.Parse(recipientProvider) - if err != nil { - WriteError(w, r, APIErrorServerError, fmt.Sprintf("error parseing recipientProvider URL: %s", recipientProvider), err) + reqres.WriteError(w, r, reqres.APIErrorServerError, fmt.Sprintf("error retrieving client IP from request: %s", r.RemoteAddr), err) return } providerInfo := ocmprovider.ProviderInfo{ - Domain: recipientProviderURL.Hostname(), + Domain: req.RecipientProvider, Services: []*ocmprovider.Service{ { Host: clientIP, }, }, } - + gatewayClient, err := h.gatewaySelector.Next() + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error getting gateway client", err) + return + } providerAllowedResp, err := gatewayClient.IsProviderAllowed(ctx, &ocmprovider.IsProviderAllowedRequest{ Provider: &providerInfo, }) if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc is provider allowed request", err) + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc is provider allowed request", err) return } if providerAllowedResp.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorUnauthenticated, "provider not authorized", errors.New(providerAllowedResp.Status.Message)) + reqres.WriteError(w, r, reqres.APIErrorUntrustedService, "provider not trusted", errors.New(providerAllowedResp.Status.Message)) return } userObj := &userpb.User{ Id: &userpb.UserId{ - OpaqueId: userID, - Idp: recipientProvider, - Type: userpb.UserType_USER_TYPE_PRIMARY, + OpaqueId: req.UserID, + Idp: req.RecipientProvider, + Type: userpb.UserType_USER_TYPE_FEDERATED, }, - Mail: email, - DisplayName: name, + Mail: req.Email, + DisplayName: req.Name, } acceptInviteRequest := &invitepb.AcceptInviteRequest{ InviteToken: &invitepb.InviteToken{ - Token: token, + Token: req.Token, }, RemoteUser: userObj, } acceptInviteResponse, err := gatewayClient.AcceptInvite(ctx, acceptInviteRequest) if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc accept invite request", err) + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc accept invite request", err) return } if acceptInviteResponse.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorServerError, "grpc accept invite request failed", errors.New(acceptInviteResponse.Status.Message)) - return + switch acceptInviteResponse.Status.Code { + case rpc.Code_CODE_NOT_FOUND: + reqres.WriteError(w, r, reqres.APIErrorNotFound, "token not found", nil) + return + case rpc.Code_CODE_INVALID_ARGUMENT: + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "token has expired", nil) + return + case rpc.Code_CODE_ALREADY_EXISTS: + reqres.WriteError(w, r, reqres.APIErrorAlreadyExist, "user already known", nil) + return + default: + reqres.WriteError(w, r, reqres.APIErrorServerError, "unexpected error: "+acceptInviteResponse.Status.Message, errors.New(acceptInviteResponse.Status.Message)) + return + } } - log.Info().Msgf("User: %+v added to accepted users.", userObj) -} - -func (h *invitesHandler) findAcceptedUsers(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) - - ctx := r.Context() - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) - if err != nil { - WriteError(w, r, APIErrorServerError, "error getting gateway grpc client", err) + if err := json.NewEncoder(w).Encode(&user{ + UserID: acceptInviteResponse.UserId.OpaqueId, + Email: acceptInviteResponse.Email, + Name: acceptInviteResponse.DisplayName, + }); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error encoding response", err) return } - - response, err := gatewayClient.FindAcceptedUsers(ctx, &invitepb.FindAcceptedUsersRequest{ - Filter: "", - }) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc find accepted users request", err) - return - } - - indentedResponse, _ := json.MarshalIndent(response, "", " ") - w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) - if _, err := w.Write(indentedResponse); err != nil { - log.Err(err).Msg("Error writing to ResponseWriter") - } -} - -func (h *invitesHandler) generate(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) - - ctx := r.Context() - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) - if err != nil { - WriteError(w, r, APIErrorServerError, "error getting gateway grpc client", err) - return - } - - response, err := gatewayClient.GenerateInviteToken(ctx, &invitepb.GenerateInviteTokenRequest{}) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc generate invite token request", err) - return - } - - indentedResponse, _ := json.MarshalIndent(response, "", " ") w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - if _, err := w.Write(indentedResponse); err != nil { - log.Err(err).Msg("Error writing to ResponseWriter") - } + + log.Info().Str("user", fmt.Sprintf("%s@%s", userObj.Id.OpaqueId, userObj.Id.Idp)).Str("token", req.Token).Msg("added to accepted users") +} + +type user struct { + UserID string `json:"userID"` + Email string `json:"email"` + Name string `json:"name"` +} + +func getAcceptInviteRequest(r *http.Request) (*acceptInviteRequest, error) { + var req acceptInviteRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return nil, err + } + } else { + req.Token, req.UserID, req.RecipientProvider = r.FormValue("token"), r.FormValue("userID"), r.FormValue("recipientProvider") + req.Name, req.Email = r.FormValue("name"), r.FormValue("email") + } + return &req, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/notifications.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/notifications.go index 48f5f9c043..5801f3e8fc 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/notifications.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/notifications.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,27 +19,48 @@ package ocmd import ( + "io" + "mime" "net/http" + "github.com/cs3org/reva/v2/internal/http/services/reqres" "github.com/cs3org/reva/v2/pkg/appctx" - "github.com/cs3org/reva/v2/pkg/rhttp/router" ) -type notificationsHandler struct { +// var validate = validator.New() + +type notifHandler struct { } -func (h *notificationsHandler) init(c *Config) { +func (h *notifHandler) init(c *config) error { + return nil } -func (h *notificationsHandler) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) +// Notifications dispatches any notifications received from remote OCM sites +// according to the specifications at: +// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post +func (h *notifHandler) Notifications(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + log := appctx.GetLogger(ctx) + req, err := getNotification(r) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) + return + } - var head string - head, r.URL.Path = router.ShiftPath(r.URL.Path) + // TODO(lopresti) this is all to be implemented. For now we just log what we got + log.Debug().Msgf("Received OCM notification: %+v", req) - log.Debug().Str("head", head).Str("tail", r.URL.Path).Msg("http routing") - - w.WriteHeader(http.StatusOK) - }) + // this is to please Nextcloud + w.WriteHeader(http.StatusCreated) +} + +func getNotification(r *http.Request) (string, error) { + // var req notificationRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + bytes, _ := io.ReadAll(r.Body) + return string(bytes), nil + } + return "", nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocm.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocm.go new file mode 100644 index 0000000000..caa93833ba --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocm.go @@ -0,0 +1,118 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package ocmd + +import ( + "net/http" + + "github.com/cs3org/reva/v2/pkg/appctx" + "github.com/cs3org/reva/v2/pkg/rhttp/global" + "github.com/cs3org/reva/v2/pkg/sharedconf" + "github.com/cs3org/reva/v2/pkg/utils/cfg" + "github.com/go-chi/chi/v5" + "github.com/rs/zerolog" +) + +func init() { + global.Register("ocmd", New) +} + +type config struct { + Prefix string `mapstructure:"prefix"` + GatewaySvc string `mapstructure:"gatewaysvc" validate:"required"` + ExposeRecipientDisplayName bool `mapstructure:"expose_recipient_display_name"` +} + +func (c *config) ApplyDefaults() { + c.GatewaySvc = sharedconf.GetGatewaySVC(c.GatewaySvc) + if c.Prefix == "" { + c.Prefix = "ocm" + } +} + +type svc struct { + Conf *config + router chi.Router +} + +// New returns a new ocmd object, that implements +// the OCM APIs specified in https://cs3org.github.io/OCM-API/docs.html +func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) { + var c config + if err := cfg.Decode(m, &c); err != nil { + return nil, err + } + + r := chi.NewRouter() + s := &svc{ + Conf: &c, + router: r, + } + + if err := s.routerInit(); err != nil { + return nil, err + } + + return s, nil +} + +func (s *svc) routerInit() error { + sharesHandler := new(sharesHandler) + invitesHandler := new(invitesHandler) + notifHandler := new(notifHandler) + + if err := sharesHandler.init(s.Conf); err != nil { + return err + } + if err := invitesHandler.init(s.Conf); err != nil { + return err + } + if err := notifHandler.init(s.Conf); err != nil { + return err + } + + s.router.Post("/shares", sharesHandler.CreateShare) + s.router.Post("/invite-accepted", invitesHandler.AcceptInvite) + s.router.Post("/notifications", notifHandler.Notifications) + return nil +} + +// Close performs cleanup. +func (s *svc) Close() error { + return nil +} + +func (s *svc) Prefix() string { + return s.Conf.Prefix +} + +func (s *svc) Unprotected() []string { + return []string{"/invite-accepted", "/shares", "/notifications"} +} + +func (s *svc) Handler() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + log := appctx.GetLogger(r.Context()) + log.Debug().Str("path", r.URL.Path).Msg("ocm routing") + + // unset raw path, otherwise chi uses it to route and then fails to match percent encoded path segments + r.URL.RawPath = "" + s.router.ServeHTTP(w, r) + }) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocmd.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocmd.go deleted file mode 100644 index 9448318521..0000000000 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/ocmd.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2018-2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -package ocmd - -import ( - "net/http" - - "github.com/cs3org/reva/v2/pkg/appctx" - "github.com/cs3org/reva/v2/pkg/rhttp/global" - "github.com/cs3org/reva/v2/pkg/rhttp/router" - "github.com/cs3org/reva/v2/pkg/sharedconf" - "github.com/cs3org/reva/v2/pkg/smtpclient" - "github.com/mitchellh/mapstructure" - "github.com/rs/zerolog" -) - -func init() { - global.Register("ocmd", New) -} - -// Config holds the config options that need to be passed down to all ocdav handlers -type Config struct { - SMTPCredentials *smtpclient.SMTPCredentials `mapstructure:"smtp_credentials"` - Prefix string `mapstructure:"prefix"` - Host string `mapstructure:"host"` - GatewaySvc string `mapstructure:"gatewaysvc"` - MeshDirectoryURL string `mapstructure:"mesh_directory_url"` - Config configData `mapstructure:"config"` -} - -func (c *Config) init() { - c.GatewaySvc = sharedconf.GetGatewaySVC(c.GatewaySvc) - - // if c.Prefix == "" { - // c.Prefix = "ocm" - // } -} - -type svc struct { - Conf *Config - SharesHandler *sharesHandler - NotificationsHandler *notificationsHandler - ConfigHandler *configHandler - InvitesHandler *invitesHandler - SendHandler *sendHandler -} - -// New returns a new ocmd object -func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) { - - conf := &Config{} - if err := mapstructure.Decode(m, conf); err != nil { - return nil, err - } - conf.init() - - s := &svc{ - Conf: conf, - } - s.SharesHandler = new(sharesHandler) - s.NotificationsHandler = new(notificationsHandler) - s.ConfigHandler = new(configHandler) - s.InvitesHandler = new(invitesHandler) - s.SendHandler = new(sendHandler) - s.SharesHandler.init(s.Conf) - s.NotificationsHandler.init(s.Conf) - log.Debug().Str("initializing ConfigHandler Host", s.Conf.Host) - - s.ConfigHandler.init(s.Conf) - s.InvitesHandler.init(s.Conf) - s.SendHandler.init(s.Conf) - - return s, nil -} - -// Close performs cleanup. -func (s *svc) Close() error { - return nil -} - -func (s *svc) Prefix() string { - return s.Conf.Prefix -} - -func (s *svc) Unprotected() []string { - return []string{"/invites/accept", "/shares", "/ocm-provider", "/notifications"} -} - -func (s *svc) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - - ctx := r.Context() - log := appctx.GetLogger(ctx) - - var head string - head, r.URL.Path = router.ShiftPath(r.URL.Path) - log.Debug().Str("head", head).Str("tail", r.URL.Path).Msg("http routing") - - switch head { - case "ocm-provider": - s.ConfigHandler.Handler().ServeHTTP(w, r) - return - case "shares": - s.SharesHandler.Handler().ServeHTTP(w, r) - return - case "notifications": - s.NotificationsHandler.Handler().ServeHTTP(w, r) - return - case "invites": - s.InvitesHandler.Handler().ServeHTTP(w, r) - return - case "send": - s.SendHandler.Handler().ServeHTTP(w, r) - } - - log.Warn().Msg("request not handled") - w.WriteHeader(http.StatusNotFound) - }) -} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go new file mode 100644 index 0000000000..0c77358387 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go @@ -0,0 +1,160 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package ocmd + +import ( + "encoding/json" + "errors" + "fmt" + "reflect" + "strings" + + ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + ocmshare "github.com/cs3org/reva/v2/pkg/ocm/share" + utils "github.com/cs3org/reva/v2/pkg/utils" +) + +// Protocols is the list of protocols. +type Protocols []Protocol + +// Protocol represents the way of access the resource +// in the OCM share. +type Protocol interface { + // ToOCMProtocol convert the protocol to a ocm Protocol struct + ToOCMProtocol() *ocm.Protocol +} + +// protocols supported by the OCM API + +// WebDAV contains the parameters for the WebDAV protocol. +type WebDAV struct { + SharedSecret string `json:"sharedSecret" validate:"required"` + Permissions []string `json:"permissions" validate:"required,dive,required,oneof=read write share"` + URL string `json:"url" validate:"required"` +} + +// ToOCMProtocol convert the protocol to a ocm Protocol struct. +func (w *WebDAV) ToOCMProtocol() *ocm.Protocol { + perms := &ocm.SharePermissions{ + Permissions: &providerv1beta1.ResourcePermissions{}, + } + for _, p := range w.Permissions { + switch p { + case "read": + perms.Permissions.GetPath = true + perms.Permissions.InitiateFileDownload = true + perms.Permissions.ListContainer = true + perms.Permissions.Stat = true + case "write": + perms.Permissions.InitiateFileUpload = true + case "share": + perms.Reshare = true + } + } + + return ocmshare.NewWebDAVProtocol(w.URL, w.SharedSecret, perms) +} + +// Webapp contains the parameters for the Webapp protocol. +type Webapp struct { + URITemplate string `json:"uriTemplate" validate:"required"` + ViewMode string `json:"viewMode" validate:"required,dive,required,oneof=view read write"` +} + +// ToOCMProtocol convert the protocol to a ocm Protocol struct. +func (w *Webapp) ToOCMProtocol() *ocm.Protocol { + return ocmshare.NewWebappProtocol(w.URITemplate, utils.GetAppViewMode(w.ViewMode)) +} + +// Datatx contains the parameters for the Datatx protocol. +type Datatx struct { + SharedSecret string `json:"sharedSecret" validate:"required"` + SourceURI string `json:"srcUri" validate:"required"` + Size uint64 `json:"size" validate:"required"` +} + +// ToOCMProtocol convert the protocol to a ocm Protocol struct. +func (w *Datatx) ToOCMProtocol() *ocm.Protocol { + return ocmshare.NewTransferProtocol(w.SourceURI, w.SharedSecret, w.Size) +} + +var protocolImpl = map[string]reflect.Type{ + "webdav": reflect.TypeOf(WebDAV{}), + "webapp": reflect.TypeOf(Webapp{}), + "datatx": reflect.TypeOf(Datatx{}), +} + +// UnmarshalJSON implements the Unmarshaler interface. +func (p *Protocols) UnmarshalJSON(data []byte) error { + var prot map[string]json.RawMessage + if err := json.Unmarshal(data, &prot); err != nil { + return err + } + + *p = []Protocol{} + + for name, d := range prot { + var res Protocol + + // we do not support the OCM v1.0 properties for now, therefore just skip or bail out + if name == "name" { + continue + } + if name == "options" { + var opt map[string]any + if err := json.Unmarshal(d, &opt); err != nil || len(opt) > 0 { + return fmt.Errorf("protocol options not supported: %s", string(d)) + } + continue + } + ctype, ok := protocolImpl[name] + if !ok { + return fmt.Errorf("protocol %s not recognised", name) + } + res = reflect.New(ctype).Interface().(Protocol) + if err := json.Unmarshal(d, &res); err != nil { + return err + } + + *p = append(*p, res) + } + return nil +} + +// MarshalJSON implements the Marshaler interface. +func (p Protocols) MarshalJSON() ([]byte, error) { + if len(p) == 0 { + return nil, errors.New("no protocol defined") + } + d := make(map[string]any) + for _, prot := range p { + d[getProtocolName(prot)] = prot + } + // fill in the OCM v1.0 properties + d["name"] = "multi" + d["options"] = map[string]any{} + return json.Marshal(d) +} + +func getProtocolName(p Protocol) string { + n := reflect.TypeOf(p).String() + s := strings.Split(n, ".") + return strings.ToLower(s[len(s)-1]) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/send.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/send.go deleted file mode 100644 index a4a84e284e..0000000000 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/send.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2018-2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -package ocmd - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "strconv" - - gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" - userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" - ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" - rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" - ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" - provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" - types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - "github.com/cs3org/reva/v2/pkg/appctx" - ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" - "google.golang.org/grpc/metadata" - - "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" -) - -type sendHandler struct { - GatewaySvc string -} - -func (h *sendHandler) init(c *Config) { - h.GatewaySvc = c.GatewaySvc -} - -func (h *sendHandler) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - log := appctx.GetLogger(r.Context()) - defer r.Body.Close() - reqBody, err := io.ReadAll(r.Body) - if err != nil { - log.Error().Msg("cannot read POST body!") - w.WriteHeader(http.StatusInternalServerError) - return - } - - reqMap := make(map[string]string) - err = json.Unmarshal(reqBody, &reqMap) - if err != nil { - log.Error().Msg("cannot parse POST body!") - w.WriteHeader(http.StatusInternalServerError) - return - } - sourcePath, targetPath, sharedSecret := reqMap["sourcePath"], reqMap["targetPath"], reqMap["sharedSecret"] - recipientUsername, recipientHost := reqMap["recipientUsername"], reqMap["recipientHost"] - loginType, loginUsername, loginPassword := reqMap["loginType"], reqMap["loginUsername"], reqMap["loginPassword"] - - // "sourcePath": "other", - // "targetPath": "sciencemesh\/other", - // "type": "dir", (unused) - // "recipientUsername": "marie", - // "recipientHost": "revanc2.docker", - // "loginType": "basic", - // "loginUsername": "einstein", - // "loginPassword": "Ny4Nv6WLoC1o70kVgrVOZLZ2vRgPjuej" - - gatewayAddr := h.GatewaySvc - gatewayClient, err := pool.GetGatewayServiceClient(gatewayAddr) - if err != nil { - log.Error().Msg("cannot get grpc client!") - w.WriteHeader(http.StatusInternalServerError) - return - } - loginReq := &gateway.AuthenticateRequest{ - Type: loginType, - ClientId: loginUsername, - ClientSecret: loginPassword, - } - - loginCtx := context.Background() - res, err := gatewayClient.Authenticate(loginCtx, loginReq) - if err != nil { - log.Error().Msg("error logging in") - w.WriteHeader(http.StatusInternalServerError) - return - } - authCtx := context.Background() - - authCtx = ctxpkg.ContextSetToken(authCtx, res.Token) - authCtx = metadata.AppendToOutgoingContext(authCtx, ctxpkg.TokenHeader, res.Token) - - // copied from cmd/reva/public-share-create.go: - ref := &provider.Reference{Path: sourcePath} - - req := &provider.StatRequest{Ref: ref} - res2, err := gatewayClient.Stat(authCtx, req) - if err != nil { - log.Error().Msg("error sending: stat file/folder to share") - w.WriteHeader(http.StatusInternalServerError) - return - } - - if res2.Status.Code != rpc.Code_CODE_OK { - log.Error().Msg("error returned: stat file/folder to share") - w.WriteHeader(http.StatusInternalServerError) - return - } - - // see cmd/reva/share-creat.go:getSharePerm - readerPermission := &provider.ResourcePermissions{ - GetPath: true, - InitiateFileDownload: true, - ListFileVersions: true, - ListContainer: true, - Stat: true, - } - - grant := &ocm.ShareGrant{ - Permissions: &ocm.SharePermissions{ - Permissions: readerPermission, - }, - Grantee: &provider.Grantee{ - Type: provider.GranteeType_GRANTEE_TYPE_USER, - Id: &provider.Grantee_UserId{ - UserId: &userpb.UserId{ - Idp: recipientHost, - OpaqueId: recipientUsername, - }, - }, - }, - } - recipientProviderInfo, err := gatewayClient.GetInfoByDomain(authCtx, &ocmprovider.GetInfoByDomainRequest{ - Domain: recipientHost, - }) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc get invite by domain info request", err) - return - } - if recipientProviderInfo.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorServerError, "grpc forward invite request failed", errors.New(recipientProviderInfo.Status.Message)) - return - } - - shareRequest := &ocm.CreateOCMShareRequest{ - Opaque: &types.Opaque{ - Map: map[string]*types.OpaqueEntry{ - "permissions": { - Decoder: "plain", - Value: []byte(strconv.Itoa(0)), - }, - "name": { - Decoder: "plain", - Value: []byte(targetPath), - }, - "protocol": { - Decoder: "plain", - Value: []byte("webdav"), // TODO: support datatx too - }, - "token": { - Decoder: "plain", - Value: []byte(sharedSecret), - }, - }, - }, - ResourceId: res2.Info.Id, - Grant: grant, - RecipientMeshProvider: recipientProviderInfo.ProviderInfo, - } - - shareRes, err := gatewayClient.CreateOCMShare(authCtx, shareRequest) - if err != nil { - log.Error().Msg("error sending: CreateShare") - w.WriteHeader(http.StatusInternalServerError) - return - } - - if shareRes.Status.Code != rpc.Code_CODE_OK { - log.Error().Msg("error returned: CreateShare") - w.WriteHeader(http.StatusInternalServerError) - return - } - - w.WriteHeader(http.StatusOK) - }) -} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/shares.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/shares.go index ac9700daf3..1d3c455a56 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/shares.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/shares.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,102 +22,83 @@ import ( "encoding/json" "errors" "fmt" - "io" - "math" "mime" "net/http" - "reflect" "strings" - "time" + + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" ocmcore "github.com/cs3org/go-cs3apis/cs3/ocm/core/v1beta1" ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" - types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" + "github.com/cs3org/reva/v2/internal/http/services/reqres" "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" "github.com/cs3org/reva/v2/pkg/utils" + "github.com/go-playground/validator/v10" ) +var validate = validator.New() + type sharesHandler struct { - gatewayAddr string + gatewaySelector *pool.Selector[gateway.GatewayAPIClient] + exposeRecipientDisplayName bool } -func (h *sharesHandler) init(c *Config) { - h.gatewayAddr = c.GatewaySvc +func (h *sharesHandler) init(c *config) error { + var err error + + gatewaySelector, err := pool.GatewaySelector(c.GatewaySvc) + if err != nil { + return err + } + h.gatewaySelector = gatewaySelector + + h.exposeRecipientDisplayName = c.ExposeRecipientDisplayName + return nil } -func (h *sharesHandler) Handler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - - switch r.Method { - case http.MethodPost: - h.createShare(w, r) - default: - WriteError(w, r, APIErrorInvalidParameter, "Only POST method is allowed", nil) - } - }) +type createShareRequest struct { + ShareWith string `json:"shareWith" validate:"required"` // identifier of the recipient of the share + Name string `json:"name" validate:"required"` // name of the resource + Description string `json:"description"` // (optional) description of the resource + ProviderID string `json:"providerId" validate:"required"` // unique identifier of the resource at provider side + Owner string `json:"owner" validate:"required"` // unique identifier of the owner at provider side + Sender string `json:"sender" validate:"required"` // unique indentifier of the user who wants to share the resource at provider side + OwnerDisplayName string `json:"ownerDisplayName"` // display name of the owner of the resource + SenderDisplayName string `json:"senderDisplayName"` // dispay name of the user who wants to share the resource + ShareType string `json:"shareType" validate:"required,oneof=user group"` // recipient share type (user or group) + ResourceType string `json:"resourceType" validate:"required,oneof=file folder"` + Expiration uint64 `json:"expiration"` + Protocols Protocols `json:"protocol" validate:"required"` } -func (h *sharesHandler) createShare(w http.ResponseWriter, r *http.Request) { +// CreateShare sends all the informations to the consumer needed to start +// synchronization between the two services. +func (h *sharesHandler) CreateShare(w http.ResponseWriter, r *http.Request) { ctx := r.Context() log := appctx.GetLogger(ctx) - contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - var shareWith, meshProvider, resource, providerID, owner string - var protocol map[string]interface{} - if err == nil && contentType == "application/json" { - defer r.Body.Close() - reqBody, err := io.ReadAll(r.Body) - if err == nil { - reqMap := make(map[string]interface{}) - err = json.Unmarshal(reqBody, &reqMap) - if err == nil { - meshProvider = reqMap["meshProvider"].(string) // FIXME: get this from sharedBy string? - shareWith, protocol = reqMap["shareWith"].(string), reqMap["protocol"].(map[string]interface{}) - resource, owner = reqMap["name"].(string), reqMap["owner"].(string) - // Note that if an OCM request were to go directly from a Nextcloud server - // to a Reva server, it will (incorrectly) sends an integer provider_id instead a string one. - // This doesn't happen when using the sciencemesh-nextcloud app, but in order to make the OCM - // test suite pass, this code works around that: - if reflect.ValueOf(reqMap["providerId"]).Kind() == reflect.Float64 { - providerID = fmt.Sprintf("%d", int(math.Round(reqMap["providerId"].(float64)))) - } else { - providerID = reqMap["providerId"].(string) - } - } else { - WriteError(w, r, APIErrorInvalidParameter, "could not parse json request body", nil) - } - } - } else { - var protocolJSON string - shareWith, protocolJSON, meshProvider = r.FormValue("shareWith"), r.FormValue("protocol"), r.FormValue("meshProvider") - resource, providerID, owner = r.FormValue("name"), r.FormValue("providerId"), r.FormValue("owner") - err = json.Unmarshal([]byte(protocolJSON), &protocol) - if err != nil { - WriteError(w, r, APIErrorInvalidParameter, "invalid protocol parameters", nil) - } - } - - if resource == "" || providerID == "" || owner == "" { - WriteError(w, r, APIErrorInvalidParameter, "missing details about resource to be shared", nil) - return - } - if shareWith == "" || protocol["name"] == "" || meshProvider == "" { - WriteError(w, r, APIErrorInvalidParameter, "missing request parameters", nil) - return - } - - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) + req, err := getCreateShareRequest(r) if err != nil { - WriteError(w, r, APIErrorServerError, "error getting storage grpc client", err) + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) + return + } + + _, meshProvider, err := getIDAndMeshProvider(req.Sender) + log.Debug().Msgf("Determined Mesh Provider '%s' from req.Sender '%s'", meshProvider, req.Sender) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) return } clientIP, err := utils.GetClientIP(r) if err != nil { - WriteError(w, r, APIErrorServerError, fmt.Sprintf("error retrieving client IP from request: %s", r.RemoteAddr), err) + reqres.WriteError(w, r, reqres.APIErrorServerError, fmt.Sprintf("error retrieving client IP from request: %s", r.RemoteAddr), err) return } providerInfo := ocmprovider.ProviderInfo{ @@ -128,128 +109,154 @@ func (h *sharesHandler) createShare(w http.ResponseWriter, r *http.Request) { }, }, } - + gatewayClient, err := h.gatewaySelector.Next() + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error getting gateway client", err) + return + } providerAllowedResp, err := gatewayClient.IsProviderAllowed(ctx, &ocmprovider.IsProviderAllowedRequest{ Provider: &providerInfo, }) if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc is provider allowed request", err) + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc is provider allowed request", err) return } if providerAllowedResp.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorUnauthenticated, "provider not authorized", errors.New(providerAllowedResp.Status.Message)) + reqres.WriteError(w, r, reqres.APIErrorUnauthenticated, "provider not authorized", errors.New(providerAllowedResp.Status.Message)) + return + } + + shareWith, _, err := getIDAndMeshProvider(req.ShareWith) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) return } - shareWithParts := strings.Split(shareWith, "@") userRes, err := gatewayClient.GetUser(ctx, &userpb.GetUserRequest{ - UserId: &userpb.UserId{OpaqueId: shareWithParts[0]}, SkipFetchingUserGroups: true, + UserId: &userpb.UserId{OpaqueId: shareWith}, SkipFetchingUserGroups: true, }) if err != nil { - WriteError(w, r, APIErrorServerError, "error searching recipient", err) + reqres.WriteError(w, r, reqres.APIErrorServerError, "error searching recipient", err) return } if userRes.Status.Code != rpc.Code_CODE_OK { - WriteError(w, r, APIErrorNotFound, "user not found", errors.New(userRes.Status.Message)) + reqres.WriteError(w, r, reqres.APIErrorNotFound, "user not found", errors.New(userRes.Status.Message)) return } - var permissions conversions.Permissions - var token string - options, ok := protocol["options"].(map[string]interface{}) - if !ok { - WriteError(w, r, APIErrorInvalidParameter, "protocol: webdav token not provided", nil) - return - } - - token, ok = options["sharedSecret"].(string) - if !ok { - token, ok = options["token"].(string) - if !ok { - WriteError(w, r, APIErrorInvalidParameter, "protocol: webdav token not provided", nil) - return - } - } - var role *conversions.Role - pval, ok := options["permissions"].(int) - if !ok { - WriteError(w, r, APIErrorInvalidParameter, "permissions not provided", nil) - return - } - - permissions, err = conversions.NewPermissions(pval) + owner, err := getUserIDFromOCMUser(req.Owner) if err != nil { - WriteError(w, r, APIErrorInvalidParameter, err.Error(), nil) + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) return } - role = conversions.RoleFromOCSPermissions(permissions) - val, err := json.Marshal(role.CS3ResourcePermissions()) + sender, err := getUserIDFromOCMUser(req.Sender) if err != nil { - WriteError(w, r, APIErrorServerError, "could not encode role", nil) + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, err.Error(), nil) return } - ownerID := &userpb.UserId{ - OpaqueId: owner, - Idp: meshProvider, - Type: userpb.UserType_USER_TYPE_PRIMARY, - } createShareReq := &ocmcore.CreateOCMCoreShareRequest{ - Name: resource, - ProviderId: providerID, - Owner: ownerID, - ShareWith: userRes.User.GetId(), - Protocol: &ocmcore.Protocol{ - Name: protocol["name"].(string), - Opaque: &types.Opaque{ - Map: map[string]*types.OpaqueEntry{ - "permissions": { - Decoder: "json", - Value: val, - }, - "token": { - Decoder: "plain", - Value: []byte(token), - }, - }, - }, - }, + Description: req.Description, + Name: req.Name, + ResourceId: req.ProviderID, + Owner: owner, + Sender: sender, + ShareWith: userRes.User.Id, + ResourceType: getResourceTypeFromOCMRequest(req.ResourceType), + ShareType: getOCMShareType(req.ShareType), + Protocols: getProtocols(req.Protocols), } - createShareResponse, err := gatewayClient.CreateOCMCoreShare(ctx, createShareReq) - if err != nil { - WriteError(w, r, APIErrorServerError, "error sending a grpc create ocm core share request", err) - return - } - if createShareResponse.Status.Code != rpc.Code_CODE_OK { - if createShareResponse.Status.Code == rpc.Code_CODE_NOT_FOUND { - WriteError(w, r, APIErrorNotFound, "not found", nil) - return + + if req.Expiration != 0 { + createShareReq.Expiration = &types.Timestamp{ + Seconds: req.Expiration, } - WriteError(w, r, APIErrorServerError, "grpc create ocm core share request failed", errors.New(createShareResponse.Status.Message)) - return } - timeCreated := createShareResponse.Created - jsonOut, err := json.Marshal( - map[string]string{ - "id": createShareResponse.Id, - "createdAt": time.Unix(int64(timeCreated.Seconds), int64(timeCreated.Nanos)).String(), - }, - ) + createShareResp, err := gatewayClient.CreateOCMCoreShare(ctx, createShareReq) if err != nil { - WriteError(w, r, APIErrorServerError, "error marshalling share data", err) + reqres.WriteError(w, r, reqres.APIErrorServerError, "error creating ocm share", err) return } + if userRes.Status.Code != rpc.Code_CODE_OK { + // TODO: define errors in the cs3apis + reqres.WriteError(w, r, reqres.APIErrorServerError, "error creating ocm share", errors.New(createShareResp.Status.Message)) + return + } + + response := map[string]any{} + + if h.exposeRecipientDisplayName { + response["recipientDisplayName"] = userRes.User.DisplayName + } + + _ = json.NewEncoder(w).Encode(response) w.WriteHeader(http.StatusCreated) - w.Header().Set("Content-Type", "application/json") - - _, err = w.Write(jsonOut) - if err != nil { - WriteError(w, r, APIErrorServerError, "error writing shares data", err) - return - } - - log.Info().Msg("Share created.") +} + +func getUserIDFromOCMUser(user string) (*userpb.UserId, error) { + id, idp, err := getIDAndMeshProvider(user) + if err != nil { + return nil, err + } + return &userpb.UserId{ + OpaqueId: id, + Idp: idp, + // the remote user is a federated account for the local reva + Type: userpb.UserType_USER_TYPE_FEDERATED, + }, nil +} + +func getIDAndMeshProvider(user string) (string, string, error) { + // the user is in the form of dimitri@apiwise.nl + split := strings.Split(user, "@") + if len(split) < 2 { + return "", "", errors.New("not in the form @") + } + return strings.Join(split[:len(split)-1], "@"), split[len(split)-1], nil +} + +func getCreateShareRequest(r *http.Request) (*createShareRequest, error) { + var req createShareRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return nil, err + } + } else { + return nil, errors.New("body request not recognised") + } + // validate the request + if err := validate.Struct(req); err != nil { + return nil, err + } + return &req, nil +} + +func getResourceTypeFromOCMRequest(t string) providerpb.ResourceType { + switch t { + case "file": + return providerpb.ResourceType_RESOURCE_TYPE_FILE + case "folder": + return providerpb.ResourceType_RESOURCE_TYPE_CONTAINER + default: + return providerpb.ResourceType_RESOURCE_TYPE_INVALID + } +} + +func getOCMShareType(t string) ocm.ShareType { + if t == "user" { + return ocm.ShareType_SHARE_TYPE_USER + } + return ocm.ShareType_SHARE_TYPE_GROUP +} + +func getProtocols(p Protocols) []*ocm.Protocol { + prot := make([]*ocm.Protocol, 0, len(p)) + for _, data := range p { + prot = append(prot, data.ToOCMProtocol()) + } + return prot } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/config/config.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/config/config.go index 2e00de97d2..77c0153d78 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/config/config.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/config/config.go @@ -16,6 +16,7 @@ type Config struct { // /users///docs WebdavNamespace string `mapstructure:"webdav_namespace"` SharesNamespace string `mapstructure:"shares_namespace"` + OCMNamespace string `mapstructure:"ocm_namespace"` GatewaySvc string `mapstructure:"gatewaysvc"` Timeout int64 `mapstructure:"timeout"` Insecure bool `mapstructure:"insecure"` diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/dav.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/dav.go index 6a2d66b911..93e12da1de 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/dav.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/dav.go @@ -22,6 +22,7 @@ import ( "context" "net/http" "path" + "path/filepath" "strings" gatewayv1beta1 "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" @@ -56,6 +57,7 @@ type DavHandler struct { PublicFolderHandler *WebDavHandler PublicFileHandler *PublicFileHandler SharesHandler *WebDavHandler + OCMSharesHandler *WebDavHandler } func (h *DavHandler) init(c *config.Config) error { @@ -95,6 +97,11 @@ func (h *DavHandler) init(c *config.Config) error { return err } + h.OCMSharesHandler = new(WebDavHandler) + if err := h.OCMSharesHandler.init(c.OCMNamespace, true); err != nil { + return err + } + return nil } @@ -170,6 +177,60 @@ func (h *DavHandler) Handler(s *svc) http.Handler { ctx = context.WithValue(ctx, net.CtxKeyBaseURI, base) r = r.WithContext(ctx) h.MetaHandler.Handler(s).ServeHTTP(w, r) + case "ocm": + base := path.Join(ctx.Value(net.CtxKeyBaseURI).(string), "ocm") + ctx := context.WithValue(ctx, net.CtxKeyBaseURI, base) + c, err := s.gatewaySelector.Next() + if err != nil { + w.WriteHeader(http.StatusNotFound) + return + } + + // OC10 and Nextcloud (OCM 1.0) are using basic auth for carrying the + // shared token. + var token string + username, _, ok := r.BasicAuth() + if ok { + // OCM 1.0 + token = username + r.URL.Path = filepath.Join("/", token, r.URL.Path) + ctx = context.WithValue(ctx, net.CtxOCM10, true) + } else { + token, _ = router.ShiftPath(r.URL.Path) + ctx = context.WithValue(ctx, net.CtxOCM10, false) + } + + authRes, err := handleOCMAuth(ctx, c, token) + switch { + case err != nil: + log.Error().Err(err).Msg("error during ocm authentication") + w.WriteHeader(http.StatusInternalServerError) + return + case authRes.Status.Code == rpc.Code_CODE_PERMISSION_DENIED: + log.Debug().Str("token", token).Msg("permission denied") + fallthrough + case authRes.Status.Code == rpc.Code_CODE_UNAUTHENTICATED: + log.Debug().Str("token", token).Msg("unauthorized") + w.WriteHeader(http.StatusUnauthorized) + return + case authRes.Status.Code == rpc.Code_CODE_NOT_FOUND: + log.Debug().Str("token", token).Msg("not found") + w.WriteHeader(http.StatusNotFound) + return + case authRes.Status.Code != rpc.Code_CODE_OK: + log.Error().Str("token", token).Interface("status", authRes.Status).Msg("grpc auth request failed") + w.WriteHeader(http.StatusInternalServerError) + return + } + + ctx = ctxpkg.ContextSetToken(ctx, authRes.Token) + ctx = ctxpkg.ContextSetUser(ctx, authRes.User) + ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.TokenHeader, authRes.Token) + + log.Debug().Str("token", token).Interface("user", authRes.User).Msg("OCM user authenticated") + + r = r.WithContext(ctx) + h.OCMSharesHandler.Handler(s).ServeHTTP(w, r) case "trash-bin": base := path.Join(ctx.Value(net.CtxKeyBaseURI).(string), "trash-bin") ctx := context.WithValue(ctx, net.CtxKeyBaseURI, base) @@ -315,3 +376,10 @@ func handleSignatureAuth(ctx context.Context, selector pool.Selectable[gatewayv1 return c.Authenticate(ctx, &authenticateRequest) } + +func handleOCMAuth(ctx context.Context, c gatewayv1beta1.GatewayAPIClient, token string) (*gatewayv1beta1.AuthenticateResponse, error) { + return c.Authenticate(ctx, &gatewayv1beta1.AuthenticateRequest{ + Type: "ocmshares", + ClientId: token, + }) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/net/net.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/net/net.go index 8d94ccd4ad..c0080a41d3 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/net/net.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/net/net.go @@ -35,6 +35,7 @@ type ctxKey int const ( // CtxKeyBaseURI is the key of the base URI context field CtxKeyBaseURI ctxKey = iota + CtxOCM10 // NsDav is the Dav ns NsDav = "DAV:" diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/ocdav.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/ocdav.go index 840f6fe3e3..af7c7eb8ac 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/ocdav.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/ocdav.go @@ -157,7 +157,7 @@ func (s *svc) Close() error { } func (s *svc) Unprotected() []string { - return []string{"/status.php", "/status", "/remote.php/dav/public-files/", "/apps/files/", "/index.php/f/", "/index.php/s/"} + return []string{"/status.php", "/status", "/remote.php/dav/public-files/", "/apps/files/", "/index.php/f/", "/index.php/s/", "/remote.php/dav/ocm/", "/dav/ocm/"} } func (s *svc) Handler() http.Handler { diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/config/config.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/config/config.go index 9cb7883e68..01a815d80a 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/config/config.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/config/config.go @@ -47,6 +47,9 @@ type Config struct { MachineAuthAPIKey string `mapstructure:"machine_auth_apikey"` SkipUpdatingExistingSharesMountpoints bool `mapstructure:"skip_updating_existing_shares_mountpoint"` EnableDenials bool `mapstructure:"enable_denials"` + OCMMountPoint string `mapstructure:"ocm_mount_point"` + ListOCMShares bool `mapstructure:"list_ocm_shares"` + Notifications map[string]interface{} `mapstructure:"notifications"` } // Init sets sane defaults diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/main.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/main.go index 7c2b6ac2ad..509068c746 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/main.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/main.go @@ -26,6 +26,8 @@ import ( "path" "time" + "github.com/cs3org/reva/v2/pkg/errtypes" + "github.com/cs3org/reva/v2/pkg/mime" "github.com/cs3org/reva/v2/pkg/publicshare" "github.com/cs3org/reva/v2/pkg/user" @@ -33,6 +35,7 @@ import ( userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1" + ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" publicsharemgr "github.com/cs3org/reva/v2/pkg/publicshare/manager/registry" @@ -303,6 +306,82 @@ func PublicShare2ShareData(share *link.PublicShare, r *http.Request, publicURL s return sd } +func formatRemoteUser(u *userpb.UserId) string { + return fmt.Sprintf("%s@%s", u.OpaqueId, u.Idp) +} + +func webdavInfo(protocols []*ocm.Protocol) (*ocm.WebDAVProtocol, bool) { + for _, p := range protocols { + if opt, ok := p.Term.(*ocm.Protocol_WebdavOptions); ok { + return opt.WebdavOptions, true + } + } + return nil, false +} + +// ReceivedOCMShare2ShareData converts a cs3 ocm received share into a share data model. +func ReceivedOCMShare2ShareData(share *ocm.ReceivedShare, path string) (*ShareData, error) { + webdav, ok := webdavInfo(share.Protocols) + if !ok { + return nil, errtypes.InternalError("webdav endpoint not in share") + } + + s := &ShareData{ + ID: share.Id.OpaqueId, + UIDOwner: formatRemoteUser(share.Creator), + UIDFileOwner: formatRemoteUser(share.Owner), + ShareWith: share.Grantee.GetUserId().OpaqueId, + Permissions: RoleFromResourcePermissions(webdav.GetPermissions().GetPermissions(), false).OCSPermissions(), + ShareType: ShareTypeFederatedCloudShare, + Path: path, + FileTarget: path, + MimeType: mime.Detect(share.ResourceType == provider.ResourceType_RESOURCE_TYPE_CONTAINER, share.Name), + ItemType: ResourceType(share.ResourceType).String(), + ItemSource: path, + STime: share.Ctime.Seconds, + Name: share.Name, + } + + if share.Expiration != nil { + s.Expiration = timestampToExpiration(share.Expiration) + } + return s, nil +} + +func webdavAMInfo(methods []*ocm.AccessMethod) (*ocm.WebDAVAccessMethod, bool) { + for _, a := range methods { + if opt, ok := a.Term.(*ocm.AccessMethod_WebdavOptions); ok { + return opt.WebdavOptions, true + } + } + return nil, false +} + +// OCMShare2ShareData converts a cs3 ocm share into a share data model. +func OCMShare2ShareData(share *ocm.Share) (*ShareData, error) { + webdav, ok := webdavAMInfo(share.AccessMethods) + if !ok { + return nil, errtypes.InternalError("webdav endpoint not in share") + } + + s := &ShareData{ + ID: share.Id.OpaqueId, + UIDOwner: share.Creator.OpaqueId, + UIDFileOwner: share.Owner.OpaqueId, + ShareWith: formatRemoteUser(share.Grantee.GetUserId()), + Permissions: RoleFromResourcePermissions(webdav.GetPermissions(), false).OCSPermissions(), + ShareType: ShareTypeFederatedCloudShare, + STime: share.Ctime.Seconds, + Name: share.Name, + } + + if share.Expiration != nil { + s.Expiration = timestampToExpiration(share.Expiration) + } + + return s, nil +} + // LocalUserIDToString transforms a cs3api user id into an ocs data model without domain name // TODO ocs uses user names ... so an additional lookup is needed. see mapUserIds() func LocalUserIDToString(userID *userpb.UserId) string { diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/role.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/role.go index eb42ca6077..6971957c8f 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/role.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions/role.go @@ -45,6 +45,8 @@ const ( RoleSpaceEditor = "spaceeditor" // RoleFileEditor grants editor permission on a single file. RoleFileEditor = "file-editor" + // RoleCoowner grants co-owner permissions on a resource. + RoleCoowner = "coowner" // RoleUploader grants uploader permission to upload onto a resource. RoleUploader = "uploader" // RoleManager grants manager permissions on a resource. Semantically equivalent to co-owner. @@ -286,6 +288,34 @@ func NewFileEditorRole() *Role { } } +// NewCoownerRole creates a coowner role. +func NewCoownerRole() *Role { + return &Role{ + Name: RoleCoowner, + cS3ResourcePermissions: &provider.ResourcePermissions{ + GetPath: true, + GetQuota: true, + InitiateFileDownload: true, + ListGrants: true, + ListContainer: true, + ListFileVersions: true, + ListRecycle: true, + Stat: true, + InitiateFileUpload: true, + RestoreFileVersion: true, + RestoreRecycleItem: true, + CreateContainer: true, + Delete: true, + Move: true, + PurgeRecycle: true, + AddGrant: true, + UpdateGrant: true, + RemoveGrant: true, + }, + ocsPermissions: PermissionAll, + } +} + // NewUploaderRole creates an uploader role func NewUploaderRole() *Role { return &Role{ diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go index cb4afe9d9b..14e8155146 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,24 +19,28 @@ package shares import ( + "context" "net/http" - "strconv" + "path/filepath" + "strings" + providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1" + gatewayv1beta1 "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" invitepb "github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1" - ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" - types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - "github.com/go-chi/chi/v5" - "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/response" + "github.com/cs3org/reva/v2/pkg/ocm/share" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/go-chi/chi/v5" + "github.com/pkg/errors" ) -func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Request, statInfo *provider.ResourceInfo, role *conversions.Role, roleVal []byte) { +func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Request, resource *provider.ResourceInfo, role *conversions.Role, roleVal []byte) { ctx := r.Context() c, err := pool.GetGatewayServiceClient(h.gatewayAddr) @@ -51,7 +55,7 @@ func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Reque return } - providerInfoResp, err := c.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ + providerInfoResp, err := c.GetInfoByDomain(ctx, &providerpb.GetInfoByDomainRequest{ Domain: shareWithProvider, }) if err != nil { @@ -59,8 +63,14 @@ func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Reque return } + if providerInfoResp.Status.Code != rpc.Code_CODE_OK { + // return proper error + response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error from provider info response", errors.New(providerInfoResp.Status.Message)) + return + } + remoteUserRes, err := c.GetAcceptedUser(ctx, &invitepb.GetAcceptedUserRequest{ - RemoteUserId: &userpb.UserId{OpaqueId: shareWithUser, Idp: shareWithProvider, Type: userpb.UserType_USER_TYPE_PRIMARY}, + RemoteUserId: &userpb.UserId{OpaqueId: shareWithUser, Idp: shareWithProvider, Type: userpb.UserType_USER_TYPE_FEDERATED}, }) if err != nil { response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error searching recipient", err) @@ -71,39 +81,20 @@ func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Reque return } - createShareReq := &ocm.CreateOCMShareRequest{ - Opaque: &types.Opaque{ - Map: map[string]*types.OpaqueEntry{ - /* TODO extend the spec with role names? - "role": { - Decoder: "plain", - Value: []byte(role.Name), - }, - */ - "permissions": { - Decoder: "plain", - Value: []byte(strconv.Itoa(int(role.OCSPermissions()))), - }, - "name": { - Decoder: "plain", - Value: []byte(statInfo.Path), - }, - }, - }, - ResourceId: statInfo.Id, - Grant: &ocm.ShareGrant{ - Grantee: &provider.Grantee{ - Type: provider.GranteeType_GRANTEE_TYPE_USER, - Id: &provider.Grantee_UserId{UserId: remoteUserRes.RemoteUser.GetId()}, - }, - Permissions: &ocm.SharePermissions{ - Permissions: role.CS3ResourcePermissions(), + createShareResponse, err := c.CreateOCMShare(ctx, &ocm.CreateOCMShareRequest{ + ResourceId: resource.Id, + Grantee: &provider.Grantee{ + Type: provider.GranteeType_GRANTEE_TYPE_USER, + Id: &provider.Grantee_UserId{ + UserId: remoteUserRes.RemoteUser.Id, }, }, RecipientMeshProvider: providerInfoResp.ProviderInfo, - } - - createShareResponse, err := c.CreateOCMShare(ctx, createShareReq) + AccessMethods: []*ocm.AccessMethod{ + share.NewWebDavAccessMethod(role.CS3ResourcePermissions()), + share.NewWebappAccessMethod(getViewModeFromRole(role)), + }, + }) if err != nil { response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error sending a grpc create ocm share request", err) return @@ -117,12 +108,41 @@ func (h *Handler) createFederatedCloudShare(w http.ResponseWriter, r *http.Reque return } - response.WriteOCSSuccess(w, r, "OCM Share created") + s := createShareResponse.Share + data, err := conversions.OCMShare2ShareData(s) + if err != nil { + response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error converting share", err) + return + } + h.mapUserIdsFederatedShare(ctx, c, data) + + info, status, err := h.getResourceInfoByID(ctx, c, s.ResourceId) + if err != nil { + response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error statting resource id", err) + return + } + if status.Code != rpc.Code_CODE_OK { + response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error statting resource id", errors.New(status.Message)) + return + } + + h.addFileInfo(ctx, data, info) + + response.WriteOCSSuccess(w, r, data) } -// GetFederatedShare handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares/{shareid} -func (h *Handler) GetFederatedShare(w http.ResponseWriter, r *http.Request) { +func getViewModeFromRole(role *conversions.Role) providerv1beta1.ViewMode { + switch role.Name { + case conversions.RoleViewer: + return providerv1beta1.ViewMode_VIEW_MODE_READ_ONLY + case conversions.RoleEditor: + return providerv1beta1.ViewMode_VIEW_MODE_READ_WRITE + } + return providerv1beta1.ViewMode_VIEW_MODE_INVALID +} +// GetFederatedShare handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares/{shareid}. +func (h *Handler) GetFederatedShare(w http.ResponseWriter, r *http.Request) { // TODO: Implement response with HAL schemating ctx := r.Context() @@ -156,28 +176,125 @@ func (h *Handler) GetFederatedShare(w http.ResponseWriter, r *http.Request) { response.WriteOCSSuccess(w, r, share) } -// ListFederatedShares handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares +// ListFederatedShares handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares. func (h *Handler) ListFederatedShares(w http.ResponseWriter, r *http.Request) { - // TODO Implement pagination. // TODO Implement response with HAL schemating - ctx := r.Context() - - gatewayClient, err := pool.GetGatewayServiceClient(h.gatewayAddr) - if err != nil { - response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error getting grpc gateway client", err) - return - } - - listOCMSharesResponse, err := gatewayClient.ListOCMShares(ctx, &ocm.ListOCMSharesRequest{}) - if err != nil { - response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error sending a grpc list ocm share request", err) - return - } - - shares := listOCMSharesResponse.GetShares() - if shares == nil { - shares = make([]*ocm.Share, 0) - } - response.WriteOCSSuccess(w, r, shares) +} + +func (h *Handler) listReceivedFederatedShares(ctx context.Context, gw gatewayv1beta1.GatewayAPIClient, state ocm.ShareState) ([]*conversions.ShareData, error) { + listRes, err := gw.ListReceivedOCMShares(ctx, &ocm.ListReceivedOCMSharesRequest{}) + if err != nil { + return nil, err + } + + shares := []*conversions.ShareData{} + for _, s := range listRes.Shares { + if state != ocsStateUnknown && s.State != state { + continue + } + sd, err := conversions.ReceivedOCMShare2ShareData(s, h.ocmLocalMount(s)) + if err != nil { + continue + } + h.mapUserIdsReceivedFederatedShare(ctx, gw, sd) + sd.State = mapOCMState(s.State) + shares = append(shares, sd) + } + return shares, nil +} + +func (h *Handler) ocmLocalMount(share *ocm.ReceivedShare) string { + return filepath.Join("/", h.ocmMountPoint, share.Id.OpaqueId) +} + +func (h *Handler) mapUserIdsReceivedFederatedShare(ctx context.Context, gw gatewayv1beta1.GatewayAPIClient, sd *conversions.ShareData) { + if sd.ShareWith != "" { + user := h.mustGetIdentifiers(ctx, gw, sd.ShareWith, false) + sd.ShareWith = user.Username + sd.ShareWithDisplayname = user.DisplayName + } + + if sd.UIDOwner != "" { + user := h.mustGetRemoteUser(ctx, gw, sd.UIDOwner) + sd.DisplaynameOwner = user.DisplayName + } + + if sd.UIDFileOwner != "" { + user := h.mustGetRemoteUser(ctx, gw, sd.UIDFileOwner) + sd.DisplaynameFileOwner = user.DisplayName + } +} + +func (h *Handler) mapUserIdsFederatedShare(ctx context.Context, gw gatewayv1beta1.GatewayAPIClient, sd *conversions.ShareData) { + if sd.ShareWith != "" { + user := h.mustGetRemoteUser(ctx, gw, sd.ShareWith) + sd.ShareWith = user.Username + sd.ShareWithDisplayname = user.DisplayName + } + + if sd.UIDOwner != "" { + user := h.mustGetIdentifiers(ctx, gw, sd.UIDOwner, false) + sd.DisplaynameOwner = user.DisplayName + } + + if sd.UIDFileOwner != "" { + user := h.mustGetIdentifiers(ctx, gw, sd.UIDFileOwner, false) + sd.DisplaynameFileOwner = user.DisplayName + } +} + +func (h *Handler) mustGetRemoteUser(ctx context.Context, gw gatewayv1beta1.GatewayAPIClient, id string) *userIdentifiers { + s := strings.SplitN(id, "@", 2) + opaqueID, idp := s[0], s[1] + userRes, err := gw.GetAcceptedUser(ctx, &invitepb.GetAcceptedUserRequest{ + RemoteUserId: &userpb.UserId{ + Idp: idp, + OpaqueId: opaqueID, + }, + }) + if err != nil { + return &userIdentifiers{} + } + if userRes.Status.Code != rpc.Code_CODE_OK { + return &userIdentifiers{} + } + + user := userRes.RemoteUser + return &userIdentifiers{ + DisplayName: user.DisplayName, + Username: user.Username, + Mail: user.Mail, + } +} + +func (h *Handler) listOutcomingFederatedShares(ctx context.Context, gw gatewayv1beta1.GatewayAPIClient, filters []*ocm.ListOCMSharesRequest_Filter) ([]*conversions.ShareData, error) { + listRes, err := gw.ListOCMShares(ctx, &ocm.ListOCMSharesRequest{ + Filters: filters, + }) + if err != nil { + return nil, err + } + + shares := []*conversions.ShareData{} + for _, s := range listRes.Shares { + sd, err := conversions.OCMShare2ShareData(s) + if err != nil { + continue + } + h.mapUserIdsFederatedShare(ctx, gw, sd) + + info, status, err := h.getResourceInfoByID(ctx, gw, s.ResourceId) + if err != nil { + return nil, err + } + + if status.Code != rpc.Code_CODE_OK { + return nil, err + } + + h.addFileInfo(ctx, sd, info) + shares = append(shares, sd) + } + return shares, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index f2c0737bb2..4d3674f926 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -46,6 +46,7 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/protobuf/types/known/fieldmaskpb" + ocmv1beta1 "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/config" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/response" @@ -82,6 +83,8 @@ type Handler struct { publicURL string sharePrefix string homeNamespace string + ocmMountPoint string + listOCMShares bool skipUpdatingExistingSharesMountpoints bool additionalInfoTemplate *template.Template userIdentifierCache *ttlcache.Cache @@ -132,6 +135,8 @@ func (h *Handler) Init(c *config.Config) error { h.publicURL = c.Config.Host h.sharePrefix = c.SharePrefix h.homeNamespace = c.HomeNamespace + h.ocmMountPoint = c.OCMMountPoint + h.listOCMShares = c.ListOCMShares h.skipUpdatingExistingSharesMountpoints = c.SkipUpdatingExistingSharesMountpoints h.additionalInfoTemplate, _ = template.New("additionalInfo").Parse(c.AdditionalInfoAttribute) @@ -861,7 +866,8 @@ const ( func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) { // which pending state to list - stateFilter := getStateFilter(r.FormValue("state")) + state := r.FormValue("state") + stateFilter := getStateFilter(state) showHidden, _ := strconv.ParseBool(r.URL.Query().Get("show_hidden")) @@ -1037,6 +1043,18 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) { sublog.Debug().Msgf("share: %+v", *data) } + if h.listOCMShares { + // include ocm shares in the response + stateFilter := getOCMStateFilter(state) + lst, err := h.listReceivedFederatedShares(ctx, client, stateFilter) + if err != nil { + sublog.Err(err).Msg("error listing received ocm shares") + response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error listing received ocm shares", err) + return + } + shares = append(shares, lst...) + } + response.WriteOCSSuccess(w, r, shares) } @@ -1520,6 +1538,19 @@ func mapState(state collaboration.ShareState) int { return mapped } +func mapOCMState(state ocmv1beta1.ShareState) int { + switch state { + case ocmv1beta1.ShareState_SHARE_STATE_PENDING: + return ocsStatePending + case ocmv1beta1.ShareState_SHARE_STATE_ACCEPTED: + return ocsStateAccepted + case ocmv1beta1.ShareState_SHARE_STATE_REJECTED: + return ocsStateRejected + default: + return ocsStateUnknown + } +} + func getStateFilter(s string) collaboration.ShareState { var stateFilter collaboration.ShareState switch s { @@ -1537,6 +1568,21 @@ func getStateFilter(s string) collaboration.ShareState { return stateFilter } +func getOCMStateFilter(s string) ocmv1beta1.ShareState { + switch s { + case "all": + return ocsStateUnknown // no filter + case "0": // accepted + return ocmv1beta1.ShareState_SHARE_STATE_ACCEPTED + case "1": // pending + return ocmv1beta1.ShareState_SHARE_STATE_PENDING + case "2": // rejected + return ocmv1beta1.ShareState_SHARE_STATE_REJECTED + default: + return ocmv1beta1.ShareState_SHARE_STATE_ACCEPTED + } +} + func (h *Handler) getPoolClient() (gateway.GatewayAPIClient, error) { return pool.GetGatewayServiceClient(h.gatewayAddr) } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go index 14037c3510..8b535be7f7 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go @@ -25,6 +25,7 @@ import ( userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" + ocmpb "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" @@ -252,7 +253,46 @@ func (h *Handler) listUserShares(r *http.Request, filters []*collaboration.Filte log.Debug().Interface("share", s).Interface("info", info).Interface("shareData", data).Msg("mapped") ocsDataPayload = append(ocsDataPayload, data) } + + if h.listOCMShares { + // include the ocm shares + ocmShares, err := h.listOutcomingFederatedShares(ctx, client, convertToOCMFilters(filters)) + if err != nil { + return nil, nil, err + } + ocsDataPayload = append(ocsDataPayload, ocmShares...) + } } return ocsDataPayload, nil, nil } + +func convertToOCMFilters(filters []*collaboration.Filter) []*ocmpb.ListOCMSharesRequest_Filter { + ocmfilters := []*ocmpb.ListOCMSharesRequest_Filter{} + for _, f := range filters { + switch v := f.Term.(type) { + case *collaboration.Filter_ResourceId: + ocmfilters = append(ocmfilters, &ocmpb.ListOCMSharesRequest_Filter{ + Type: ocmpb.ListOCMSharesRequest_Filter_TYPE_RESOURCE_ID, + Term: &ocmpb.ListOCMSharesRequest_Filter_ResourceId{ + ResourceId: v.ResourceId, + }, + }) + case *collaboration.Filter_Creator: + ocmfilters = append(ocmfilters, &ocmpb.ListOCMSharesRequest_Filter{ + Type: ocmpb.ListOCMSharesRequest_Filter_TYPE_CREATOR, + Term: &ocmpb.ListOCMSharesRequest_Filter_Creator{ + Creator: v.Creator, + }, + }) + case *collaboration.Filter_Owner: + ocmfilters = append(ocmfilters, &ocmpb.ListOCMSharesRequest_Filter{ + Type: ocmpb.ListOCMSharesRequest_Filter_TYPE_OWNER, + Term: &ocmpb.ListOCMSharesRequest_Filter_Owner{ + Owner: v.Owner, + }, + }) + } + } + return ocmfilters +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/reqres.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/reqres/reqres.go similarity index 87% rename from vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/reqres.go rename to vendor/github.com/cs3org/reva/v2/internal/http/services/reqres/reqres.go index f0fd55be9e..acd0ee822f 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/reqres.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/reqres/reqres.go @@ -1,4 +1,4 @@ -// Copyright 2018-2021 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package ocmd +package reqres import ( "encoding/json" @@ -25,10 +25,10 @@ import ( "github.com/cs3org/reva/v2/pkg/appctx" ) -// APIErrorCode stores the type of error encountered +// APIErrorCode stores the type of error encountered. type APIErrorCode string -// The various types of errors that can be expected to occur +// The various types of errors that can be expected to occur. const ( APIErrorNotFound APIErrorCode = "RESOURCE_NOT_FOUND" APIErrorUnauthenticated APIErrorCode = "UNAUTHENTICATED" @@ -36,10 +36,11 @@ const ( APIErrorUnimplemented APIErrorCode = "FUNCTION_NOT_IMPLEMENTED" APIErrorInvalidParameter APIErrorCode = "INVALID_PARAMETER" APIErrorProviderError APIErrorCode = "PROVIDER_ERROR" + APIErrorAlreadyExist APIErrorCode = "ALREADY_EXIST" APIErrorServerError APIErrorCode = "SERVER_ERROR" ) -// APIErrorCodeMapping stores the HTTP error code mapping for various APIErrorCodes +// APIErrorCodeMapping stores the HTTP error code mapping for various APIErrorCodes. var APIErrorCodeMapping = map[APIErrorCode]int{ APIErrorNotFound: http.StatusNotFound, APIErrorUnauthenticated: http.StatusUnauthorized, @@ -47,16 +48,17 @@ var APIErrorCodeMapping = map[APIErrorCode]int{ APIErrorUnimplemented: http.StatusNotImplemented, APIErrorInvalidParameter: http.StatusBadRequest, APIErrorProviderError: http.StatusBadGateway, + APIErrorAlreadyExist: http.StatusConflict, APIErrorServerError: http.StatusInternalServerError, } -// APIError encompasses the error type and message +// APIError encompasses the error type and message. type APIError struct { Code APIErrorCode `json:"code"` Message string `json:"message"` } -// WriteError handles writing error responses +// WriteError handles writing error responses. func WriteError(w http.ResponseWriter, r *http.Request, code APIErrorCode, message string, e error) { if e != nil { appctx.GetLogger(r.Context()).Error().Err(e).Msg(message) diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/apps.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/apps.go new file mode 100644 index 0000000000..2c4bf356c1 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/apps.go @@ -0,0 +1,139 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "context" + "encoding/json" + "errors" + "net/http" + "strings" + + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + ocmpb "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/reqres" + "github.com/cs3org/reva/v2/pkg/errtypes" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/rhttp/router" +) + +type appsHandler struct { + gatewayClient gateway.GatewayAPIClient + ocmMountPoint string +} + +func (h *appsHandler) init(c *config) error { + var err error + h.gatewayClient, err = pool.GetGatewayServiceClient(c.GatewaySvc) + if err != nil { + return err + } + h.ocmMountPoint = c.OCMMountPoint + + return nil +} + +func (h *appsHandler) shareInfo(p string) (*ocmpb.ShareId, string) { + p = strings.TrimPrefix(p, h.ocmMountPoint) + shareID, rel := router.ShiftPath(p) + if len(rel) > 0 { + rel = rel[1:] + } + return &ocmpb.ShareId{OpaqueId: shareID}, rel +} + +func (h *appsHandler) OpenInApp(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + if err := r.ParseForm(); err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "parameters could not be parsed", nil) + return + } + + path := r.Form.Get("file") + if path == "" { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "missing file", nil) + return + } + + shareID, rel := h.shareInfo(path) + + template, err := h.webappTemplate(ctx, shareID) + if err != nil { + var e errtypes.NotFound + if errors.As(err, &e) { + reqres.WriteError(w, r, reqres.APIErrorNotFound, e.Error(), nil) + } + reqres.WriteError(w, r, reqres.APIErrorServerError, err.Error(), err) + return + } + + url := resolveTemplate(template, rel) + + if err := json.NewEncoder(w).Encode(map[string]any{ + "app_url": url, + }); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error marshalling JSON response", err) + return + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) +} + +func (h *appsHandler) webappTemplate(ctx context.Context, id *ocmpb.ShareId) (string, error) { + res, err := h.gatewayClient.GetReceivedOCMShare(ctx, &ocmpb.GetReceivedOCMShareRequest{ + Ref: &ocmpb.ShareReference{ + Spec: &ocmpb.ShareReference_Id{ + Id: id, + }, + }, + }) + if err != nil { + return "", err + } + if res.Status.Code != rpcv1beta1.Code_CODE_OK { + if res.Status.Code == rpcv1beta1.Code_CODE_NOT_FOUND { + return "", errtypes.NotFound(res.Status.Message) + } + return "", errtypes.InternalError(res.Status.Message) + } + + webapp, ok := getWebappProtocol(res.Share.Protocols) + if !ok { + return "", errtypes.BadRequest("share does not contain webapp protocol") + } + + return webapp.UriTemplate, nil +} + +func getWebappProtocol(protocols []*ocmpb.Protocol) (*ocmpb.WebappProtocol, bool) { + for _, p := range protocols { + if t, ok := p.Term.(*ocmpb.Protocol_WebappOptions); ok { + return t.WebappOptions, true + } + } + return nil, false +} + +func resolveTemplate(template string, rel string) string { + // the template is of type "https://open-cloud-mesh.org/s/share-hash/{relative-path-to-shared-resource}" + return strings.Replace(template, "{relative-path-to-shared-resource}", rel, 1) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/email.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/email.go new file mode 100644 index 0000000000..239c89ba5d --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/email.go @@ -0,0 +1,119 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "bytes" + "html/template" + "io" + "os" + + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" +) + +type emailParams struct { + User *userpb.User + Token string + MeshDirectoryURL string + InviteLink string +} + +const defaultSubject = `ScienceMesh: {{.User.DisplayName}} wants to collaborate with you` + +const defaultBody = `Hi + +{{.User.DisplayName}} ({{.User.Mail}}) wants to start sharing OCM resources with you. +To accept the invite, please visit the following URL: +{{.InviteLink}} + +Alternatively, you can visit your mesh provider and use the following details: +Token: {{.Token}} +ProviderDomain: {{.User.Id.Idp}} + +Best, +The ScienceMesh team` + +func (h *tokenHandler) sendEmail(recipient string, obj *emailParams) error { + subj, err := h.generateEmailSubject(obj) + if err != nil { + return err + } + + body, err := h.generateEmailBody(obj) + if err != nil { + return err + } + + return h.smtpCredentials.SendMail(recipient, subj, body) +} + +func (h *tokenHandler) generateEmailSubject(obj *emailParams) (string, error) { + var buf bytes.Buffer + err := h.tplSubj.Execute(&buf, obj) + return buf.String(), err +} + +func (h *tokenHandler) generateEmailBody(obj *emailParams) (string, error) { + var buf bytes.Buffer + err := h.tplBody.Execute(&buf, obj) + return buf.String(), err +} + +func (h *tokenHandler) initBodyTemplate(bodyTemplPath string) error { + var body string + if bodyTemplPath == "" { + body = defaultBody + } else { + f, err := os.Open(bodyTemplPath) + if err != nil { + return err + } + defer f.Close() + + data, err := io.ReadAll(f) + if err != nil { + return err + } + body = string(data) + } + + tpl, err := template.New("tpl_body").Parse(body) + if err != nil { + return err + } + + h.tplBody = tpl + return nil +} + +func (h *tokenHandler) initSubjectTemplate(subjTempl string) error { + var subj string + if subjTempl == "" { + subj = defaultSubject + } else { + subj = subjTempl + } + + tpl, err := template.New("tpl_subj").Parse(subj) + if err != nil { + return err + } + h.tplSubj = tpl + return nil +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/providers.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/providers.go new file mode 100644 index 0000000000..72d8515d4a --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/providers.go @@ -0,0 +1,87 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "encoding/json" + "errors" + "net/http" + "strings" + + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/reqres" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" +) + +type providersHandler struct { + gatewayClient gateway.GatewayAPIClient +} + +func (h *providersHandler) init(c *config) error { + var err error + h.gatewayClient, err = pool.GetGatewayServiceClient(c.GatewaySvc) + if err != nil { + return err + } + + return nil +} + +type provider struct { + FullName string `json:"full_name"` + Domain string `json:"domain"` +} + +// ListProviders lists all the providers filtering by the `search` query parameter. +func (h *providersHandler) ListProviders(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + term := strings.ToLower(r.URL.Query().Get("search")) + + listRes, err := h.gatewayClient.ListAllProviders(ctx, &providerpb.ListAllProvidersRequest{}) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error listing all providers", err) + return + } + + if listRes.Status.Code != rpc.Code_CODE_OK { + reqres.WriteError(w, r, reqres.APIErrorServerError, listRes.Status.Message, errors.New(listRes.Status.Message)) + return + } + + filtered := []*provider{} + for _, p := range listRes.Providers { + if strings.Contains(strings.ToLower(p.FullName), term) || + strings.Contains(strings.ToLower(p.Domain), term) { + filtered = append(filtered, &provider{ + FullName: p.FullName, + Domain: p.Domain, + }) + } + } + + if err := json.NewEncoder(w).Encode(filtered); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error encoding response in json", err) + return + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go new file mode 100644 index 0000000000..67b2f902a9 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go @@ -0,0 +1,136 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "net/http" + + "github.com/cs3org/reva/v2/pkg/appctx" + "github.com/cs3org/reva/v2/pkg/rhttp/global" + "github.com/cs3org/reva/v2/pkg/sharedconf" + "github.com/cs3org/reva/v2/pkg/smtpclient" + "github.com/cs3org/reva/v2/pkg/utils/cfg" + "github.com/go-chi/chi/v5" + "github.com/rs/zerolog" +) + +func init() { + global.Register("sciencemesh", New) +} + +// New returns a new sciencemesh service. +func New(m map[string]interface{}, _ *zerolog.Logger) (global.Service, error) { + var c config + if err := cfg.Decode(m, &c); err != nil { + return nil, err + } + + r := chi.NewRouter() + s := &svc{ + conf: &c, + router: r, + } + + if err := s.routerInit(); err != nil { + return nil, err + } + + return s, nil +} + +// Close performs cleanup. +func (s *svc) Close() error { + return nil +} + +type config struct { + Prefix string `mapstructure:"prefix"` + SMTPCredentials *smtpclient.SMTPCredentials `mapstructure:"smtp_credentials" validate:"required"` + GatewaySvc string `mapstructure:"gatewaysvc" validate:"required"` + MeshDirectoryURL string `mapstructure:"mesh_directory_url" validate:"required"` + ProviderDomain string `mapstructure:"provider_domain" validate:"required"` + SubjectTemplate string `mapstructure:"subject_template"` + BodyTemplatePath string `mapstructure:"body_template_path"` + OCMMountPoint string `mapstructure:"ocm_mount_point"` +} + +func (c *config) ApplyDefaults() { + if c.Prefix == "" { + c.Prefix = "sciencemesh" + } + if c.OCMMountPoint == "" { + c.OCMMountPoint = "/ocm" + } + + c.GatewaySvc = sharedconf.GetGatewaySVC(c.GatewaySvc) +} + +type svc struct { + conf *config + router chi.Router +} + +func (s *svc) routerInit() error { + tokenHandler := new(tokenHandler) + if err := tokenHandler.init(s.conf); err != nil { + return err + } + providersHandler := new(providersHandler) + if err := providersHandler.init(s.conf); err != nil { + return err + } + sharesHandler := new(sharesHandler) + if err := sharesHandler.init(s.conf); err != nil { + return err + } + + appsHandler := new(appsHandler) + if err := appsHandler.init(s.conf); err != nil { + return err + } + + s.router.Get("/generate-invite", tokenHandler.Generate) + s.router.Get("/list-invite", tokenHandler.ListInvite) + s.router.Post("/accept-invite", tokenHandler.AcceptInvite) + s.router.Get("/find-accepted-users", tokenHandler.FindAccepted) + s.router.Delete("/delete-accepted-user", tokenHandler.DeleteAccepted) + s.router.Get("/list-providers", providersHandler.ListProviders) + s.router.Post("/create-share", sharesHandler.CreateShare) + s.router.Post("/open-in-app", appsHandler.OpenInApp) + return nil +} + +func (s *svc) Prefix() string { + return s.conf.Prefix +} + +func (s *svc) Unprotected() []string { + return nil +} + +func (s *svc) Handler() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + log := appctx.GetLogger(r.Context()) + log.Debug().Str("path", r.URL.Path).Msg("sciencemesh routing") + + // unset raw path, otherwise chi uses it to route and then fails to match percent encoded path segments + r.URL.RawPath = "" + s.router.ServeHTTP(w, r) + }) +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/share.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/share.go new file mode 100644 index 0000000000..efb6f3d4a7 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/share.go @@ -0,0 +1,179 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "encoding/json" + "errors" + "mime" + "net/http" + + appprovider "github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" + ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" + providerpb "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" + "github.com/cs3org/reva/v2/internal/http/services/reqres" + "github.com/cs3org/reva/v2/pkg/appctx" + "github.com/cs3org/reva/v2/pkg/ocm/share" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/go-playground/validator/v10" +) + +var validate = validator.New() + +type sharesHandler struct { + gatewayClient gateway.GatewayAPIClient +} + +func (h *sharesHandler) init(c *config) error { + var err error + h.gatewayClient, err = pool.GetGatewayServiceClient(c.GatewaySvc) + return err +} + +type createShareRequest struct { + SourcePath string `json:"sourcePath" validate:"required"` + TargetPath string `json:"targetPath" validate:"required"` + Type string `json:"type"` + Role string `json:"role" validate:"oneof=viewer editor"` + RecipientUsername string `json:"recipientUsername" validate:"required"` + RecipientHost string `json:"recipientHost" validate:"required"` +} + +// CreateShare creates an OCM share. +func (h *sharesHandler) CreateShare(w http.ResponseWriter, r *http.Request) { + log := appctx.GetLogger(r.Context()) + + req, err := getCreateShareRequest(r) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "invalid parameters", err) + return + } + + ctx := r.Context() + + statRes, err := h.gatewayClient.Stat(ctx, &providerpb.StatRequest{ + Ref: &providerpb.Reference{ + Path: req.SourcePath, + }, + }) + switch { + case err != nil: + reqres.WriteError(w, r, reqres.APIErrorServerError, "unexpected error", err) + return + case statRes.Status.Code == rpc.Code_CODE_NOT_FOUND: + reqres.WriteError(w, r, reqres.APIErrorNotFound, statRes.Status.Message, nil) + return + case statRes.Status.Code != rpc.Code_CODE_OK: + reqres.WriteError(w, r, reqres.APIErrorServerError, statRes.Status.Message, errors.New(statRes.Status.Message)) + return + } + + recipientProviderInfo, err := h.gatewayClient.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ + Domain: req.RecipientHost, + }) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc get invite by domain info request", err) + return + } + if recipientProviderInfo.Status.Code != rpc.Code_CODE_OK { + reqres.WriteError(w, r, reqres.APIErrorNotFound, recipientProviderInfo.Status.Message, errors.New(recipientProviderInfo.Status.Message)) + return + } + + perm, viewMode := getPermissionsByRole(req.Role) + + log.Debug().Msg("calling gatewayClient.CreateOCMShare from sciencemesh/share.go") + shareRes, err := h.gatewayClient.CreateOCMShare(ctx, &ocm.CreateOCMShareRequest{ + ResourceId: statRes.Info.Id, + Grantee: &providerpb.Grantee{ + Type: providerpb.GranteeType_GRANTEE_TYPE_USER, + Id: &providerpb.Grantee_UserId{ + UserId: &userpb.UserId{ + Idp: req.RecipientHost, + OpaqueId: req.RecipientUsername, + }, + }, + }, + RecipientMeshProvider: recipientProviderInfo.ProviderInfo, + AccessMethods: []*ocm.AccessMethod{ + share.NewWebDavAccessMethod(perm), + share.NewWebappAccessMethod(viewMode), + }, + }) + log.Debug().Msg("called gatewayClient.CreateOCMShare from sciencemesh/share.go") + + switch { + case err != nil: + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc CreateOCMShare", err) + return + case shareRes.Status.Code == rpc.Code_CODE_NOT_FOUND: + reqres.WriteError(w, r, reqres.APIErrorNotFound, shareRes.Status.Message, nil) + return + case shareRes.Status.Code == rpc.Code_CODE_ALREADY_EXISTS: + reqres.WriteError(w, r, reqres.APIErrorAlreadyExist, shareRes.Status.Message, nil) + return + case shareRes.Status.Code != rpc.Code_CODE_OK: + reqres.WriteError(w, r, reqres.APIErrorAlreadyExist, shareRes.Status.Message, errors.New(shareRes.Status.Message)) + return + } + + if err := json.NewEncoder(w).Encode(shareRes); err != nil { + log.Error().Err(err).Msg("error encoding response") + w.WriteHeader(http.StatusInternalServerError) + return + } + + w.WriteHeader(http.StatusOK) +} + +func getPermissionsByRole(role string) (*providerpb.ResourcePermissions, appprovider.ViewMode) { + switch role { + case "viewer": + return conversions.NewViewerRole(false).CS3ResourcePermissions(), appprovider.ViewMode_VIEW_MODE_READ_ONLY + case "editor": + return conversions.NewEditorRole(false).CS3ResourcePermissions(), appprovider.ViewMode_VIEW_MODE_READ_WRITE + } + return nil, 0 +} + +func getCreateShareRequest(r *http.Request) (*createShareRequest, error) { + var req createShareRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return nil, err + } + } else { + return nil, errors.New("body request not recognised") + } + // set defaults + if req.Type == "" { + req.Type = "viewer" + } + // validate the request + if err := validate.Struct(req); err != nil { + return nil, err + } + return &req, nil +} diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/token.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/token.go new file mode 100644 index 0000000000..946aa97430 --- /dev/null +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/token.go @@ -0,0 +1,324 @@ +// Copyright 2018-2023 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package sciencemesh + +import ( + "encoding/json" + "errors" + "html/template" + "mime" + "net/http" + + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" + invitepb "github.com/cs3org/go-cs3apis/cs3/ocm/invite/v1beta1" + ocmprovider "github.com/cs3org/go-cs3apis/cs3/ocm/provider/v1beta1" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + "github.com/cs3org/reva/v2/internal/http/services/reqres" + "github.com/cs3org/reva/v2/pkg/appctx" + ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" + "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/smtpclient" + "github.com/cs3org/reva/v2/pkg/utils/list" +) + +type tokenHandler struct { + gatewayClient gateway.GatewayAPIClient + smtpCredentials *smtpclient.SMTPCredentials + meshDirectoryURL string + providerDomain string + tplSubj *template.Template + tplBody *template.Template +} + +func (h *tokenHandler) init(c *config) error { + var err error + h.gatewayClient, err = pool.GetGatewayServiceClient(c.GatewaySvc) + if err != nil { + return err + } + + if c.SMTPCredentials != nil { + h.smtpCredentials = smtpclient.NewSMTPCredentials(c.SMTPCredentials) + } + + h.meshDirectoryURL = c.MeshDirectoryURL + h.providerDomain = c.ProviderDomain + + if err := h.initSubjectTemplate(c.SubjectTemplate); err != nil { + return err + } + + if err := h.initBodyTemplate(c.BodyTemplatePath); err != nil { + return err + } + + return nil +} + +type token struct { + Token string `json:"token"` + Description string `json:"description,omitempty"` + Expiration uint64 `json:"expiration,omitempty"` + InviteLink string `json:"invite_link"` +} + +// Generate generates an invitation token and if a recipient is specified, +// will send an email containing the link the user will use to accept the +// invitation. +func (h *tokenHandler) Generate(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + query := r.URL.Query() + token, err := h.gatewayClient.GenerateInviteToken(ctx, &invitepb.GenerateInviteTokenRequest{ + Description: query.Get("description"), + }) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error generating token", err) + return + } + + user := ctxpkg.ContextMustGetUser(ctx) + recipient := query.Get("recipient") + if recipient != "" && h.smtpCredentials != nil { + templObj := &emailParams{ + User: user, + Token: token.InviteToken.Token, + MeshDirectoryURL: h.meshDirectoryURL, + } + if err := h.sendEmail(recipient, templObj); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending token by mail", err) + return + } + } + + tknRes := h.prepareGenerateTokenResponse(token.InviteToken) + if err := json.NewEncoder(w).Encode(tknRes); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error marshalling token data", err) + return + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) +} + +func (h *tokenHandler) prepareGenerateTokenResponse(tkn *invitepb.InviteToken) *token { + res := &token{ + Token: tkn.Token, + Description: tkn.Description, + InviteLink: h.meshDirectoryURL + "?token=" + tkn.Token + "&providerDomain=" + h.providerDomain, + } + if tkn.Expiration != nil { + res.Expiration = tkn.Expiration.Seconds + } + + return res +} + +type acceptInviteRequest struct { + Token string `json:"token"` + ProviderDomain string `json:"providerDomain"` +} + +// AcceptInvite accepts an invitation from the user in the remote provider. +func (h *tokenHandler) AcceptInvite(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + log := appctx.GetLogger(ctx) + + req, err := getAcceptInviteRequest(r) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "missing parameters in request", err) + return + } + + if req.Token == "" || req.ProviderDomain == "" { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "token and providerDomain must not be null", nil) + return + } + + providerInfo, err := h.gatewayClient.GetInfoByDomain(ctx, &ocmprovider.GetInfoByDomainRequest{ + Domain: req.ProviderDomain, + }) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc get invite by domain info request", err) + return + } + if providerInfo.Status.Code != rpc.Code_CODE_OK { + reqres.WriteError(w, r, reqres.APIErrorServerError, "grpc forward invite request failed", errors.New(providerInfo.Status.Message)) + return + } + + forwardInviteReq := &invitepb.ForwardInviteRequest{ + InviteToken: &invitepb.InviteToken{ + Token: req.Token, + }, + OriginSystemProvider: providerInfo.ProviderInfo, + } + forwardInviteResponse, err := h.gatewayClient.ForwardInvite(ctx, forwardInviteReq) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc forward invite request", err) + return + } + if forwardInviteResponse.Status.Code != rpc.Code_CODE_OK { + switch forwardInviteResponse.Status.Code { + case rpc.Code_CODE_NOT_FOUND: + reqres.WriteError(w, r, reqres.APIErrorNotFound, "token not found", nil) + return + case rpc.Code_CODE_INVALID_ARGUMENT: + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "token has expired", nil) + return + case rpc.Code_CODE_ALREADY_EXISTS: + reqres.WriteError(w, r, reqres.APIErrorAlreadyExist, "user already known", nil) + return + case rpc.Code_CODE_PERMISSION_DENIED: + reqres.WriteError(w, r, reqres.APIErrorUnauthenticated, "remove service not trusted", nil) + return + default: + reqres.WriteError(w, r, reqres.APIErrorServerError, "unexpected error: "+forwardInviteResponse.Status.Message, errors.New(forwardInviteResponse.Status.Message)) + return + } + } + + w.WriteHeader(http.StatusOK) + + log.Info().Str("token", req.Token).Str("provider", req.ProviderDomain).Msgf("invite forwarded") +} + +func getAcceptInviteRequest(r *http.Request) (*acceptInviteRequest, error) { + var req acceptInviteRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return nil, err + } + } else { + req.Token, req.ProviderDomain = r.FormValue("token"), r.FormValue("providerDomain") + } + return &req, nil +} + +type remoteUser struct { + DisplayName string `json:"display_name"` + Idp string `json:"idp"` + UserID string `json:"user_id"` + Mail string `json:"mail"` +} + +// FindAccepted returns the list of all the users that accepted the invitation +// to the authenticated user. +func (h *tokenHandler) FindAccepted(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + res, err := h.gatewayClient.FindAcceptedUsers(ctx, &invitepb.FindAcceptedUsersRequest{}) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc find accepted users request", err) + return + } + + users := list.Map(res.AcceptedUsers, func(u *userpb.User) *remoteUser { + return &remoteUser{ + DisplayName: u.DisplayName, + Idp: u.Id.Idp, + UserID: u.Id.OpaqueId, + Mail: u.Mail, + } + }) + + if err := json.NewEncoder(w).Encode(users); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error marshalling token data", err) + return + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) +} + +// DeleteAccepted deletes the given user from the list of the accepted users. +func (h *tokenHandler) DeleteAccepted(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + req, err := getDeleteAcceptedRequest(r) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorInvalidParameter, "missing parameters in request", err) + return + } + + res, err := h.gatewayClient.DeleteAcceptedUser(ctx, &invitepb.DeleteAcceptedUserRequest{ + RemoteUserId: &userpb.UserId{ + Idp: req.Idp, + OpaqueId: req.UserID, + Type: userpb.UserType_USER_TYPE_FEDERATED, + }, + }) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error sending a grpc get invite by domain info request", err) + return + } + if res.Status.Code != rpc.Code_CODE_OK { + reqres.WriteError(w, r, reqres.APIErrorServerError, "grpc forward invite request failed", errors.New(res.Status.Message)) + return + } + w.WriteHeader(http.StatusOK) +} + +type deleteAcceptedRequest struct { + Idp string `json:"idp"` + UserID string `json:"user_id"` +} + +func getDeleteAcceptedRequest(r *http.Request) (*deleteAcceptedRequest, error) { + var req deleteAcceptedRequest + contentType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err == nil && contentType == "application/json" { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return nil, err + } + } else { + req.Idp, req.UserID = r.FormValue("idp"), r.FormValue("user_id") + } + return &req, nil +} + +func (h *tokenHandler) ListInvite(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + res, err := h.gatewayClient.ListInviteTokens(ctx, &invitepb.ListInviteTokensRequest{}) + if err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error listing tokens", err) + return + } + + if res.Status.Code != rpc.Code_CODE_OK { + reqres.WriteError(w, r, reqres.APIErrorServerError, res.Status.Message, errors.New(res.Status.Message)) + return + } + + tokens := make([]*token, 0, len(res.InviteTokens)) + for _, tkn := range res.InviteTokens { + tokens = append(tokens, h.prepareGenerateTokenResponse(tkn)) + } + + if err := json.NewEncoder(w).Encode(tokens); err != nil { + reqres.WriteError(w, r, reqres.APIErrorServerError, "error marshalling token data", err) + return + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) +} diff --git a/vendor/github.com/cs3org/reva/v2/pkg/app/app.go b/vendor/github.com/cs3org/reva/v2/pkg/app/app.go index 50e6ce28d8..ab672888e3 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/app/app.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/app/app.go @@ -40,6 +40,6 @@ type Registry interface { // Provider is the interface that application providers implement // for interacting with external apps that serve the requested resource. type Provider interface { - GetAppURL(ctx context.Context, resource *provider.ResourceInfo, viewMode appprovider.OpenInAppRequest_ViewMode, token, language string) (*appprovider.OpenInAppURL, error) + GetAppURL(ctx context.Context, resource *provider.ResourceInfo, viewMode appprovider.ViewMode, token, language string) (*appprovider.OpenInAppURL, error) GetAppProviderInfo(ctx context.Context) (*registry.ProviderInfo, error) } diff --git a/vendor/github.com/cs3org/reva/v2/pkg/app/provider/demo/demo.go b/vendor/github.com/cs3org/reva/v2/pkg/app/provider/demo/demo.go index 0b00fa419a..9964eb0948 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/app/provider/demo/demo.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/app/provider/demo/demo.go @@ -39,7 +39,7 @@ type demoProvider struct { iframeUIProvider string } -func (p *demoProvider) GetAppURL(ctx context.Context, resource *provider.ResourceInfo, viewMode appprovider.OpenInAppRequest_ViewMode, token, language string) (*appprovider.OpenInAppURL, error) { +func (p *demoProvider) GetAppURL(ctx context.Context, resource *provider.ResourceInfo, viewMode appprovider.ViewMode, token, language string) (*appprovider.OpenInAppURL, error) { url := fmt.Sprintf("