Skip to content

Commit e8681c6

Browse files
authored
Merge pull request #11576 from 2403905/issues/OCISDEV-147
feat: [OCISDEV-147] use the signing-key for a public link
2 parents 9266051 + 55fe5bd commit e8681c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2088
-1035
lines changed

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ require (
5757
github.com/mitchellh/mapstructure v1.5.0
5858
github.com/mna/pigeon v1.3.0
5959
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
60-
github.com/nats-io/nats-server/v2 v2.11.6
61-
github.com/nats-io/nats.go v1.43.0
60+
github.com/nats-io/nats-server/v2 v2.11.7
61+
github.com/nats-io/nats.go v1.44.0
6262
github.com/olekukonko/tablewriter v1.0.9
6363
github.com/onsi/ginkgo v1.16.5
6464
github.com/onsi/ginkgo/v2 v2.23.4
6565
github.com/onsi/gomega v1.38.0
6666
github.com/open-policy-agent/opa v1.6.0
6767
github.com/orcaman/concurrent-map v1.0.0
6868
github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27
69-
github.com/owncloud/reva/v2 v2.0.0-20250714122755-7cec7b87d4f9
69+
github.com/owncloud/reva/v2 v2.0.0-20250819151952-a4826f98a8c9
7070
github.com/pkg/errors v0.9.1
7171
github.com/pkg/xattr v0.4.12
72-
github.com/prometheus/client_golang v1.22.0
72+
github.com/prometheus/client_golang v1.23.0
7373
github.com/r3labs/sse/v2 v2.10.0
7474
github.com/rogpeppe/go-internal v1.14.1
7575
github.com/rs/cors v1.11.1
@@ -269,15 +269,15 @@ require (
269269
github.com/olekukonko/ll v0.0.9 // indirect
270270
github.com/opentracing/opentracing-go v1.2.0 // indirect
271271
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
272-
github.com/pablodz/inotifywaitgo v0.0.7 // indirect
272+
github.com/pablodz/inotifywaitgo v0.0.9 // indirect
273273
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
274274
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
275275
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
276276
github.com/pierrec/lz4/v4 v4.1.15 // indirect
277277
github.com/pjbgf/sha1cd v0.3.0 // indirect
278278
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
279279
github.com/pquerna/cachecontrol v0.2.0 // indirect
280-
github.com/prometheus/alertmanager v0.27.0 // indirect
280+
github.com/prometheus/alertmanager v0.28.1 // indirect
281281
github.com/prometheus/client_model v0.6.2 // indirect
282282
github.com/prometheus/common v0.65.0 // indirect
283283
github.com/prometheus/procfs v0.17.0 // indirect
@@ -287,13 +287,13 @@ require (
287287
github.com/rs/xid v1.6.0 // indirect
288288
github.com/russellhaering/goxmldsig v1.5.0 // indirect
289289
github.com/russross/blackfriday/v2 v2.1.0 // indirect
290-
github.com/segmentio/kafka-go v0.4.47 // indirect
290+
github.com/segmentio/kafka-go v0.4.48 // indirect
291291
github.com/segmentio/ksuid v1.0.4 // indirect
292292
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
293293
github.com/sergi/go-diff v1.4.0 // indirect
294294
github.com/sethvargo/go-password v0.3.1 // indirect
295-
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
296-
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
295+
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
296+
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
297297
github.com/skeema/knownhosts v1.3.0 // indirect
298298
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect
299299
github.com/spf13/pflag v1.0.6 // indirect

go.sum

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,10 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
661661
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
662662
github.com/nats-io/jwt/v2 v2.7.4 h1:jXFuDDxs/GQjGDZGhNgH4tXzSUK6WQi2rsj4xmsNOtI=
663663
github.com/nats-io/jwt/v2 v2.7.4/go.mod h1:me11pOkwObtcBNR8AiMrUbtVOUGkqYjMQZ6jnSdVUIA=
664-
github.com/nats-io/nats-server/v2 v2.11.6 h1:4VXRjbTUFKEB+7UoaKL3F5Y83xC7MxPoIONOnGgpkHw=
665-
github.com/nats-io/nats-server/v2 v2.11.6/go.mod h1:2xoztlcb4lDL5Blh1/BiukkKELXvKQ5Vy29FPVRBUYs=
666-
github.com/nats-io/nats.go v1.43.0 h1:uRFZ2FEoRvP64+UUhaTokyS18XBCR/xM2vQZKO4i8ug=
667-
github.com/nats-io/nats.go v1.43.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g=
664+
github.com/nats-io/nats-server/v2 v2.11.7 h1:lINWQ/Hb3cnaoHmWTjj/7WppZnaSh9C/1cD//nHCbms=
665+
github.com/nats-io/nats-server/v2 v2.11.7/go.mod h1:DchDPVzAsAPqhqm7VLedX0L7hjnV/SYtlmsl9F8U53s=
666+
github.com/nats-io/nats.go v1.44.0 h1:ECKVrDLdh/kDPV1g0gAQ+2+m2KprqZK5O/eJAyAnH2M=
667+
github.com/nats-io/nats.go v1.44.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g=
668668
github.com/nats-io/nkeys v0.4.11 h1:q44qGV008kYd9W1b1nEBkNzvnWxtRSQ7A8BoqRrcfa0=
669669
github.com/nats-io/nkeys v0.4.11/go.mod h1:szDimtgmfOi9n25JpfIdGw12tZFYXqhGxjhVxsatHVE=
670670
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
@@ -700,12 +700,12 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
700700
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
701701
github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27 h1:ID8s5lGBntmrlI6TbDAjTzRyHucn3bVM2wlW+HBplv4=
702702
github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27/go.mod h1:+gT+x62AS9u2Farh9wE2uYmgdvTg0MQgsSI62D+xoRg=
703-
github.com/owncloud/reva/v2 v2.0.0-20250714122755-7cec7b87d4f9 h1:YiIMNov8f/gY9mfVkfb9RUN1iTo7DPjLxW/4XN1vcN4=
704-
github.com/owncloud/reva/v2 v2.0.0-20250714122755-7cec7b87d4f9/go.mod h1:hbank0QHAsLCaK2KKbnmhkgbCA1d8GLAWDAZEV09/Uk=
703+
github.com/owncloud/reva/v2 v2.0.0-20250819151952-a4826f98a8c9 h1:6ptOupvu49y1r7IxuszzeSmOKc2l7YanTc56hA9tIp4=
704+
github.com/owncloud/reva/v2 v2.0.0-20250819151952-a4826f98a8c9/go.mod h1:oE/NdmwG3w5TKWqpkcLiwLZwDCT37Xqz4unkjuz4ayI=
705705
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
706706
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
707-
github.com/pablodz/inotifywaitgo v0.0.7 h1:1ii49dGBnRn0t1Sz7RGZS6/NberPEDQprwKHN49Bv6U=
708-
github.com/pablodz/inotifywaitgo v0.0.7/go.mod h1:OtzRCsYTJlIr+vAzlOtauTkfQ1c25ebFuXq8tbbf8cw=
707+
github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=
708+
github.com/pablodz/inotifywaitgo v0.0.9/go.mod h1:hAfx2oN+WKg8miwUKPs52trySpPignlRBRxWcXVHku0=
709709
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
710710
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
711711
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
@@ -731,8 +731,8 @@ github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEn
731731
github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI=
732732
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
733733
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
734-
github.com/prometheus/alertmanager v0.27.0 h1:V6nTa2J5V4s8TG4C4HtrBP/WNSebCCTYGGv4qecA/+I=
735-
github.com/prometheus/alertmanager v0.27.0/go.mod h1:8Ia/R3urPmbzJ8OsdvmZvIprDwvwmYCmUbwBL+jlPOE=
734+
github.com/prometheus/alertmanager v0.28.1 h1:BK5pCoAtaKg01BYRUJhEDV1tqJMEtYBGzPw8QdvnnvA=
735+
github.com/prometheus/alertmanager v0.28.1/go.mod h1:0StpPUDDHi1VXeM7p2yYfeZgLVi/PPlt39vo9LQUHxM=
736736
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
737737
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
738738
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
@@ -741,8 +741,8 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr
741741
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
742742
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
743743
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
744-
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
745-
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
744+
github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc=
745+
github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE=
746746
github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
747747
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
748748
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -791,8 +791,8 @@ github.com/russellhaering/goxmldsig v1.5.0 h1:AU2UkkYIUOTyZRbe08XMThaOCelArgvNfY
791791
github.com/russellhaering/goxmldsig v1.5.0/go.mod h1:x98CjQNFJcWfMxeOrMnMKg70lvDP6tE0nTaeUnjXDmk=
792792
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
793793
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
794-
github.com/segmentio/kafka-go v0.4.47 h1:IqziR4pA3vrZq7YdRxaT3w1/5fvIH5qpCwstUanQQB0=
795-
github.com/segmentio/kafka-go v0.4.47/go.mod h1:HjF6XbOKh0Pjlkr5GVZxt6CsjjwnmhVOfURM5KMd8qg=
794+
github.com/segmentio/kafka-go v0.4.48 h1:9jyu9CWK4W5W+SroCe8EffbrRZVqAOkuaLd/ApID4Vs=
795+
github.com/segmentio/kafka-go v0.4.48/go.mod h1:HjF6XbOKh0Pjlkr5GVZxt6CsjjwnmhVOfURM5KMd8qg=
796796
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
797797
github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
798798
github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY=
@@ -805,10 +805,10 @@ github.com/shamaton/msgpack/v2 v2.2.3 h1:uDOHmxQySlvlUYfQwdjxyybAOzjlQsD1Vjy+4jm
805805
github.com/shamaton/msgpack/v2 v2.2.3/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI=
806806
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
807807
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
808-
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
809-
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
810-
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU=
811-
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
808+
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs=
809+
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
810+
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 h1:OfRzdxCzDhp+rsKWXuOO2I/quKMJ/+TQwVbIP/gltZg=
811+
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92/go.mod h1:7/OT02F6S6I7v6WXb+IjhMuZEYfH/RJ5RwEWnEo5BMg=
812812
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
813813
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
814814
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=

ocis-pkg/middleware/account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler
5555
opt.Logger.Error().Err(err)
5656
return
5757
}
58-
if ok, err := scope.VerifyScope(r.Context(), tokenScope, r); err != nil || !ok {
58+
if ok, err := scope.VerifyScope(r.Context(), tokenScope, r.URL.Path); err != nil || !ok {
5959
opt.Logger.Error().Err(err).Msg("verifying scope failed")
6060
return
6161
}

services/proxy/pkg/middleware/authentication.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ var (
3131
"/ocs/v1.php/apps/files_sharing/api/v1/tokeninfo/unprotected",
3232
"/ocs/v2.php/apps/files_sharing/api/v1/tokeninfo/unprotected",
3333
"/ocs/v1.php/cloud/capabilities",
34+
"/ocs/v1.php/cloud/user/signing-key",
35+
"/ocs/v2.php/cloud/user/signing-key",
3436
}
3537
)
3638

vendor/github.com/nats-io/nats-server/v2/server/client.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/nats-io/nats-server/v2/server/const.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)