Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site accounts update #2599

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
28ee48f
Remove site account authorization field
Daniel-WWU-IT Feb 25, 2022
98f0633
Remove site authorization field
Daniel-WWU-IT Feb 25, 2022
ebf337d
Remove API keys from site user accounts
Daniel-WWU-IT Feb 25, 2022
50ef732
Remove site type
Daniel-WWU-IT Feb 25, 2022
9ffd10b
Use short site names by default for site IDs
Daniel-WWU-IT Feb 25, 2022
d4387ec
Always send alerts to the global receiver
Daniel-WWU-IT Feb 28, 2022
1de484c
Unify site account naming
Daniel-WWU-IT Feb 28, 2022
7a2811f
cephfs: fix Dockerfile.revad-ceph to use the right base image (#2588)
SamuAlfageme Feb 25, 2022
994882f
[tests-only] Bump core commit id on reva master (#2586)
SwikritiT Feb 25, 2022
f9c3a61
Include service type in alerts
Daniel-WWU-IT Mar 1, 2022
97a5ffe
Remove excess white-space from expected-failures files (#2598)
phil-davis Mar 1, 2022
0b7b37d
Add changelog
Daniel-WWU-IT Mar 1, 2022
433ac4b
Fix missing trailing slash in endpoint URLs
Daniel-WWU-IT Mar 3, 2022
946f780
Update docs
Daniel-WWU-IT Mar 16, 2022
873e858
eos: Use sys ACLs for file permissions (#2494)
gmgigi96 Mar 2, 2022
87c4414
[Build-deps]: Bump github.com/go-ldap/ldap/v3 from 3.4.1 to 3.4.2 (#2…
dependabot[bot] Mar 2, 2022
775771d
[Build-deps]: Bump github.com/ceph/go-ceph from 0.13.0 to 0.14.0 (#2564)
dependabot[bot] Mar 2, 2022
83e94d6
[Build-deps]: Bump go.opentelemetry.io/otel/exporters/jaeger (#2565)
dependabot[bot] Mar 2, 2022
cd44a64
[tests-only] Bump core commit id on reva master (#2606)
grgprarup Mar 3, 2022
4f01cb6
[Build-deps]: Bump github.com/minio/minio-go/v7 from 7.0.21 to 7.0.23…
dependabot[bot] Mar 4, 2022
4bea6b4
[Build-deps]: Bump go.opentelemetry.io/contrib/instrumentation/google…
dependabot[bot] Mar 4, 2022
fb3fc0c
[Build-deps]: Bump github.com/nats-io/nats-streaming-server (#2602)
dependabot[bot] Mar 4, 2022
6c50bf6
trace: honour tracing_service_name config directive (#2608)
labkode Mar 4, 2022
fd1e1e4
Wait for nats server master edition (#2573)
kobergj Mar 7, 2022
47fa1f0
get rid of public link url hash (#2596) (#2615)
ishank011 Mar 7, 2022
887d388
Externalize custom mime types configuration for storage providers (#2…
glpatcern Mar 7, 2022
2ea8ab7
[tests-only] [full-ci] Bump core commit id to latest (#2629)
SwikritiT Mar 11, 2022
35683a1
Nextcloud Alpha (#2421)
michielbdejong Mar 14, 2022
3c747f5
[Build-deps]: Bump github.com/onsi/gomega from 1.18.0 to 1.18.1 (#2491)
dependabot[bot] Mar 15, 2022
e240dcd
[Build-deps]: Bump github.com/nats-io/nats-streaming-server (#2631)
dependabot[bot] Mar 15, 2022
af77105
[Build-deps]: Bump github.com/hashicorp/go-hclog from 1.1.0 to 1.2.0 …
dependabot[bot] Mar 15, 2022
94418be
Datatx pull model (#2052)
redblom Mar 16, 2022
b1ae64f
Bump core commit id in reva master (#2642)
phil-davis Mar 16, 2022
7ec8702
Lint fixes
Daniel-WWU-IT Mar 16, 2022
d480192
Update docs
Daniel-WWU-IT Mar 16, 2022
1e33ebd
[tests-only] Updated AppProvider examples (#2659)
glpatcern Mar 21, 2022
89f3d54
[tests-only] [full-ci] Bump CORE_COMMITID in master (#2662)
phil-davis Mar 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The test runner source for API tests
CORE_COMMITID=afae230f67daf971cda4a10d1b20cd846e87060b
CORE_COMMITID=8fc353d79e7c0de1e137220c2422efcfe2ac5b89
CORE_BRANCH=master
2 changes: 1 addition & 1 deletion Dockerfile.revad-ceph
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

FROM ceph/daemon-base
FROM quay.ceph.io/ceph-ci/ceph:pacific

RUN dnf update -y && dnf install -y \
git \
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/cephfs-fix-base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Dockerfile.revad-ceph to use the right base image

In Aug2021 https://hub.docker.com/r/ceph/daemon-base was moved to quay.ceph.io
and the builds for this image were failing for some weeks after January.

https://github.com/cs3org/reva/pull/2588
7 changes: 7 additions & 0 deletions changelog/unreleased/change-public-link-hash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Change: Remove hash from public link urls

Public link urls do not contain the hash anymore, this is needed to support the ocis and web history mode.

https://github.com/cs3org/reva/pull/2596
https://github.com/owncloud/ocis/pull/3109
https://github.com/owncloud/web/pull/6363
3 changes: 3 additions & 0 deletions changelog/unreleased/eos-sys-acl-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: Use sys ACLs for file permissions

https://github.com/cs3org/reva/pull/2494
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-ocmd-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Accept new userid idp format

The format for userid idp [changed](https://github.com/cs3org/cs3apis/pull/159)
and this broke [the ocmd tutorial](https://reva.link/docs/tutorials/share-tutorial/#5-1-4-create-the-share)
This PR makes the provider authorizer interceptor accept both the old and the new string format.

See https://github.com/cs3org/reva/issues/2285 and https://github.com/cs3org/reva/issues/2285
3 changes: 3 additions & 0 deletions changelog/unreleased/honour-tracing-service-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: respect the tracing_service_name config variable

https://github.com/cs3org/reva/pull/2608
5 changes: 5 additions & 0 deletions changelog/unreleased/mimetypes-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Externalize custom mime types configuration for storage providers

Added ability to configure custom mime types in an external JSON file, such that it can be reused when many storage providers are deployed at the same time.

https://github.com/cs3org/reva/pull/2613
7 changes: 7 additions & 0 deletions changelog/unreleased/nextcloud-ocm-share-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Nextcloud-based share manager for pkg/ocm/share

Note that pkg/ocm/share is very similar to pkg/share,
but it deals with cs3/sharing/ocm
whereas pkg/share deals with cs3/sharing/collaboration

https://github.com/cs3org/reva/pull/2163
6 changes: 6 additions & 0 deletions changelog/unreleased/pull-transfer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: New CS3API datatx methods

CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers
Method CreateTransfer removed.

https://github.com/cs3org/reva/pull/2052
9 changes: 9 additions & 0 deletions changelog/unreleased/siteacc-upd-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Enhancement: Site accounts improvements

Yet another PR to update the site accounts (and Mentix):
New default site ID;
Include service type in alerts;
Naming unified;
Remove obsolete stuff.

https://github.com/cs3org/reva/pull/2599
5 changes: 5 additions & 0 deletions changelog/unreleased/waitForNats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: wait for nats server on middleware start

Use a retry mechanism to connect to the nats server when it is not ready yet

https://github.com/cs3org/reva/pull/2572
2 changes: 2 additions & 0 deletions cmd/reva/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ var (
transferCreateCommand(),
transferGetStatusCommand(),
transferCancelCommand(),
transferListCommand(),
transferRetryCommand(),
appTokensListCommand(),
appTokensRemoveCommand(),
appTokensCreateCommand(),
Expand Down
28 changes: 25 additions & 3 deletions cmd/reva/transfer-cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,27 @@
package main

import (
"encoding/gob"
"errors"
"io"
"os"
"time"

rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
datatx "github.com/cs3org/go-cs3apis/cs3/tx/v1beta1"
"github.com/jedib0t/go-pretty/table"
)

func transferCancelCommand() *command {
cmd := newCommand("transfer-cancel")
cmd.Description = func() string { return "cancel a running transfer" }
cmd.Usage = func() string { return "Usage: transfer-cancel [-flags]" }
txID := cmd.String("txID", "", "the transfer identifier")
txID := cmd.String("txId", "", "the transfer identifier")

cmd.Action = func(w ...io.Writer) error {
// validate flags
if *txID == "" {
return errors.New("txID must be specified: use -txID flag\n" + cmd.Usage())
return errors.New("txId must be specified: use -txId flag\n" + cmd.Usage())
}

ctx := getAuthContext()
Expand All @@ -44,7 +48,9 @@ func transferCancelCommand() *command {
return err
}

cancelRequest := &datatx.CancelTransferRequest{}
cancelRequest := &datatx.CancelTransferRequest{
TxId: &datatx.TxId{OpaqueId: *txID},
}

cancelResponse, err := client.CancelTransfer(ctx, cancelRequest)
if err != nil {
Expand All @@ -54,6 +60,22 @@ func transferCancelCommand() *command {
return formatError(cancelResponse.Status)
}

if len(w) == 0 {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
t.AppendHeader(table.Row{"ShareId.OpaqueId", "Id.OpaqueId", "Status", "Ctime"})
cTime := time.Unix(int64(cancelResponse.TxInfo.Ctime.Seconds), int64(cancelResponse.TxInfo.Ctime.Nanos))
t.AppendRows([]table.Row{
{cancelResponse.TxInfo.ShareId.OpaqueId, cancelResponse.TxInfo.Id.OpaqueId, cancelResponse.TxInfo.Status, cTime.Format("Mon Jan 2 15:04:05 -0700 MST 2006")},
})
t.Render()
} else {
enc := gob.NewEncoder(w[0])
if err := enc.Encode(cancelResponse.TxInfo); err != nil {
return err
}
}

return nil
}
return cmd
Expand Down
4 changes: 2 additions & 2 deletions cmd/reva/transfer-create.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func transferCreateCommand() *command {
cmd.Description = func() string { return "create transfer between 2 sites" }
cmd.Usage = func() string { return "Usage: transfer-create [-flags] <path>" }
grantee := cmd.String("grantee", "", "the grantee, receiver of the transfer")
granteeType := cmd.String("granteeType", "user", "the grantee type, one of: user, group")
idp := cmd.String("idp", "", "the idp of the grantee, default to same idp as the user triggering the action")
granteeType := cmd.String("granteeType", "user", "the grantee type, one of: user, group (defaults to user)")
idp := cmd.String("idp", "", "the idp of the grantee")
userType := cmd.String("user-type", "primary", "the type of user account, defaults to primary")

cmd.Action = func(w ...io.Writer) error {
Expand Down
28 changes: 25 additions & 3 deletions cmd/reva/transfer-get-status.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,27 @@
package main

import (
"encoding/gob"
"errors"
"io"
"os"
"time"

rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
datatx "github.com/cs3org/go-cs3apis/cs3/tx/v1beta1"
"github.com/jedib0t/go-pretty/table"
)

func transferGetStatusCommand() *command {
cmd := newCommand("transfer-get-status")
cmd.Description = func() string { return "get the status of a transfer" }
cmd.Usage = func() string { return "Usage: transfer-get-status [-flags]" }
txID := cmd.String("txID", "", "the transfer identifier")
txID := cmd.String("txId", "", "the transfer identifier")

cmd.Action = func(w ...io.Writer) error {
// validate flags
if *txID == "" {
return errors.New("txID must be specified: use -txID flag\n" + cmd.Usage())
return errors.New("txId must be specified: use -txId flag\n" + cmd.Usage())
}

ctx := getAuthContext()
Expand All @@ -44,7 +48,9 @@ func transferGetStatusCommand() *command {
return err
}

getStatusRequest := &datatx.GetTransferStatusRequest{}
getStatusRequest := &datatx.GetTransferStatusRequest{
TxId: &datatx.TxId{OpaqueId: *txID},
}

getStatusResponse, err := client.GetTransferStatus(ctx, getStatusRequest)
if err != nil {
Expand All @@ -54,6 +60,22 @@ func transferGetStatusCommand() *command {
return formatError(getStatusResponse.Status)
}

if len(w) == 0 {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
t.AppendHeader(table.Row{"ShareId.OpaqueId", "Id.OpaqueId", "Status", "Ctime"})
cTime := time.Unix(int64(getStatusResponse.TxInfo.Ctime.Seconds), int64(getStatusResponse.TxInfo.Ctime.Nanos))
t.AppendRows([]table.Row{
{getStatusResponse.TxInfo.ShareId.OpaqueId, getStatusResponse.TxInfo.Id.OpaqueId, getStatusResponse.TxInfo.Status, cTime.Format("Mon Jan 2 15:04:05 -0700 MST 2006")},
})
t.Render()
} else {
enc := gob.NewEncoder(w[0])
if err := enc.Encode(getStatusResponse.TxInfo); err != nil {
return err
}
}

return nil
}
return cmd
Expand Down
91 changes: 91 additions & 0 deletions cmd/reva/transfer-list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// 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 main

import (
"encoding/gob"
"io"
"os"

rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1"
datatx "github.com/cs3org/go-cs3apis/cs3/tx/v1beta1"
"github.com/jedib0t/go-pretty/table"
)

func transferListCommand() *command {
cmd := newCommand("transfer-list")
cmd.Description = func() string { return "get a list of transfers" }
cmd.Usage = func() string { return "Usage: transfer-list [-flags]" }
filterShareID := cmd.String("shareId", "", "share ID filter (optional)")

cmd.Action = func(w ...io.Writer) error {
ctx := getAuthContext()
client, err := getClient()
if err != nil {
return err
}

// validate flags
var filters []*datatx.ListTransfersRequest_Filter
if *filterShareID != "" {
filters = append(filters, &datatx.ListTransfersRequest_Filter{
Type: datatx.ListTransfersRequest_Filter_TYPE_SHARE_ID,
Term: &datatx.ListTransfersRequest_Filter_ShareId{
ShareId: &ocm.ShareId{
OpaqueId: *filterShareID,
},
},
})
}

transferslistRequest := &datatx.ListTransfersRequest{
Filters: filters,
}

listTransfersResponse, err := client.ListTransfers(ctx, transferslistRequest)
if err != nil {
return err
}
if listTransfersResponse.Status.Code != rpc.Code_CODE_OK {
return formatError(listTransfersResponse.Status)
}

if len(w) == 0 {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
t.AppendHeader(table.Row{"ShareId.OpaqueId", "Id.OpaqueId"})

for _, s := range listTransfersResponse.Transfers {
t.AppendRows([]table.Row{
{s.ShareId.OpaqueId, s.Id.OpaqueId},
})
}
t.Render()
} else {
enc := gob.NewEncoder(w[0])
if err := enc.Encode(listTransfersResponse.Transfers); err != nil {
return err
}
}

return nil
}
return cmd
}
Loading