Compare commits

..
Author SHA1 Message Date
Florian Schade 923fd045ce changelog 1.7.0 2021-06-04 09:37:21 +02:00
892 changed files with 75156 additions and 28264 deletions

No files matched your search

+49 -43
View File
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.0. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -17,23 +17,23 @@ GO ?= $(shell which go)
# @echo "Running bingo"
# @$(BINGO) <flags/args..>
#
BINGO := $(GOBIN)/bingo-v0.5.1
BINGO := $(GOBIN)/bingo-v0.4.0
$(BINGO): $(BINGO_DIR)/bingo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/bingo-v0.5.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.5.1 "github.com/bwplotka/bingo"
@echo "(re)installing $(GOBIN)/bingo-v0.4.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.4.0 "github.com/bwplotka/bingo"
BUF := $(GOBIN)/buf-v0.56.0
BUF := $(GOBIN)/buf-v0.40.0
$(BUF): $(BINGO_DIR)/buf.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/buf-v0.56.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buf.mod -o=$(GOBIN)/buf-v0.56.0 "github.com/bufbuild/buf/cmd/buf"
@echo "(re)installing $(GOBIN)/buf-v0.40.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buf.mod -o=$(GOBIN)/buf-v0.40.0 "github.com/bufbuild/buf/cmd/buf"
BUILDIFIER := $(GOBIN)/buildifier-v0.0.0-20210920153738-d6daef01a1a2
BUILDIFIER := $(GOBIN)/buildifier-v0.0.0-20210227132407-f2aed9ee205d
$(BUILDIFIER): $(BINGO_DIR)/buildifier.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/buildifier-v0.0.0-20210920153738-d6daef01a1a2"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buildifier.mod -o=$(GOBIN)/buildifier-v0.0.0-20210920153738-d6daef01a1a2 "github.com/bazelbuild/buildtools/buildifier"
@echo "(re)installing $(GOBIN)/buildifier-v0.0.0-20210227132407-f2aed9ee205d"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buildifier.mod -o=$(GOBIN)/buildifier-v0.0.0-20210227132407-f2aed9ee205d "github.com/bazelbuild/buildtools/buildifier"
CALENS := $(GOBIN)/calens-v0.2.0
$(CALENS): $(BINGO_DIR)/calens.mod
@@ -41,17 +41,29 @@ $(CALENS): $(BINGO_DIR)/calens.mod
@echo "(re)installing $(GOBIN)/calens-v0.2.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=calens.mod -o=$(GOBIN)/calens-v0.2.0 "github.com/restic/calens"
FLAEX := $(GOBIN)/flaex-v0.2.1-0.20210701123229-9d7dceed124f
FILEB0X := $(GOBIN)/fileb0x-v1.1.4
$(FILEB0X): $(BINGO_DIR)/fileb0x.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/fileb0x-v1.1.4"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=fileb0x.mod -o=$(GOBIN)/fileb0x-v1.1.4 "github.com/UnnoTed/fileb0x"
FLAEX := $(GOBIN)/flaex-v0.2.0
$(FLAEX): $(BINGO_DIR)/flaex.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/flaex-v0.2.1-0.20210701123229-9d7dceed124f"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=flaex.mod -o=$(GOBIN)/flaex-v0.2.1-0.20210701123229-9d7dceed124f "github.com/owncloud/flaex"
@echo "(re)installing $(GOBIN)/flaex-v0.2.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=flaex.mod -o=$(GOBIN)/flaex-v0.2.0 "github.com/owncloud/flaex"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.42.1
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.37.1
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.42.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.42.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.37.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.37.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
GOVERAGE := $(GOBIN)/goverage-v0.0.0-20180129164344-eec3514a20b5
$(GOVERAGE): $(BINGO_DIR)/goverage.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/goverage-v0.0.0-20180129164344-eec3514a20b5"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=goverage.mod -o=$(GOBIN)/goverage-v0.0.0-20180129164344-eec3514a20b5 "github.com/haya14busa/goverage"
GOX := $(GOBIN)/gox-v1.0.1
$(GOX): $(BINGO_DIR)/gox.mod
@@ -59,11 +71,11 @@ $(GOX): $(BINGO_DIR)/gox.mod
@echo "(re)installing $(GOBIN)/gox-v1.0.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gox.mod -o=$(GOBIN)/gox-v1.0.1 "github.com/mitchellh/gox"
HUGO := $(GOBIN)/hugo-v0.88.1
HUGO := $(GOBIN)/hugo-v0.80.0
$(HUGO): $(BINGO_DIR)/hugo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/hugo-v0.88.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=hugo.mod -o=$(GOBIN)/hugo-v0.88.1 "github.com/gohugoio/hugo"
@echo "(re)installing $(GOBIN)/hugo-v0.80.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=hugo.mod -o=$(GOBIN)/hugo-v0.80.0 "github.com/gohugoio/hugo"
MUTAGEN := $(GOBIN)/mutagen-v0.11.8
$(MUTAGEN): $(BINGO_DIR)/mutagen.mod
@@ -71,45 +83,39 @@ $(MUTAGEN): $(BINGO_DIR)/mutagen.mod
@echo "(re)installing $(GOBIN)/mutagen-v0.11.8"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mutagen.mod -o=$(GOBIN)/mutagen-v0.11.8 "github.com/mutagen-io/mutagen/cmd/mutagen"
OAPI_CODEGEN := $(GOBIN)/oapi-codegen-v1.8.2
$(OAPI_CODEGEN): $(BINGO_DIR)/oapi-codegen.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/oapi-codegen-v1.8.2"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=oapi-codegen.mod -o=$(GOBIN)/oapi-codegen-v1.8.2 "github.com/deepmap/oapi-codegen/cmd/oapi-codegen"
PROTOC_GEN_DOC := $(GOBIN)/protoc-gen-doc-v1.5.0
PROTOC_GEN_DOC := $(GOBIN)/protoc-gen-doc-v1.4.1
$(PROTOC_GEN_DOC): $(BINGO_DIR)/protoc-gen-doc.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-doc-v1.5.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-doc.mod -o=$(GOBIN)/protoc-gen-doc-v1.5.0 "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
@echo "(re)installing $(GOBIN)/protoc-gen-doc-v1.4.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-doc.mod -o=$(GOBIN)/protoc-gen-doc-v1.4.1 "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
PROTOC_GEN_GO := $(GOBIN)/protoc-gen-go-v1.27.1
PROTOC_GEN_GO := $(GOBIN)/protoc-gen-go-v1.26.0
$(PROTOC_GEN_GO): $(BINGO_DIR)/protoc-gen-go.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-go-v1.27.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-go.mod -o=$(GOBIN)/protoc-gen-go-v1.27.1 "google.golang.org/protobuf/cmd/protoc-gen-go"
@echo "(re)installing $(GOBIN)/protoc-gen-go-v1.26.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-go.mod -o=$(GOBIN)/protoc-gen-go-v1.26.0 "google.golang.org/protobuf/cmd/protoc-gen-go"
PROTOC_GEN_MICRO := $(GOBIN)/protoc-gen-micro-v3.0.0-20211012122208-f63e46a7d1e9
PROTOC_GEN_MICRO := $(GOBIN)/protoc-gen-micro-v3.0.0-20210329103359-9b41d1bf0888
$(PROTOC_GEN_MICRO): $(BINGO_DIR)/protoc-gen-micro.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-micro-v3.0.0-20211012122208-f63e46a7d1e9"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-micro.mod -o=$(GOBIN)/protoc-gen-micro-v3.0.0-20211012122208-f63e46a7d1e9 "github.com/asim/go-micro/cmd/protoc-gen-micro/v3"
@echo "(re)installing $(GOBIN)/protoc-gen-micro-v3.0.0-20210329103359-9b41d1bf0888"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-micro.mod -o=$(GOBIN)/protoc-gen-micro-v3.0.0-20210329103359-9b41d1bf0888 "github.com/asim/go-micro/cmd/protoc-gen-micro/v3"
PROTOC_GEN_MICROWEB := $(GOBIN)/protoc-gen-microweb-v0.0.0-20210824101557-828409dbfbf9
PROTOC_GEN_MICROWEB := $(GOBIN)/protoc-gen-microweb-v0.0.0-20210224131655-d9b1137a84d4
$(PROTOC_GEN_MICROWEB): $(BINGO_DIR)/protoc-gen-microweb.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-microweb-v0.0.0-20210824101557-828409dbfbf9"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-microweb.mod -o=$(GOBIN)/protoc-gen-microweb-v0.0.0-20210824101557-828409dbfbf9 "github.com/owncloud/protoc-gen-microweb"
@echo "(re)installing $(GOBIN)/protoc-gen-microweb-v0.0.0-20210224131655-d9b1137a84d4"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-microweb.mod -o=$(GOBIN)/protoc-gen-microweb-v0.0.0-20210224131655-d9b1137a84d4 "github.com/owncloud/protoc-gen-microweb"
PROTOC_GEN_OPENAPIV2 := $(GOBIN)/protoc-gen-openapiv2-v2.6.0
PROTOC_GEN_OPENAPIV2 := $(GOBIN)/protoc-gen-openapiv2-v2.3.0
$(PROTOC_GEN_OPENAPIV2): $(BINGO_DIR)/protoc-gen-openapiv2.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-openapiv2-v2.6.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-openapiv2.mod -o=$(GOBIN)/protoc-gen-openapiv2-v2.6.0 "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
@echo "(re)installing $(GOBIN)/protoc-gen-openapiv2-v2.3.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-openapiv2.mod -o=$(GOBIN)/protoc-gen-openapiv2-v2.3.0 "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
REFLEX := $(GOBIN)/reflex-v0.3.1
REFLEX := $(GOBIN)/reflex-v0.3.0
$(REFLEX): $(BINGO_DIR)/reflex.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/reflex-v0.3.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.1 "github.com/cespare/reflex"
@echo "(re)installing $(GOBIN)/reflex-v0.3.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.0 "github.com/cespare/reflex"
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/bwplotka/bingo v0.5.1
require github.com/bwplotka/bingo v0.4.0
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/bufbuild/buf v0.56.0 // cmd/buf
require github.com/bufbuild/buf v0.40.0 // cmd/buf
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/bazelbuild/buildtools v0.0.0-20210920153738-d6daef01a1a2 // buildifier
require github.com/bazelbuild/buildtools v0.0.0-20210227132407-f2aed9ee205d // buildifier
+1 -1
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/restic/calens v0.2.0
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.15
go 1.16
require github.com/deepmap/oapi-codegen v1.8.2 // cmd/oapi-codegen
require github.com/UnnoTed/fileb0x v1.1.4
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/owncloud/flaex v0.2.1-0.20210701123229-9d7dceed124f
require github.com/owncloud/flaex v0.2.0
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/golangci/golangci-lint v1.42.1 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.37.1 // cmd/golangci-lint
+5
View File
@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5
+1 -1
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/mitchellh/gox v1.0.1
+2 -2
View File
@@ -1,7 +1,7 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
replace github.com/markbates/inflect => github.com/markbates/inflect v0.0.0-20171215194931-a12c3aec81a6
require github.com/gohugoio/hugo v0.88.1
require github.com/gohugoio/hugo v0.80.0
+1 -1
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/mutagen-io/mutagen v0.11.8 // cmd/mutagen
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/pseudomuto/protoc-gen-doc v1.5.0 // cmd/protoc-gen-doc
require github.com/pseudomuto/protoc-gen-doc v1.4.1 // cmd/protoc-gen-doc
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require google.golang.org/protobuf v1.27.1 // cmd/protoc-gen-go
require google.golang.org/protobuf v1.26.0 // cmd/protoc-gen-go
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/asim/go-micro/cmd/protoc-gen-micro/v3 v3.0.0-20211012122208-f63e46a7d1e9
require github.com/asim/go-micro/cmd/protoc-gen-micro/v3 v3.0.0-20210329103359-9b41d1bf0888
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/owncloud/protoc-gen-microweb v0.0.0-20210824101557-828409dbfbf9
require github.com/owncloud/protoc-gen-microweb v0.0.0-20210224131655-d9b1137a84d4
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0 // protoc-gen-openapiv2
require github.com/grpc-ecosystem/grpc-gateway/v2 v2.3.0 // protoc-gen-openapiv2
+2 -2
View File
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
go 1.16
require github.com/cespare/reflex v0.3.1
require github.com/cespare/reflex v0.3.0
+17 -15
View File
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.0. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -8,35 +8,37 @@ if [ -z "$GOBIN" ]; then
fi
BINGO="${GOBIN}/bingo-v0.5.1"
BINGO="${GOBIN}/bingo-v0.4.0"
BUF="${GOBIN}/buf-v0.56.0"
BUF="${GOBIN}/buf-v0.40.0"
BUILDIFIER="${GOBIN}/buildifier-v0.0.0-20210920153738-d6daef01a1a2"
BUILDIFIER="${GOBIN}/buildifier-v0.0.0-20210227132407-f2aed9ee205d"
CALENS="${GOBIN}/calens-v0.2.0"
FLAEX="${GOBIN}/flaex-v0.2.1-0.20210701123229-9d7dceed124f"
FILEB0X="${GOBIN}/fileb0x-v1.1.4"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.42.1"
FLAEX="${GOBIN}/flaex-v0.2.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.37.1"
GOVERAGE="${GOBIN}/goverage-v0.0.0-20180129164344-eec3514a20b5"
GOX="${GOBIN}/gox-v1.0.1"
HUGO="${GOBIN}/hugo-v0.88.1"
HUGO="${GOBIN}/hugo-v0.80.0"
MUTAGEN="${GOBIN}/mutagen-v0.11.8"
OAPI_CODEGEN="${GOBIN}/oapi-codegen-v1.8.2"
PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.4.1"
PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.5.0"
PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.26.0"
PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.27.1"
PROTOC_GEN_MICRO="${GOBIN}/protoc-gen-micro-v3.0.0-20210329103359-9b41d1bf0888"
PROTOC_GEN_MICRO="${GOBIN}/protoc-gen-micro-v3.0.0-20211012122208-f63e46a7d1e9"
PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20210224131655-d9b1137a84d4"
PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20210824101557-828409dbfbf9"
PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.3.0"
PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.6.0"
REFLEX="${GOBIN}/reflex-v0.3.1"
REFLEX="${GOBIN}/reflex-v0.3.0"
-2
View File
@@ -15,7 +15,5 @@ exclude_paths:
- 'ocis/docker/eos-ocis/Dockerfile'
- 'ocis/docker/eos-ocis-dev/Dockerfile'
- 'deployments/**'
- 'tests/acceptance/expected-failures-*.md'
- 'tests/acceptance/features/bootstrap/**'
...
+2 -2
View File
@@ -1,7 +1,7 @@
# The test runner source for API tests
CORE_COMMITID=b72258bf8ef1e483d92d42535abfe76f912d12a2
CORE_COMMITID=67ce741589a98c61062277666dfbfad38d068c2c
CORE_BRANCH=master
# The test runner source for UI tests
WEB_COMMITID=6f6855ebdea9ef5eb956ce517f3742e7018bccfa
WEB_COMMITID=531c4718dbc6cec184cb1f38cca53f726502f7f9
WEB_BRANCH=master
+116 -242
View File
@@ -9,6 +9,7 @@ config = {
"ocis-pkg",
"ocis",
"ocs",
"onlyoffice",
"proxy",
"settings",
"storage",
@@ -19,27 +20,22 @@ config = {
],
"localApiTests": {
"skip": False,
"earlyFail": True,
},
"apiTests": {
"numberOfParts": 10,
"skip": False,
"skipExceptParts": [],
"earlyFail": True,
},
"uiTests": {
"filterTags": "@ocisSmokeTest",
"debugSuites": [],
"skip": False,
"skipExceptParts": [],
"earlyFail": True,
},
"accountsUITests": {
"skip": False,
"earlyFail": True,
},
"settingsUITests": {
"skip": False,
"earlyFail": True,
},
"rocketchat": {
"channel": "ocis-internal",
@@ -124,8 +120,7 @@ def main(ctx):
test_pipelines = \
[buildOcisBinaryForTesting(ctx)] + \
testOcisModules(ctx) + \
testPipelines(ctx) + \
checkForRecentBuilds(ctx)
testPipelines(ctx)
build_release_pipelines = \
dockerReleases(ctx) + \
@@ -149,7 +144,7 @@ def main(ctx):
elif (ctx.build.event == "pull_request" and "[docs-only]" in ctx.build.title) or \
(ctx.build.event != "pull_request" and "[docs-only]" in (ctx.build.title + ctx.build.message)):
# [docs-only] is not taken from PR messages, but from commit messages
pipelines = [docs(ctx), changelog(ctx)]
pipelines = [docs(ctx)]
else:
test_pipelines.append(
@@ -190,56 +185,14 @@ def testOcisModules(ctx):
return pipelines + [scan_result_upload]
def checkForRecentBuilds(ctx):
pipelines = []
result = {
"kind": "pipeline",
"type": "docker",
"name": "stop-recent-builds",
"steps": stopRecentBuilds(ctx),
"depends_on": [],
"trigger": {
"ref": [
"refs/heads/master",
"refs/tags/**",
"refs/pull/**",
],
},
}
pipelines.append(result)
return pipelines
def stopRecentBuilds(ctx):
return [{
"name": "stop-recent-builds",
"image": "drone/cli:alpine",
"environment": {
"DRONE_SERVER": "https://drone.owncloud.com",
"DRONE_TOKEN": {
"from_secret": "drone_token",
},
},
"commands": [
"drone build ls %s --status running > /drone/src/recentBuilds.txt" % ctx.repo.slug,
"drone build info %s ${DRONE_BUILD_NUMBER} > /drone/src/thisBuildInfo.txt" % ctx.repo.slug,
"cd /drone/src && ./tests/acceptance/cancelBuilds.sh",
],
"when": {
"event": [
"pull_request",
],
},
}]
def testPipelines(ctx):
pipelines = []
if "skip" not in config["localApiTests"] or not config["localApiTests"]["skip"]:
pipelines = [
localApiTests(ctx, "owncloud", "apiBugDemonstration"),
localApiTests(ctx, "ocis", "apiBugDemonstration"),
localApiTests(ctx, "owncloud", "apiAccountsHashDifficulty", "default"),
localApiTests(ctx, "ocis", "apiAccountsHashDifficulty", "default"),
localApiTests(ctx, "ocis", "apiSpaces", "default"),
]
if "skip" not in config["apiTests"] or not config["apiTests"]["skip"]:
@@ -260,7 +213,8 @@ def testOcisModule(ctx, module):
steps = makeGenerate(module) + [
{
"name": "golangci-lint",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"mkdir -p cache/checkstyle",
"make -C %s ci-golangci-lint" % (module),
@@ -270,7 +224,8 @@ def testOcisModule(ctx, module):
},
{
"name": "test",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"mkdir -p cache/coverage",
"make -C %s test" % (module),
@@ -280,7 +235,7 @@ def testOcisModule(ctx, module):
},
{
"name": "scan-result-cache",
"image": "plugins/s3:latest",
"image": "plugins/s3:1",
"settings": {
"endpoint": {
"from_secret": "cache_s3_endpoint",
@@ -392,6 +347,7 @@ def uploadScanResults(ctx):
{
"name": "codacy",
"image": "plugins/codacy:1",
"pull": "always",
"settings": {
"token": {
"from_secret": "codacy_token",
@@ -401,6 +357,7 @@ def uploadScanResults(ctx):
{
"name": "sonarcloud",
"image": "sonarsource/sonar-scanner-cli:latest",
"pull": "always",
"environment": sonar_env,
},
{
@@ -425,12 +382,7 @@ def uploadScanResults(ctx):
},
}
def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
earlyFail = config["localApiTests"]["earlyFail"] if "earlyFail" in config["localApiTests"] else False
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
earlyFail = False
def localApiTests(ctx, storage = "owncloud", suite = "apiBugDemonstration", accounts_hash_difficulty = 4):
return {
"kind": "pipeline",
"type": "docker",
@@ -445,25 +397,24 @@ def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
{
"name": "localApiTests-%s-%s" % (suite, storage),
"image": "owncloudci/php:7.4",
"pull": "always",
"environment": {
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
"SKELETON_DIR": "/srv/app/tmp/testing/data/apiSkeleton",
"OCIS_SKELETON_STRATEGY": "%s" % ("copy" if storage == "owncloud" else "upload"),
"TEST_OCIS": "true",
"SEND_SCENARIO_LINE_REFERENCES": "true",
"STORAGE_DRIVER": storage,
"BEHAT_SUITE": suite,
"BEHAT_FILTER_TAGS": "~@skip&&~@skipOnOcis-%s-Storage" % ("OC" if storage == "owncloud" else "OCIS"),
"PATH_TO_CORE": "/srv/app/testrunner",
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
},
"commands": [
"make test-acceptance-api",
],
"volumes": [stepVolumeOC10Tests],
},
] + buildGithubCommentForBuildStopped("localApiTests-%s-%s" % (suite, storage), earlyFail) + githubComment(earlyFail) + stopBuild(earlyFail),
],
"services": redisForOCStorage(storage),
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
"trigger": {
@@ -476,12 +427,7 @@ def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
"volumes": [pipelineVolumeOC10Tests],
}
def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", accounts_hash_difficulty = 4):
earlyFail = config["apiTests"]["earlyFail"] if "earlyFail" in config["apiTests"] else False
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
earlyFail = False
def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "owncloud", accounts_hash_difficulty = 4):
return {
"kind": "pipeline",
"type": "docker",
@@ -496,26 +442,25 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
{
"name": "oC10ApiTests-%s-storage-%s" % (storage, part_number),
"image": "owncloudci/php:7.4",
"pull": "always",
"environment": {
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
"SKELETON_DIR": "/srv/app/tmp/testing/data/apiSkeleton",
"OCIS_SKELETON_STRATEGY": "%s" % ("copy" if storage == "owncloud" else "upload"),
"TEST_OCIS": "true",
"SEND_SCENARIO_LINE_REFERENCES": "true",
"STORAGE_DRIVER": storage,
"BEHAT_FILTER_TAGS": "~@skipOnOcis&&~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage&&~@skipOnOcis-%s-Storage" % ("OC" if storage == "owncloud" else "OCIS"),
"DIVIDE_INTO_NUM_PARTS": number_of_parts,
"RUN_PART": part_number,
"EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-API-on-%s-storage.md" % (storage.upper()),
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
},
"commands": [
"make -C /srv/app/testrunner test-acceptance-api",
],
"volumes": [stepVolumeOC10Tests],
},
] + buildGithubCommentForBuildStopped("Core-API-Tests-%s-storage-%s" % (storage, part_number), earlyFail) + githubComment(earlyFail) + stopBuild(earlyFail),
],
"services": redisForOCStorage(storage),
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
"trigger": {
@@ -534,6 +479,7 @@ def apiTests(ctx):
debugPartsEnabled = (len(debugParts) != 0)
for runPart in range(1, config["apiTests"]["numberOfParts"] + 1):
if (not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts)):
pipelines.append(coreApiTests(ctx, runPart, config["apiTests"]["numberOfParts"], "owncloud"))
pipelines.append(coreApiTests(ctx, runPart, config["apiTests"]["numberOfParts"], "ocis"))
return pipelines
@@ -541,65 +487,37 @@ def apiTests(ctx):
def uiTests(ctx):
default = {
"filterTags": "",
"debugSuites": [],
"skip": False,
"earlyFail": False,
# only used if 'full-ci' is in build title or if run by cron
"numberOfParts": 20,
"skipExceptParts": [],
}
params = {}
pipelines = []
params = {}
for item in default:
params[item] = config["uiTests"][item] if item in config["uiTests"] else default[item]
filterTags = params["filterTags"]
earlyFail = params["earlyFail"]
if len(params["debugSuites"]) != 0:
suiteNames = params["debugSuites"]
return [uiTestPipeline(ctx, suiteName, params["filterTags"]) for suiteName in suiteNames]
return [uiTestPipeline(ctx, None, params["filterTags"])]
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
earlyFail = False
def uiTestPipeline(ctx, suiteName, filterTags, storage = "ocis", accounts_hash_difficulty = 4):
testFeaturesBaseDir = "tests/acceptance/features/"
if suiteName:
paths = testFeaturesBaseDir + suiteName
else:
suiteName = "web-ocis-smoke-tests"
paths = None
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "tag" or ctx.build.event == "cron"):
numberOfParts = params["numberOfParts"]
skipExceptParts = params["skipExceptParts"]
debugPartsEnabled = (len(skipExceptParts) != 0)
for runPart in range(1, numberOfParts + 1):
if (not debugPartsEnabled or (debugPartsEnabled and runPart in skipExceptParts)):
pipelines.append(uiTestPipeline(ctx, "", earlyFail, runPart, numberOfParts))
# For ordinary PRs, always run the "minimal" UI test pipeline
# That has its own expected-failures file, and we always want to know that it is correct,
if (ctx.build.event != "tag"):
pipelines.append(uiTestPipeline(ctx, filterTags, earlyFail, 1, 2, "ocis", "smoke"))
pipelines.append(uiTestPipeline(ctx, filterTags, earlyFail, 2, 2, "ocis", "smoke"))
return pipelines
def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, storage = "ocis", uniqueName = "", accounts_hash_difficulty = 4):
standardFilterTags = "not @skipOnOCIS and not @skip and not @notToImplementOnOCIS and not @federated-server-needed"
standardFilterTags = "not @skipOnOCIS and not @skip and not @notToImplementOnOCIS"
if filterTags == "":
finalFilterTags = standardFilterTags
expectedFailuresFileFilterTags = ""
else:
finalFilterTags = filterTags + " and " + standardFilterTags
expectedFailuresFileFilterTags = "-" + filterTags.lstrip("@")
if uniqueName == "":
uniqueNameString = ""
else:
finalFilterTags = filterTags + " and " + standardFilterTags
uniqueNameString = "-" + uniqueName
if numberOfParts == 1:
pipelineName = "Web-Tests-ocis%s-%s-storage" % (uniqueNameString, storage)
else:
pipelineName = "Web-Tests-ocis%s-%s-storage-%s" % (uniqueNameString, storage, runPart)
return {
"kind": "pipeline",
"type": "docker",
"name": pipelineName,
"name": suiteName,
"platform": {
"os": "linux",
"arch": "amd64",
@@ -609,6 +527,7 @@ def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, s
{
"name": "webUITests",
"image": "owncloudci/nodejs:14",
"pull": "always",
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -619,9 +538,8 @@ def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, s
"TEST_TAGS": finalFilterTags,
"LOCAL_UPLOAD_DIR": "/uploads",
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"RUN_PART": runPart,
"DIVIDE_INTO_NUM_PARTS": numberOfParts,
"EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-webUI-on-%s-storage%s.md" % (storage.upper(), expectedFailuresFileFilterTags),
"TEST_PATHS": paths,
"EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-webUI-on-%s-storage.md" % (storage.upper()),
},
"commands": [
". /drone/src/.drone.env",
@@ -630,7 +548,7 @@ def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, s
"cd /srv/app/web",
"git checkout $WEB_COMMITID",
"cp -r tests/acceptance/filesForUpload/* /uploads",
"yarn install --frozen-lockfile",
"yarn install --all",
"yarn build",
"./tests/acceptance/run.sh",
],
@@ -640,7 +558,7 @@ def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, s
"path": "/uploads",
}],
},
] + buildGithubCommentForBuildStopped("Web-Tests-ocis-%s-storage-%s" % (storage, runPart), earlyFail) + githubComment(earlyFail) + stopBuild(earlyFail),
],
"services": selenium(),
"volumes": [pipelineVolumeOC10Tests] +
[{
@@ -658,11 +576,6 @@ def uiTestPipeline(ctx, filterTags, earlyFail, runPart = 1, numberOfParts = 1, s
}
def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
earlyFail = config["accountsUITests"]["earlyFail"] if "earlyFail" in config["accountsUITests"] else False
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
earlyFail = False
return {
"kind": "pipeline",
"type": "docker",
@@ -676,6 +589,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
{
"name": "WebUIAcceptanceTests",
"image": "owncloudci/nodejs:14",
"pull": "always",
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -696,10 +610,10 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"cd /srv/app/web",
"git checkout $WEB_COMMITID",
"cp -r tests/acceptance/filesForUpload/* /uploads",
"yarn install --frozen-lockfile",
"yarn install --all",
"yarn build",
"cd /drone/src/accounts",
"yarn install --frozen-lockfile",
"yarn install --all",
"make test-acceptance-webui",
],
"volumes": [stepVolumeOC10Tests] +
@@ -708,7 +622,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"path": "/uploads",
}],
},
] + buildGithubCommentForBuildStopped("accountsUITests", earlyFail) + githubComment(earlyFail) + stopBuild(earlyFail),
],
"services": selenium(),
"volumes": [stepVolumeOC10Tests] +
[{
@@ -726,11 +640,6 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
}
def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
earlyFail = config["settingsUITests"]["earlyFail"] if "earlyFail" in config["settingsUITests"] else False
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
earlyFail = False
return {
"kind": "pipeline",
"type": "docker",
@@ -744,6 +653,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
{
"name": "WebUIAcceptanceTests",
"image": "owncloudci/nodejs:14",
"pull": "always",
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -755,6 +665,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
"OCIS_SETTINGS_STORE": "/srv/app/tmp/ocis/settings",
},
"commands": [
". /drone/src/.drone.env",
@@ -763,9 +674,9 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads",
"cd /srv/app/web",
"git checkout $WEB_COMMITID",
"yarn install --frozen-lockfile",
"yarn install --all",
"cd /drone/src/settings",
"yarn install --frozen-lockfile",
"yarn install --all",
"make test-acceptance-webui",
],
"volumes": [stepVolumeOC10Tests] +
@@ -774,13 +685,25 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"path": "/uploads",
}],
},
] + buildGithubCommentForBuildStopped("settingsUITests", earlyFail) + githubComment(earlyFail) + stopBuild(earlyFail),
],
"services": [
{
"name": "redis",
"image": "redis:6-alpine",
"pull": "always",
},
] + selenium(),
{
"name": "selenium",
"image": "selenium/standalone-chrome-debug:3.141.59-20200326",
"pull": "always",
"volumes": [
{
"name": "uploads",
"path": "/uploads",
},
],
},
],
"volumes": [stepVolumeOC10Tests] +
[{
"name": "uploads",
@@ -796,80 +719,6 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
},
}
def stopBuild(earlyFail):
if (earlyFail):
return [{
"name": "stop-build",
"image": "drone/cli:alpine",
"environment": {
"DRONE_SERVER": "https://drone.owncloud.com",
"DRONE_TOKEN": {
"from_secret": "drone_token",
},
},
"commands": [
"drone build stop owncloud/ocis ${DRONE_BUILD_NUMBER}",
],
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]
else:
return []
def buildGithubCommentForBuildStopped(alternateSuiteName, earlyFail):
if (earlyFail):
return [{
"name": "build-github-comment-buildStop",
"image": "owncloud/ubuntu:20.04",
"commands": [
'echo "<details><summary>:boom: Acceptance tests <strong>%s</strong> failed. The build is cancelled...</summary>\\n\\n" >> /drone/src/comments.file' % alternateSuiteName,
],
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]
else:
return []
def githubComment(earlyFail):
if (earlyFail):
return [{
"name": "github-comment",
"image": "jmccann/drone-github-comment:1",
"settings": {
"message_file": "/drone/src/comments.file",
},
"environment": {
"GITHUB_TOKEN": {
"from_secret": "github_token",
},
},
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]
else:
return []
def dockerReleases(ctx):
pipelines = []
for arch in config["dockerReleases"]["architectures"]:
@@ -902,7 +751,8 @@ def dockerRelease(ctx, arch):
"steps": makeGenerate("") + [
{
"name": "build",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make -C ocis release-linux-docker",
],
@@ -910,6 +760,7 @@ def dockerRelease(ctx, arch):
{
"name": "dryrun",
"image": "plugins/docker:latest",
"pull": "always",
"settings": {
"dry_run": True,
"context": "ocis",
@@ -929,6 +780,7 @@ def dockerRelease(ctx, arch):
{
"name": "docker",
"image": "plugins/docker:latest",
"pull": "always",
"settings": {
"username": {
"from_secret": "docker_username",
@@ -972,20 +824,15 @@ def dockerEos(ctx):
"os": "linux",
"arch": "amd64",
},
"steps": makeGenerate("") + [
{
"name": "build",
"image": "owncloudci/golang:1.17",
"commands": [
"make -C ocis release-linux-docker",
],
},
"steps": makeGenerate("ocis") +
build() + [
{
"name": "dryrun-eos-ocis",
"image": "plugins/docker:latest",
"pull": "always",
"settings": {
"dry_run": True,
"context": "ocis",
"context": "ocis/docker/eos-ocis",
"tags": "linux-eos-ocis",
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
"repo": "owncloud/eos-ocis",
@@ -1001,6 +848,7 @@ def dockerEos(ctx):
{
"name": "docker-eos-ocis",
"image": "plugins/docker:latest",
"pull": "always",
"settings": {
"username": {
"from_secret": "docker_username",
@@ -1009,7 +857,7 @@ def dockerEos(ctx):
"from_secret": "docker_password",
},
"auto_tag": True,
"context": "ocis",
"context": "ocis/docker/eos-ocis",
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
"repo": "owncloud/eos-ocis",
},
@@ -1077,14 +925,16 @@ def binaryRelease(ctx, name):
"steps": makeGenerate("") + [
{
"name": "build",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make -C ocis release-%s" % (name),
],
},
{
"name": "finish",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make -C ocis release-finish",
],
@@ -1097,7 +947,8 @@ def binaryRelease(ctx, name):
},
{
"name": "upload",
"image": "plugins/s3:latest",
"image": "plugins/s3:1",
"pull": "always",
"settings": settings,
"when": {
"ref": [
@@ -1108,7 +959,8 @@ def binaryRelease(ctx, name):
},
{
"name": "changelog",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make changelog CHANGELOG_VERSION=%s" % ctx.build.ref.replace("refs/tags/v", "").split("-")[0],
],
@@ -1121,6 +973,7 @@ def binaryRelease(ctx, name):
{
"name": "release",
"image": "plugins/github-release:1",
"pull": "always",
"settings": {
"api_key": {
"from_secret": "github_token",
@@ -1168,6 +1021,7 @@ def releaseSubmodule(ctx):
{
"name": "release-submodule",
"image": "plugins/github-release:1",
"pull": "always",
"settings": {
"api_key": {
"from_secret": "github_token",
@@ -1207,6 +1061,7 @@ def releaseDockerManifest(ctx):
{
"name": "execute",
"image": "plugins/manifest:1",
"pull": "always",
"settings": {
"username": {
"from_secret": "docker_username",
@@ -1240,7 +1095,8 @@ def changelog(ctx):
"steps": [
{
"name": "generate",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make -C ocis changelog",
],
@@ -1248,6 +1104,7 @@ def changelog(ctx):
{
"name": "diff",
"image": "owncloudci/alpine:latest",
"pull": "always",
"commands": [
"git diff",
],
@@ -1255,6 +1112,7 @@ def changelog(ctx):
{
"name": "output",
"image": "owncloudci/alpine:latest",
"pull": "always",
"commands": [
"cat CHANGELOG.md",
],
@@ -1262,6 +1120,7 @@ def changelog(ctx):
{
"name": "publish",
"image": "plugins/git-action:1",
"pull": "always",
"settings": {
"actions": [
"commit",
@@ -1309,6 +1168,7 @@ def releaseDockerReadme(ctx):
{
"name": "execute",
"image": "chko/docker-pushrm:1",
"pull": "always",
"environment": {
"DOCKER_USER": {
"from_secret": "docker_username",
@@ -1342,19 +1202,19 @@ def docs(ctx):
"steps": [
{
"name": "docs-generate",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"commands": ["make -C %s docs-generate" % (module) for module in config["modules"]],
},
{
"name": "prepare",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"commands": [
"make -C docs docs-copy",
],
},
{
"name": "test",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"commands": [
"make -C docs test",
],
@@ -1362,6 +1222,7 @@ def docs(ctx):
{
"name": "publish",
"image": "plugins/gh-pages:1",
"pull": "always",
"settings": {
"username": {
"from_secret": "github_username",
@@ -1426,6 +1287,7 @@ def makeGenerate(module):
{
"name": "generate nodejs",
"image": "owncloudci/nodejs:14",
"pull": "always",
"commands": [
"%s ci-node-generate" % (make),
],
@@ -1433,7 +1295,8 @@ def makeGenerate(module):
},
{
"name": "generate go",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"%s ci-go-generate" % (make),
],
@@ -1453,6 +1316,7 @@ def notify(ctx):
{
"name": "notify-rocketchat",
"image": "plugins/slack:1",
"pull": "always",
"settings": {
"webhook": {
"from_secret": config["rocketchat"]["from_secret"],
@@ -1476,13 +1340,17 @@ def notify(ctx):
def ocisServer(storage, accounts_hash_difficulty = 4, volumes = []):
environment = {
#'OCIS_LOG_LEVEL': 'debug',
"OCIS_URL": "https://ocis-server:9200",
"STORAGE_HOME_DRIVER": "%s" % (storage),
"STORAGE_USERS_DRIVER": "%s" % (storage),
"STORAGE_USERS_DRIVER_LOCAL_ROOT": "/srv/app/tmp/ocis/local/root",
"STORAGE_USERS_DRIVER_OWNCLOUD_DATADIR": "/srv/app/tmp/ocis/owncloud/data",
"STORAGE_USERS_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/users",
"STORAGE_METADATA_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/metadata",
"STORAGE_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/users",
"STORAGE_DRIVER_LOCAL_ROOT": "/srv/app/tmp/ocis/local/root",
"STORAGE_METADATA_ROOT": "/srv/app/tmp/ocis/metadata",
"STORAGE_DRIVER_OWNCLOUD_DATADIR": "/srv/app/tmp/ocis/owncloud/data",
"STORAGE_DRIVER_OWNCLOUD_REDIS_ADDR": "redis:6379" if storage == "owncloud" else "",
"STORAGE_HOME_DATA_SERVER_URL": "http://ocis-server:9155/data",
"STORAGE_USERS_DATA_SERVER_URL": "http://ocis-server:9158/data",
"STORAGE_SHARING_USER_JSON_FILE": "/srv/app/tmp/ocis/shares.json",
"PROXY_ENABLE_BASIC_AUTH": True,
"WEB_UI_CONFIG": "/drone/src/tests/config/drone/ocis-config.json",
@@ -1502,6 +1370,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = []):
{
"name": "ocis-server",
"image": "owncloudci/alpine:latest",
"pull": "always",
"detach": True,
"environment": environment,
"commands": [
@@ -1513,6 +1382,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = []):
{
"name": "wait-for-ocis-server",
"image": "owncloudci/wait-for:latest",
"pull": "always",
"commands": [
"wait-for -it ocis-server:9200 -t 300",
],
@@ -1524,6 +1394,7 @@ def cloneCoreRepos():
{
"name": "clone-core-repos",
"image": "owncloudci/alpine:latest",
"pull": "always",
"commands": [
"source /drone/src/.drone.env",
"git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing",
@@ -1540,6 +1411,7 @@ def redis():
{
"name": "redis",
"image": "redis:6-alpine",
"pull": "always",
},
]
@@ -1554,6 +1426,7 @@ def selenium():
{
"name": "selenium",
"image": "selenium/standalone-chrome-debug:3.141.59",
"pull": "always",
"volumes": [{
"name": "uploads",
"path": "/uploads",
@@ -1565,7 +1438,8 @@ def build():
return [
{
"name": "build",
"image": "owncloudci/golang:1.17",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"make -C ocis build",
],
@@ -1579,9 +1453,6 @@ def example_deploys(ctx):
"ocis_keycloak/latest.yml",
"ocis_traefik/latest.yml",
"ocis_wopi/latest.yml",
"ocis_hello/latest.yml",
"ocis_s3/latest.yml",
"oc10_ocis_parallel/latest.yml",
]
released_configs = [
"cs3_users_ocis/released.yml",
@@ -1668,6 +1539,7 @@ def checkStarlark():
{
"name": "format-check-starlark",
"image": "owncloudci/bazel-buildifier",
"pull": "always",
"commands": [
"buildifier --mode=check .drone.star",
],
@@ -1675,6 +1547,7 @@ def checkStarlark():
{
"name": "show-diff",
"image": "owncloudci/bazel-buildifier",
"pull": "always",
"commands": [
"buildifier --mode=fix .drone.star",
"git diff",
@@ -1707,6 +1580,7 @@ def genericCache(name, action, mounts, cache_key):
step = {
"name": "%s_%s" % (action, name),
"image": "meltwater/drone-cache:v1",
"pull": "always",
"environment": {
"AWS_ACCESS_KEY_ID": {
"from_secret": "cache_s3_access_key",
+1 -3
View File
@@ -1,4 +1,2 @@
accounts/ @kulmann @pascalwengerter @paulcod3
settings/ @kulmann @pascalwengerter @paulcod3
web/ @kulmann @pascalwengerter
/onlyoffice/ @LukasHirt
.drone.star @wkloucek @micbar @phil-davis @individual-it
+8 -2
View File
@@ -1,9 +1,9 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
directory: "/ocis"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 2
- package-ecosystem: "npm"
@@ -18,6 +18,12 @@ updates:
interval: "weekly"
open-pull-requests-limit: 2
- package-ecosystem: "npm"
directory: "/onlyoffice"
schedule:
interval: "weekly"
open-pull-requests-limit: 2
- package-ecosystem: "npm"
directory: "/idp"
schedule:
-14
View File
@@ -23,26 +23,12 @@ labels:
- name: OCIS-Fastlane
color: "#deadbf"
description: Planned outside of the sprint
- name: Storage:EOS
color: "#3F7A62"
- name: Storage:S3NG
color: "#3F7A62"
- name: Storage:CephFS
color: "#3F7A62"
- name: Storage:OCIS
color: "#3F7A62"
- name: Storage:POSIX
color: "#3F7A62"
- name: Storage:ownCloudSQL
color: "#3F7A62"
teams:
- name: ci
permission: admin
- name: employees
permission: push
- name: cern
permission: triage
branches:
- name: master
-1
View File
@@ -7,7 +7,6 @@ daysUntilClose: 10
exemptLabels:
- "Type:Bug"
- "Type:Technical-Debt"
- "Category:Research"
# Label to use when marking an issue as stale
staleLabel: "Status:Stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
-1
View File
@@ -13,7 +13,6 @@ node_modules/
ocis/ocis
ocis/cmd/ocis/__debug_bin
ocis/cmd/ocis/config/
config/
.idea
+1 -1
View File
@@ -4,4 +4,4 @@ config-docs-generate: $(FLAEX)
@$(FLAEX) >| ../docs/extensions/$(NAME)/configuration.md
.PHONY: grpc-docs-generate
grpc-docs-generate: buf-generate
grpc-docs-generate: ../docs/extensions/${NAME}/grpc.md
+4
View File
@@ -1,2 +1,6 @@
.PHONY: generate
generate: ci-node-generate ci-go-generate
.PHONY: embed.yml
embed.yml: $(FILEB0X)
@cd pkg/assets/ && echo -n "$(NAME): embed.go - " && $(FILEB0X) embed.yml
+19 -10
View File
@@ -1,5 +1,4 @@
OCIS_REPO := github.com/owncloud/ocis
IMPORT := ($OCIS_REPO)/$(NAME)
IMPORT := github.com/owncloud/ocis/$(NAME)
BIN := bin
DIST := dist
@@ -11,9 +10,15 @@ else
UNAME := $(shell uname -s)
endif
GOBUILD ?= go build
ifeq ($(UNAME), Darwin)
GOBUILD ?= go build -i
else
GOBUILD ?= go build
endif
PACKAGES ?= $(shell go list ./...)
SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*")
GENERATE ?= $(PACKAGES)
TAGS ?=
@@ -37,9 +42,8 @@ ifndef DATE
DATE := $(shell date -u '+%Y%m%d')
endif
LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w -X "$(OCIS_REPO)/ocis-pkg/version.String=$(VERSION)" -X "$(OCIS_REPO)/ocis-pkg/version.Date=$(DATE)"
DEBUG_LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -X "$(OCIS_REPO)/ocis-pkg/version.String=$(VERSION)" -X "$(OCIS_REPO)/ocis-pkg/version.Date=$(DATE)"
LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
DEBUG_LDFLAGS += -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
GCFLAGS += all=-N -l
.PHONY: all
@@ -66,18 +70,23 @@ fmt:
.PHONY: golangci-lint
golangci-lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT) run -E gosec -E bodyclose -E dogsled -E durationcheck -E revive -E ifshort -E makezero -E prealloc -E predeclared --path-prefix $(NAME)
$(GOLANGCI_LINT) run -E gosec -E bodyclose -E dogsled -E durationcheck -E golint -E ifshort -E makezero -E prealloc -E predeclared --path-prefix $(NAME)
.PHONY: ci-golangci-lint
ci-golangci-lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT) run -E gosec -E bodyclose -E dogsled -E durationcheck -E revive -E ifshort -E makezero -E prealloc -E predeclared --path-prefix $(NAME) --timeout 10m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
$(GOLANGCI_LINT) run -E gosec -E bodyclose -E dogsled -E durationcheck -E golint -E ifshort -E makezero -E prealloc -E predeclared --path-prefix $(NAME) --timeout 10m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
.PHONY: test
test:
@go test -v -coverprofile coverage.out ./...
test: $(GOVERAGE)
@echo
@echo
@echo "$(NAME): test"
@echo
@$(GOVERAGE) -v -coverprofile coverage.out $(PACKAGES)
.PHONY: go-coverage
go-coverage:
@echo "$(NAME): go-coverage"
@if [ ! -f coverage.out ]; then $(MAKE) test &>/dev/null; fi;
@go tool cover -func coverage.out | tail -1 | grep -Eo "[0-9]+\.[0-9]+"
+60 -18
View File
@@ -1,21 +1,63 @@
.PHONY: protoc-gen-openapiv2
protoc-gen-openapiv2:
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2
.PHONY: protoc-deps
protoc-deps: $(BINGO)
@# #TODO: bingo creates symlinks from the -l option in the current directory
@# if no GOPATH and GOBIN is set, but they should reside inside .bingo
@# for now we move them manually
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go
@cd .. && mv protoc-gen-go .bingo/
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v3
@cd .. && mv protoc-gen-micro .bingo/
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
@cd .. && mv protoc-gen-microweb .bingo/
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
@cd .. && mv protoc-gen-openapiv2 .bingo/
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
@cd .. && mv protoc-gen-doc .bingo/
.PHONY: buf-generate
buf-generate: $(BUF) protoc-deps
$(BUF) generate
.PHONY: $(PROTO_SRC)/${NAME}.pb.go
$(PROTO_SRC)/${NAME}.pb.go: $(BUF) protoc-gen-openapiv2 $(PROTOC_GEN_GO)
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.go"
@$(BUF) protoc \
-I=$(PROTO_SRC)/ \
-I=../third_party/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \
--plugin protoc-gen-go=$(PROTOC_GEN_GO) \
--go_out=$(PROTO_SRC) \
--go_opt=paths=source_relative \
$(PROTO_SRC)/${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.pb.micro.go
$(PROTO_SRC)/${NAME}.pb.micro.go: $(BUF) protoc-gen-openapiv2 $(PROTOC_GEN_MICRO)
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.micro.go"
@$(BUF) protoc \
-I=$(PROTO_SRC)/ \
-I=../third_party/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \
--plugin protoc-gen-micro=$(PROTOC_GEN_MICRO) \
--micro_out=logtostderr=true:$(PROTO_SRC) \
--micro_opt=paths=source_relative \
$(PROTO_SRC)/${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.pb.web.go
$(PROTO_SRC)/${NAME}.pb.web.go: $(BUF) protoc-gen-openapiv2 $(PROTOC_GEN_MICROWEB)
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.web.go"
@$(BUF) protoc \
-I=$(PROTO_SRC)/ \
-I=../third_party/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \
--plugin protoc-gen-microweb=$(PROTOC_GEN_MICROWEB) \
--microweb_out=logtostderr=true:$(PROTO_SRC) \
--microweb_opt=paths=source_relative \
$(PROTO_SRC)/${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.swagger.json
$(PROTO_SRC)/${NAME}.swagger.json: $(BUF) protoc-gen-openapiv2 $(PROTOC_GEN_OPENAPIV2)
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.swagger.json"
@$(BUF) protoc \
-I=$(PROTO_SRC)/ \
-I=../third_party/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \
--plugin protoc-gen-openapiv2=$(PROTOC_GEN_OPENAPIV2) \
--openapiv2_out=logtostderr=true:$(PROTO_SRC)/ \
$(PROTO_SRC)/${NAME}.proto
.PHONY: ../docs/extensions/${NAME}/grpc.md
../docs/extensions/${NAME}/grpc.md: $(BUF) protoc-gen-openapiv2 $(PROTOC_GEN_DOC)
@echo "$(NAME): generating ../docs/extensions/${NAME}/grpc.md"
@$(BUF) protoc \
-I=$(PROTO_SRC)/ \
-I=../third_party/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \
--plugin protoc-gen-doc=$(PROTOC_GEN_DOC) \
--doc_opt=./templates/GRPC.tmpl,grpc.md \
--doc_out=../docs/extensions/${NAME} \
$(PROTO_SRC)/${NAME}.proto
+1 -3
View File
@@ -13,10 +13,8 @@ release-dirs:
release-linux: $(GOX) release-dirs
$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
# docker specific packaging flags
DOCKER_LDFLAGS += -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathType=path" -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis"
release-linux-docker: $(GOX) release-dirs
$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-windows
release-windows: $(GOX) release-dirs
+3 -1054
View File
File diff suppressed because it is too large. Load diff
-263
View File
@@ -1,263 +0,0 @@
First of all, thank you for taking the time to read this and your interest in contributing to ownCloud Infinite Scale!
The following is a set of guidelines for contributing to most of the projects hosted in the [ownCloud Organization](https://github.com/owncloud) on [GitHub](https://www.github.com). These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
For simplicity reasons, this document mostly refers to the ownCloud [Infinite Scale project](https://www.github.com/owncloud/ocis), but it should be easily transferable to other (sub)projects.
#### Table Of Contents
[I don't want to read this whole thing, I just have a question](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
[What should I know before I get started](#what-should-i-know-before-i-get-started)
* [ownCloud is hosted on Github](#owncloud-is-hosted-on-github)
* [ownCloud Company, Engineering Partners and Community](#owncloud-company,-engineering-partners-and-community)
* [Licensing and CLA](#licensing-and-cla)
[How Can I Contribute](#how-can-i-contribute)
* [Help spreading the word](#help-spreading-the-word)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Your First Code Contribution](#your-first-code-contribution)
* [Pull Requests](#pull-requests)
* [Documentation Contributions](#documentation-contributions)
* [Internationalization](#internationalization)
* [Deployments: Docker, Ansible and friends](#deployments-docker-ansible-and-friends)
[Styleguides](#styleguides)
* [Git Commit Messages](#git-commit-messages)
* [Golang Styleguide](#golang-styleguide)
* [Web Styleguide](#web-styleguide)
* [Documentation Styleguide](#documentation-styleguide)
[Additional Notes](#additional-notes)
* [Issue and Pull Request Labels](#issue-and-pull-request-labels)
## I don't want to read this whole thing I just have a question
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
For general questions, please refer to [ownCloud's FAQs](https://owncloud.com/faq/) or ask on the [ownCloud Central Server](https://central.owncloud.org/).
We also have a [Rocket Chat Server](https://talk.owncloud.com/channel/ocis) to answer your questions specifically about ownCloud Infinite Scale.
## What should I know before I get started
### ownCloud is hosted on Github
To effectively contribute to ownCloud Infinite Scale, you need a Github account. You can get that for free at [Github](https://github.com/join). You can find howtos on the internet, for example [here](https://www.wikihow.com/Create-an-Account-on-GitHub).
For other ways of contributing, for example with translations, other systems require you to have an account as well, for example [Transifex](https://www.transifex.com).
The ownCloud project follows the strict Github workflow of development as briefly [described here](https://guides.github.com/introduction/flow/).
### ownCloud Company, Engineering Partners and Community
ownCloud Infinite Scale is largely created by developers who are employed by the [ownCloud company](https://www.owncloud.com), which is located in Germany. It is providing support for ownCloud for customers worldwide. In addition there are engineering partners who also work full time on ownCloud related code, for example in [CERN REVA](https://github.com/cs3org/reva/).
Because of that fact, the pace that the development is moving forward is sometimes high for people who are not willing and/or able to spend a comparable amount of time to contribute. Even though this can be a challenge, it should not scare anybody away. Here is our clear commitment that we feel honored by everybody who is interested in our work and improves it, no matter how big the contribution might be.
We as the full time devs from either organization are doing our best to listen, review and consider all changes that are brought forward following this guideline and make sense for the project.
### Licensing and CLA
We are very happy that there is *no CLA* required for most of the code of ownCloud Infinite Scale.
Currently, only for the following components you need to sign a [Contributors License Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement):
* [ownCloud Web](https://github.com/owncloud/web/): [Link to CLA](https://owncloud.com/contribute/join-the-development/contributor-agreement/)
Please make sure to read and understand the details of the CLA before starting to invest time on a component that requires it. If you have any questions or concerns please feel free to raise them with us.
## How Can I Contribute
There are many ways to contribute to open source projects, and all are equally valuable and appreciated.
### Help spreading the word
This way to contribute to the project can not be overestimated: People who talk about their experience with ownCloud Infinite Scale and help others with that are the key to success of the project.
There are too many ways of doing that to line them up here, but examples are answering questions in [ownCloud Central](https://central.owncloud.org/) or on [ownCloud Talk](https://talk.owncloud.com/channel/ocis), writing blog posts etc pp.
There is no formal guideline to this, just do it :-)
### Reporting Bugs
This section guides you through submitting a bug report for ownCloud Infinite Scale. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/owncloud/ocis/issues/new?Type%3ABug&template=bug_report.md), the information it asks for helps us resolve issues faster.
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. If you have permission to reopen the issue, feel free to do so.
#### Before Submitting A Bug Report
* **Make sure you are running a recent version** Usually, developers' interest in old versions of software drops very fast once a new shiny version has been released. So the general recommendation is: Use the latest released version or even the current master to reproduce problems that you might encounter. That helps a lot to attract developers attention.
* **Determine which [repository](https://github.com/owncloud) the problem should be reported in**.
* **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Aowncloud)** with possibly a more granular filter on the repository, to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one **if you have new information**. Please abstain from adding "plus ones", except using the Github emojis. That might indicate how many users are affected.
#### How Do I Submit A (Good) Bug Report
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](https://github.com/owncloud) your bug is related to, create an issue on that repository and provide the following information by filling in [the template](https://github.com/owncloud/ocis/issues/new?Type%3ABug&template=bug_report.md).
Explain the problem and include additional details to help maintainers reproduce the problem:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. Start with describing, from a user perspective, what you tried to achieve, i.e. "I want to share some pictures with Grandma". When listing steps, **don't just say what you did, but explain how you did it**. For example, if you uploaded a file to ownCloud, say which client you used, which way of uploading you chose, if the name was special somehow and how big it was.
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **If you report a web browser related problem**, consider to using the browser's Web developer tools (such as the debugger, console or network monitor) to check what happened. Make sure to add screenshots of the utilities if you are short of time to interpret it.
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context by answering these questions:
* **Did the problem start happening recently** (e.g. after updating to a new version) or was this always a problem?
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen? You can find more information about how to set up [test environments](https://owncloud.dev/ocis/development/testing/) in the [developer documentation](https://owncloud.dev/#developer-documentation).
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment as asked for in the template.
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for ownCloud Infinite Scale, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](https://github.com/owncloud/ocis/.github/blob/master/.github/ISSUE_TEMPLATE/feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed.
#### Before Submitting An Enhancement Suggestion
* **Check if there's already an extension or other component which provides that enhancement, even in a different way.**
* **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Aowncloud)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. Feel free to use the Github emojis to indicate that you are in favour of an enhancement request.
#### How Do I Submit A (Good) Enhancement Suggestion
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](https://github.com/owncloud) your enhancement suggestion is related to, create an issue on that repository and provide the following information:
* **Use a clear and descriptive title** for the issue to identify the suggestion.
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Explain why this enhancement would be useful** to most ownCloud users.
* **List some other projects or products where this enhancement exists.**
### Your First Code Contribution
Unsure where to begin contributing to ownCloud? You can start by looking through these `Needs-help` issues:
* The [Good first issue](https://github.com/owncloud/ocis/labels/Topic%3Agood-first-issue) label marks good items to start with.
* [Tests needed](https://github.com/owncloud/ocis/labels/Interaction%3ANeeds-tests) - issues which would benefit from a test.
* [Help wanted issues](https://github.com/owncloud/ocis/labels/Interaction%3ANeeds-help) - issues which should be a bit more involved.
It is fine to pick one of the list following personal preference. While not perfect, number of comments is a reasonable proxy for impact a given change will have.
To find out how to set up ownCloud Infinite Scale for local development please refer to the [Developer Documentation](https://owncloud.dev/ocis/development/getting-started/). It contains a lot of information that will come in handy when starting to work on the project.
### Pull Requests
All contributions to ownClouds projects use so called pull requests following the [Github PR workflow](https://guides.github.com/introduction/flow/).
Please follow these steps to have your contribution considered by the maintainers:
* Follow all instructions in [the template](https://github.com/owncloud/ocis/blob/master/.github/pull_request_template.md)
* Follow the [styleguides](#styleguides) where applicable
* After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing <details><summary>What if the status checks are failing?</summary>If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.</details>
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
### Documentation Contributions
ownCloud is very proud of the documentation it has, which is the work of a great team of people. Of course, also the documentation is open to contributions.
See the [Getting Started Guide](https://owncloud.dev/ocis/development/getting-started/) on how to get started. Other useful information is summarized in the [Documentation Readme](https://github.com/owncloud/docs).
### Internationalization
Our projects are getting translated into many languages to allow people from all over the world to use ownCloud in their native language. For translations, ownCloud uses [Transifex](https://www.transifex.com) as a community based collaboration platform for internationalization.
For contributions please refer to the [Transifex Resources](https://www.transifex.com/resources/) to learn how to improve ownClouds translations there.
### Deployments: Docker, Ansible and friends
Depending on the ownCloud component, there is complex deployment tooling to install in various environments. There is for example [ownCloud Ansible](https://github.com/owncloud-ansible) with Ansible resources. Contributions to that are very appreciated and follow the same guidelines as every other code contribution.
## Styleguides
To keep up with a consistent code and tooling landscape, some of the ownCloud modules maintain styleguides for contributions. It is mandatory to follow them in contributions.
### Git Commit Messages
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally after the first line
* When only changing documentation, include `[docs-only]` in the commit title
### Golang Styleguide
Use the built in golang code formatter before submitting the patch. Also, consulting documentation like [Effective Go](https://golang.org/doc/effective_go) or [Practical Go](http://bit.ly/gcsg-2019) helps to improve the code quality.
### Web Styleguide
Refer to related documents in the [ownCloud Web Repository](https://github.com/owncloud/web).
#### Documentation Styleguide
See the [ownCloud Documentation Styleguide](https://github.com/owncloud/docs/blob/master/docs/style-guide.md).
## Additional Notes
### Issue and Pull Request Labels
This section lists the labels we use to help us track and manage issues and pull requests. Most labels are used across all ownCloud repositories, but some are specific.
[GitHub search](https://help.github.com/articles/searching-issues/) makes it easy to use labels for finding groups of issues or pull requests you're interested in. To help you find issues and pull requests, each label can be used in search links for finding open items with that label in the ownCloud repositories.
The labels are loosely grouped by their purpose, but it's not required that every issue has a label from every group or that an issue can't have more than one label from the same group.
The list here contains all the more general categories of issues which are followed by a colon and a specific value. For example severity 1 looks like `Severity:sev1-critical`.
#### Platform
Describes the platform the issue is happening on, ie. iOS or Windows.
#### Estimation
T-Shirt sizes for effort estimation to fix that bug or implement an enhancement. Ranges from XS to XXXL.
#### Priority
P1 to P4 (lowest) to indicate an priority. Mostly a tool for internal project management and support.
#### QA
Flags to indicate the internal QA status in terms of process and priority. Please leave alone unless you're QA ;-)
#### Severity
Severity for the product, mostly impact on user.
#### Type
The issue type, helps to structure the issues in the agile categories (Epic, Story...) but also organizational ones.
#### Topic
A general category of the topic of a ticket.
#### Category
Categorizes the issue to also indicate the type of the issue.
#### Status
The status in the ticket life cycle. Keep an eye on that one, especially for the `Waiting-for-Feedback` tag which might indicate that the reporter is asked for feedback.
#### Interaction
Another label that indicates the type of the issue.
#### Browser
Important for browser dependent web issues. It specifies the browser that shows the error.
#### Early-Adopter
Tags issues that were reported by one of the oCIS early adopters, ie. customers and users who start using ownCloud Infinite Scale before it's general availability.
+1 -1
View File
@@ -1,4 +1,4 @@
FROM owncloudci/golang:1.17 as build
FROM owncloudci/golang:1.16 as build
COPY ./ /ocis/
+3 -2
View File
@@ -24,6 +24,7 @@ OCIS_MODULES = \
ocis \
ocis-pkg \
ocs \
onlyoffice \
proxy \
settings \
storage \
@@ -32,7 +33,7 @@ OCIS_MODULES = \
web \
webdav
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
ifneq (, $(shell which go 2> /dev/null)) # supress `command not found warnings` for non go targets in CI
include .bingo/Variables.mk
endif
@@ -150,7 +151,7 @@ protobuf:
.PHONY: bingo-update
bingo-update: $(BINGO)
$(BINGO) get -l -u
$(BINGO) get -u
CHANGELOG_VERSION =
+3 -3
View File
@@ -1,6 +1,6 @@
# ownCloud Infinite Scale
[![Rocket chat](https://img.shields.io/badge/Chat%20on%20Rocket.Chat-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSItDnaQIpKhOlkQFemoVShChVArtOpgcv2EJg1Jiouj4Fpw8GOx6uDirKuDqyAIfoA4OTopukiJ/0sKLWI8OO7Hu3uPu3eA0Kwy1eyZAFTNMtLJhJjNrYqBVwQxghDiiMjM1OckKQXP8XUPH1/vYjzL+9yfI5QvmAzwicSzTDcs4g3imU1L57xPHGZlOU98Tjxu0AWJH7muuPzGueSwwDPDRiY9TxwmFktdrHQxKxsq8TRxNK9qlC9kXc5z3uKsVuusfU/+wmBBW1nmOs1hJLGIJUgQoaCOCqqwEKNVI8VEmvYTHv6I45fIpZCrAkaOBdSgQnb84H/wu1uzODXpJgUTQO+LbX+MAoFdoNWw7e9j226dAP5n4Err+GtNIP5JeqOjRY+AgW3g4rqjKXvA5Q4w9KTLhuxIfppCsQi8n9E35YDBW6B/ze2tvY/TByBDXaVugINDYKxE2ese7+7r7u3fM+3+fgDAvHLGj7r9AwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+QMHg05Mvq8cfAAAAAGYktHRAD/AP8A/6C9p5MAAAcbSURBVGje7VlpTFRXGLU0NmmNpuma9IciCCKCQDTuxqQWkrrTNJAal6Y2ECyoURONRBPXuBujVpsYiys1qUH7w8QVjQnVP9Zqq3Y2FgcQmIEBBpgZmPl6vvveLG94D2ZAFhNvcsIwb5nv3G87994hQ970oY+OjgaygR3AWmAyMPRNIjAV+A8gGQ3AKX1U1Nf60aNTgVn4nIDvPgLeGYwE3gd+ATwBJBhuQ2xshyEuzmWIiWnQRUY+0o0adRBkUvQxMRGDicAHwLkg4xUwTJtG5RkZVDZnDunHjKmCV3JB4r3BQyIq6jgM83RFQhCZNIlMqamkj41txzO/47tcYBWwApgHJAGfABH96YGxMMbMxnVHoAsweRdgBf4GfgW+A77AxPRt3ugjIzONycmO+qIiMqal9YxAVBThPYQcIYSX9H90dDvwFNjIRPqWQFKSo+3RI7Jev84xHjaBMuRHdX4+mVesoNJZs0gfFyeRkIiwd2qAQmA1sBhIAT4F3n0dIRSLH9LVbd9OzpqaHnvBMGMG6ZOSQrmXPVMve+cikANwme55UYDb1xri413VO3aQITm5N7nQ0/x5BXBR+Bb4sEdeQJ2vN0ycKNxuGDeuV3kggM96GbqA78V3UmipwQHcAzK4vIdTRvNQ16UyGhtLtbt2hRZKsnGGsWOpFL3iZXo6Va9aRbVbt5LlwAGyHj0qwJ9rt2yhqpwcqli8mExTp4pnfCQ7v7tVzpmEUGZ/GmD2GmReupScZjOV4ce0ZloYDS9VLFpEdbt3k/3GDXKZTORuaiLq6CCt4cE1vsdpNJIdBaNu506qWLBAvEun7hmWON902VdwMQoo8j5ku3CB2hsbqSw7W3XGjRMmUHVuLtlv3aKOhgbq1fB4qKO+XpBh7xgTE9U8wr0lq8uKhYs/i9hPSKCWBw+kchpYUXhmUF7Ny5ZRy7175HE66XUPj8NB9uJiMi9Z4v9NPwkb8H1IBCznz5ORNY/3YTQmnhnr4cO9n/EQBnvEsn+/sCWIRCUwW4vAJu+NprlzFTNvTEmhxkuXRPz21/C0t4tQNnIUKEkUs9ZSI/AlYFfczB6JjyfbuXMiVvt9uN3UcPo0GbxdXbKrA/hJjcAIoESRPAidmk2b+iTeQ/ZEWxu9Wr9e0ld+2x7w4kqNxInA2S+dPp0cz5/TQA/H06dkmjIl0AstQGqw8RFy4xA3cU1+tWGDcKNWorF7azZuJFtBQefkxnMt9++LhlaHpuh48qTTO9orK8l67JjwctPly+RubdXMh+o1a6Q+4fdCfjCB4bJrfDc1FhaqvxAhVbN5s9TQWBrgLxvqcbl897TcvUsmrC+88oFXcs4XL/z8bDaqWrnSJzGwdKX6Eyc0vWA7cyY4mQuMgesMfPEZ8MynLJE4bITacBoMZJo82R+X+MsywlVW5ruHPaMbOZICPVp/8qTvemtJiSgQXqP4esX8+Zpl2n7zpiAZQOAPxc6JrM3/DYUASwY2WEFg5kxyVVT4CcBDgQS4uzacOuUn8PAhGcaPVxKALHFDAagSgFTpjgCH0F+KELp4UTMmWf9A/EkhhBdb9u1TaCA2kEl5VSnrHSbuCyG7XcS1NwyZjO3s2V6FEC/EyxVJjPKlJczczc3UdOWKMLzp6lVhULDGaXv8mKxHjojQYfHWqRBYLGTDJHHXtd++rVmuRRKvXh2cxJsDjR8GHFfsC3EZRZg4nj0b+DKKCiZyTllGvwre2MqQ48qlaGRIRhZZA9rI1q0LbmQlWo1sKHBSISWg0zn+tPpBn0sJJL6KlMjpSpXGKfZJWcxhjcw9gWOx32YePYWTWkXM3QI+7m6FthxoVshpLGLsd+70i/Gc3JY9exRlVsZLYGYoS0wOpW3y9odUlVDqeD3Q1/HOqzxzZqbagoa3YZaGs0sxCigNJMD7Rq/fao+Y8eZr16gqK0taxHReUtYBP2BFGBEOgZEKAnip5dAhTZdz13bq9aKTdpUrfI11EN/LRtdu20bl8+aJRNVY1LO8WRiW8TKB2Yo8wHq4qaios/G1tVSdlycMYMnLcqAqO5tq8vPJsnevCDsGxzTLC57lioULJXmMDi6MVpbIwFrPW/7jerrduDewEvE+jlOnU2qi8nJhkG8PVGVjS4HQNrbagNtAOvennho/Pjh8uJV75TKHAYcMz7bG7IULt7xgL5Q3fkf09ripQNEHEhOlPSCrlVqKi8VCh3uDivFtgZWrC7jkxGTxeAb4Ue4/vTtYNEDdydvfjuBGVrl8OZWnpUkaXj0E/gQWyDOYB2wHDssa6xhwENgqn4bOBxLFoWG4ydnN7LMesmhtJWqEC8/mb3xUO9AHfXy+VR1m3D6X9/aHD4aTSj4xOQr8I/aHOh+5eoVUrVwl1nCzG2znxbwz8bncA7JkOcGxu0/eucuUY3fYkLfj7Xg7Bs34HwoINZEQp4aVAAAAAElFTkSuQmCC)](https://talk.owncloud.com/channel/ocis)
[![Rocket chat](https://img.shields.io/badge/Chat%20on%20Rocket.Chat-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSItDnaQIpKhOlkQFemoVShChVArtOpgcv2EJg1Jiouj4Fpw8GOx6uDirKuDqyAIfoA4OTopukiJ/0sKLWI8OO7Hu3uPu3eA0Kwy1eyZAFTNMtLJhJjNrYqBVwQxghDiiMjM1OckKQXP8XUPH1/vYjzL+9yfI5QvmAzwicSzTDcs4g3imU1L57xPHGZlOU98Tjxu0AWJH7muuPzGueSwwDPDRiY9TxwmFktdrHQxKxsq8TRxNK9qlC9kXc5z3uKsVuusfU/+wmBBW1nmOs1hJLGIJUgQoaCOCqqwEKNVI8VEmvYTHv6I45fIpZCrAkaOBdSgQnb84H/wu1uzODXpJgUTQO+LbX+MAoFdoNWw7e9j226dAP5n4Err+GtNIP5JeqOjRY+AgW3g4rqjKXvA5Q4w9KTLhuxIfppCsQi8n9E35YDBW6B/ze2tvY/TByBDXaVugINDYKxE2ese7+7r7u3fM+3+fgDAvHLGj7r9AwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+QMHg05Mvq8cfAAAAAGYktHRAD/AP8A/6C9p5MAAAcbSURBVGje7VlpTFRXGLU0NmmNpuma9IciCCKCQDTuxqQWkrrTNJAal6Y2ECyoURONRBPXuBujVpsYiys1qUH7w8QVjQnVP9Zqq3Y2FgcQmIEBBpgZmPl6vvveLG94D2ZAFhNvcsIwb5nv3G87994hQ970oY+OjgaygR3AWmAyMPRNIjAV+A8gGQ3AKX1U1Nf60aNTgVn4nIDvPgLeGYwE3gd+ATwBJBhuQ2xshyEuzmWIiWnQRUY+0o0adRBkUvQxMRGDicAHwLkg4xUwTJtG5RkZVDZnDunHjKmCV3JB4r3BQyIq6jgM83RFQhCZNIlMqamkj41txzO/47tcYBWwApgHJAGfABH96YGxMMbMxnVHoAsweRdgBf4GfgW+A77AxPRt3ugjIzONycmO+qIiMqal9YxAVBThPYQcIYSX9H90dDvwFNjIRPqWQFKSo+3RI7Jev84xHjaBMuRHdX4+mVesoNJZs0gfFyeRkIiwd2qAQmA1sBhIAT4F3n0dIRSLH9LVbd9OzpqaHnvBMGMG6ZOSQrmXPVMve+cikANwme55UYDb1xri413VO3aQITm5N7nQ0/x5BXBR+Bb4sEdeQJ2vN0ycKNxuGDeuV3kggM96GbqA78V3UmipwQHcAzK4vIdTRvNQ16UyGhtLtbt2hRZKsnGGsWOpFL3iZXo6Va9aRbVbt5LlwAGyHj0qwJ9rt2yhqpwcqli8mExTp4pnfCQ7v7tVzpmEUGZ/GmD2GmReupScZjOV4ce0ZloYDS9VLFpEdbt3k/3GDXKZTORuaiLq6CCt4cE1vsdpNJIdBaNu506qWLBAvEun7hmWON902VdwMQoo8j5ku3CB2hsbqSw7W3XGjRMmUHVuLtlv3aKOhgbq1fB4qKO+XpBh7xgTE9U8wr0lq8uKhYs/i9hPSKCWBw+kchpYUXhmUF7Ny5ZRy7175HE66XUPj8NB9uJiMi9Z4v9NPwkb8H1IBCznz5ORNY/3YTQmnhnr4cO9n/EQBnvEsn+/sCWIRCUwW4vAJu+NprlzFTNvTEmhxkuXRPz21/C0t4tQNnIUKEkUs9ZSI/AlYFfczB6JjyfbuXMiVvt9uN3UcPo0GbxdXbKrA/hJjcAIoESRPAidmk2b+iTeQ/ZEWxu9Wr9e0ld+2x7w4kqNxInA2S+dPp0cz5/TQA/H06dkmjIl0AstQGqw8RFy4xA3cU1+tWGDcKNWorF7azZuJFtBQefkxnMt9++LhlaHpuh48qTTO9orK8l67JjwctPly+RubdXMh+o1a6Q+4fdCfjCB4bJrfDc1FhaqvxAhVbN5s9TQWBrgLxvqcbl897TcvUsmrC+88oFXcs4XL/z8bDaqWrnSJzGwdKX6Eyc0vWA7cyY4mQuMgesMfPEZ8MynLJE4bITacBoMZJo82R+X+MsywlVW5ruHPaMbOZICPVp/8qTvemtJiSgQXqP4esX8+Zpl2n7zpiAZQOAPxc6JrM3/DYUASwY2WEFg5kxyVVT4CcBDgQS4uzacOuUn8PAhGcaPVxKALHFDAagSgFTpjgCH0F+KELp4UTMmWf9A/EkhhBdb9u1TaCA2kEl5VSnrHSbuCyG7XcS1NwyZjO3s2V6FEC/EyxVJjPKlJczczc3UdOWKMLzp6lVhULDGaXv8mKxHjojQYfHWqRBYLGTDJHHXtd++rVmuRRKvXh2cxJsDjR8GHFfsC3EZRZg4nj0b+DKKCiZyTllGvwre2MqQ48qlaGRIRhZZA9rI1q0LbmQlWo1sKHBSISWg0zn+tPpBn0sJJL6KlMjpSpXGKfZJWcxhjcw9gWOx32YePYWTWkXM3QI+7m6FthxoVshpLGLsd+70i/Gc3JY9exRlVsZLYGYoS0wOpW3y9odUlVDqeD3Q1/HOqzxzZqbagoa3YZaGs0sxCigNJMD7Rq/fao+Y8eZr16gqK0taxHReUtYBP2BFGBEOgZEKAnip5dAhTZdz13bq9aKTdpUrfI11EN/LRtdu20bl8+aJRNVY1LO8WRiW8TKB2Yo8wHq4qaios/G1tVSdlycMYMnLcqAqO5tq8vPJsnevCDsGxzTLC57lioULJXmMDi6MVpbIwFrPW/7jerrduDewEvE+jlOnU2qi8nJhkG8PVGVjS4HQNrbagNtAOvennho/Pjh8uJV75TKHAYcMz7bG7IULt7xgL5Q3fkf09ripQNEHEhOlPSCrlVqKi8VCh3uDivFtgZWrC7jkxGTxeAb4Ue4/vTtYNEDdydvfjuBGVrl8OZWnpUkaXj0E/gQWyDOYB2wHDssa6xhwENgqn4bOBxLFoWG4ydnN7LMesmhtJWqEC8/mb3xUO9AHfXy+VR1m3D6X9/aHD4aTSj4xOQr8I/aHOh+5eoVUrVwl1nCzG2znxbwz8bncA7JkOcGxu0/eucuUY3fYkLfj7Xg7Bs34HwoINZEQp4aVAAAAAElFTkSuQmCC)](https://talk.owncloud.com/channel/infinitescale)
[![Build Status](https://drone.owncloud.com/api/badges/owncloud/ocis/status.svg)](https://drone.owncloud.com/owncloud/ocis)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=owncloud_ocis&metric=security_rating)](https://sonarcloud.io/dashboard?id=owncloud_ocis)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud_ocis&metric=coverage)](https://sonarcloud.io/dashboard?id=owncloud_ocis)
@@ -24,7 +24,7 @@ If you find a security issue please contact [security@owncloud.com](mailto:secur
## Contributing
Please refer to our [Contribution Guidelines](CONTRIBUTING.md).
Fork -> Patch -> Push -> Pull Request
## License
@@ -33,5 +33,5 @@ Apache-2.0
## Copyright
```console
Copyright (c) 2020-2021 ownCloud GmbH <https://owncloud.com>
Copyright (c) 2020 ownCloud GmbH <https://owncloud.com>
```
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
+7 -2
View File
@@ -7,7 +7,7 @@ test-acceptance-webui:
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
ifneq (, $(shell which go 2> /dev/null)) # supress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk
endif
@@ -32,6 +32,7 @@ include ../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: protobuf # CI runs ci-node-generate automatically before this target
@go generate $(GENERATE)
.PHONY: ci-node-generate
ci-node-generate: yarn-build
@@ -53,4 +54,8 @@ PROTO_SRC := pkg/proto/$(PROTO_VERSION)
include ../.make/protobuf.mk
.PHONY: protobuf
protobuf: buf-generate
protobuf: $(PROTO_SRC)/${NAME}.pb.go \
$(PROTO_SRC)/${NAME}.pb.micro.go \
$(PROTO_SRC)/${NAME}.pb.web.go \
$(PROTO_SRC)/${NAME}.swagger.json \
../docs/extensions/${NAME}/grpc.md
-8
View File
@@ -1,8 +0,0 @@
package accounts
import (
"embed"
)
//go:embed assets/*
var Assets embed.FS
-29
View File
@@ -1,29 +0,0 @@
version: v1
plugins:
- name: go
path: ../.bingo/protoc-gen-go
out: pkg/
opt:
- paths=source_relative
- name: micro
path: ../.bingo/protoc-gen-micro
out: pkg/
opt:
- paths=source_relative
- name: microweb
path: ../.bingo/protoc-gen-microweb
out: pkg/
opt:
- paths=source_relative
- name: openapiv2
path: ../.bingo/protoc-gen-openapiv2
out: pkg/
- name: doc
path: ../.bingo/protoc-gen-doc
out: ../docs/extensions/accounts
opt:
- ./templates/GRPC.tmpl,grpc.md
-17
View File
@@ -1,17 +0,0 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
branch: main
commit: ca45b9d9c51849e898845743a28b0eb0
digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw=
create_time: 2021-10-14T15:09:30.598677Z
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
branch: main
commit: 462ede5f3dee45569df6317bda220b1b
digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0=
create_time: 2021-10-14T01:55:03.476639Z
-10
View File
@@ -1,10 +0,0 @@
version: v1
lint:
use:
- DEFAULT
deps:
- buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
breaking:
use:
- FILE
+45
View File
@@ -0,0 +1,45 @@
module github.com/owncloud/ocis/accounts
go 1.16
require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
contrib.go.opencensus.io/exporter/ocagent v0.7.0
contrib.go.opencensus.io/exporter/zipkin v0.1.2
github.com/asim/go-micro/plugins/client/grpc/v3 v3.0.0-20210408173139-0d57213d3f5c
github.com/asim/go-micro/v3 v3.5.1-0.20210217182006-0f0ace1a44a9
github.com/cs3org/go-cs3apis v0.0.0-20210527092509-2b828e94ed4c
github.com/cs3org/reva v1.7.1-0.20210531093513-b74a2b156af6
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-chi/render v1.0.1
github.com/gofrs/uuid v3.3.0+incompatible
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.2.0
github.com/mennanov/fieldmask-utils v0.3.3
github.com/micro/cli/v2 v2.1.2
github.com/oklog/run v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/openzipkin/zipkin-go v0.2.5
github.com/owncloud/ocis/ocis-pkg v0.0.0-20210216094451-dc73176dc62d
github.com/owncloud/ocis/settings v0.0.0-20210413063522-955bd60edf33
github.com/prometheus/client_golang v1.10.0
github.com/rs/zerolog v1.22.0
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/thejerf/suture/v4 v4.0.0
go.opencensus.io v0.23.0
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781
google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
)
replace (
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
github.com/owncloud/ocis/settings => ../settings
github.com/owncloud/ocis/store => ../store
// taken from https://github.com/asim/go-micro/blob/master/plugins/registry/etcd/go.mod#L14-L16
go.etcd.io/etcd/api/v3 => go.etcd.io/etcd/api/v3 v3.0.0-20210204162551-dae29bb719dd
go.etcd.io/etcd/pkg/v3 => go.etcd.io/etcd/pkg/v3 v3.0.0-20210204162551-dae29bb719dd
)
+2425
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1 +1 @@
{"ar":{"Account is activated":"تم تفعيل الحساب","Account is blocked":"تم حظر الحساب","Accounts":"حسابات","Activate":"فعل","Activated":"مُفعّلة","Admin":"المسؤول","Block":"حظر","Cancel":"إلغاء","Clear selection":"اختيار واضحة","Confirm":"تأكيد","Create":"إنشاء","Create new account":"إنشاء حساب جديد","Creating":"إنشاء","Delete":"حذف","Display name":"اسم العرض","Email":"البريد الإلكتروني","Email cannot be empty":"لا يمكن للبريد الإلكتروني أن يكون فارغا","Failed to change role.":"فشل في تغيير الدور","Guest":"ضيف","Invalid email address":"عنوان بريد إلكتروني غير صالح","Invalid username":"اسم مستخدم غير صالح","Loading":"تحميل","msg":"ام اس جي","Password":"كلمة المرور","Password cannot be empty":"لا يمكن أن تكون كلمة المرور فارغة","Role":"الدور","Select all users":"تحديد كل المستخدمين","Select role":"تحديد الدور","User":"المستخدم","Username":"اسم المستخدم","Username cannot be empty":"لا يمكن أن يكون إسم المستخدم فارغا","You don't have permissions to manage accounts.":"ليس لديك صلاحيات لإدارة الحسابات"},"de":{"%{ amount } selected user":["%{ amount } ausgewählter Benutzer","%{ amount } ausgewählte Benutzer"],"Account is activated":"Konto ist aktiviert","Account is blocked":"Konto ist geblockt","Accounts":"Konten","Activate":"Aktivieren","Activated":"Aktiviert","Admin":"Administration","Block":"Blockieren","Cancel":"Abbrechen","Clear selection":"Auswahl aufheben","Confirm":"Bestätigen","Create":"Erstellen","Create new account":"Neues Konto erstellen","Creating":"Erstelle","Delete":"Löschen","Delete the selected account?":["Ausgewählten Account löschen?","Ausgewählte Accounts löschen?"],"Display name":"Anzeigename","Email":"E-Mail","Email cannot be empty":"E-Mail darf nicht leer sein","Failed to change role.":"Ändern der Rolle fehlgeschlagen.","Guest":"Gast","Invalid email address":"Ungültige E-Mail-Adresse","Invalid username":"Ungültiger Benutzername","Loading":"Lade","msg":"msg","Password":"Passwort","Password cannot be empty":"Das Passwort darf nicht leer sein","Role":"Rolle","Select %{ account }":" %{ account } auswählen","Select all users":"Alle Benutzer auswählen","Select role":"Rolle auswählen","User":"Benutzer","Username":"Benutzername","Username cannot be empty":"Benutzername darf nicht leer sein","You don't have permissions to manage accounts.":"Keine Berechtigungen um Konten zu verwalten"},"el":{"%{ amount } selected user":["%{ amount } επιλεγμένος χρήστης","%{ amount } επιλεγμένοι χρήστες"],"Account is activated":"Ο λογαριασμός είναι ενεργοποιημένος.","Account is blocked":"Ο λογαριασμός είναι αποκλεισμένος","Accounts":"Λογαριασμοί","Activate":"Ενεργοποίηση","Activated":"Ενεργοποιημένο","Admin":"Διαχειριστής","Block":"Αποκλεισμός","Cancel":"Aκύρωση","Clear selection":"Εκκαθάριση επιλογής","Confirm":"Επιβεβαίωση","Create":"Δημιουργία","Create new account":"Δημιουργία νέου λογαριασμού","Creating":"Γίνεται δημιουργία","Delete":"Διαγραφή","Delete the selected account?":["Διαγραφή του επιλεγμένου λογαριασμού;","Διαγραφή των επιλεγμένων λογαριασμών;"],"Display name":"Εμφανιζόμενο όνομα","Email":"Ηλεκτρονική αλληλογραφία","Email cannot be empty":"Η διεύθυνση ηλεκτρονικού ταχυδρομείου δεν μπορεί να είναι κενή","Failed to change role.":"Αποτυχία αλλαγής ρόλου.","Guest":"Επισκέπτης","Invalid email address":"Μη έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου","Invalid username":"Μη έγκυρο όνομα χρήστη","Loading":"Γίνεται φόρτωση","msg":"μνμ","Password":"Συνθηματικό","Password cannot be empty":"Το συνθηματικό δεν πρέπει να είναι κενό","Role":"Ρόλος","Select %{ account }":"Επιλογή %{ account }","Select all users":"Επιλογή όλων των χρηστών","Select role":"Επιλογή ρόλου","User":"Χρήστης","Username":"Όνομα χρήστη","Username cannot be empty":"Το όνομα χρήστη δεν μπορεί να είναι κενό","You don't have permissions to manage accounts.":"Δεν έχετε δικαιώματα να διαχειριστείτε λογαριασμούς."},"es":{"%{ amount } selected user":["%{ amount } usuario seleccionado","%{ aLine truncated
{"ar":{"Account is activated":"تم تفعيل الحساب","Account is blocked":"تم حظر الحساب","Accounts":"حسابات","Activate":"فعل","Activated":"مُفعّلة","Admin":"المسؤول","Block":"حظر","Cancel":"إلغاء","Clear selection":"اختيار واضحة","Confirm":"تأكيد","Create":"إنشاء","Create new account":"إنشاء حساب جديد","Creating":"إنشاء","Delete":"حذف","Display name":"اسم العرض","Email":"البريد الإلكتروني","Email cannot be empty":"لا يمكن للبريد الإلكتروني أن يكون فارغا","Failed to change role.":"فشل في تغيير الدور","Guest":"ضيف","Invalid email address":"عنوان بريد إلكتروني غير صالح","Invalid username":"اسم مستخدم غير صالح","Loading":"تحميل","msg":"ام اس جي","Password":"كلمة المرور","Password cannot be empty":"لا يمكن أن تكون كلمة المرور فارغة","Role":"الدور","Select all users":"تحديد كل المستخدمين","Select role":"تحديد الدور","User":"المستخدم","Username":"اسم المستخدم","Username cannot be empty":"لا يمكن أن يكون إسم المستخدم فارغا","You don't have permissions to manage accounts.":"ليس لديك صلاحيات لإدارة الحسابات"},"de":{"%{ amount } selected user":["%{ amount } ausgewählter Benutzer","%{ amount } ausgewählte Benutzer"],"Account is activated":"Konto ist aktiviert","Account is blocked":"Konto ist geblockt","Accounts":"Konten","Activate":"Aktivieren","Activated":"Aktiviert","Admin":"Administration","Block":"Blockieren","Cancel":"Abbrechen","Clear selection":"Auswahl aufheben","Confirm":"Bestätigen","Create":"Erstellen","Create new account":"Neues Konto erstellen","Creating":"Erstelle","Delete":"Löschen","Delete the selected account?":["Ausgewählten Account löschen?","Ausgewählte Accounts löschen?"],"Display name":"Anzeigename","Email":"E-Mail","Email cannot be empty":"E-Mail darf nicht leer sein","Failed to change role.":"Ändern der Rolle fehlgeschlagen.","Guest":"Gast","Invalid email address":"Ungültige E-Mail-Adresse","Invalid username":"Ungültiger Benutzername","Loading":"Lade","msg":"msg","Password":"Passwort","Password cannot be empty":"Das Passwort darf nicht leer sein","Role":"Rolle","Select %{ account }":" %{ account } auswählen","Select all users":"Alle Benutzer auswählen","Select role":"Rolle auswählen","User":"Benutzer","Username":"Benutzername","Username cannot be empty":"Benutzername darf nicht leer sein","You don't have permissions to manage accounts.":"Keine Berechtigungen um Konten zu verwalten"},"es":{"%{ amount } selected user":["%{ amount } usuario seleccionado","%{ amount } usuarios seleccionados"],"Account is activated":"La cuenta está activada","Account is blocked":"La cuenta está bloqueada","Accounts":"Cuentas","Activate":"Activar","Activated":"Activada","Admin":"Administración","Block":"Bloquear","Cancel":"Cancelar","Clear selection":"Selección clara","Confirm":"Confirmar","Create":"Crear","Create new account":"Crear una nueva cuenta","Creating":"Creando","Delete":"Eliminar","Delete the selected account?":["¿Eliminar la cuenta seleccionada?","¿Eliminar las cuentas seleccionadas?"],"Display name":"Nombre para mostrar","Email":"Correo electrónico","Email cannot be empty":"El correo electrónico no puede estar vacío","Failed to change role.":"Error al cambiar de rol.","Guest":"Invitado","Invalid email address":"Dirección de correo no válida","Invalid username":"Nombre de usuario no válido","Loading":"Cargando","msg":"msg","Password":"Contraseña","Password cannot be empty":"La contraseña no puede estar vacía","Role":"Rol","Select %{ account }":"Seleccionar %{ account }","Select all users":"Seleccionar todos los usuarios","Select role":"Seleccionar rol","User":"Usuario","Username":"Nombre de usuario","Username cannot be empty":"El nombre de usuario no puede estar vacío","You don't have permissions to manage accounts.":"No tienes permisos para gestionar cuentas."},"fr":{"%{ amount } selected user":["%{ amount } utilisateur sélectionné","%{ amount } utilisateurs sélectionnés"],"Account is activated":"Le compte est activé","Account is blocked":"Le compte est verrouillé","Accounts":"Comptes","Activate":"Activer","Activated":"Activé","Admin":"Administration","Block":"Bloquer","Cancel":"Annuler","Clear selection":"Vider la sélection","Confirm":"Confirmer","Create":"Créer","Create new account":"Créer un compte","Delete":"Supprimer","Delete the selected account?":["Supprimer le compte sélectionné ?","Supprimer les comptes sélectionnés ?"],"Display name":"Nom affiché","Email":"Adresse courriel","Email cannot be empty":"L'email ne peut pas être vide.","Guest":"Invité","Invalid email address":"Adresse mail invalide","Invalid username":"Noms d'utilisateur non valide","Loading":"Chargement","Password":"Mot de passe",Line truncated
+30 -30
View File
@@ -1,54 +1,46 @@
{
"private": true,
"name": "ocis-accounts",
"version": "0.0.0",
"private": true,
"description": "",
"homepage": "https://github.com/owncloud/ocis-accounts#readme",
"license": "Apache-2.0",
"author": "ownCloud GmbH <devops@owncloud.com>",
"repository": "https://github.com/owncloud/ocis-accounts.git",
"bugs": {
"url": "https://github.com/owncloud/ocis/issues",
"email": "support@owncloud.com"
},
"repository": "https://github.com/owncloud/ocis-accounts.git",
"license": "Apache-2.0",
"author": "ownCloud GmbH <devops@owncloud.com>",
"scripts": {
"acceptance-tests": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require ${TEST_INFRA_DIRECTORY}/acceptance/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/acceptance/stepDefinitions --format @cucumber/pretty-formatter -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"",
"build": "rollup -c",
"generate-api": "node node_modules/swagger-vue-generator/bin/generate-api.js --package-version v0 --source pkg/proto/v0/accounts.swagger.json --moduleName accounts --destination ui/client/accounts/index.js",
"lint": "eslint ui/**/*.vue ui/**/*.js --color --global requirejs --global require",
"build": "rollup -c",
"watch": "rollup -c -w",
"test": "echo 'Not implemented'",
"watch": "rollup -c -w"
},
"browserslist": [
"> 1%",
"not dead"
],
"dependencies": {
"axios": "^0.21.4",
"core-js": "^3.17.3",
"debounce": "^1.2.1",
"validator": "^13.1.1",
"vuex": "^3.5.1"
"generate-api": "node node_modules/swagger-vue-generator/bin/generate-api.js --package-version v0 --source pkg/proto/v0/accounts.swagger.json --moduleName accounts --destination ui/client/accounts/index.js",
"acceptance-tests": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require ${TEST_INFRA_DIRECTORY}/acceptance/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\""
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.15.6",
"@babel/plugin-proposal-object-rest-spread": "^7.7.7",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/polyfill": "^7.10.1",
"@babel/preset-env": "^7.13.12",
"@babel/register": "^7.14.5",
"@cucumber/cucumber": "^7.3.1",
"@cucumber/pretty-formatter": "^1.0.0-alpha.1",
"@babel/register": "7.13.8",
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-replace": "^2.3.0",
"archiver": "^5.3.0",
"axios": "^0.21.1",
"core-js": "3",
"cross-env": "^7.0.3",
"easygettext": "^2.17.0",
"cucumber": "^6.0.5",
"cucumber-pretty": ">=6.0.0",
"debounce": "^1.2.1",
"easygettext": "^2.7.0",
"eslint": "7.24.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.17.3",
@@ -59,13 +51,13 @@
"fs-extra": "^9.0.1",
"join-path": "^1.1.1",
"ldapjs": "^2.2.3",
"nightwatch": "1.7.11",
"nightwatch-api": "3.0.2",
"nightwatch": "^1.3.6",
"nightwatch-api": "^3.0.1",
"nightwatch-vrt": "^0.2.10",
"node-fetch": "^2.6.1",
"qs": "^6.10.1",
"rimraf": "^3.0.0",
"rollup": "^2.55.1",
"rollup": "^2.42.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-filesize": "^9.1.0",
@@ -76,9 +68,17 @@
"swagger-vue-generator": "^1.0.6",
"url-search-params-polyfill": "^8.1.0",
"vue-template-compiler": "^2.6.11",
"vuex": "^3.5.1",
"xml-js": "^1.6.11"
},
"browserslist": [
"> 1%",
"not dead"
],
"peerDependencies": {
"owncloud-design-system": "^11.0.0"
"owncloud-design-system": "^6.0.1"
},
"dependencies": {
"validator": "^13.1.1"
}
}
+66
View File
@@ -0,0 +1,66 @@
package assets
import (
"net/http"
"os"
"path"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
// Fake the import to make the dep tree happy.
_ "golang.org/x/net/context"
// Fake the import to make the dep tree happy.
_ "golang.org/x/net/webdav"
)
//go:generate make -C ../.. embed.yml
// assets gets initialized by New and provides the handler.
type assets struct {
logger log.Logger
config *config.Config
}
// Open just implements the HTTP filesystem interface.
func (a assets) Open(original string) (http.File, error) {
if a.config.Asset.Path != "" {
if stat, err := os.Stat(a.config.Asset.Path); err == nil && stat.IsDir() {
custom := path.Join(
a.config.Asset.Path,
original,
)
if _, err := os.Stat(custom); !os.IsNotExist(err) {
f, err := os.Open(custom)
if err != nil {
return nil, err
}
return f, nil
}
} else {
a.logger.Warn().
Str("path", a.config.Asset.Path).
Msg("Assets directory doesn't exist")
}
}
return FS.OpenFile(
CTX,
original,
os.O_RDONLY,
0644,
)
}
// New returns a new http filesystem to serve assets.
func New(opts ...Option) http.FileSystem {
options := newOptions(opts...)
return assets{
config: options.Config,
}
}
+202
View File
@@ -0,0 +1,202 @@
// Code generated by fileb0x at "2021-05-10 09:09:08.432578 +0100 WEST m=+0.055032667" from config file "embed.yml" DO NOT EDIT.
// modification hash(8ff85c5a20f443aa72338e8c88f810cf.8058aec596c5fb73022d09bb97af796e)
package assets
import (
"bytes"
"compress/gzip"
"context"
"io"
"net/http"
"os"
"path"
"golang.org/x/net/webdav"
)
var (
// CTX is a context for webdav vfs
CTX = context.Background()
// FS is a virtual memory file system
FS = webdav.NewMemFS()
// Handler is used to server files through a http handler
Handler *webdav.Handler
// HTTP is the http file system
HTTP http.FileSystem = new(HTTPFS)
)
// HTTPFS implements http.FileSystem
type HTTPFS struct {
// Prefix allows to limit the path of all requests. F.e. a prefix "css" would allow only calls to /css/*
Prefix string
}
// FileAccountsJs is "accounts.js"
var FileAccountsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\xfd\xf9\x92\x1b\xb7\x92\x38\x0a\xff\xfd\xcd\x53\x90\x18\xa9\x0c\x98\xe8\x12\x29\x79\x2d\x0a\xe2\xc8\x52\xcb\x96\xad\xcd\x6a\xc9\xcb\x61\xf3\xf4\x41\x17\x41\x76\x49\x24\x40\xa3\xc0\x5e\x4c\xd6\xf7\x3e\xf7\x35\xee\x93\xdd\xc0\x56\x85\x5a\xd8\xd2\x99\x99\xdf\x8d\xb8\x11\x1d\xcd\x02\x90\x48\xec\x89\xcc\x44\x22\x31\x67\x8b\x8c\x33\x08\x17\x5b\x9e\xaa\x4c\x70\x88\x76\x60\x9b\xb3\x5e\xae\x64\x96\x2a\x30\xbe\xa4\xb2\xc7\x08\xd8\x72\x0b\x38\x07\x7d\xa2\x6e\x36\x4c\x2c\x7a\xcb\x95\x38\xa7\xab\x77\x17\x59\x3e\xa9\x3e\x93\x2e\xc8\xab\x8c\xcf\xc5\xd5\xc4\xfe\x74\x42\x58\x04\x0e\x4f\x27\x44\xce\x56\x8b\x89\xfe\x97\xec\x8a\xb1\xaf\x6c\x4f\x41\x86\x76\x92\xa9\xad\xe4\x3d\x16\x45\x2c\x3e\x3b\x63\xf9\x4b\x31\xdf\xae\x58\x14\xbd\x3e\xff\xc0\x52\x15\x6f\xa4\x50\x42\x63\x89\x2f\x68\xfe\xfa\x8a\xbf\x91\x62\xc3\xa4\xba\x89\x53\xba\x5a\x41\x86\xc1\x9c\x2d\xe8\x76\xa5\x00\x9a\xb0\xd8\x7d\x27\xac\x28\xcb\xe0\xba\x8c\x6c\x01\x43\xe4\xc8\x97\x69\xfa\x47\x11\x57\x94\xad\xb5\x2f\x00\xee\x0a\x0c\xaa\x3c\x00\xef\x2e\xe9\x6a\xcb\x92\xfe\xb0\x40\x63\x87\xc0\x65\xfc\xc8\x6e\x72\xc8\x50\xbc\x10\xf2\x98\xa6\x17\xc1\x70\x70\xb4\xd3\x45\x48\x5f\xc4\x92\xa9\xa0\x0d\x4f\x59\x9e\xca\x6c\xa3\x84\x84\x0c\x73\x34\xee\xae\x87\xc2\x1c\x4b\x9d\x73\x22\x93\x1d\xe3\xdb\x35\x93\xf4\x7c\xa5\x2b\x82\x97\x4c\x25\xc1\xd0\xfb\x66\x4d\xf9\xac\x28\x50\x81\x10\x56\x55\x47\x48\xdd\x11\xb6\xbd\x3b\x76\xbd\x11\x52\xe5\xc9\xae\x28\x7c\x53\x18\x54\x58\xc5\x2e\x01\x55\x9f\x85\x0c\x9a\x53\x62\x68\xc5\x60\x4e\x9a\x03\x86\x25\xe1\x8d\x41\xc3\x82\x00\x9f\x15\x10\x3f\x39\x4e\x6e\xd6\xe7\x62\x35\xb1\x3f\xc9\xae\xc0\x94\x88\x38\x53\x4c\x52\x25\xe4\x7e\x0f\xfe\xeb\xbf\x7c\x00\xe0\x8c\x88\x98\xe6\x37\x3c\x7d\x1e\xa6\xd7\x62\x00\xce\x89\x88\x95\x38\x51\x32\xe3\xcb\x77\x74\x69\x40\x82\x30\xa8\x66\x60\x0a\x19\x56\x98\x97\x5d\xd7\x3d\x02\x1a\xc6\x8d\x3e\xc7\xf5\x11\x48\x05\x5f\x64\xcb\x6d\x19\xbe\x92\x99\x72\xdf\x05\xc2\x6c\xaa\x66\x85\x92\x37\xbb\xd4\xcc\x26\x80\x8a\x94\xaa\xf4\x42\xf7\x5a\x1a\xf4\x61\xad\x0a\x3a\x0f\xe1\x45\x35\x70\x5b\x0b\x80\xa5\xed\x6a\x41\x54\x14\x05\xdd\xdc\xcb\x78\xae\x28\x4f\x75\x4f\xde\x4c\x54\x72\x83\xa9\x1f\x8a\x54\x32\xaa\x18\x14\x15\x30\xc2\x19\xe1\xec\xaa\xf7\x01\xca\xfd\x7e\x3a\x2b\x27\x32\x8d\xcf\x32\x7e\x29\x3e\xb2\x56\xad\xec\xf4\x5d\x78\xc0\x32\x59\x60\x6a\xd6\x95\x24\x84\xcc\x91\xba\x90\xe2\xaa\xa7\x31\x1f\x4b\x29\x24\x04\x3f\x32\x6e\x47\xa3\x97\xe5\x3d\xba\x92\x8c\xce\x6f\x7a\x72\xcb\x79\xc6\x97\x00\x8d\x5d\xc6\x0b\x83\x02\x98\xdc\x80\x10\x22\x1c\x22\xea\x8b\xbb\x86\xa8\x58\x08\x09\x79\xbc\x66\xea\x42\xcc\x89\xc0\x3c\xa6\x72\x49\xe8\x78\x6c\xeb\x96\x11\x1e\xcf\xd9\x8a\x2d\xa9\x62\x1a\x6d\x66\xa3\x73\xf2\x11\x66\x7a\x4d\x65\x0b\x98\x9b\x52\x72\x42\xc8\x1a\xa5\x82\xab\x8c\x6f\x99\x2f\x20\x2f\x0a\x5d\x03\xce\xae\x95\xae\x80\x2f\x07\xf1\x38\x67\x5c\x11\x1e\x9f\xb9\x5f\x2a\x97\x63\xb6\xca\x59\xaf\x56\xe1\x12\xde\x77\xc5\xc2\xb5\x40\x92\x0b\x5b\xd3\x31\x8f\xe7\x59\xbe\xd1\xc3\x7e\x7c\x9d\xb2\x8d\x25\x0b\x3a\x05\x15\x1a\x1f\xb0\x15\x09\x91\x45\x11\x8f\xe9\xb9\xdc\x6e\x14\xf4\xa9\x16\x17\x1a\x4b\x32\x37\x34\x2b\x25\x2b\x37\x40\x63\x53\x7d\x21\xd7\x74\xa5\x71\xa4\xb1\x19\x66\x5b\x1d\x1e\xcf\x05\x67\x93\x8b\x64\x83\x53\xd3\x6b\x1d\x3d\xe0\xe6\xb5\x49\xc7\x1a\x3c\xb1\xb9\x8a\xa2\x6a\xa5\x45\x1a\x45\xd0\xb6\xca\x0d\x85\x4b\x77\x03\x92\xda\x26\x15\x85\x26\x65\x38\x43\x98\x56\x33\xd8\xd7\x75\xa7\x97\x82\x2b\x56\x63\x4c\x7c\xc5\x31\x95\xcb\x84\x59\x92\xae\x01\x8b\x6a\x9d\xd4\xc0\x5d\x89\x06\xba\x28\x0a\x16\x5f\x49\xba\x21\x5b\xd3\x25\x0b\x02\xf2\x6d\xbe\x61\x7c\xce\xe6\x27\x8a\x4a\x05\xf0\x26\x88\xfa\x33\x63\xab\x39\xc0\x73\x02\xd8\x35\x4b\xb7\x4a\xcf\x43\x7c\x41\x40\x2a\xd6\x9b\x15\x53\x6c\x0e\xf0\x9a\x84\x9b\xd3\x0d\x44\xbb\xaa\x09\xcb\x5a\xe8\x52\x87\x74\xa1\xe7\x3a\xcb\xf9\x94\xce\x48\x9b\x0c\xab\x8b\x2c\x2f\x4c\xd5\xae\x02\xf2\xff\xc6\x2f\xc5\xd7\x0b\xfc\x98\x5c\x45\xd1\x15\xbc\x82\x4f\xe0\x74\x86\x10\x1a\x3f\x8e\xa2\xc7\x7d\x42\x78\x14\x49\xdb\x19\x8f\x31\x45\x51\x04\xcf\xc9\x63\x64\x30\x9d\x90\xcb\x6a\x31\x93\x9b\xe0\xbb\xbe\xe4\xcf\x51\xd5\x90\x63\xdd\x8d\x53\x3b\xc5\xb1\xef\x42\x3f\xb1\x66\x1d\x9b\x96\x42\x3b\x4b\x17\x6b\x84\x3f\x68\x95\x27\x16\x50\x61\xa6\xb7\x19\xfd\x57\x16\xf7\x5a\x67\x45\xbb\x60\x03\x16\x98\xe2\x0c\xe7\x76\x61\x9a\x99\x3b\x15\x33\xcc\x30\xb5\x93\xd7\xd6\xa8\x5f\xcd\x5d\x0d\xb6\xb5\x13\x0a\x2f\xc8\x36\x36\x33\xb4\x24\x40\x51\x04\x84\x69\x6b\xb5\x81\x2c\xca\xfe\x5a\xe8\x2d\x9b\x5e\xd1\x4c\xf3\x03\x2a\x96\x2c\x17\xab\x4b\x06\x17\xb1\x8b\x45\xb1\xba\x60\xbc\xbe\xa3\x71\xb7\xfc\x31\x33\xb5\x2c\x10\x6e\x26\xbb\x3e\xf3\xe9\x28\x09\x30\x77\x61\x74\x55\x26\x0c\x67\x70\xdb\x42\xe8\x1a\xd2\x81\xb7\xc8\xa1\x5b\x46\x86\xd0\x8f\xc3\xbe\x0e\x09\xb3\x0c\xba\x97\x56\x13\x4e\x93\x5f\x15\x8e\x23\x16\xba\xfa\x0c\x4b\xac\x3f\x75\x01\x0e\x52\x10\x31\x11\xb6\xe2\x14\x53\x94\x50\x88\x82\x0d\xe7\xa3\xe1\x46\x1c\xe5\x67\xe5\x4e\x3c\xf5\x2b\x7f\xe6\xc9\xb7\x32\x74\xa6\xa2\xbf\x84\x6f\x57\x2b\x7c\x80\x3a\x56\x88\x62\x5b\x8b\x28\xaa\xc8\x7a\x9d\xce\x11\x85\x6d\x1d\xba\x70\x79\xe6\x6d\xLine truncated
// FileAccountsJsMap is "accounts.js.map"
var FileAccountsJsMap = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x0d\x97\x1b\xb7\x91\x28\x0c\xff\x15\x78\xe2\x35\x49\x8b\x1f\x92\x9d\xcd\xcd\x72\x32\x51\x64\x59\x76\xb4\xaf\x25\xf9\x4a\xb2\x77\xef\x99\x99\x95\xc0\x6e\x90\x84\xa6\xd9\x60\x1a\xdd\x43\x31\xd2\xbc\xe7\xfe\x88\xfb\x0b\xef\x2f\x79\x0e\xaa\x0a\x9f\xdd\xcd\xe1\xd8\x72\x76\xf7\x39\x8f\x73\x4e\xc4\x41\x03\x85\x02\x50\x28\xd4\x17\x0a\x1f\x4e\xae\x45\xa5\xa5\x2a\x4f\xe6\x5f\x8f\x4f\x96\xb2\x10\x27\xf3\x13\x9e\x65\xaa\x29\x6b\x3d\x7d\xa7\x4f\xc6\x27\x5a\x35\x55\x26\xf4\xc9\xfc\xfc\x64\x3a\x9d\x95\x2a\x17\x6f\x36\x2a\x6f\x0a\xa1\x67\x95\x58\x89\x52\x54\xbc\x56\xd5\xa4\x6a\xca\x5a\x6e\xc4\x8c\xfe\xc5\xb6\x69\x83\xbf\x2c\xf8\x42\x14\xb6\xce\x6c\x2d\x8a\xad\xa8\xf4\x2c\x17\x4b\x59\x8a\x1f\x2b\xb5\x15\x55\xbd\xef\x6e\x5a\xa9\xa2\x68\xb6\x93\x6d\xd1\xac\x64\x39\x31\x9f\x26\xab\x42\x2d\x78\xa1\x67\xba\xca\x66\xf8\xbb\xbb\xe9\x75\x23\xde\xcf\x72\xa9\x6b\xf8\x35\x15\x7a\xe3\xea\x35\xd2\x21\xd1\xd4\xb2\xd0\xdd\x00\xf8\x7b\xa9\xf4\xac\x90\x0b\x57\x79\x21\xcb\xfc\xb6\xba\x77\x03\xd8\xc8\x22\xff\xe9\xe5\x0f\xb7\xd5\xcf\x54\x25\x66\x4f\xcb\x5a\x54\x99\xd8\xd6\xaa\x7a\xc6\x4b\xbe\x12\xd5\x51\xcd\xea\x8a\x97\x7a\xa9\xaa\xcd\xb7\xbc\xe6\xb7\xb6\xe0\x65\x26\x8a\x99\xd4\x8f\xe1\x47\x77\xf5\x6d\xa5\x32\xa1\xf5\x44\xe8\x3f\xcc\x16\x95\xda\xe9\xdb\x31\xb1\x03\x2e\x55\xb5\xe1\x85\xfc\xbb\xf8\xab\xe0\xb9\xa8\x9e\xf3\x3e\x9a\x49\x06\x21\xca\xb5\x41\xe8\x49\x55\xa9\xe3\x46\x9d\x55\x82\xd7\x77\xa8\xaf\x45\x5d\x17\xb7\xe2\x62\x87\x91\x29\x75\x25\xc5\xd1\xcb\x2c\xf5\xa3\x85\x56\x45\x53\x8b\x23\xd6\xda\xf7\xb1\x59\xc8\xd2\xb4\xb8\xb5\x1f\x18\x01\xd0\xd2\x77\x4d\x51\xfc\xc8\xeb\xf5\xb1\x9d\x6c\x79\xa5\x69\x2d\xee\x30\x9a\x9f\x5e\xfe\xf0\x8a\x6f\xc4\x8b\x4a\xae\x64\x79\x5b\x33\x9e\xf3\x6d\x6d\xda\xbd\x5f\xdf\xba\x14\xb9\x58\xf2\xa6\xa8\x8f\x1b\x70\x2e\xf5\x96\xd7\xd9\xfa\xa5\xf8\x5b\x23\x74\x7d\x54\x9b\x8d\xa8\x56\xe2\xb1\x2a\x97\x72\x75\x54\xfd\x47\xe6\xcf\x23\x37\xcd\xa1\x2d\xd3\x53\xf9\xb5\xba\x12\xb7\x4e\xa0\x9d\x77\xbd\xad\x04\xbf\x95\xff\x04\x34\x67\xca\x8e\xda\x01\xfc\xb6\x51\xca\x32\x17\xef\xbb\xd8\x27\x6f\xfa\x68\x6d\xcd\xf5\x44\xef\x37\x0b\x65\x58\xf5\x9a\x6f\x7a\xe0\x87\xd5\xe2\x5e\xa2\x6a\xcb\xa6\xcc\x6a\xa9\xca\x89\x61\xc1\x33\xb9\xd9\x16\x62\x23\xca\x9a\x9b\xb2\xa3\x5a\xf4\x83\x5e\x73\x3c\x4b\x0e\x54\x59\x89\x7a\x22\xcb\xba\x92\xa5\x96\x07\x2b\x66\xbc\x28\x6e\xed\xd0\x57\x32\xbf\xbe\x51\x4d\xdf\xa1\xa2\x16\xef\x44\x66\x7a\xd6\x5b\x91\xd5\x87\x40\x6a\x99\x8b\x49\xb6\xe6\x65\x69\x98\x77\x7f\xbd\xbf\xe1\x7a\x9b\xd3\x80\xf7\xed\xb2\xbf\xdd\x7a\x8e\x51\x0d\x6d\x26\x64\x25\x97\x3d\x47\x37\xd5\x02\x0e\x73\xb0\x46\x8b\xb8\xb2\x42\x8a\xb2\x06\x96\x2c\xcb\xd5\x41\xba\x30\x9b\x74\xf2\xce\x54\xa9\x45\x55\x1a\xb1\xa0\x56\x66\xa9\x44\xef\xe9\xd8\x6e\x51\x89\xbf\x35\xb2\x12\x13\x9a\xee\x4c\x89\x2a\x93\x8b\xbe\xc3\xa0\xdd\x1e\xe7\x61\xb2\x69\x8a\x5a\x2e\xf6\xf5\xd1\xed\x0e\x09\x2f\xed\xda\x4b\xde\xbb\x1e\xed\xca\xb9\xd0\x59\x25\x8d\xa4\x70\x74\x13\xa9\x69\x02\x8e\xee\x43\x65\x8d\xd9\x83\x13\x3c\x6a\x27\x02\xb7\xe4\xd1\xfd\x89\x3f\x4e\x72\xb5\x99\xa0\x14\x78\x6c\x2b\x5e\xde\x11\xcb\x5a\x4d\xb6\x95\xdc\xc8\x5a\x5e\x1f\xdd\x09\x11\x02\x62\x36\xd9\x1e\x14\x50\xdb\xad\x69\x3a\x6c\xb3\x89\x5f\x8b\x3b\x42\x28\x55\x39\x11\x65\xb3\x11\x15\x5f\x14\x77\xc7\x43\x8b\x7a\x72\x37\x12\xd3\x6b\x5e\x89\x7c\xa2\x6b\x55\x1d\x3d\x57\xc4\x9c\x26\xa8\x2f\x1c\xdb\xaa\xe4\x66\x3d\x26\x3b\xc1\xaf\x26\x1b\xbe\x3d\xb6\xd9\x9a\xdf\x85\x9c\xb7\xcd\xf1\xc3\xc0\xa1\x1f\x5b\xbb\x91\x47\x57\xa5\x39\xbd\x12\x47\xaf\xdb\x5a\xe6\xb9\x28\x4d\x8b\xe3\x07\x4b\xbf\x26\xba\xe6\xc7\xf3\x1f\x22\x73\x47\xa8\x52\x07\xe4\x76\x34\xad\x16\x5c\x6b\xb5\x9c\x54\x7c\x77\x3c\xb6\xb9\x78\x2f\xf2\xbb\x6f\xe4\x5f\xd6\x90\x86\x69\xce\x70\xb5\x2b\x7f\xcd\xbe\xac\xc4\xdd\x98\xd5\xb6\x57\x10\xef\x38\x0c\x44\x3d\x31\x12\xbc\x39\xee\xef\x30\x25\x85\x28\x57\xc7\x77\x52\xab\x09\x27\x45\x64\x72\xa7\x43\x95\x57\x15\xdf\x4f\x64\x99\x15\x4d\xde\xa7\xf6\xf4\xce\xbc\xa1\xe4\x89\x2d\x3d\xb6\xad\xa1\xc4\xc9\xa2\x59\xdd\x69\x1f\xf4\x2d\x75\xc9\x37\x77\xc6\xba\x05\x84\xa4\xd4\xa3\xc1\xec\xee\xb6\x87\x33\xb5\xdd\x4f\x32\x55\xea\xba\x6a\xb2\x5a\x55\xb6\xe3\x5e\x35\xb3\x93\xe7\x2d\x55\x95\x1d\xcf\xc7\xc4\xfb\xad\xaa\xee\xb2\x03\xef\xb6\xf3\x32\x55\x55\xc4\x61\x6a\x55\xef\xb7\xc2\x4c\x6a\x7d\xbc\x60\x16\xac\x84\x07\xa1\x96\xc7\x93\xd0\xca\x9c\xdf\x52\x83\xdd\xe8\x8e\xad\x1a\x2d\xaa\x09\x5f\xdd\x41\xa0\xa1\x86\xd7\x7f\x9c\x90\x71\xed\x8e\x87\x21\xd2\xd7\xd1\x47\x90\xb6\x2d\x26\x5c\x4f\xee\x70\x20\xed\x44\x51\x4c\xae\x4a\x43\x9e\x77\xeb\x51\xd6\x68\xf3\xd3\x93\xec\x0e\xf2\x41\xc0\x03\x7e\x95\xf8\x75\x87\x6d\xb0\xae\x37\x47\x0f\xca\xca\xfc\x20\x71\xdd\x45\xb2\xaa\xd5\x84\xe4\xfe\x9a\xf7\x98\x12\x0e\x4c\xe1\x1d\x25\x41\xdb\x2e\xe4\x0f\x47\xb3\xee\xc9\x56\x69\x2d\x49\x82\xc4\x4d\x74\xc7\xd9\xd1\xbf\x70\x03\xd2\x0a\x5a\xec\x0f\x37\xb3\x7f\x0b\x3d\xc5\x89\x9d\x1e\xd7\xae\xb5\x8f\x9a\xea\xe8\xd5\xe7\xa5\x51\xae\x6b\x5e\x1e\x2f\xb9\xd2\x94\x70\xad\xe5\xea\xe8\x1d\xce\x27\xd6\x1a\x71\xb4\xb6\x17\x5a\x2f\xcc\xb2\xd7\xe2\xfd\xf1\xaa\x95\x23\x97\x42\xf5\xe9\xdLine truncated
func init() {
err := CTX.Err()
if err != nil {
panic(err)
}
var f webdav.File
var rb *bytes.Reader
var r *gzip.Reader
rb = bytes.NewReader(FileAccountsJs)
r, err = gzip.NewReader(rb)
if err != nil {
panic(err)
}
err = r.Close()
if err != nil {
panic(err)
}
f, err = FS.OpenFile(CTX, "accounts.js", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0777)
if err != nil {
panic(err)
}
_, err = io.Copy(f, r)
if err != nil {
panic(err)
}
err = f.Close()
if err != nil {
panic(err)
}
rb = bytes.NewReader(FileAccountsJsMap)
r, err = gzip.NewReader(rb)
if err != nil {
panic(err)
}
err = r.Close()
if err != nil {
panic(err)
}
f, err = FS.OpenFile(CTX, "accounts.js.map", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0777)
if err != nil {
panic(err)
}
_, err = io.Copy(f, r)
if err != nil {
panic(err)
}
err = f.Close()
if err != nil {
panic(err)
}
Handler = &webdav.Handler{
FileSystem: FS,
LockSystem: webdav.NewMemLS(),
}
}
// Open a file
func (hfs *HTTPFS) Open(path string) (http.File, error) {
path = hfs.Prefix + path
f, err := FS.OpenFile(CTX, path, os.O_RDONLY, 0644)
if err != nil {
return nil, err
}
return f, nil
}
// ReadFile is adapTed from ioutil
func ReadFile(path string) ([]byte, error) {
f, err := FS.OpenFile(CTX, path, os.O_RDONLY, 0644)
if err != nil {
return nil, err
}
buf := bytes.NewBuffer(make([]byte, 0, bytes.MinRead))
// If the buffer overflows, we will get bytes.ErrTooLarge.
// Return that as an error. Any other panic remains.
defer func() {
e := recover()
if e == nil {
return
}
if panicErr, ok := e.(error); ok && panicErr == bytes.ErrTooLarge {
err = panicErr
} else {
panic(e)
}
}()
_, err = buf.ReadFrom(f)
return buf.Bytes(), err
}
// WriteFile is adapTed from ioutil
func WriteFile(filename string, data []byte, perm os.FileMode) error {
f, err := FS.OpenFile(CTX, filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
if err != nil {
return err
}
n, err := f.Write(data)
if err == nil && n < len(data) {
err = io.ErrShortWrite
}
if err1 := f.Close(); err == nil {
err = err1
}
return err
}
// WalkDirs looks for files in the given dir and returns a list of files in it
// usage for all files in the b0x: WalkDirs("", false)
func WalkDirs(name string, includeDirsInList bool, files ...string) ([]string, error) {
f, err := FS.OpenFile(CTX, name, os.O_RDONLY, 0)
if err != nil {
return nil, err
}
fileInfos, err := f.Readdir(0)
if err != nil {
return nil, err
}
err = f.Close()
if err != nil {
return nil, err
}
for _, info := range fileInfos {
filename := path.Join(name, info.Name())
if includeDirsInList || !info.IsDir() {
files = append(files, filename)
}
if info.IsDir() {
files, err = WalkDirs(filename, includeDirsInList, files...)
if err != nil {
return nil, err
}
}
}
return files, nil
}
+17
View File
@@ -0,0 +1,17 @@
---
pkg: "assets"
dest: "."
output: "embed.go"
fmt: true
noprefix: true
compression:
compress: true
custom:
- files:
- "../../assets/"
base: "../../assets/"
prefix: ""
...
-10
View File
@@ -1,20 +1,10 @@
package assets
import (
"net/http"
"github.com/owncloud/ocis/accounts"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/assetsfs"
"github.com/owncloud/ocis/ocis-pkg/log"
)
// New returns a new http filesystem to serve assets.
func New(opts ...Option) http.FileSystem {
options := newOptions(opts...)
return assetsfs.New(accounts.Assets, options.Config.Asset.Path, options.Logger)
}
// Option defines a single option function.
type Option func(o *Options)
+1 -1
View File
@@ -4,10 +4,10 @@ import (
"fmt"
"github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
// AddAccount command creates a new account
+1 -1
View File
@@ -6,11 +6,11 @@ import (
"strconv"
"github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/micro/cli/v2"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
// InspectAccount command shows detailed information about a specific account.
+1 -1
View File
@@ -6,11 +6,11 @@ import (
"strconv"
"github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/micro/cli/v2"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
// ListAccounts command lists all accounts
+2 -2
View File
@@ -5,10 +5,10 @@ import (
"fmt"
"github.com/asim/go-micro/plugins/client/grpc/v3"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
index "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
merrors "go-micro.dev/v4/errors"
)
// RebuildIndex rebuilds the entire configured index.
+1 -1
View File
@@ -5,10 +5,10 @@ import (
"os"
"github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
// RemoveAccount command deletes an existing account.
+2 -2
View File
@@ -5,15 +5,15 @@ import (
"os"
"strings"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/accounts/pkg/version"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
var (
+2 -13
View File
@@ -6,6 +6,7 @@ import (
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
@@ -14,7 +15,6 @@ import (
"github.com/owncloud/ocis/accounts/pkg/server/http"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/accounts/pkg/tracing"
"github.com/urfave/cli/v2"
)
// Server is the entry point for the server command.
@@ -30,28 +30,17 @@ func Server(cfg *config.Config) *cli.Command {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
}
if origins := ctx.StringSlice("cors-allowed-origins"); len(origins) != 0 {
cfg.HTTP.CORS.AllowedOrigins = origins
}
if methods := ctx.StringSlice("cors-allowed-methods"); len(methods) != 0 {
cfg.HTTP.CORS.AllowedMethods = methods
}
if headers := ctx.StringSlice("cors-allowed-headers"); len(headers) != 0 {
cfg.HTTP.CORS.AllowedOrigins = headers
}
logger.Debug().Str("service", "accounts").Msg("ignoring config file parsing when running supervised")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
err := tracing.Configure(cfg)
err := tracing.Configure(cfg, logger)
if err != nil {
return err
}
+1 -1
View File
@@ -5,10 +5,10 @@ import (
"fmt"
"github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
"google.golang.org/genproto/protobuf/field_mask"
)
+1 -1
View File
@@ -6,10 +6,10 @@ import (
"github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/micro/cli/v2"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/urfave/cli/v2"
)
// PrintVersion prints the service versions of all running instances.
+5 -16
View File
@@ -26,21 +26,12 @@ type LDAPSchema struct {
Groups string
}
// CORS defines the available cors configuration.
type CORS struct {
AllowedOrigins []string
AllowedMethods []string
AllowedHeaders []string
AllowCredentials bool
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
CacheTTL int
CORS CORS
}
// GRPC defines the available grpc configuration.
@@ -51,10 +42,9 @@ type GRPC struct {
// Server configures a server.
type Server struct {
Version string
Name string
HashDifficulty int
DemoUsersAndGroups bool
Version string
Name string
HashDifficulty int
}
// Asset defines the available asset configuration.
@@ -77,9 +67,8 @@ type Log struct {
// Repo defines which storage implementation is to be used.
type Repo struct {
Backend string
Disk Disk
CS3 CS3
Disk Disk
CS3 CS3
}
// Disk is the local disk implementation of the storage.
+9 -58
View File
@@ -1,13 +1,10 @@
package flagset
import (
"path"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// RootWithConfig applies cfg to the root flagset
@@ -31,10 +28,6 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"ACCOUNTS_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
@@ -50,28 +43,28 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"ACCOUNTS_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
EnvVars: []string{"ACCOUNTS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"ACCOUNTS_TRACING_TYPE", "OCIS_TRACING_TYPE"},
EnvVars: []string{"ACCOUNTS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"ACCOUNTS_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
EnvVars: []string{"ACCOUNTS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"ACCOUNTS_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
EnvVars: []string{"ACCOUNTS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
@@ -90,7 +83,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "http-addr",
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9181"),
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9181"),
Usage: "Address to bind http server",
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
@@ -109,30 +102,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
Destination: &cfg.HTTP.CacheTTL,
},
&cli.StringSliceFlag{
Name: "cors-allowed-origins",
Value: cli.NewStringSlice("*"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_ORIGINS", "OCIS_CORS_ALLOW_ORIGINS"},
},
&cli.StringSliceFlag{
Name: "cors-allowed-methods",
Value: cli.NewStringSlice("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_METHODS", "OCIS_CORS_ALLOW_METHODS"},
},
&cli.StringSliceFlag{
Name: "cors-allowed-headers",
Value: cli.NewStringSlice("Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_HEADERS", "OCIS_CORS_ALLOW_HEADERS"},
},
&cli.BoolFlag{
Name: "cors-allow-credentials",
Value: flags.OverrideDefaultBool(cfg.HTTP.CORS.AllowCredentials, true),
Usage: "Allow credentials for CORS",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_CREDENTIALS", "OCIS_CORS_ALLOW_CREDENTIALS"},
},
&cli.StringFlag{
Name: "grpc-namespace",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
@@ -142,7 +111,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "grpc-addr",
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9180"),
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "0.0.0.0:9180"),
Usage: "Address to bind grpc server",
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
@@ -161,13 +130,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
Destination: &cfg.Server.HashDifficulty,
},
&cli.BoolFlag{
Name: "demo-users-and-groups",
Value: flags.OverrideDefaultBool(cfg.Server.DemoUsersAndGroups, true),
Usage: "Enable demo users and groups",
EnvVars: []string{"ACCOUNTS_DEMO_USERS_AND_GROUPS"},
Destination: &cfg.Server.DemoUsersAndGroups,
},
&cli.StringFlag{
Name: "asset-path",
Value: flags.OverrideDefaultString(cfg.Asset.Path, ""),
@@ -182,17 +144,10 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"ACCOUNTS_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
&cli.StringFlag{
Name: "storage-backend",
Value: flags.OverrideDefaultString(cfg.Repo.Backend, "CS3"),
Usage: "Which backend to use to store accounts data (CS3 or disk)",
EnvVars: []string{"ACCOUNTS_STORAGE_BACKEND"},
Destination: &cfg.Repo.Backend,
},
&cli.StringFlag{
Name: "storage-disk-path",
Value: flags.OverrideDefaultString(cfg.Repo.Disk.Path, path.Join(defaults.BaseDataPath(), "accounts")),
Usage: "Path on the local disk to store accounts data when backend is set to disk",
Value: flags.OverrideDefaultString(cfg.Repo.Disk.Path, ""),
Usage: "Path on the local disk, e.g. /var/tmp/ocis/accounts",
EnvVars: []string{"ACCOUNTS_STORAGE_DISK_PATH"},
Destination: &cfg.Repo.Disk.Path,
},
@@ -280,10 +235,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.GID.Upper,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
+3 -3
View File
@@ -3,13 +3,13 @@ package proto
import (
context "context"
client "go-micro.dev/v4/client"
empty "google.golang.org/protobuf/types/known/emptypb"
client "github.com/asim/go-micro/v3/client"
empty "github.com/golang/protobuf/ptypes/empty"
)
// MockAccountsService can be used to write tests
/*
To create a mock overwrite the functions of an instance like this:
To creata a mock overwrite the functions of an instance like this:
```go
func mockAccSvc(retErr bool) proto.AccountsService {
File diff suppressed because it is too large. Load diff
+40 -34
View File
@@ -1,24 +1,24 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: proto/v0/accounts.proto
// source: accounts.proto
package proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
proto "google.golang.org/protobuf/proto"
emptypb "google.golang.org/protobuf/types/known/emptypb"
_ "google.golang.org/protobuf/types/known/fieldmaskpb"
_ "google.golang.org/protobuf/types/known/timestamppb"
_ "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
import (
context "context"
api "go-micro.dev/v4/api"
client "go-micro.dev/v4/client"
server "go-micro.dev/v4/server"
api "github.com/asim/go-micro/v3/api"
client "github.com/asim/go-micro/v3/client"
server "github.com/asim/go-micro/v3/server"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -26,6 +26,12 @@ 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
// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
@@ -36,35 +42,35 @@ var _ server.Option
func NewAccountsServiceEndpoints() []*api.Endpoint {
return []*api.Endpoint{
{
&api.Endpoint{
Name: "AccountsService.ListAccounts",
Path: []string{"/api/v0/accounts/accounts-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "AccountsService.GetAccount",
Path: []string{"/api/v0/accounts/accounts-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "AccountsService.CreateAccount",
Path: []string{"/api/v0/accounts/accounts-create"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "AccountsService.UpdateAccount",
Path: []string{"/api/v0/accounts/accounts-update"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "AccountsService.DeleteAccount",
Path: []string{"/api/v0/accounts/accounts-delete"},
Method: []string{"POST"},
@@ -86,7 +92,7 @@ type AccountsService interface {
// Updates an account
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error)
// Deletes an account
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error)
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error)
}
type accountsService struct {
@@ -141,9 +147,9 @@ func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRe
return out, nil
}
func (c *accountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) {
func (c *accountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) {
req := c.c.NewRequest(c.name, "AccountsService.DeleteAccount", in)
out := new(emptypb.Empty)
out := new(empty.Empty)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
@@ -163,7 +169,7 @@ type AccountsServiceHandler interface {
// Updates an account
UpdateAccount(context.Context, *UpdateAccountRequest, *Account) error
// Deletes an account
DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error
DeleteAccount(context.Context, *DeleteAccountRequest, *empty.Empty) error
}
func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler, opts ...server.HandlerOption) error {
@@ -172,7 +178,7 @@ func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler
GetAccount(ctx context.Context, in *GetAccountRequest, out *Account) error
CreateAccount(ctx context.Context, in *CreateAccountRequest, out *Account) error
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *Account) error
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *empty.Empty) error
}
type AccountsService struct {
accountsService
@@ -236,7 +242,7 @@ func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAc
return h.AccountsServiceHandler.UpdateAccount(ctx, in, out)
}
func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error {
func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *empty.Empty) error {
return h.AccountsServiceHandler.DeleteAccount(ctx, in, out)
}
@@ -244,56 +250,56 @@ func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAc
func NewGroupsServiceEndpoints() []*api.Endpoint {
return []*api.Endpoint{
{
&api.Endpoint{
Name: "GroupsService.ListGroups",
Path: []string{"/api/v0/accounts/groups-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.GetGroup",
Path: []string{"/api/v0/accounts/groups-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.CreateGroup",
Path: []string{"/api/v0/accounts/groups-create"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.UpdateGroup",
Path: []string{"/api/v0/accounts/groups-update"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.DeleteGroup",
Path: []string{"/api/v0/accounts/groups-delete"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.AddMember",
Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.RemoveMember",
Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
&api.Endpoint{
Name: "GroupsService.ListMembers",
Path: []string{"/api/v0/groups/{id=*}/members/$ref"},
Method: []string{"POST"},
@@ -315,7 +321,7 @@ type GroupsService interface {
// Updates a group
UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*Group, error)
// Deletes a group
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error)
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*empty.Empty, error)
// group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http
AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*Group, error)
// group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0
@@ -376,9 +382,9 @@ func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest,
return out, nil
}
func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) {
func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*empty.Empty, error) {
req := c.c.NewRequest(c.name, "GroupsService.DeleteGroup", in)
out := new(emptypb.Empty)
out := new(empty.Empty)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
@@ -428,7 +434,7 @@ type GroupsServiceHandler interface {
// Updates a group
UpdateGroup(context.Context, *UpdateGroupRequest, *Group) error
// Deletes a group
DeleteGroup(context.Context, *DeleteGroupRequest, *emptypb.Empty) error
DeleteGroup(context.Context, *DeleteGroupRequest, *empty.Empty) error
// group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http
AddMember(context.Context, *AddMemberRequest, *Group) error
// group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0
@@ -443,7 +449,7 @@ func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, op
GetGroup(ctx context.Context, in *GetGroupRequest, out *Group) error
CreateGroup(ctx context.Context, in *CreateGroupRequest, out *Group) error
UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *Group) error
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *empty.Empty) error
AddMember(ctx context.Context, in *AddMemberRequest, out *Group) error
RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *Group) error
ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error
@@ -531,7 +537,7 @@ func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupR
return h.GroupsServiceHandler.UpdateGroup(ctx, in, out)
}
func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error {
func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *empty.Empty) error {
return h.GroupsServiceHandler.DeleteGroup(ctx, in, out)
}
@@ -551,7 +557,7 @@ func (h *groupsServiceHandler) ListMembers(ctx context.Context, in *ListMembersR
func NewIndexServiceEndpoints() []*api.Endpoint {
return []*api.Endpoint{
{
&api.Endpoint{
Name: "IndexService.RebuildIndex",
Path: []string{"/api/v0/index/rebuild"},
Method: []string{"POST"},
@@ -11,8 +11,10 @@ import (
"testing"
mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v3"
empty "github.com/golang/protobuf/ptypes/empty"
"github.com/asim/go-micro/v3/client"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/command"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
@@ -20,8 +22,6 @@ import (
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
"github.com/stretchr/testify/assert"
"go-micro.dev/v4/client"
merrors "go-micro.dev/v4/errors"
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -80,9 +80,7 @@ func init() {
)
cfg := config.New()
cfg.Repo.Backend = "disk"
cfg.Repo.Disk.Path = dataPath
cfg.Server.DemoUsersAndGroups = true
var hdlr *svc.Service
var err error
@@ -393,7 +391,7 @@ func deleteGroup(t *testing.T, id string) (*empty.Empty, error) {
// createTmpDir creates a temporary dir for tests data.
func createTmpDir() string {
name, err := ioutil.TempDir("/tmp", "ocis-accounts-store-")
name, err := ioutil.TempDir("/var/tmp", "ocis-accounts-store-")
if err != nil {
panic(err)
}
@@ -545,7 +543,7 @@ func TestUpdateAccount(t *testing.T) {
resp, err := updateAccount(t, tt.userAccount, updateMask)
if tt.expectedErrOnUpdate != nil {
assert.Error(t, err)
assert.Equal(t, tt.expectedErrOnUpdate.Error(), err.Error())
assert.Equal(t, tt.expectedErrOnUpdate, err)
} else {
assert.NoError(t, err)
assert.IsType(t, &proto.Account{}, resp)
@@ -618,7 +616,7 @@ func TestUpdateNonUpdatableFieldsInAccount(t *testing.T) {
errMsg := fmt.Sprintf("can not update field %s, either unknown or readonly", tt.updateMask[0])
assert.Equal(t, errMsg, e.Detail)
} else {
t.Fatal("Expected merrors errors but found something else.")
t.Fatal("Expected merror errors but found something else.")
}
})
}
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"encoding/json"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi"
"github.com/go-chi/render"
"github.com/golang/protobuf/jsonpb"
@@ -247,7 +247,7 @@ message DeleteAccountRequest {
string id = 1;
}
// Account follows the properties of the ms graph api user resource.
// Account follows the properties of the ms graph api user resuorce.
// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties
message Account {
@@ -383,7 +383,7 @@ message Account {
repeated OnPremisesProvisioningError on_premises_provisioning_errors = 29;
// TODO do we need to sync uidnumber and gidnumber from the external ldap? we may assign different numbers so eos has a non colliding namespace.
// we can sync them to the (uid|gid)_number fields but what if they changed in the external ldap and now collide?
// we can sync them to the (uid|gid)_number fileds but what if they changed in the external ldap and now collide?
// move those properties to a posixaccount message so we can exchange that part with an external (readonly or writeable) ldap server?
// For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status.
+62 -32
View File
@@ -396,13 +396,7 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"accountId": {
"type": "string",
"title": "The account id to add"
}
}
"$ref": "#/definitions/v0AddMemberRequest"
}
}
],
@@ -449,7 +443,7 @@
"in": "body",
"required": true,
"schema": {
"type": "object"
"$ref": "#/definitions/v0RemoveMemberRequest"
}
}
],
@@ -489,26 +483,7 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"pageSize": {
"type": "integer",
"format": "int32"
},
"pageToken": {
"type": "string",
"title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue"
},
"fieldMask": {
"type": "string",
"description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation."
},
"query": {
"type": "string",
"description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"",
"title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned"
}
}
"$ref": "#/definitions/v0ListMembersRequest"
}
}
],
@@ -554,11 +529,14 @@
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
},
"additionalProperties": {}
}
},
"rpcStatus": {
"type": "object",
@@ -711,7 +689,20 @@
"description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nRead-only. Use revokeSignInSessions to reset."
}
},
"title": "Account follows the properties of the ms graph api user resource.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties"
"title": "Account follows the properties of the ms graph api user resuorce.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties"
},
"v0AddMemberRequest": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"title": "The id of the group to add a member to"
},
"accountId": {
"type": "string",
"title": "The account id to add"
}
}
},
"v0CreateAccountRequest": {
"type": "object",
@@ -957,6 +948,32 @@
}
}
},
"v0ListMembersRequest": {
"type": "object",
"properties": {
"pageSize": {
"type": "integer",
"format": "int32"
},
"pageToken": {
"type": "string",
"title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue"
},
"fieldMask": {
"type": "string",
"description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation."
},
"query": {
"type": "string",
"description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"",
"title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned"
},
"id": {
"type": "string",
"title": "The id of the group to list members from"
}
}
},
"v0ListMembersResponse": {
"type": "object",
"properties": {
@@ -1030,6 +1047,19 @@
"v0RebuildIndexResponse": {
"type": "object"
},
"v0RemoveMemberRequest": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"title": "The id of the group to remove a member from"
},
"accountId": {
"type": "string",
"title": "The account id to remove"
}
}
},
"v0UpdateAccountRequest": {
"type": "object",
"properties": {
+1
View File
@@ -0,0 +1 @@
checks = ["all", "-ST1003", "-ST1000", "-SA1019"]
+1 -1
View File
@@ -3,11 +3,11 @@ package grpc
import (
"context"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/urfave/cli/v2"
)
// Option defines a single option function.
+1
View File
@@ -30,5 +30,6 @@ func Server(opts ...Option) grpc.Service {
options.Logger.Fatal().Err(err).Msg("could not register index handler")
}
service.Init()
return service
}
+1 -1
View File
@@ -3,11 +3,11 @@ package http
import (
"context"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/urfave/cli/v2"
)
// Option defines a single option function.
+7 -15
View File
@@ -1,16 +1,14 @@
package http
import (
"github.com/go-chi/chi/v5"
chimiddleware "github.com/go-chi/chi/v5/middleware"
"github.com/asim/go-micro/v3"
"github.com/go-chi/chi"
"github.com/owncloud/ocis/accounts/pkg/assets"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/accounts/pkg/version"
"github.com/owncloud/ocis/ocis-pkg/account"
"github.com/owncloud/ocis/ocis-pkg/cors"
"github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/service/http"
"github.com/owncloud/ocis/ocis-pkg/version"
"go-micro.dev/v4"
)
// Server initializes the http service and server.
@@ -30,17 +28,10 @@ func Server(opts ...Option) http.Service {
mux := chi.NewMux()
mux.Use(chimiddleware.RealIP)
mux.Use(chimiddleware.RequestID)
mux.Use(middleware.TraceContext)
mux.Use(middleware.RealIP)
mux.Use(middleware.RequestID)
mux.Use(middleware.NoCache)
mux.Use(middleware.Cors(
cors.Logger(options.Logger),
cors.AllowedOrigins(options.Config.HTTP.CORS.AllowedOrigins),
cors.AllowedMethods(options.Config.HTTP.CORS.AllowedMethods),
cors.AllowedHeaders(options.Config.HTTP.CORS.AllowedHeaders),
cors.AllowCredentials(options.Config.HTTP.CORS.AllowCredentials),
))
mux.Use(middleware.Cors)
mux.Use(middleware.Secure)
mux.Use(middleware.ExtractAccountUUID(
account.Logger(options.Logger),
@@ -75,5 +66,6 @@ func Server(opts ...Option) http.Service {
options.Logger.Fatal().Err(err).Msg("failed to register the handler")
}
service.Init()
return service
}
+7 -51
View File
@@ -12,26 +12,23 @@ import (
"strconv"
"time"
"go.opentelemetry.io/otel/trace"
"github.com/owncloud/ocis/ocis-pkg/sync"
"golang.org/x/crypto/bcrypt"
"go.opentelemetry.io/otel/attribute"
"github.com/owncloud/ocis/ocis-pkg/log"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/metadata"
"github.com/gofrs/uuid"
"github.com/golang/protobuf/ptypes/empty"
fieldmask_utils "github.com/mennanov/fieldmask-utils"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/accounts/pkg/storage"
accTracing "github.com/owncloud/ocis/accounts/pkg/tracing"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/roles"
"github.com/owncloud/ocis/ocis-pkg/sync"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0"
"github.com/rs/zerolog"
merrors "go-micro.dev/v4/errors"
"go-micro.dev/v4/metadata"
"golang.org/x/crypto/bcrypt"
"google.golang.org/genproto/protobuf/field_mask"
p "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
@@ -127,15 +124,6 @@ func (s Service) getInMemoryServiceUser() proto.Account {
// ListAccounts implements the AccountsServiceHandler interface
// the query contains account properties
func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, out *proto.ListAccountsResponse) (err error) {
var span trace.Span
ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.ListAccounts")
defer span.End()
span.SetAttributes(
attribute.KeyValue{Key: "page_size", Value: attribute.Int64Value(int64(in.PageSize))},
attribute.KeyValue{Key: "page_token", Value: attribute.StringValue(in.PageToken)},
)
hasSelf := s.hasSelfManagementPermissions(ctx)
hasManagement := s.hasAccountManagementPermissions(ctx)
if !hasSelf && !hasManagement {
@@ -281,15 +269,6 @@ func (s Service) findAccountsByQuery(ctx context.Context, query string) ([]strin
// GetAccount implements the AccountsServiceHandler interface
func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, out *proto.Account) (err error) {
var span trace.Span
ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.GetAccount")
defer span.End()
span.SetAttributes(
attribute.KeyValue{Key: "account_id", Value: attribute.StringValue(in.Id)},
)
hasSelf := s.hasSelfManagementPermissions(ctx)
hasManagement := s.hasAccountManagementPermissions(ctx)
if !hasSelf && !hasManagement {
@@ -338,15 +317,6 @@ func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, ou
// CreateAccount implements the AccountsServiceHandler interface
func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, out *proto.Account) (err error) {
var span trace.Span
ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.CreateAccount")
defer span.End()
span.SetAttributes(
attribute.KeyValue{Key: "account", Value: attribute.StringValue(in.Account.String())},
)
if !s.hasAccountManagementPermissions(ctx) {
return merrors.Forbidden(s.id, "no permission for CreateAccount")
}
@@ -479,15 +449,6 @@ func (s Service) rollbackCreateAccount(ctx context.Context, acc *proto.Account)
// read only fields are ignored
// TODO how can we unset specific values? using the update mask
func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, out *proto.Account) (err error) {
var span trace.Span
ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.UpdateAccount")
defer span.End()
span.SetAttributes(
attribute.KeyValue{Key: "account", Value: attribute.StringValue(in.Account.String())},
)
hasSelf := s.hasSelfManagementPermissions(ctx)
hasManagement := s.hasAccountManagementPermissions(ctx)
if !hasSelf && !hasManagement {
@@ -625,7 +586,7 @@ func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountReque
return
}
// whitelist of all paths/fields which can be updated by users themselves
// whitelist of all paths/fields which can be updated by users themself
var selfUpdatableAccountPaths = map[string]struct{}{
"DisplayName": {},
"Description": {},
@@ -654,11 +615,6 @@ var updatableAccountPaths = map[string]struct{}{
// DeleteAccount implements the AccountsServiceHandler interface
func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, out *empty.Empty) (err error) {
var span trace.Span
ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.DeleteAccount")
defer span.End()
if !s.hasAccountManagementPermissions(ctx) {
return merrors.Forbidden(s.id, "no permission for DeleteAccount")
}
@@ -741,7 +697,7 @@ func validateAccountEmail(serviceID string, a *proto.Account) error {
return nil
}
// We want to allow email addresses as usernames so they show up when using them in ACLs on storages that allow integration with our glauth LDAP service
// We want to allow email addresses as usernames so they show up when using them in ACLs on storages that allow intergration with our glauth LDAP service
// so we are adding a few restrictions from https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6
// names should not start with numbers
var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$")
@@ -9,6 +9,9 @@ import (
"testing"
"time"
"github.com/asim/go-micro/v3/client"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/metadata"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
@@ -18,12 +21,9 @@ import (
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
ssvc "github.com/owncloud/ocis/settings/pkg/service/v0"
"github.com/stretchr/testify/assert"
"go-micro.dev/v4/client"
merrors "go-micro.dev/v4/errors"
"go-micro.dev/v4/metadata"
)
const dataPath = "/tmp/ocis-accounts-tests"
const dataPath = "/var/tmp/ocis-accounts-tests"
var (
roleServiceMock settings.RoleService
@@ -33,7 +33,6 @@ var (
func init() {
cfg := config.New()
cfg.Server.Name = "accounts"
cfg.Repo.Backend = "disk"
cfg.Repo.Disk.Path = dataPath
logger := olog.NewLogger(olog.Color(true), olog.Pretty(true))
roleServiceMock = buildRoleServiceMock()
+2 -2
View File
@@ -5,11 +5,11 @@ import (
"path"
"strconv"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/gofrs/uuid"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/accounts/pkg/storage"
merrors "go-micro.dev/v4/errors"
p "google.golang.org/protobuf/proto"
)
@@ -270,7 +270,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p
break
}
}
// only store the reference to prevent recursion when marshaling json
// only store the reference to prevent recurision when marshaling json
gref := &proto.Group{
Id: g.Id,
}
+47 -77
View File
@@ -2,14 +2,13 @@ package service
import (
"context"
"errors"
"path"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/accounts/pkg/storage"
@@ -49,22 +48,17 @@ func New(opts ...Option) (s *Service, err error) {
roleManager = &m
}
storage, err := createMetadataStorage(cfg, logger)
if err != nil {
return nil, errors.Wrap(err, "could not create metadata storage")
}
s = &Service{
id: cfg.GRPC.Namespace + "." + cfg.Server.Name,
log: logger,
Config: cfg,
RoleService: roleService,
RoleManager: roleManager,
repo: storage,
repo: createMetadataStorage(cfg, logger),
}
r := oreg.GetRegistry()
if cfg.Repo.Backend == "cs3" {
if cfg.Repo.Disk.Path == "" {
if _, err := r.GetService("com.owncloud.storage.metadata"); err != nil {
logger.Error().Err(err).Msg("index: storage-metadata service not present")
return nil, err
@@ -79,11 +73,11 @@ func New(opts ...Option) (s *Service, err error) {
return nil, err
}
if err = s.createDefaultAccounts(cfg.Server.DemoUsersAndGroups); err != nil {
if err = s.createDefaultAccounts(); err != nil {
return nil, err
}
if err = s.createDefaultGroups(cfg.Server.DemoUsersAndGroups); err != nil {
if err = s.createDefaultGroups(); err != nil {
return nil, err
}
return
@@ -119,47 +113,46 @@ func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) {
}
}(cfg)
switch cfg.Repo.Backend {
case "disk":
c.Repo = idxcfg.Repo{
Backend: cfg.Repo.Backend,
Disk: idxcfg.Disk{
Path: cfg.Repo.Disk.Path,
},
if (config.Repo{}) != cfg.Repo {
if (config.Disk{}) != cfg.Repo.Disk {
c.Repo = idxcfg.Repo{
Disk: idxcfg.Disk{
Path: cfg.Repo.Disk.Path,
},
}
}
case "cs3":
c.Repo = idxcfg.Repo{
Backend: cfg.Repo.Backend,
CS3: idxcfg.CS3{
ProviderAddr: cfg.Repo.CS3.ProviderAddr,
DataURL: cfg.Repo.CS3.DataURL,
DataPrefix: cfg.Repo.CS3.DataPrefix,
JWTSecret: cfg.Repo.CS3.JWTSecret,
},
}
default:
return nil, errors.New("index backend " + cfg.Repo.Backend + " is not supported")
}
if (config.Index{}) != cfg.Index {
c.Index = idxcfg.Index{
UID: idxcfg.Bound{
Lower: cfg.Index.UID.Lower,
},
GID: idxcfg.Bound{
Lower: cfg.Index.GID.Lower,
},
if (config.CS3{}) != cfg.Repo.CS3 {
c.Repo = idxcfg.Repo{
CS3: idxcfg.CS3{
ProviderAddr: cfg.Repo.CS3.ProviderAddr,
DataURL: cfg.Repo.CS3.DataURL,
DataPrefix: cfg.Repo.CS3.DataPrefix,
JWTSecret: cfg.Repo.CS3.JWTSecret,
},
}
}
}
if (config.ServiceUser{}) != cfg.ServiceUser {
c.ServiceUser = cfg.ServiceUser
if (config.Index{}) != cfg.Index {
c.Index = idxcfg.Index{
UID: idxcfg.Bound{
Lower: cfg.Index.UID.Lower,
},
GID: idxcfg.Bound{
Lower: cfg.Index.GID.Lower,
},
}
}
if (config.ServiceUser{}) != cfg.ServiceUser {
c.ServiceUser = cfg.ServiceUser
}
}
return c, nil
}
func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) {
func (s Service) createDefaultAccounts() (err error) {
accounts := []proto.Account{
{
Id: "4c510ada-c86b-4815-8820-42cdf82c3d51",
@@ -285,19 +278,8 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) {
},
},
}
mustHaveAccounts := map[string]bool{
"bc596f3c-c955-4328-80a0-60d018b4ad57": true, // Reva IOP
"820ba2a1-3f54-4538-80a4-2d73007e30bf": true, // Kopano IDP
"ddc2004c-0977-11eb-9d3f-a793888cd0f8": true, // admin
}
// this only deals with the metadata service.
for i := range accounts {
if !withDemoAccounts && !mustHaveAccounts[accounts[i].Id] {
continue
}
a := &proto.Account{}
err := s.repo.LoadAccount(context.Background(), accounts[i].Id, a)
if !storage.IsNotFoundErr(err) {
@@ -341,7 +323,7 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) {
return nil
}
func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
func (s Service) createDefaultGroups() (err error) {
groups := []proto.Group{
{Id: "34f38767-c937-4eb6-b847-1c175829a2a0", GidNumber: 15000, OnPremisesSamAccountName: "sysusers", DisplayName: "Technical users", Description: "A group for technical users. They should not show up in sharing dialogs.", Members: []*proto.Account{
{Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf"}, // idp
@@ -376,17 +358,7 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
}},
}
mustHaveGroups := map[string]bool{
"34f38767-c937-4eb6-b847-1c175829a2a0": true, // sysusers
"509a9dcd-bb37-4f4f-a01a-19dca27d9cfa": true, // users
}
for i := range groups {
if !withDemoGroups && !mustHaveGroups[groups[i].Id] {
continue
}
g := &proto.Group{}
err := s.repo.LoadGroup(context.Background(), groups[i].Id, g)
if !storage.IsNotFoundErr(err) {
@@ -424,19 +396,17 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
return nil
}
func createMetadataStorage(cfg *config.Config, logger log.Logger) (storage.Repo, error) {
switch cfg.Repo.Backend {
case "disk":
return storage.NewDiskRepo(cfg, logger), nil
case "cs3":
repo, err := storage.NewCS3Repo(cfg)
if err != nil {
return nil, errors.Wrap(err, "cs3 backend was configured but failed to start")
}
return repo, nil
default:
return nil, errors.New("backend type " + cfg.Repo.Backend + " is not supported")
func createMetadataStorage(cfg *config.Config, logger log.Logger) storage.Repo {
// for now we detect the used storage implementation based on which storage is configured
// the config with defaults needs to be checked last
if cfg.Repo.Disk.Path != "" {
return storage.NewDiskRepo(cfg, logger)
}
repo, err := storage.NewCS3Repo(cfg)
if err != nil {
logger.Fatal().Err(err).Msg("cs3 storage was configured but failed to start")
}
return repo
}
// Service implements the AccountsServiceHandler interface
+76
View File
@@ -0,0 +1,76 @@
package service
import (
"context"
"github.com/golang/protobuf/ptypes/empty"
v0proto "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"go.opencensus.io/trace"
)
// NewTracing returns a service that instruments traces.
func NewTracing(next v0proto.AccountsServiceHandler) v0proto.AccountsServiceHandler {
return tracing{
next: next,
}
}
type tracing struct {
next v0proto.AccountsServiceHandler
}
func (t tracing) ListAccounts(ctx context.Context, req *v0proto.ListAccountsRequest, rsp *v0proto.ListAccountsResponse) error {
ctx, span := trace.StartSpan(ctx, "Accounts.ListAccounts")
defer span.End()
span.Annotate([]trace.Attribute{
trace.Int64Attribute("page_size", int64(req.PageSize)),
trace.StringAttribute("page_token", req.PageToken),
trace.StringAttribute("field_mask", req.FieldMask.String()),
}, "Execute Accounts.ListAccount handler")
return t.next.ListAccounts(ctx, req, rsp)
}
func (t tracing) GetAccount(ctx context.Context, req *v0proto.GetAccountRequest, acc *v0proto.Account) error {
ctx, span := trace.StartSpan(ctx, "Accounts.GetAccount")
defer span.End()
span.Annotate([]trace.Attribute{
trace.StringAttribute("id", req.Id),
}, "Execute Accounts.GetAccount handler")
return t.next.GetAccount(ctx, req, acc)
}
func (t tracing) CreateAccount(ctx context.Context, req *v0proto.CreateAccountRequest, acc *v0proto.Account) error {
ctx, span := trace.StartSpan(ctx, "Accounts.CreateAccount")
defer span.End()
span.Annotate([]trace.Attribute{
trace.StringAttribute("account", req.Account.String()),
}, "Execute Accounts.CreateAccount handler")
return t.next.CreateAccount(ctx, req, acc)
}
func (t tracing) UpdateAccount(ctx context.Context, req *v0proto.UpdateAccountRequest, acc *v0proto.Account) error {
ctx, span := trace.StartSpan(ctx, "Accounts.UpdateAccount")
defer span.End()
span.Annotate([]trace.Attribute{
trace.StringAttribute("account", req.Account.String()),
}, "Execute Accounts.UpdateAccount handler")
return t.next.UpdateAccount(ctx, req, acc)
}
func (t tracing) DeleteAccount(ctx context.Context, req *v0proto.DeleteAccountRequest, e *empty.Empty) error {
ctx, span := trace.StartSpan(ctx, "Accounts.DeleteAccount")
defer span.End()
span.Annotate([]trace.Attribute{
trace.StringAttribute("id", req.Id),
}, "Execute Accounts.DeleteAccout handler")
return t.next.DeleteAccount(ctx, req, e)
}
+30 -20
View File
@@ -4,19 +4,19 @@ import (
"bytes"
"context"
"encoding/json"
"github.com/cs3org/reva/pkg/auth/scope"
"io"
"io/ioutil"
"net/http"
"path"
"path/filepath"
"strconv"
"strings"
"github.com/cs3org/reva/pkg/auth/scope"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
v1beta11 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
revactx "github.com/cs3org/reva/pkg/ctx"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
"github.com/cs3org/reva/pkg/rgrpc/todo/pool"
"github.com/cs3org/reva/pkg/token"
"github.com/cs3org/reva/pkg/token/manager/jwt"
@@ -68,7 +68,7 @@ func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error)
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
if err := r.makeRootDirIfNotExist(ctx, accountsFolder); err != nil {
return err
}
@@ -105,10 +105,10 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", accountsFolder),
Spec: &provider.Reference_Path{Path: path.Join("/meta", accountsFolder)},
},
})
if err != nil {
@@ -155,11 +155,11 @@ func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", accountsFolder, id),
Spec: &provider.Reference_Path{Path: path.Join("/meta", accountsFolder, id)},
},
})
@@ -182,7 +182,7 @@ func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
if err := r.makeRootDirIfNotExist(ctx, groupsFolder); err != nil {
return err
}
@@ -219,10 +219,10 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", groupsFolder),
Spec: &provider.Reference_Path{Path: path.Join("/meta", groupsFolder)},
},
})
if err != nil {
@@ -269,11 +269,11 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", groupsFolder, id),
Spec: &provider.Reference_Path{Path: path.Join("/meta", groupsFolder, id)},
},
})
@@ -299,11 +299,21 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
Id: &user.UserId{
OpaqueId: su.UUID,
},
Groups: []string{},
UidNumber: su.UID,
GidNumber: su.GID,
Groups: []string{},
Opaque: &types.Opaque{
Map: map[string]*types.OpaqueEntry{
"uid": {
Decoder: "plain",
Value: []byte(strconv.FormatInt(su.UID, 10)),
},
"gid": {
Decoder: "plain",
Value: []byte(strconv.FormatInt(su.GID, 10)),
},
},
},
}
s, err := scope.AddOwnerScope(nil)
s, err := scope.GetOwnerScope()
if err != nil {
return
}
@@ -325,7 +335,7 @@ func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error
// MakeDirIfNotExist will create a root node in the metadata storage. Requires an authenticated context.
func MakeDirIfNotExist(ctx context.Context, sp provider.ProviderAPIClient, folder string) error {
var rootPathRef = &provider.Reference{
Path: path.Join("/meta", folder),
Spec: &provider.Reference_Path{Path: path.Join("/meta", folder)},
}
resp, err := sp.Stat(ctx, &provider.StatRequest{
@@ -372,7 +382,7 @@ func (d dataProviderClient) put(url string, body io.Reader, token string) (*http
return nil, err
}
req.Header.Add(revactx.TokenHeader, token)
req.Header.Add("x-access-token", token)
return d.client.Do(req)
}
@@ -382,6 +392,6 @@ func (d dataProviderClient) get(url string, token string) (*http.Response, error
return nil, err
}
req.Header.Add(revactx.TokenHeader, token)
req.Header.Add("x-access-token", token)
return d.client.Do(req)
}
+79 -12
View File
@@ -1,23 +1,90 @@
package tracing
import (
"time"
"contrib.go.opencensus.io/exporter/jaeger"
"contrib.go.opencensus.io/exporter/ocagent"
"contrib.go.opencensus.io/exporter/zipkin"
openzipkin "github.com/openzipkin/zipkin-go"
zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
"github.com/owncloud/ocis/accounts/pkg/config"
pkgtrace "github.com/owncloud/ocis/ocis-pkg/tracing"
"go.opentelemetry.io/otel/trace"
"github.com/owncloud/ocis/ocis-pkg/log"
"go.opencensus.io/stats/view"
"go.opencensus.io/trace"
)
var (
// TraceProvider is the global trace provider for the proxy service.
TraceProvider = trace.NewNoopTracerProvider()
)
func Configure(cfg *config.Config) error {
var err error
func Configure(cfg *config.Config, logger log.Logger) error {
if cfg.Tracing.Enabled {
if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "accounts", cfg.Tracing.Type); err != nil {
return err
switch t := cfg.Tracing.Type; t {
case "agent":
exporter, err := ocagent.NewExporter(
ocagent.WithReconnectionPeriod(5*time.Second),
ocagent.WithAddress(cfg.Tracing.Endpoint),
ocagent.WithServiceName(cfg.Tracing.Service),
)
if err != nil {
logger.Error().
Err(err).
Str("endpoint", cfg.Tracing.Endpoint).
Str("collector", cfg.Tracing.Collector).
Msg("Failed to create agent tracing")
return err
}
trace.RegisterExporter(exporter)
view.RegisterExporter(exporter)
case "jaeger":
exporter, err := jaeger.NewExporter(
jaeger.Options{
AgentEndpoint: cfg.Tracing.Endpoint,
CollectorEndpoint: cfg.Tracing.Collector,
Process: jaeger.Process{
ServiceName: cfg.Tracing.Service,
},
},
)
if err != nil {
logger.Error().
Err(err).
Str("endpoint", cfg.Tracing.Endpoint).
Str("collector", cfg.Tracing.Collector).
Msg("Failed to create jaeger tracing")
return err
}
trace.RegisterExporter(exporter)
case "zipkin":
endpoint, err := openzipkin.NewEndpoint(
cfg.Tracing.Service,
cfg.Tracing.Endpoint,
)
if err != nil {
logger.Error().
Err(err).
Str("endpoint", cfg.Tracing.Endpoint).
Str("collector", cfg.Tracing.Collector).
Msg("Failed to create zipkin tracing")
return err
}
exporter := zipkin.NewExporter(
zipkinhttp.NewReporter(
cfg.Tracing.Collector,
),
endpoint,
)
trace.RegisterExporter(exporter)
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
trace.ApplyConfig(
trace.Config{
DefaultSampler: trace.AlwaysSample(),
},
)
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
return nil
}
File renamed without changes.
+4 -6
View File
@@ -7,9 +7,8 @@ geekdocEditPath: edit/master/accounts/templates
geekdocFilePath: CONFIGURATION.tmpl
---
{{- define "options"}}
{{ $fnNames := (last . ).Flags -}}
{{ range $opt := first . }}
{{ range $fnName := $fnNames }}{{ with list $fnName $opt -}}
{{ $fnName := (last . ).Flags -}}
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
@@ -18,7 +17,6 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end }}
{{`{{< toc >}}`}}
@@ -45,9 +43,9 @@ If you prefer to configure the service with environment variables you can see th
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Command-line flags
### Commandline flags
If you prefer to configure the service with command-line flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
{{ $options := .Options -}}
{{ range $com := .Commands }}{{ with (list $options $com) -}}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Asserts whether the given object is empty
* Asserts wheter the given object is empty
* @param {Object} obj Object to be checked
* @returns {Boolean}
*/
@@ -1,6 +1,6 @@
const assert = require('assert')
const { client } = require('nightwatch-api')
const { Given, When, Then } = require('@cucumber/cucumber')
const { Given, When, Then } = require('cucumber')
When('the user browses to the accounts page', function () {
return client.page.accountsPage().navigateAndWaitUntilMounted()
+390 -858
View File
File diff suppressed because it is too large. Load diff
@@ -1,5 +0,0 @@
Enhancement: Proxy: Add claims policy selector
Using the proxy config file, it is now possible to let let the IdP determine the routing policy by sending an `ocis.routing.policy` claim. Its value will be used to determine the set of routes for the logged in user.
https://github.com/owncloud/ocis/pull/2248
@@ -1,7 +0,0 @@
Bugfix: Improve IDP Login Accessibility
We have addressed the feedback from the `a11y` audit and improved
the IDP login screen accordingly.
https://github.com/owncloud/web/issues/5376
https://github.com/owncloud/web/issues/5377
@@ -1,3 +0,0 @@
Enhancement: Add ocs cache warmup config and warn on protobuf ns conflicts
https://github.com/owncloud/ocis/pull/2328
@@ -1,6 +0,0 @@
Bugfix: forward basic auth to OpenID connect token authentication endpoint
When using `PROXY_ENABLE_BASIC_AUTH=true` we now forward request to the idp instead of trying to authenticate the request ourself.
https://github.com/owncloud/ocis/issues/2095
https://github.com/owncloud/ocis/issues/2094
@@ -1,8 +0,0 @@
Bugfix: log all requests in the proxy access log
We now use a dedicated middleware to log all requests, regardless of routing selector outcome.
While the log now includes the remote address, the selected routing policy is only logged when log level
is set to debug because the request context cannot be changed in the `directorSelectionDirector`, as per
the `ReverseProxy.Director` documentation.
https://github.com/owncloud/ocis/pull/2301
@@ -1,5 +0,0 @@
Enhancement: Refactor graph API
We refactored the `/graph/v1.0/` endpoint which now relies on the internal acces token fer authentication, getting rid of any LDAP or OIDC code to authenticate requests. This allows using the graph api when using basic auth or any other auth mechanism provided by the CS3 auth providers / reva gateway / ocis proxy.
https://github.com/owncloud/ocis/pull/2277
@@ -1,10 +0,0 @@
Bugfix: update glauth to 20210729125545-b9aecdfcac31
* Fixes the backend config not being passed correctly in ocis
* Fixes a mutex being copied, leading to concurrent writes
* Fixes UTF8 chars in filters
* Fixes case insensitive strings
https://github.com/owncloud/ocis/pull/2336
https://github.com/glauth/glauth/pull/198
https://github.com/glauth/glauth/pull/194
@@ -1,50 +0,0 @@
Enhancement: update REVA
Update REVA from v1.10.1-0.20210730095301-fcb7a30a44a6 to v1.11.1-0.20210809134415-3fe79c870fb5
* Fix cs3org/reva#1978: Fix owner type is optional
* Fix cs3org/reva#1965: fix value of file_target in shares
* Fix cs3org/reva#1960: fix updating shares in the memory share manager
* Fix cs3org/reva#1956: fix trashbin listing with depth 0
* Fix cs3org/reva#1957: fix etag propagation on deletes
* Enh cs3org/reva#1861: [WIP] Runtime plugins
* Fix cs3org/reva#1954: fix response format of the sharees API
* Fix cs3org/reva#1819: Remove notifications key from ocs response
* Enh cs3org/reva#1946: Add a share manager that connects to oc10 databases
* Fix cs3org/reva#1899: Fix chunked uploads for new versions
* Fix cs3org/reva#1906: Fix copy over existing resource
* Fix cs3org/reva#1891: Delete Shared Resources as Receiver
* Fix cs3org/reva#1907: Error when creating folder with existing name
* Fix cs3org/reva#1937: Do not overwrite more specific matches when finding storage providers
* Fix cs3org/reva#1939: Fix the share jail permissions in the decomposedfs
* Fix cs3org/reva#1932: Numerous fixes to the owncloudsql storage driver
* Fix cs3org/reva#1912: Fix response when listing versions of another user
* Fix cs3org/reva#1910: Get user groups recursively in the cbox rest user driver
* Fix cs3org/reva#1904: Set Content-Length to 0 when swallowing body in the datagateway
* Fix cs3org/reva#1911: Fix version order in propfind responses
* Fix cs3org/reva#1926: Trash Bin in oCIS Storage Operations
* Fix cs3org/reva#1901: Fix response code when folder doesnt exist on upload
* Enh cs3org/reva#1785: Extend app registry with AddProvider method and mimetype filters
* Enh cs3org/reva#1938: Add methods to get and put context values
* Enh cs3org/reva#1798: Add support for a deny-all permission on references
* Enh cs3org/reva#1916: Generate updated protobuf bindings for EOS GRPC
* Enh cs3org/reva#1887: Add "a" and "l" filter for grappa queries
* Enh cs3org/reva#1919: Run gofmt before building
* Enh cs3org/reva#1927: Implement RollbackToVersion for eosgrpc (needs a newer EOS MGM)
* Enh cs3org/reva#1944: Implement listing supported mime types in app registry
* Enh cs3org/reva#1870: Be defensive about wrongly quoted etags
* Enh cs3org/reva#1940: Reduce memory usage when uploading with S3ng storage
* Enh cs3org/reva#1888: Refactoring of the webdav code
* Enh cs3org/reva#1900: Check for illegal names while uploading or moving files
* Enh cs3org/reva#1925: Refactor listing and statting across providers for virtual views
* Fix cs3org/reva#1883: Pass directories with trailing slashes to eosclient.GenerateToken
* Fix cs3org/reva#1878: Improve the webdav error handling in the trashbin
* Fix cs3org/reva#1884: Do not send body on failed range request
* Enh cs3org/reva#1744: Add support for lightweight user types
* Fix cs3org/reva#1904: Set Content-Length to 0 when swallowing body in the datagateway
* Fix cs3org/reva#1899: Bugfix: Fix chunked uploads for new versions
* Enh cs3org/reva#1888: Refactoring of the webdav code
* Enh cs3org/reva#1887: Add "a" and "l" filter for grappa queries
https://github.com/owncloud/ocis/pull/2355
https://github.com/owncloud/ocis/pull/2295
https://github.com/owncloud/ocis/pull/2314
@@ -1,8 +0,0 @@
Change: Update ownCloud Web to v4.0.0
Tags: web
We updated ownCloud Web to v4.0.0. Please refer to the changelog (linked) for details on the web release.
https://github.com/owncloud/ocis/pull/2353
https://github.com/owncloud/web/releases/tag/v4.0.0
@@ -1,6 +0,0 @@
Enhancement: use only one go.mod file for project dependencies
We now use one single go.mod file at the root of the repository
rather than one per core extension.
https://github.com/owncloud/ocis/pull/2344
@@ -1,3 +0,0 @@
Bugfix: Specify primary user type for all accounts
https://github.com/owncloud/ocis/pull/2364
@@ -1,7 +0,0 @@
Enhancement: Use non root user for the owncloud/ocis docker image
The owncloud/ocis docker image now uses a non root user and enables you to set a different user with the docker `--user` parameter. The default user has the UID 1000 is part of a group with the GID 1000.
This is a breaking change for existing docker deployments. The permission on the files and folders in persistent volumes need to be changed to the UID and GID used for oCIS (default 1000:1000 if not changed by the user).
https://github.com/owncloud/ocis/pull/2380
@@ -1,5 +0,0 @@
Enhancement: Replace unmaintained jwt library
The old library [github.com/dgrijalva/jwt-go](https://github.com/dgrijalva/jwt-go) is unmaintained and was replaced by the community maintained fork [github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt).
https://github.com/owncloud/ocis/pull/2386
@@ -1,5 +0,0 @@
Enhancement: Update bleve to version 2.1.0
Updated bleve to the current version.
https://github.com/owncloud/ocis/pull/2391
Loaded 100 of 892 files, more files were not shown because too many files have changed in this diff. Show more