Merge branch 'master' into no-additional-init

This commit is contained in:
A.Unger
2021-07-02 13:25:30 +02:00
662 changed files with 43303 additions and 29596 deletions

1
.adr-dir Normal file
View File

@@ -0,0 +1 @@
docs/ocis/adr

12
.bingo/.gitignore vendored Executable file
View File

@@ -0,0 +1,12 @@
# Ignore everything
*
# But not these files:
!.gitignore
!*.mod
!README.md
!Variables.mk
!variables.env
*tmp.mod

14
.bingo/README.md Executable file
View File

@@ -0,0 +1,14 @@
# Project Development Dependencies.
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
* Run `bingo get` to install all tools having each own module file in this directory.
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
* For go: Import `.bingo/variables.go` to for variable names.
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
## Requirements
* Go 1.14+

121
.bingo/Variables.mk Normal file
View File

@@ -0,0 +1,121 @@
# 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)
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
GO ?= $(shell which go)
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
# will be used; reinstalling only if needed.
# For example for bingo variable:
#
# In your main Makefile (for non array binaries):
#
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
#
#command: $(BINGO)
# @echo "Running bingo"
# @$(BINGO) <flags/args..>
#
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.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.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.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-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-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
@# 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)/calens-v0.2.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=calens.mod -o=$(GOBIN)/calens-v0.2.0 "github.com/restic/calens"
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.1-0.20210701123229-9d7dceed124f
$(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"
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.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
@# 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)/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.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.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
@# 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)/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"
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.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.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.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-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-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-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-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.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.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.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.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.0 "github.com/cespare/reflex"

5
.bingo/bingo.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/bwplotka/bingo v0.4.0

5
.bingo/buf.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/bufbuild/buf v0.40.0 // cmd/buf

5
.bingo/buildifier.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/bazelbuild/buildtools v0.0.0-20210227132407-f2aed9ee205d // buildifier

5
.bingo/calens.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/restic/calens v0.2.0

5
.bingo/fileb0x.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/UnnoTed/fileb0x v1.1.4

5
.bingo/flaex.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/owncloud/flaex v0.2.1-0.20210701123229-9d7dceed124f

1
.bingo/go.mod Executable file
View File

@@ -0,0 +1 @@
module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.

5
.bingo/golangci-lint.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/golangci/golangci-lint v1.37.1 // cmd/golangci-lint

5
.bingo/goverage.mod Normal file
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

5
.bingo/gox.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/mitchellh/gox v1.0.1

7
.bingo/hugo.mod Normal file
View File

@@ -0,0 +1,7 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
replace github.com/markbates/inflect => github.com/markbates/inflect v0.0.0-20171215194931-a12c3aec81a6
require github.com/gohugoio/hugo v0.80.0

5
.bingo/mutagen.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/mutagen-io/mutagen v0.11.8 // cmd/mutagen

View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/pseudomuto/protoc-gen-doc v1.4.1 // cmd/protoc-gen-doc

5
.bingo/protoc-gen-go.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require google.golang.org/protobuf v1.26.0 // cmd/protoc-gen-go

View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/asim/go-micro/cmd/protoc-gen-micro/v3 v3.0.0-20210329103359-9b41d1bf0888

View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/owncloud/protoc-gen-microweb v0.0.0-20210224131655-d9b1137a84d4

View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/grpc-ecosystem/grpc-gateway/v2 v2.3.0 // protoc-gen-openapiv2

5
.bingo/reflex.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/cespare/reflex v0.3.0

44
.bingo/variables.env Normal file
View File

@@ -0,0 +1,44 @@
# 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)}
if [ -z "$GOBIN" ]; then
GOBIN="$(go env GOPATH)/bin"
fi
BINGO="${GOBIN}/bingo-v0.4.0"
BUF="${GOBIN}/buf-v0.40.0"
BUILDIFIER="${GOBIN}/buildifier-v0.0.0-20210227132407-f2aed9ee205d"
CALENS="${GOBIN}/calens-v0.2.0"
FILEB0X="${GOBIN}/fileb0x-v1.1.4"
FLAEX="${GOBIN}/flaex-v0.2.1-0.20210701123229-9d7dceed124f"
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.80.0"
MUTAGEN="${GOBIN}/mutagen-v0.11.8"
PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.4.1"
PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.26.0"
PROTOC_GEN_MICRO="${GOBIN}/protoc-gen-micro-v3.0.0-20210329103359-9b41d1bf0888"
PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20210224131655-d9b1137a84d4"
PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.3.0"
REFLEX="${GOBIN}/reflex-v0.3.0"

View File

@@ -15,5 +15,6 @@ exclude_paths:
- 'ocis/docker/eos-ocis/Dockerfile'
- 'ocis/docker/eos-ocis-dev/Dockerfile'
- 'deployments/**'
- 'tests/acceptance/expected-failures-*.md'
...

7
.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
.bingo
!.bingo/*.mod
!.bingo/Variables.mk
**/.git
**/bin
docs
**/node_modules

View File

@@ -1,7 +1,7 @@
# The test runner source for API tests
CORE_COMMITID=df5e095c7e5e94cb44f842a4b51a3480cf8878a0
CORE_COMMITID=82f26997e3b0d1197c745cd71f498cc69c5a82ea
CORE_BRANCH=master
# The test runner source for UI tests
WEB_COMMITID=f1c70eb67fbe86f6f32f851ec6199f0b25bb5393
WEB_COMMITID=be1317c2c6fcc2fed0000b31f80bee351b111c3c
WEB_BRANCH=master

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ _extends: gh-labels
repository:
name: ocis
description: ':atom_symbol: ownCloud Infinite Scale Stack'
homepage: https://owncloud.github.io/ocis/
homepage: https://owncloud.dev/ocis/
topics: reva, ocis
private: false
@@ -22,7 +22,7 @@ repository:
labels:
- name: OCIS-Fastlane
color: "#deadbf"
description: Something isn't working
description: Planned outside of the sprint
teams:
- name: ci
@@ -37,16 +37,17 @@ branches:
required_approving_review_count: 1
dismiss_stale_reviews: false
require_code_owner_reviews: false
dismissal_restrictions: {}
required_status_checks:
strict: false
contexts:
- continuous-integration/drone/pr
enforce_admins: false
enforce_admins: null
restrictions:
apps: []
users: []
teams:
- ci
- employees
...

1
.github/stale.yml vendored
View File

@@ -7,6 +7,7 @@ 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

9
.gitignore vendored
View File

@@ -1,4 +1,6 @@
*/coverage.out
*/checkstyle.xml
*/package-lock.json
ocis/config/identifier-registration.yaml
*/bin
@@ -8,10 +10,14 @@ dist/
*crt
node_modules/
*/assets
ocis/ocis
ocis/cmd/ocis/__debug_bin
ocis/cmd/ocis/config/
.idea
yarn-error.log
yarn.lock
# Konnectd
idp/assets/identifier
@@ -24,3 +30,6 @@ vendor-bin/**/composer.lock
# drone CI is in .drone.star, do not let someone accidentally commit a local .drone.yml
.drone.yml
**/l10n/locale
**/l10n/template.pot

7
.make/docs.mk Normal file
View File

@@ -0,0 +1,7 @@
.PHONY: config-docs-generate
config-docs-generate: $(FLAEX)
@echo "$(NAME): generating config docs"
@$(FLAEX) >| ../docs/extensions/$(NAME)/configuration.md
.PHONY: grpc-docs-generate
grpc-docs-generate: ../docs/extensions/${NAME}/grpc.md

6
.make/generate.mk Normal file
View File

@@ -0,0 +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

114
.make/go.mk Normal file
View File

@@ -0,0 +1,114 @@
IMPORT := github.com/owncloud/ocis/$(NAME)
BIN := bin
DIST := dist
ifeq ($(OS), Windows_NT)
EXECUTABLE := $(NAME).exe
UNAME := Windows
else
EXECUTABLE := $(NAME)
UNAME := $(shell uname -s)
endif
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 ?=
ifndef OUTPUT
ifneq ($(DRONE_TAG),)
OUTPUT ?= $(subst v,,$(DRONE_TAG))
else
OUTPUT ?= testing
endif
endif
ifndef VERSION
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
VERSION ?= $(shell git rev-parse --short HEAD)
endif
endif
ifndef DATE
DATE := $(shell date -u '+%Y%m%d')
endif
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
all: build
.PHONY: sync
sync:
go mod download
.PHONY: clean
clean:
@echo "$(NAME): clean"
go clean -i ./...
rm -rf $(BIN) $(DIST)
.PHONY: go-mod-tidy
go-mod-tidy:
@echo "$(NAME): go-mod-tidy"
@go mod tidy
.PHONY: fmt
fmt:
gofmt -s -w $(SOURCES)
.PHONY: golangci-lint
golangci-lint: $(GOLANGCI_LINT)
$(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 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: $(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]+"
.PHONY: install
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME)
.PHONY: build-all
build-all: build build-debug
.PHONY: build
build: $(BIN)/$(EXECUTABLE)
.PHONY: build-debug
build-debug: $(BIN)/$(EXECUTABLE)-debug
$(BIN)/$(EXECUTABLE): $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME)
$(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(DEBUG_LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
.PHONY: watch
watch: $(REFLEX)
$(REFLEX) -c reflex.conf

50
.make/l10n.mk Normal file
View File

@@ -0,0 +1,50 @@
# On OSX the PATH variable isn't exported unless "SHELL" is also set, see: http://stackoverflow.com/a/25506676
SHELL = /bin/bash
NODE_BINDIR = ./node_modules/.bin
export PATH := $(PATH):$(NODE_BINDIR)
INPUT_FILES = ./ui
# Where to write the files generated by this makefile.
OUTPUT_DIR = ./l10n
# Template file
TEMPLATE_FILE = ./l10n/template.pot
# Name of the generated .po files for each available locale.
LOCALE_FILES = $(shell find l10n/locale -name '*.po')
.PHONY: l10n-push
l10n-push:
cd $(OUTPUT_DIR) && tx -d push -s --skip --no-interactive
.PHONY: l10n-pull
l10n-pull:
cd $(OUTPUT_DIR) && tx -d pull -a --skip --minimum-perc=75
.PHONY: l10n-clean
l10n-clean:
rm -f $(TEMPLATE_FILE)
rm -rf $(OUTPUT_DIR)/locale
.PHONY: l10n-read
l10n-read: node_modules $(TEMPLATE_FILE)
.PHONY: l10n-write
l10n-write: node_modules $(OUTPUT_DIR)/translations.json
# Create a main .pot template, then generate .po files for each available language.
# Thanks to Systematic: https://github.com/Polyconseil/systematic/blob/866d5a/mk/main.mk#L167-L183
$(TEMPLATE_FILE):
# Extract gettext strings from each template file and create a POT dictionary template.
# Generate .po files for each available language.
export GETTEXT_SOURCES=`find $(INPUT_FILES) -name '*.vue' -o -name '*.js'`; \
node ./node_modules/easygettext/src/extract-cli.js --attribute v-translate --output $(OUTPUT_DIR)/template.pot $$GETTEXT_SOURCES;
# Generate translations.json file from .pot template.
.PHONY: $(OUTPUT_DIR)/translations.json
$(OUTPUT_DIR)/translations.json:
rm -rf $(OUTPUT_DIR)/translations.json
gettext-compile --output $(OUTPUT_DIR)/translations.json $(LOCALE_FILES);

63
.make/protobuf.mk Normal file
View File

@@ -0,0 +1,63 @@
.PHONY: protoc-gen-openapiv2
protoc-gen-openapiv2:
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2
.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

36
.make/release.mk Normal file
View File

@@ -0,0 +1,36 @@
.PHONY: changelog
changelog: $(CALENS) ## generate changelog
$(CALENS) -i ../changelog -t ../changelog/CHANGELOG.tmpl >| ../CHANGELOG.md
.PHONY: release
release: release-dirs release-linux release-windows release-darwin release-copy release-check
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release
.PHONY: release-linux
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)
release-linux-docker: $(GOX) release-dirs
$(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
$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-darwin
release-darwin: $(GOX) release-dirs
$(GOX) -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-copy
release-copy:
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
.PHONY: release-check
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: release-finish
release-finish: release-copy release-check

19
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "oCIS server",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/ocis/cmd/ocis",
"args": ["server"],
"env": {
"OCIS_LOG_LEVEL": "debug",
"OCIS_LOG_PRETTY": "true",
"OCIS_LOG_COLOR": "true",
"PROXY_ENABLE_BASIC_AUTH": "true"
}
},
]
}

View File

@@ -2,17 +2,570 @@
The following sections list the changes for unreleased.
[unreleased]: https://github.com/owncloud/ocis/compare/v1.2.0...master
[unreleased]: https://github.com/owncloud/ocis/compare/v1.8.0...master
## Summary
* Enhancement - Runtime support for cherry picking extensions: [#2229](https://github.com/owncloud/ocis/pull/2229)
* Enhancement - Update REVA to v1.9.1-0.20210628143859-9d29c36c0c3f: [#2227](https://github.com/owncloud/ocis/pull/2227)
## Details
* Enhancement - Runtime support for cherry picking extensions: [#2229](https://github.com/owncloud/ocis/pull/2229)
Support for running certain extensions supervised via cli flags. Example usage:
``` > ocis server --extensions="proxy, idp, storage-metadata, accounts" ```
https://github.com/owncloud/ocis/pull/2229
* Enhancement - Update REVA to v1.9.1-0.20210628143859-9d29c36c0c3f: [#2227](https://github.com/owncloud/ocis/pull/2227)
https://github.com/owncloud/ocis/pull/2227
# Changelog for [1.8.0] (2021-06-28)
The following sections list the changes for 1.8.0.
[1.8.0]: https://github.com/owncloud/ocis/compare/v1.7.0...v1.8.0
## Summary
* Bugfix - External storage registration used wrong config: [#2120](https://github.com/owncloud/ocis/pull/2120)
* Bugfix - Remove authentication from /status.php completely: [#2188](https://github.com/owncloud/ocis/pull/2188)
* Bugfix - Make webdav namespace configurable across services: [#2198](https://github.com/owncloud/ocis/pull/2198)
* Change - Update ownCloud Web to v3.3.0: [#2187](https://github.com/owncloud/ocis/pull/2187)
* Enhancement - Properly configure graph-explorer client registration: [#2118](https://github.com/owncloud/ocis/pull/2118)
* Enhancement - Use system default location to store TLS artefacts: [#2129](https://github.com/owncloud/ocis/pull/2129)
* Enhancement - Update REVA to v1.9: [#2205](https://github.com/owncloud/ocis/pull/2205)
## Details
* Bugfix - External storage registration used wrong config: [#2120](https://github.com/owncloud/ocis/pull/2120)
The go-micro registry-singleton ignores the ocis configuration and defaults to mdns
https://github.com/owncloud/ocis/pull/2120
* Bugfix - Remove authentication from /status.php completely: [#2188](https://github.com/owncloud/ocis/pull/2188)
Despite requests without Authentication header being successful, requests with an invalid
bearer token in the Authentication header were rejected in the proxy with an 401
unauthenticated. Now the Authentication header is completely ignored for the /status.php
route.
https://github.com/owncloud/client/issues/8538
https://github.com/owncloud/ocis/pull/2188
* Bugfix - Make webdav namespace configurable across services: [#2198](https://github.com/owncloud/ocis/pull/2198)
The WebDAV namespace is used across various services, but it was previously hardcoded in some
of the services. This PR uses the same environment variable to set the config correctly across
the services.
https://github.com/owncloud/ocis/pull/2198
* Change - Update ownCloud Web to v3.3.0: [#2187](https://github.com/owncloud/ocis/pull/2187)
Tags: web
We updated ownCloud Web to v3.3.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/2187
https://github.com/owncloud/web/releases/tag/v3.3.0
* Enhancement - Properly configure graph-explorer client registration: [#2118](https://github.com/owncloud/ocis/pull/2118)
The client registration in the `identifier-registration.yaml` for the graph-explorer
didn't contain `redirect_uris` nor `origins`. Both were added to prevent exploitation.
https://github.com/owncloud/ocis/pull/2118
* Enhancement - Use system default location to store TLS artefacts: [#2129](https://github.com/owncloud/ocis/pull/2129)
This used to default to the current location of the binary, which is not ideal after a first run as
it leaves traces behind. It now uses the system's location for artefacts with the help of
https://golang.org/pkg/os/#UserConfigDir.
https://github.com/owncloud/ocis/pull/2129
* Enhancement - Update REVA to v1.9: [#2205](https://github.com/owncloud/ocis/pull/2205)
This update includes * [set Content-Type
correctly](https://github.com/cs3org/reva/pull/1750) * [Return file checksum
available from the metadata for the EOS
driver](https://github.com/cs3org/reva/pull/1755) * [Sort share entries
alphabetically](https://github.com/cs3org/reva/pull/1772) * [Initial work on the
owncloudsql driver](https://github.com/cs3org/reva/pull/1710) * [Add user ID cache
warmup to EOS storage driver](https://github.com/cs3org/reva/pull/1774) * [Use
UidNumber and GidNumber fields in User
objects](https://github.com/cs3org/reva/pull/1573) * [EOS GRPC
interface](https://github.com/cs3org/reva/pull/1471) * [switch
references](https://github.com/cs3org/reva/pull/1721) * [remove user's uuid from
trashbin file key](https://github.com/cs3org/reva/pull/1793) * [fix restore behavior of
the trashbin API](https://github.com/cs3org/reva/pull/1795) * [eosfs: add arbitrary
metadata support](https://github.com/cs3org/reva/pull/1811)
https://github.com/owncloud/ocis/pull/2205
https://github.com/owncloud/ocis/pull/2210
# Changelog for [1.7.0] (2021-06-04)
The following sections list the changes for 1.7.0.
[1.7.0]: https://github.com/owncloud/ocis/compare/v1.6.0...v1.7.0
## Summary
* Bugfix - Change the groups index to be case sensitive: [#2109](https://github.com/owncloud/ocis/pull/2109)
* Change - Update ownCloud Web to v3.2.0: [#2096](https://github.com/owncloud/ocis/pull/2096)
* Enhancement - Enable the s3ng storage driver: [#1886](https://github.com/owncloud/ocis/pull/1886)
* Enhancement - Color contrasts on IDP/OIDC login pages: [#2088](https://github.com/owncloud/ocis/pull/2088)
* Enhancement - Announce user profile picture capability: [#2036](https://github.com/owncloud/ocis/pull/2036)
* Enhancement - Update reva to v1.7.1-0.20210531093513-b74a2b156af6: [#2104](https://github.com/owncloud/ocis/pull/2104)
## Details
* Bugfix - Change the groups index to be case sensitive: [#2109](https://github.com/owncloud/ocis/pull/2109)
Groups are considered to be case sensitive. The index must handle them case sensitive too
otherwise we will have undeterministic behavior while editing or deleting groups.
https://github.com/owncloud/ocis/pull/2109
* Change - Update ownCloud Web to v3.2.0: [#2096](https://github.com/owncloud/ocis/pull/2096)
Tags: web
We updated ownCloud Web to v3.2.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/2096
https://github.com/owncloud/web/releases/tag/v3.2.0
* Enhancement - Enable the s3ng storage driver: [#1886](https://github.com/owncloud/ocis/pull/1886)
We made it possible to use the new s3ng storage driver by adding according commandline flags and
environment variables.
https://github.com/owncloud/ocis/pull/1886
* Enhancement - Color contrasts on IDP/OIDC login pages: [#2088](https://github.com/owncloud/ocis/pull/2088)
We have updated the color contrasts on the IDP pages in order to improve accessibility.
https://github.com/owncloud/ocis/pull/2088
* Enhancement - Announce user profile picture capability: [#2036](https://github.com/owncloud/ocis/pull/2036)
Added a new capability (through https://github.com/cs3org/reva/pull/1694) to prevent the
web frontend from fetching (nonexistent) user avatar profile pictures which added latency &
console errors.
https://github.com/owncloud/ocis/pull/2036
* Enhancement - Update reva to v1.7.1-0.20210531093513-b74a2b156af6: [#2104](https://github.com/owncloud/ocis/pull/2104)
This reva update includes: * [fix move in the owncloud storage
driver](https://github.com/cs3org/reva/pull/1696) * [add checksum header to the tus
preflight response](https://github.com/cs3org/reva/pull/1702) * [Add reliability
calculations support to Mentix](https://github.com/cs3org/reva/pull/1649) * [fix
response format when accepting shares](https://github.com/cs3org/reva/pull/1724) *
[Datatx createtransfershare](https://github.com/cs3org/reva/pull/1725)
https://github.com/owncloud/ocis/issues/2102
https://github.com/owncloud/ocis/pull/2104
# Changelog for [1.6.0] (2021-05-12)
The following sections list the changes for 1.6.0.
[1.6.0]: https://github.com/owncloud/ocis/compare/v1.5.0...v1.6.0
## Summary
* Bugfix - Fix STORAGE_METADATA_ROOT default value override: [#1956](https://github.com/owncloud/ocis/pull/1956)
* Bugfix - Stop the supervisor if a service fails to start: [#1963](https://github.com/owncloud/ocis/pull/1963)
* Change - Update ownCloud Web to v3.1.0: [#2045](https://github.com/owncloud/ocis/pull/2045)
* Enhancement - Added dictionary files: [#2003](https://github.com/owncloud/ocis/pull/2003)
* Enhancement - Introduce login form with h1 tag for screen readers only: [#1991](https://github.com/owncloud/ocis/pull/1991)
* Enhancement - User Deprovisioning for the OCS API: [#1962](https://github.com/owncloud/ocis/pull/1962)
* Enhancement - Support thumbnails for txt files: [#1988](https://github.com/owncloud/ocis/pull/1988)
* Enhancement - Update reva to v1.7.1-0.20210430154404-69bd21f2cc97: [#2010](https://github.com/owncloud/ocis/pull/2010)
* Enhancement - Update reva to v1.7.1-0.20210507160327-e2c3841d0dbc: [#2044](https://github.com/owncloud/ocis/pull/2044)
* Enhancement - Use oc-select: [#1979](https://github.com/owncloud/ocis/pull/1979)
* Enhancement - Set SameSite settings to Strict for Web: [#2019](https://github.com/owncloud/ocis/pull/2019)
## Details
* Bugfix - Fix STORAGE_METADATA_ROOT default value override: [#1956](https://github.com/owncloud/ocis/pull/1956)
The way the value was being set ensured that it was NOT being overridden where it should have
been. This patch ensures the correct loading order of values.
https://github.com/owncloud/ocis/pull/1956
* Bugfix - Stop the supervisor if a service fails to start: [#1963](https://github.com/owncloud/ocis/pull/1963)
Steps to make the supervisor fail:
`PROXY_HTTP_ADDR=0.0.0.0:9144 bin/ocis server`
https://github.com/owncloud/ocis/pull/1963
* Change - Update ownCloud Web to v3.1.0: [#2045](https://github.com/owncloud/ocis/pull/2045)
Tags: web
We updated ownCloud Web to v3.1.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/2045
https://github.com/owncloud/web/releases/tag/v3.1.0
* Enhancement - Added dictionary files: [#2003](https://github.com/owncloud/ocis/pull/2003)
Added the dictionary.js file for package settings and accounts which contains strings that
should be synced to transifex but not exist in the UI directly.
https://github.com/owncloud/ocis/pull/2003
* Enhancement - Introduce login form with h1 tag for screen readers only: [#1991](https://github.com/owncloud/ocis/pull/1991)
https://github.com/owncloud/ocis/pull/1991
* Enhancement - User Deprovisioning for the OCS API: [#1962](https://github.com/owncloud/ocis/pull/1962)
Use the CS3 API and Reva to deprovision users completely.
Two new environment variables introduced: ``` OCS_IDM_ADDRESS OCS_STORAGE_USERS_DRIVER
```
`OCS_IDM_ADDRESS` is also an alias for `OCIS_URL`; allows the OCS service to mint jwt tokens
for the authenticated user that will be read by the reva authentication middleware.
`OCS_STORAGE_USERS_DRIVER` determines how a user is deprovisioned. This kind of behavior is
needed since every storage driver deals with deleting differently.
https://github.com/owncloud/ocis/pull/1962
* Enhancement - Support thumbnails for txt files: [#1988](https://github.com/owncloud/ocis/pull/1988)
Implemented support for thumbnails for txt files in the thumbnails service.
https://github.com/owncloud/ocis/pull/1988
* Enhancement - Update reva to v1.7.1-0.20210430154404-69bd21f2cc97: [#2010](https://github.com/owncloud/ocis/pull/2010)
* Fix recycle to different locations (https://github.com/cs3org/reva/pull/1541)
* Fix user share as grantee in json backend (https://github.com/cs3org/reva/pull/1650)
* Introduce named services (https://github.com/cs3org/reva/pull/1509)
* Improve json marshalling of share protobuf messages (https://github.com/cs3org/reva/pull/1655)
* Cache resources from share getter methods in OCS (https://github.com/cs3org/reva/pull/1643)
* Fix public file shares (https://github.com/cs3org/reva/pull/1666)
https://github.com/owncloud/ocis/pull/2010
* Enhancement - Update reva to v1.7.1-0.20210507160327-e2c3841d0dbc: [#2044](https://github.com/owncloud/ocis/pull/2044)
* Add user profile picture to capabilities (https://github.com/cs3org/reva/pull/1694)
* Mint scope-based access tokens for RBAC (https://github.com/cs3org/reva/pull/1669)
* Add cache warmup strategy for OCS resource infos (https://github.com/cs3org/reva/pull/1664)
* Filter shares based on type in OCS (https://github.com/cs3org/reva/pull/1683)
https://github.com/owncloud/ocis/pull/2044
* Enhancement - Use oc-select: [#1979](https://github.com/owncloud/ocis/pull/1979)
Replace oc-drop with oc select in settings
https://github.com/owncloud/ocis/pull/1979
* Enhancement - Set SameSite settings to Strict for Web: [#2019](https://github.com/owncloud/ocis/pull/2019)
Changed SameSite settings to Strict for Web to prevent warnings in Firefox
https://github.com/owncloud/ocis/pull/2019
# Changelog for [1.5.0] (2021-04-21)
The following sections list the changes for 1.5.0.
[1.5.0]: https://github.com/owncloud/ocis/compare/v1.4.0...v1.5.0
## Summary
* Bugfix - Fixes "unaligned 64-bit atomic operation" panic on 32-bit ARM: [#1888](https://github.com/owncloud/ocis/pull/1888)
* Change - Make Protobuf package names unique: [#1875](https://github.com/owncloud/ocis/pull/1875)
* Change - Update ownCloud Web to v3.0.0: [#1938](https://github.com/owncloud/ocis/pull/1938)
* Enhancement - Change default path for thumbnails: [#1892](https://github.com/owncloud/ocis/pull/1892)
* Enhancement - Parse config on supervised mode with run subcommand: [#1931](https://github.com/owncloud/ocis/pull/1931)
* Enhancement - Update ODS in accounts & settings extension: [#1934](https://github.com/owncloud/ocis/pull/1934)
* Enhancement - Add config for public share SQL driver: [#1916](https://github.com/owncloud/ocis/pull/1916)
* Enhancement - Remove dead runtime code: [#1923](https://github.com/owncloud/ocis/pull/1923)
* Enhancement - Add option to reading registry rules from json file: [#1917](https://github.com/owncloud/ocis/pull/1917)
* Enhancement - Update reva to v1.6.1-0.20210414111318-a4b5148cbfb2: [#1872](https://github.com/owncloud/ocis/pull/1872)
## Details
* Bugfix - Fixes "unaligned 64-bit atomic operation" panic on 32-bit ARM: [#1888](https://github.com/owncloud/ocis/pull/1888)
Sync/cache had uint64s that were not 64-bit aligned causing panics on 32-bit systems during
atomic access
https://github.com/owncloud/ocis/issues/1887
https://github.com/owncloud/ocis/pull/1888
* Change - Make Protobuf package names unique: [#1875](https://github.com/owncloud/ocis/pull/1875)
Introduce unique `package` and `go_package` names for our Protobuf definitions
https://github.com/owncloud/ocis/pull/1875
* Change - Update ownCloud Web to v3.0.0: [#1938](https://github.com/owncloud/ocis/pull/1938)
Tags: web
We updated ownCloud Web to v3.0.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/1938
https://github.com/owncloud/web/releases/tag/v3.0.0
* Enhancement - Change default path for thumbnails: [#1892](https://github.com/owncloud/ocis/pull/1892)
Changes the default path for thumbnails from `<os tmp dir>/ocis-thumbnails` to
`/var/tmp/ocis/thumbnails`
https://github.com/owncloud/ocis/issues/1891
https://github.com/owncloud/ocis/pull/1892
* Enhancement - Parse config on supervised mode with run subcommand: [#1931](https://github.com/owncloud/ocis/pull/1931)
Currenntly it is not possible to parse a single config file from an extension when running on
supervised mode.
https://github.com/owncloud/ocis/pull/1931
* Enhancement - Update ODS in accounts & settings extension: [#1934](https://github.com/owncloud/ocis/pull/1934)
The accounts and settings extensions were updated to reflect the latest changes in the
ownCloud design system. In addition, a couple of quick wins in terms of accessibility are
included.
https://github.com/owncloud/ocis/pull/1934
* Enhancement - Add config for public share SQL driver: [#1916](https://github.com/owncloud/ocis/pull/1916)
https://github.com/owncloud/ocis/pull/1916
* Enhancement - Remove dead runtime code: [#1923](https://github.com/owncloud/ocis/pull/1923)
When moving from the old runtime to the new one there were lots of files left behind that are
essentially dead code and should be removed. The original code lives here
github.com/refs/pman/ if someone finds it interesting to read.
https://github.com/owncloud/ocis/pull/1923
* Enhancement - Add option to reading registry rules from json file: [#1917](https://github.com/owncloud/ocis/pull/1917)
https://github.com/owncloud/ocis/pull/1917
* Enhancement - Update reva to v1.6.1-0.20210414111318-a4b5148cbfb2: [#1872](https://github.com/owncloud/ocis/pull/1872)
* enforce quota (https://github.com/cs3org/reva/pull/1557)
* Make additional info attribute configureable (https://github.com/cs3org/reva/pull/1588)
* check ENOTDIR for readlink (https://github.com/cs3org/reva/pull/1597)
* Add wrappers for EOS and EOS Home storage drivers (https://github.com/cs3org/reva/pull/1624)
* eos: fixes for enabling file sharing (https://github.com/cs3org/reva/pull/1619)
* implement checksums in the owncloud storage driver (https://github.com/cs3org/reva/pull/1629)
https://github.com/owncloud/ocis/pull/1872
# Changelog for [1.4.0] (2021-03-30)
The following sections list the changes for 1.4.0.
[1.4.0]: https://github.com/owncloud/ocis/compare/v1.3.0...v1.4.0
## Summary
* Bugfix - Fix thumbnail generation for jpegs: [#1785](https://github.com/owncloud/ocis/pull/1785)
* Change - Update ownCloud Web to v2.1.0: [#1870](https://github.com/owncloud/ocis/pull/1870)
* Enhancement - Add focus to input elements on login page: [#1792](https://github.com/owncloud/ocis/pull/1792)
* Enhancement - Improve accessibility to input elements on login page: [#1794](https://github.com/owncloud/ocis/pull/1794)
* Enhancement - Add new build targets: [#1824](https://github.com/owncloud/ocis/pull/1824)
* Enhancement - Clarify expected failures: [#1790](https://github.com/owncloud/ocis/pull/1790)
* Enhancement - Replace special character in login page title with a regular minus: [#1813](https://github.com/owncloud/ocis/pull/1813)
* Enhancement - File Logging: [#1816](https://github.com/owncloud/ocis/pull/1816)
* Enhancement - Runtime Hostname and Port are now configurable: [#1822](https://github.com/owncloud/ocis/pull/1822)
* Enhancement - Generate thumbnails for .gif files: [#1791](https://github.com/owncloud/ocis/pull/1791)
* Enhancement - Tracing Refactor: [#1819](https://github.com/owncloud/ocis/pull/1819)
* Enhancement - Update reva to v1.6.1-0.20210326165326-e8a00d9b2368: [#1683](https://github.com/owncloud/ocis/pull/1683)
## Details
* Bugfix - Fix thumbnail generation for jpegs: [#1785](https://github.com/owncloud/ocis/pull/1785)
Images with the extension `.jpeg` were not properly supported.
https://github.com/owncloud/ocis/issues/1490
https://github.com/owncloud/ocis/pull/1785
* Change - Update ownCloud Web to v2.1.0: [#1870](https://github.com/owncloud/ocis/pull/1870)
Tags: web
We updated ownCloud Web to v2.1.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/1870
https://github.com/owncloud/web/releases/tag/v2.1.0
* Enhancement - Add focus to input elements on login page: [#1792](https://github.com/owncloud/ocis/pull/1792)
https://github.com/owncloud/web/issues/4322
https://github.com/owncloud/ocis/pull/1792
* Enhancement - Improve accessibility to input elements on login page: [#1794](https://github.com/owncloud/ocis/pull/1794)
https://github.com/owncloud/web/issues/4319
https://github.com/owncloud/ocis/pull/1794
https://github.com/owncloud/ocis/pull/1811
* Enhancement - Add new build targets: [#1824](https://github.com/owncloud/ocis/pull/1824)
Make build target `build` used to build a binary twice, the second occurrence having symbols
for debugging. We split this step in two and added `build-all` and `build-debug` targets.
- `build-all` now behaves as the previous `build` target, it will generate 2 binaries, one for
debug. - `build-debug` will build a single binary for debugging.
https://github.com/owncloud/ocis/pull/1824
* Enhancement - Clarify expected failures: [#1790](https://github.com/owncloud/ocis/pull/1790)
Some features, while covered by the ownCloud 10 acceptance tests, will not be implmented for
now: - blacklisted / ignored files, because ocis does not need to blacklist `.htaccess` files -
`OC-LazyOps` support was [removed from the
clients](https://github.com/owncloud/client/pull/8398). We are thinking about [a state
machine for uploads to properly solve that scenario and also list the state of files in progress
in the web ui](https://github.com/owncloud/ocis/issues/214). The expected failures
files now have a dedicated _Won't fix_ section for these items.
https://github.com/owncloud/ocis/issues/214
https://github.com/owncloud/ocis/pull/1790
https://github.com/owncloud/client/pull/8398
* Enhancement - Replace special character in login page title with a regular minus: [#1813](https://github.com/owncloud/ocis/pull/1813)
https://github.com/owncloud/ocis/pull/1813
* Enhancement - File Logging: [#1816](https://github.com/owncloud/ocis/pull/1816)
When running supervised, support for configuring all logs to a single log file:
`OCIS_LOG_FILE=/Users/foo/bar/ocis.log MICRO_REGISTRY=etcd bin/ocis server`
Supports directing log from single extensions to a log file:
`PROXY_LOG_FILE=/Users/foo/bar/proxy.log MICRO_REGISTRY=etcd bin/ocis proxy`
https://github.com/owncloud/ocis/pull/1816
* Enhancement - Runtime Hostname and Port are now configurable: [#1822](https://github.com/owncloud/ocis/pull/1822)
Without any configuration the ocis runtime will start on `localhost:9250` unless specified
otherwise. Usage:
- `OCIS_RUNTIME_PORT=6061 bin/ocis server` - overrides the oCIS runtime and starts on port
6061 - `OCIS_RUNTIME_PORT=6061 bin/ocis list` - lists running extensions for the runtime on
`localhost:6061`
All subcommands are updated and expected to work with the following environment variables:
``` OCIS_RUNTIME_HOST OCIS_RUNTIME_PORT ```
https://github.com/owncloud/ocis/pull/1822
* Enhancement - Generate thumbnails for .gif files: [#1791](https://github.com/owncloud/ocis/pull/1791)
Added support for gifs to the thumbnails service.
https://github.com/owncloud/ocis/pull/1791
* Enhancement - Tracing Refactor: [#1819](https://github.com/owncloud/ocis/pull/1819)
Centralize tracing handling per extension.
https://github.com/owncloud/ocis/pull/1819
* Enhancement - Update reva to v1.6.1-0.20210326165326-e8a00d9b2368: [#1683](https://github.com/owncloud/ocis/pull/1683)
* quota querying and tree accounting [cs3org/reva#1405](https://github.com/cs3org/reva/pull/1405)
* Fix webdav file versions endpoint bugs [cs3org/reva#1526](https://github.com/cs3org/reva/pull/1526)
* Fix etag changing only once a second [cs3org/reva#1576](https://github.com/cs3org/reva/pull/1576)
* Trashbin API parity [cs3org/reva#1552](https://github.com/cs3org/reva/pull/1552)
* Signature authentication for public links [cs3org/reva#1590](https://github.com/cs3org/reva/pull/1590)
https://github.com/owncloud/ocis/pull/1683
https://github.com/cs3org/reva/pull/1405
https://github.com/owncloud/ocis/pull/1861
# Changelog for [1.3.0] (2021-03-09)
The following sections list the changes for 1.3.0.
[1.3.0]: https://github.com/owncloud/ocis/compare/v1.2.0...v1.3.0
## Summary
* Bugfix - Purposely delay accounts service startup: [#1734](https://github.com/owncloud/ocis/pull/1734)
* Bugfix - Add missing gateway config: [#1716](https://github.com/owncloud/ocis/pull/1716)
* Bugfix - Fix accounts initialization: [#1696](https://github.com/owncloud/ocis/pull/1696)
* Bugfix - Fix the ttl of the authentication middleware cache: [#1699](https://github.com/owncloud/ocis/pull/1699)
* Change - Update ownCloud Web to v2.0.1: [#1683](https://github.com/owncloud/ocis/pull/1683)
* Change - Update ownCloud Web to v2.0.2: [#1776](https://github.com/owncloud/ocis/pull/1776)
* Enhancement - Remove the JWT from the log: [#1758](https://github.com/owncloud/ocis/pull/1758)
* Enhancement - Update go-micro to v3.5.1-0.20210217182006-0f0ace1a44a9: [#1670](https://github.com/owncloud/ocis/pull/1670)
* Enhancement - Update reva to v1.6.1-0.20210223065028-53f39499762e: [#1683](https://github.com/owncloud/ocis/pull/1683)
* Enhancement - Add initial nats and kubernetes registry support: [#1697](https://github.com/owncloud/ocis/pull/1697)
## Details
* Bugfix - Purposely delay accounts service startup: [#1734](https://github.com/owncloud/ocis/pull/1734)
As it turns out the race condition between `accounts <-> storage-metadata` still remains.
This PR is a hotfix, and it should be followed up with a proper fix. Either:
- block the accounts' initialization until the storage metadata is ready (using the registry)
or - allow the accounts service to initialize and use a message broker to signal the accounts the
metadata storage is ready to receive requests.
https://github.com/owncloud/ocis/pull/1734
* Bugfix - Add missing gateway config: [#1716](https://github.com/owncloud/ocis/pull/1716)
The auth provider `ldap` and `oidc` drivers now need to be able talk to the reva gateway. We added
the `gatewayscv` to the config that is passed to reva.
https://github.com/owncloud/ocis/pull/1716
* Bugfix - Fix accounts initialization: [#1696](https://github.com/owncloud/ocis/pull/1696)
Originally the accounts service relies on both the `settings` and `storage-metadata` to be up
and running at the moment it starts. This is an antipattern as it will cause the entire service to
panic if the dependants are not present.
We inverted this dependency and moved the default initialization data (i.e: creating roles,
permissions, settings bundles) and instead of notifying the settings service that the
account has to provide with such options, the settings is instead initialized with the options
the accounts rely on. Essentially saving bandwith as there is no longer a gRPC call to the
settings service.
For the `storage-metadata` a retry mechanism was added that retries by default 20 times to
fetch the `com.owncloud.storage.metadata` from the service registry every `500`
miliseconds. If this retry expires the accounts panics, as its dependency on the
`storage-metadata` service cannot be resolved.
We also introduced a client wrapper that acts as middleware between a client and a server. For
more information on how it works further read [here](https://github.com/sony/gobreaker)
https://github.com/owncloud/ocis/pull/1696
* Bugfix - Fix the ttl of the authentication middleware cache: [#1699](https://github.com/owncloud/ocis/pull/1699)
The authentication cache ttl was multiplied with `time.Second` multiple times. This
@@ -30,6 +583,22 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/pull/1683
https://github.com/owncloud/web/releases/tag/v2.0.1
* Change - Update ownCloud Web to v2.0.2: [#1776](https://github.com/owncloud/ocis/pull/1776)
Tags: web
We updated ownCloud Web to v2.0.2. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/1776
https://github.com/owncloud/web/releases/tag/v2.0.2
* Enhancement - Remove the JWT from the log: [#1758](https://github.com/owncloud/ocis/pull/1758)
We were logging the JWT in some places. Secrets should not be exposed in logs so it got removed.
https://github.com/owncloud/ocis/pull/1758
* Enhancement - Update go-micro to v3.5.1-0.20210217182006-0f0ace1a44a9: [#1670](https://github.com/owncloud/ocis/pull/1670)
- We updated from go micro v2 (v2.9.1) go-micro v3 (v3.5.1 edge). - oCIS runtime is now aware of
@@ -43,6 +612,13 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/pull/1670
https://github.com/asim/go-micro/pull/2126
* Enhancement - Update reva to v1.6.1-0.20210223065028-53f39499762e: [#1683](https://github.com/owncloud/ocis/pull/1683)
* quota querying and tree accounting [cs3org/reva#1405](https://github.com/cs3org/reva/pull/1405)
https://github.com/owncloud/ocis/pull/1683
https://github.com/cs3org/reva/pull/1405
* Enhancement - Add initial nats and kubernetes registry support: [#1697](https://github.com/owncloud/ocis/pull/1697)
We added initial support to use nats and kubernetes as a service registry using

View File

@@ -1,19 +1,12 @@
FROM webhippie/golang:1.15 as build
FROM owncloudci/golang:1.16 as build
COPY ./ /ocis/
ENV CGO_ENABLED=0
ENV GOOS=linux
RUN apk update && \
apk upgrade --ignore musl-dev && \
apk add make gcc bash && \
rm -rf /var/cache/apk/*
WORKDIR /ocis/ocis
RUN make clean generate build
FROM alpine:3
FROM alpine:3.13
RUN apk update && \
apk upgrade && \

View File

@@ -12,6 +12,9 @@ WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||' | sed 's|/[^/]*$$||' | sed 's|/[^/]*$$||')
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
accounts \
glauth \
@@ -30,12 +33,16 @@ OCIS_MODULES = \
web \
webdav
ifneq (, $(shell which go 2> /dev/null)) # supress `command not found warnings` for non go targets in CI
include .bingo/Variables.mk
endif
.PHONY: help
help:
@echo "Please use 'make <target>' where <target> is one of the following:"
@echo
@echo -e "${GREEN}Testing with test suite natively installed:${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.github.io/ocis/development/testing/#testing-with-test-suite-natively-installed${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-natively-installed${RESET}\n"
@echo -e "\tmake test-acceptance-api\t${BLUE}run API acceptance tests${RESET}"
@echo -e "\tmake clean-tests\t\t${BLUE}delete API tests framework dependencies${RESET}"
@echo
@@ -44,17 +51,17 @@ help:
@echo -e "${RED}You also should have a look at other available Makefiles:${RESET}"
@echo
@echo -e "${GREEN}oCIS:${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.github.io/ocis/development/building/${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/build/${RESET}\n"
@echo -e "\tsee ./ocis/Makefile"
@echo -e "\tor run ${YELLOW}make -C ocis help${RESET}"
@echo
@echo -e "${GREEN}Documentation:${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.github.io/ocis/development/building-docs/${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/build-docs/${RESET}\n"
@echo -e "\tsee ./docs/Makefile"
@echo -e "\tor run ${YELLOW}make -C docs help${RESET}"
@echo
@echo -e "${GREEN}Testing with test suite in docker:${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.github.io/ocis/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
@echo -e "\tsee ./tests/acceptance/docker/Makefile"
@echo -e "\tor run ${YELLOW}make -C tests/acceptance/docker help${RESET}"
@echo
@@ -135,3 +142,56 @@ go-coverage:
@for mod in $(OCIS_MODULES); do \
echo -n "% coverage $$mod: "; $(MAKE) --no-print-directory -C $$mod go-coverage; \
done
.PHONY: protobuf
protobuf:
@for mod in $(OCIS_MODULES); do \
echo -n "% protobuf $$mod: "; $(MAKE) --no-print-directory -C $$mod protobuf; \
done
.PHONY: bingo-update
bingo-update: $(BINGO)
$(BINGO) get -u
CHANGELOG_VERSION =
.PHONY: changelog
changelog: $(CALENS)
ifndef CHANGELOG_VERSION
$(error CHANGELOG_VERSION is undefined)
endif
$(CALENS) --version $(CHANGELOG_VERSION) -o ocis/dist/CHANGELOG.md
.PHONY: l10n-push
l10n-push:
@for extension in $(L10N_MODULES); do \
make -C $$extension l10n-push; \
done
.PHONY: l10n-pull
l10n-pull:
@for extension in $(L10N_MODULES); do \
make -C $$extension l10n-pull; \
done
.PHONY: l10n-clean
l10n-clean:
@for extension in $(L10N_MODULES); do \
make -C $$extension l10n-clean; \
done
.PHONY: l10n-read
l10n-read:
@for extension in $(L10N_MODULES); do \
make -C $$extension l10n-read; \
done
.PHONY: l10n-write
l10n-write:
@for extension in $(L10N_MODULES); do \
make -C $$extension l10n-write; \
done
.PHONY: ci-format
ci-format: $(BUILDIFIER)
$(BUILDIFIER) --mode=fix .drone.star

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/infinitescale)
[![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)
[![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)
@@ -12,11 +12,11 @@
## Run ownCloud Infinite Scale
Please see [Getting Started](https://owncloud.github.io/ocis/getting-started/)
Please see [Getting Started](https://owncloud.dev/ocis/getting-started/)
## Development
Please see [Development - Getting Started](https://owncloud.github.io/ocis/development/getting-started/)
Please see [Development - Getting Started](https://owncloud.dev/ocis/development/getting-started/)
## Security

View File

@@ -1,178 +1,38 @@
SHELL := bash
NAME := accounts
IMPORT := github.com/owncloud/ocis/$(NAME)
BIN := bin
DIST := dist
HUGO := hugo
PROTO_VERSION := v0
PROTO_SRC := pkg/proto/$(PROTO_VERSION)
ifeq ($(OS), Windows_NT)
EXECUTABLE := $(NAME).exe
UNAME := Windows
else
EXECUTABLE := $(NAME)
UNAME := $(shell uname -s)
endif
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 ?= $(IMPORT)/pkg/assets
FEATURE_PATH ?= "ui/tests/acceptance/features"
TAGS ?=
ifndef GOPATH
export GOPATH := $(shell go env GOPATH)
endif
export PATH := $(PATH):$(GOPATH)/bin
ifndef OUTPUT
ifneq ($(DRONE_TAG),)
OUTPUT ?= $(subst v,,$(DRONE_TAG))
else
OUTPUT ?= testing
endif
endif
ifndef VERSION
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
VERSION ?= $(shell git rev-parse --short HEAD)
endif
endif
ifndef DATE
DATE := $(shell date -u '+%Y%m%d')
endif
LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
GCFLAGS += all=-N -l
.PHONY: all
all: build
.PHONY: sync
sync:
go mod download
.PHONY: clean
clean:
go clean -i ./...
rm -rf $(BIN) $(DIST) $(HUGO)
.PHONY: go-mod-tidy
go-mod-tidy:
@go mod tidy
.PHONY: fmt
fmt:
gofmt -s -w $(SOURCES)
.PHONY: vet
vet:
go vet $(PACKAGES)
.PHONY: staticcheck
staticcheck:
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
.PHONY: lint
lint:
for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done;
.PHONY: changelog
changelog:
go run github.com/restic/calens >| CHANGELOG.md
.PHONY: test
test:
go run github.com/haya14busa/goverage -v -coverprofile coverage.out $(PACKAGES)
.PHONY: go-coverage
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]+"
.PHONY: install
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME)
.PHONY: build
build: $(BIN)/$(EXECUTABLE) $(BIN)/$(EXECUTABLE)-debug
$(BIN)/$(EXECUTABLE): $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME)
$(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
.PHONY: release
release: release-dirs release-linux release-windows release-darwin release-copy release-check
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release
.PHONY: release-linux
release-linux: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-windows
release-windows: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-darwin
release-darwin: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-copy
release-copy:
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
.PHONY: release-check
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: release-finish
release-finish: release-copy release-check
.PHONY: test-acceptance-webui
test-acceptance-webui:
./ui/tests/run-acceptance-test.sh $(FEATURE_PATH)
.PHONY: watch
watch:
go run github.com/cespare/reflex -c reflex.conf
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # supress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk
endif
############ go tooling ############
include ../.make/go.mk
############ release ############
include ../.make/release.mk
############ docs generate ############
include ../.make/docs.mk
############ l10n ############
include ../.make/l10n.mk
.PHONY: docs-generate
docs-generate: config-docs-generate \
grpc-docs-generate
.PHONY: config-docs-generate
config-docs-generate:
go run github.com/owncloud/flaex >| ../docs/extensions/$(NAME)/configuration.md
.PHONY: grpc-docs-generate
grpc-docs-generate: ../docs/extensions/${NAME}/grpc.md
############ generate ############
.PHONY: generate
generate: ci-node-generate ci-go-generate
include ../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: protobuf # CI runs ci-node-generate automatically before this target
go generate $(GENERATE)
@go generate $(GENERATE)
.PHONY: ci-node-generate
ci-node-generate: yarn-build
@@ -188,61 +48,10 @@ node_modules:
yarn install --frozen-lockfile
############ protobuf ############
$(GOPATH)/bin/protoc-gen-go:
go get -v google.golang.org/protobuf/cmd/protoc-gen-go@v1.25.0
PROTO_VERSION := v0
PROTO_SRC := pkg/proto/$(PROTO_VERSION)
$(GOPATH)/bin/protoc-gen-micro:
GO111MODULE=on go get -v github.com/asim/go-micro/cmd/protoc-gen-micro/v3
$(GOPATH)/bin/protoc-gen-microweb:
GO111MODULE=off go get -v github.com/owncloud/protoc-gen-microweb
$(GOPATH)/bin/protoc-gen-openapiv2:
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2
$(GOPATH)/bin/protoc-gen-doc:
GO111MODULE=off go get -v github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
.PHONY: $(PROTO_SRC)/${NAME}.pb.go
$(PROTO_SRC)/${NAME}.pb.go: $(GOPATH)/bin/protoc-gen-openapiv2 $(GOPATH)/bin/protoc-gen-go
protoc \
-I=../third_party/ \
-I=$(PROTO_SRC)/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/ \
--go_out=. ${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.pb.micro.go
$(PROTO_SRC)/${NAME}.pb.micro.go: $(GOPATH)/bin/protoc-gen-openapiv2 $(GOPATH)/bin/protoc-gen-micro
protoc \
-I=../third_party/ \
-I=$(PROTO_SRC)/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/ \
--micro_out=. ${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.pb.web.go
$(PROTO_SRC)/${NAME}.pb.web.go: $(GOPATH)/bin/protoc-gen-openapiv2 $(GOPATH)/bin/protoc-gen-microweb
protoc \
-I=../third_party/ \
-I=$(PROTO_SRC)/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/ \
--microweb_out=. ${NAME}.proto
.PHONY: $(PROTO_SRC)/${NAME}.swagger.json
$(PROTO_SRC)/${NAME}.swagger.json: $(GOPATH)/bin/protoc-gen-openapiv2
protoc \
-I=../third_party/ \
-I=$(PROTO_SRC)/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/ \
--openapiv2_out=$(PROTO_SRC)/ ${NAME}.proto
.PHONY: ../docs/extensions/${NAME}/grpc.md
../docs/extensions/${NAME}/grpc.md: $(GOPATH)/bin/protoc-gen-openapiv2 $(GOPATH)/bin/protoc-gen-doc
protoc \
-I=../third_party/ \
-I=$(PROTO_SRC)/ \
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/ \
--doc_opt=./templates/GRPC.tmpl,grpc.md \
--doc_out=../docs/extensions/${NAME} $(PROTO_SRC)/${NAME}.proto
include ../.make/protobuf.mk
.PHONY: protobuf
protobuf: $(PROTO_SRC)/${NAME}.pb.go \

View File

@@ -4,10 +4,11 @@ import (
"os"
"github.com/owncloud/ocis/accounts/pkg/command"
"github.com/owncloud/ocis/accounts/pkg/config"
)
func main() {
if err := command.Execute(); err != nil {
if err := command.Execute(config.New()); err != nil {
os.Exit(1)
}
}

View File

@@ -1,50 +1,45 @@
module github.com/owncloud/ocis/accounts
go 1.15
go 1.16
require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
contrib.go.opencensus.io/exporter/ocagent v0.6.0
contrib.go.opencensus.io/exporter/zipkin v0.1.1
github.com/asim/go-micro/plugins/client/grpc/v3 v3.0.0-20210217182006-0f0ace1a44a9
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-20210209082852-35ace33082f5
github.com/cs3org/reva v1.6.0
github.com/cs3org/go-cs3apis v0.0.0-20210614143420-5ee2eb1e7887
github.com/cs3org/reva v1.9.1-0.20210628143859-9d29c36c0c3f
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.4.3
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.2.0
github.com/mattn/go-runewidth v0.0.10 // indirect
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.4
github.com/openzipkin/zipkin-go v0.2.2
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-20210216094451-dc73176dc62d
github.com/prometheus/client_golang v1.7.1
github.com/restic/calens v0.2.0
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rs/zerolog v1.20.0
github.com/spf13/viper v1.7.0
github.com/owncloud/ocis/settings v0.0.0-20210413063522-955bd60edf33
github.com/prometheus/client_golang v1.10.0
github.com/rs/zerolog v1.23.0
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
go.opencensus.io v0.22.6
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-20210119194325-5f4716e94777
golang.org/x/text v0.3.5 // indirect
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781
google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea
google.golang.org/grpc v1.35.0
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v2 v2.4.0 // indirect
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.27.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
// latest version compatible with etcd
google.golang.org/grpc => google.golang.org/grpc v1.29.1
)

File diff suppressed because it is too large Load Diff

10
accounts/l10n/.tx/config Normal file
View File

@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
[owncloud.ocis-accounts]
file_filter = locale/<lang>/LC_MESSAGES/app.po
minimum_perc = 0
source_file = template.pot
source_lang = en
type = PO

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@
"author": "ownCloud GmbH <devops@owncloud.com>",
"repository": "https://github.com/owncloud/ocis-accounts.git",
"bugs": {
"url": "https://github.com/owncloud/ocis/accounts/issues",
"url": "https://github.com/owncloud/ocis/issues",
"email": "support@owncloud.com"
},
"scripts": {
@@ -20,50 +20,50 @@
"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.7.7",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@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.7.7",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.8.0",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/polyfill": "^7.10.1",
"@babel/preset-env": "^7.7.7",
"@babel/register": "7.12.13",
"@babel/preset-env": "^7.13.12",
"@babel/register": "7.13.8",
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-replace": "^2.3.0",
"archiver": "^4.0.1",
"archiver": "^5.3.0",
"axios": "^0.21.1",
"core-js": "3",
"cross-env": "^7.0.3",
"cucumber": "^6.0.5",
"cucumber-pretty": ">=6.0.0",
"debounce": "^1.2.0",
"easygettext": "^2.7.0",
"eslint": "6.8.0",
"eslint-config-standard": "^14.1.0",
"debounce": "^1.2.1",
"easygettext": "^2.17.0",
"eslint": "7.24.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.6.0",
"eslint-plugin-vue": "^7.8.0",
"fs-extra": "^9.0.1",
"join-path": "^1.1.1",
"ldap": "^0.7.1",
"nightwatch": "^1.3.6",
"ldapjs": "^2.2.3",
"nightwatch": "^1.6.0",
"nightwatch-api": "^3.0.1",
"nightwatch-vrt": "^0.2.10",
"node-fetch": "^2.6.1",
"qs": "^6.9.1",
"qs": "^6.10.1",
"rimraf": "^3.0.0",
"rollup": "^2.39.0",
"rollup": "^2.52.6",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-filesize": "^9.1.0",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.1.4",
"swagger-vue-generator": "^1.0.6",
"url-search-params-polyfill": "^8.1.0",
@@ -76,7 +76,7 @@
"not dead"
],
"peerDependencies": {
"owncloud-design-system": "^1.7.0"
"owncloud-design-system": "^7.4.2"
},
"dependencies": {
"validator": "^13.1.1"

View File

@@ -15,7 +15,7 @@ import (
_ "golang.org/x/net/webdav"
)
//go:generate go run github.com/UnnoTed/fileb0x embed.yml
//go:generate make -C ../.. embed.yml
// assets gets initialized by New and provides the handler.
type assets struct {

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,19 @@
package command
import (
"context"
"os"
"strings"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"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/spf13/viper"
"github.com/thejerf/suture/v4"
)
var (
@@ -19,8 +22,7 @@ var (
)
// Execute is the entry point for the ocis-accounts command.
func Execute() error {
cfg := config.New()
func Execute(cfg *config.Config) error {
app := &cli.App{
Name: "ocis-accounts",
Version: version.String,
@@ -73,11 +75,14 @@ func NewLogger(cfg *config.Config) log.Logger {
log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color),
log.File(cfg.Log.File),
)
}
// ParseConfig loads accounts configuration from Viper known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
sync.ParsingViperConfig.Lock()
defer sync.ParsingViperConfig.Unlock()
logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
@@ -118,3 +123,28 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
return nil
}
// SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree.
type SutureService struct {
cfg *config.Config
}
// NewSutureService creates a new accounts.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Accounts.Supervised = true
}
cfg.Accounts.Log.File = cfg.Log.File
return SutureService{
cfg: cfg.Accounts,
}
}
func (s SutureService) Serve(ctx context.Context) error {
s.cfg.Context = ctx
if err := Execute(s.cfg); err != nil {
return err
}
return nil
}

View File

@@ -2,26 +2,19 @@ package command
import (
"context"
"os"
"os/signal"
"strings"
"time"
"contrib.go.opencensus.io/exporter/jaeger"
"contrib.go.opencensus.io/exporter/ocagent"
"contrib.go.opencensus.io/exporter/zipkin"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/micro/cli/v2"
"github.com/oklog/run"
openzipkin "github.com/openzipkin/zipkin-go"
zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/accounts/pkg/metrics"
"github.com/owncloud/ocis/accounts/pkg/server/grpc"
"github.com/owncloud/ocis/accounts/pkg/server/http"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"go.opencensus.io/stats/view"
"go.opencensus.io/trace"
"github.com/owncloud/ocis/accounts/pkg/tracing"
)
// Server is the entry point for the server command.
@@ -32,92 +25,28 @@ func Server(cfg *config.Config) *cli.Command {
Description: "uses an LDAP server as the storage backend",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
// 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.
return ParseConfig(ctx, cfg)
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
}
logger.Debug().Str("service", "accounts").Msg("ignoring config file parsing when running supervised")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
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")
err := tracing.Configure(cfg, logger)
if err != nil {
return err
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
mtrcs = metrics.New()
)
gr := run.Group{}
ctx, cancel := defineContext(cfg)
mtrcs := metrics.New()
defer cancel()
@@ -125,70 +54,54 @@ func Server(cfg *config.Config) *cli.Command {
handler, err := svc.New(svc.Logger(logger), svc.Config(cfg))
if err != nil {
logger.Fatal().Err(err).Msg("could not initialize service handler")
logger.Error().Err(err).Msg("handler init")
return err
}
{
server := http.Server(
http.Logger(logger),
http.Name(cfg.Server.Name),
http.Context(ctx),
http.Config(cfg),
http.Metrics(mtrcs),
http.Flags(flagset.RootWithConfig(config.New())),
http.Flags(flagset.ServerWithConfig(config.New())),
http.Handler(handler),
)
httpServer := http.Server(
http.Config(cfg),
http.Logger(logger),
http.Name(cfg.Server.Name),
http.Context(ctx),
http.Metrics(mtrcs),
http.Handler(handler),
)
gr.Add(server.Run, func(_ error) {
logger.Info().
Str("server", "http").
Msg("Shutting down server")
gr.Add(httpServer.Run, func(_ error) {
logger.Info().Str("server", "http").Msg("shutting down server")
cancel()
})
cancel()
})
}
grpcServer := grpc.Server(
grpc.Config(cfg),
grpc.Logger(logger),
grpc.Name(cfg.Server.Name),
grpc.Context(ctx),
grpc.Metrics(mtrcs),
grpc.Handler(handler),
)
{
server := grpc.Server(
grpc.Logger(logger),
grpc.Name(cfg.Server.Name),
grpc.Context(ctx),
grpc.Config(cfg),
grpc.Metrics(mtrcs),
grpc.Handler(handler),
)
gr.Add(grpcServer.Run, func(_ error) {
logger.Info().Str("server", "grpc").Msg("shutting down server")
cancel()
})
gr.Add(func() error {
logger.Info().Str("service", server.Name()).Msg("Reporting settings bundles to settings service")
svc.RegisterSettingsBundles(&logger)
svc.RegisterPermissions(&logger)
return server.Run()
}, func(_ error) {
logger.Info().
Str("server", "grpc").
Msg("Shutting down server")
cancel()
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
if !cfg.Supervised {
sync.Trap(&gr, cancel)
}
return gr.Run()
},
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {
if cfg.Context == nil {
return context.WithCancel(context.Background())
}
return context.WithCancel(cfg.Context)
}()
}

View File

@@ -1,6 +1,8 @@
// Package config should be moved to internal
package config
import "context"
// LDAP defines the available ldap configuration.
type LDAP struct {
Hostname string
@@ -60,6 +62,7 @@ type Log struct {
Level string
Pretty bool
Color bool
File string
}
// Repo defines which storage implementation is to be used.
@@ -121,6 +124,9 @@ type Config struct {
Index Index
ServiceUser ServiceUser
Tracing Tracing
Context context.Context
Supervised bool
}
// New returns a new config.

View File

@@ -4,6 +4,7 @@ import (
"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/flags"
)
// RootWithConfig applies cfg to the root flagset
@@ -11,31 +12,38 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-level",
Value: "info",
Usage: "Set logging level",
EnvVars: []string{"ACCOUNTS_LOG_LEVEL"},
EnvVars: []string{"ACCOUNTS_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Value: true,
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"ACCOUNTS_LOG_PRETTY"},
EnvVars: []string{"ACCOUNTS_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Value: true,
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"ACCOUNTS_LOG_COLOR"},
EnvVars: []string{"ACCOUNTS_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-file",
Usage: "Enable log to file",
EnvVars: []string{"ACCOUNTS_LOG_FILE", "OCIS_LOG_FILE"},
Destination: &cfg.Log.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
@@ -44,193 +52,197 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"ACCOUNTS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"ACCOUNTS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"ACCOUNTS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "accounts"),
Usage: "Service name for tracing",
EnvVars: []string{"ACCOUNTS_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "http-namespace",
Value: "com.owncloud.web",
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
Usage: "Set the base namespace for the http namespace",
EnvVars: []string{"ACCOUNTS_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
&cli.StringFlag{
Name: "http-addr",
Value: "0.0.0.0: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,
},
&cli.StringFlag{
Name: "http-root",
Value: "/",
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/"),
Usage: "Root path of http server",
EnvVars: []string{"ACCOUNTS_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
&cli.IntFlag{
Name: "http-cache-ttl",
Value: 604800, // 7 days
Value: flags.OverrideDefaultInt(cfg.HTTP.CacheTTL, 604800),
Usage: "Set the static assets caching duration in seconds",
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
Destination: &cfg.HTTP.CacheTTL,
},
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "grpc-addr",
Value: "0.0.0.0: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,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
},
&cli.IntFlag{
Name: "accounts-hash-difficulty",
Value: 11,
Value: flags.OverrideDefaultInt(cfg.Server.HashDifficulty, 11),
Usage: "accounts password hash difficulty",
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
Destination: &cfg.Server.HashDifficulty,
},
&cli.StringFlag{
Name: "asset-path",
Value: "",
Value: flags.OverrideDefaultString(cfg.Asset.Path, ""),
Usage: "Path to custom assets",
EnvVars: []string{"ACCOUNTS_ASSET_PATH"},
Destination: &cfg.Asset.Path,
},
&cli.StringFlag{
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
EnvVars: []string{"ACCOUNTS_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
&cli.StringFlag{
Name: "storage-disk-path",
Value: "",
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,
},
&cli.StringFlag{
Name: "storage-cs3-provider-addr",
Value: "localhost:9215",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.ProviderAddr, "localhost:9215"),
Usage: "bind address for the metadata storage provider",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
Destination: &cfg.Repo.CS3.ProviderAddr,
},
&cli.StringFlag{
Name: "storage-cs3-data-url",
Value: "http://localhost:9216",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataURL, "http://localhost:9216"),
Usage: "http endpoint of the metadata storage",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_URL"},
Destination: &cfg.Repo.CS3.DataURL,
},
&cli.StringFlag{
Name: "storage-cs3-data-prefix",
Value: "data",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataPrefix, "data"),
Usage: "path prefix for the http endpoint of the metadata storage, without leading slash",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_PREFIX"},
Destination: &cfg.Repo.CS3.DataPrefix,
},
&cli.StringFlag{
Name: "storage-cs3-jwt-secret",
Value: "Pive-Fumkiu4",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.JWTSecret, "Pive-Fumkiu4"),
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.Repo.CS3.JWTSecret,
},
&cli.StringFlag{
Name: "service-user-uuid",
Value: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Value: flags.OverrideDefaultString(cfg.ServiceUser.UUID, "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad"),
Usage: "uuid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UUID"},
Destination: &cfg.ServiceUser.UUID,
},
&cli.StringFlag{
Name: "service-user-username",
Value: "",
Value: flags.OverrideDefaultString(cfg.ServiceUser.Username, ""),
Usage: "username of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_USERNAME"},
Destination: &cfg.ServiceUser.Username,
},
&cli.Int64Flag{
Name: "service-user-uid",
Value: 0,
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.UID, 0),
Usage: "uid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UID"},
Destination: &cfg.ServiceUser.UID,
},
&cli.Int64Flag{
Name: "service-user-gid",
Value: 0,
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.GID, 0),
Usage: "gid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_GID"},
Destination: &cfg.ServiceUser.GID,
},
&cli.Int64Flag{
Name: "uid-index-lower-bound",
Value: 0,
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Lower, 0),
Usage: "define a starting point for the account UID",
EnvVars: []string{"ACCOUNTS_UID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.UID.Lower,
},
&cli.Int64Flag{
Name: "gid-index-lower-bound",
Value: 1000,
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Lower, 1000),
Usage: "define a starting point for the account GID",
EnvVars: []string{"ACCOUNTS_GID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.GID.Lower,
},
&cli.Int64Flag{
Name: "uid-index-upper-bound",
Value: 0,
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Upper, 0),
Usage: "define an ending point for the account UID",
EnvVars: []string{"ACCOUNTS_UID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.UID.Upper,
},
&cli.Int64Flag{
Name: "gid-index-upper-bound",
Value: 1000,
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Upper, 1000),
Usage: "define an ending point for the account GID",
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.GID.Upper,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
@@ -243,14 +255,14 @@ func UpdateAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag
return []cli.Flag{
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
@@ -327,14 +339,14 @@ func AddAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
@@ -411,14 +423,14 @@ func ListAccountsWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
@@ -431,14 +443,14 @@ func RemoveAccountWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
@@ -451,14 +463,14 @@ func InspectAccountWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "name",
Value: "accounts",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,8 @@ import (
"path/filepath"
"testing"
mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v3"
"github.com/asim/go-micro/v3/client"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/golang/protobuf/ptypes/empty"
@@ -24,7 +26,7 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
)
var service = grpc.Service{}
var service = grpc.NewService()
var dataPath = createTmpDir()
@@ -302,18 +304,18 @@ func assertGroupsSame(t *testing.T, grp1, grp2 *proto.Group) {
}
}
func assertGroupHasMember(t *testing.T, grp *proto.Group, memberId string) {
func assertGroupHasMember(t *testing.T, grp *proto.Group, memberID string) {
for _, m := range grp.Members {
if m.Id == memberId {
if m.Id == memberID {
return
}
}
t.Fatalf("Member with id %s expected to be in group '%s', but not found", memberId, grp.DisplayName)
t.Fatalf("Member with id %s expected to be in group '%s', but not found", memberID, grp.DisplayName)
}
func createAccount(t *testing.T, user string) (*proto.Account, error) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewAccountsService("com.owncloud.api.accounts", client)
account := getAccount(user)
@@ -326,7 +328,7 @@ func createAccount(t *testing.T, user string) (*proto.Account, error) {
}
func createGroup(t *testing.T, group *proto.Group) (*proto.Group, error) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
request := &proto.CreateGroupRequest{Group: group}
@@ -338,7 +340,7 @@ func createGroup(t *testing.T, group *proto.Group) (*proto.Group, error) {
}
func updateAccount(t *testing.T, account *proto.Account, updateArray []string) (*proto.Account, error) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewAccountsService("com.owncloud.api.accounts", client)
updateMask := &field_mask.FieldMask{
@@ -352,7 +354,7 @@ func updateAccount(t *testing.T, account *proto.Account, updateArray []string) (
func listAccounts(t *testing.T) (*proto.ListAccountsResponse, error) {
request := &proto.ListAccountsRequest{}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewAccountsService("com.owncloud.api.accounts", client)
response, err := cl.ListAccounts(context.Background(), request)
@@ -361,7 +363,7 @@ func listAccounts(t *testing.T) (*proto.ListAccountsResponse, error) {
func listGroups(t *testing.T) *proto.ListGroupsResponse {
request := &proto.ListGroupsRequest{}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
response, err := cl.ListGroups(context.Background(), request)
@@ -370,7 +372,7 @@ func listGroups(t *testing.T) *proto.ListGroupsResponse {
}
func deleteAccount(t *testing.T, id string) (*empty.Empty, error) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewAccountsService("com.owncloud.api.accounts", client)
req := &proto.DeleteAccountRequest{Id: id}
@@ -379,7 +381,7 @@ func deleteAccount(t *testing.T, id string) (*empty.Empty, error) {
}
func deleteGroup(t *testing.T, id string) (*empty.Empty, error) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.DeleteGroupRequest{Id: id}
@@ -554,7 +556,8 @@ func TestUpdateAccount(t *testing.T) {
}
func TestUpdateNonUpdatableFieldsInAccount(t *testing.T) {
_, _ = createAccount(t, "user1")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
tests := []struct {
name string
@@ -622,8 +625,10 @@ func TestUpdateNonUpdatableFieldsInAccount(t *testing.T) {
}
func TestListAccounts(t *testing.T) {
createAccount(t, "user1")
createAccount(t, "user2")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
_, err = createAccount(t, "user2")
assert.NoError(t, err)
resp, err := listAccounts(t)
assert.NoError(t, err)
@@ -744,7 +749,8 @@ func TestListAccountsWithFilterQuery(t *testing.T) {
}
func TestGetAccount(t *testing.T) {
createAccount(t, "user1")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
req := &proto.GetAccountRequest{Id: getAccount("user1").Id}
@@ -762,12 +768,14 @@ func TestGetAccount(t *testing.T) {
//TODO: This segfaults! WIP
func TestDeleteAccount(t *testing.T) {
createAccount(t, "user1")
createAccount(t, "user2")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
_, err = createAccount(t, "user2")
assert.NoError(t, err)
req := &proto.DeleteAccountRequest{Id: getAccount("user1").Id}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewAccountsService("com.owncloud.api.accounts", client)
resp, err := cl.DeleteAccount(context.Background(), req)
@@ -785,7 +793,7 @@ func TestDeleteAccount(t *testing.T) {
func TestListGroups(t *testing.T) {
req := &proto.ListGroupsRequest{}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
resp, err := cl.ListGroups(context.Background(), req)
@@ -812,7 +820,7 @@ func TestListGroups(t *testing.T) {
}
func TestGetGroups(t *testing.T) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
groups := []string{
@@ -860,7 +868,7 @@ func TestCreateGroup(t *testing.T) {
}
func TestGetGroupInvalidID(t *testing.T) {
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.GetGroupRequest{Id: "42"}
@@ -876,11 +884,14 @@ func TestDeleteGroup(t *testing.T) {
grp1 := getTestGroups("grp1")
grp2 := getTestGroups("grp2")
grp3 := getTestGroups("grp3")
createGroup(t, grp1)
createGroup(t, grp2)
createGroup(t, grp3)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
_, err = createGroup(t, grp2)
assert.NoError(t, err)
_, err = createGroup(t, grp3)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.DeleteGroupRequest{Id: grp1.Id}
@@ -909,7 +920,7 @@ func TestDeleteGroupNotExisting(t *testing.T) {
" ",
}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
for _, id := range invalidIds {
@@ -932,7 +943,7 @@ func TestDeleteGroupInvalidId(t *testing.T) {
"": ".",
}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
for id := range invalidIds {
@@ -947,9 +958,10 @@ func TestDeleteGroupInvalidId(t *testing.T) {
func TestUpdateGroup(t *testing.T) {
grp1 := getTestGroups("grp1")
createGroup(t, grp1)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
updateGrp := &proto.Group{
@@ -975,10 +987,12 @@ func TestAddMember(t *testing.T) {
updatedGroup := grp1
updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id})
createGroup(t, grp1)
createAccount(t, account.PreferredName)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
_, err = createAccount(t, account.PreferredName)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id}
@@ -1005,12 +1019,15 @@ func TestAddMemberAlreadyInGroup(t *testing.T) {
updatedGroup := grp1
updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id})
createGroup(t, grp1)
createAccount(t, account.PreferredName)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
_, err = createAccount(t, account.PreferredName)
assert.NoError(t, err)
addMemberToGroup(t, grp1.Id, account.Id)
_, err = addMemberToGroup(t, grp1.Id, account.Id)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id}
@@ -1033,9 +1050,10 @@ func TestAddMemberAlreadyInGroup(t *testing.T) {
func TestAddMemberNonExisting(t *testing.T) {
grp1 := getTestGroups("grp1")
createGroup(t, grp1)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
invalidIds := []string{
@@ -1062,11 +1080,11 @@ func TestAddMemberNonExisting(t *testing.T) {
cleanUp(t)
}
func addMemberToGroup(t *testing.T, groupId, memberId string) (*proto.Group, error) {
client := service.Client()
func addMemberToGroup(t *testing.T, groupID, memberID string) (*proto.Group, error) {
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.AddMemberRequest{GroupId: groupId, AccountId: memberId}
req := &proto.AddMemberRequest{GroupId: groupID, AccountId: memberID}
res, err := cl.AddMember(context.Background(), req)
@@ -1078,12 +1096,15 @@ func TestRemoveMember(t *testing.T) {
grp1 := getTestGroups("grp1")
account := getAccount("user1")
createGroup(t, grp1)
createAccount(t, account.PreferredName)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
_, err = createAccount(t, account.PreferredName)
assert.NoError(t, err)
addMemberToGroup(t, grp1.Id, account.Id)
_, err = addMemberToGroup(t, grp1.Id, account.Id)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id}
@@ -1104,9 +1125,10 @@ func TestRemoveMember(t *testing.T) {
func TestRemoveMemberNonExistingUser(t *testing.T) {
grp1 := getTestGroups("grp1")
createGroup(t, grp1)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
invalidIds := []string{
@@ -1137,10 +1159,12 @@ func TestRemoveMemberNotInGroup(t *testing.T) {
grp1 := getTestGroups("grp1")
account := getAccount("user1")
createGroup(t, grp1)
createAccount(t, account.PreferredName)
_, err := createGroup(t, grp1)
assert.NoError(t, err)
_, err = createAccount(t, account.PreferredName)
assert.NoError(t, err)
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id}
@@ -1177,7 +1201,7 @@ func TestListMembers(t *testing.T) {
"physics-lovers",
}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
for _, group := range groups {
@@ -1209,7 +1233,7 @@ func TestListMembers(t *testing.T) {
func TestListMembersEmptyGroup(t *testing.T) {
group := &proto.Group{Id: "5d58e5ec-842e-498b-8800-61f2ec6f911c", GidNumber: 60000, OnPremisesSamAccountName: "quantum-group", DisplayName: "Quantum Group", Members: []*proto.Account{}}
client := service.Client()
client := mgrpcc.NewClient()
cl := proto.NewGroupsService("com.owncloud.api.accounts", client)
request := &proto.CreateGroupRequest{Group: group}
@@ -1229,9 +1253,11 @@ func TestListMembersEmptyGroup(t *testing.T) {
}
func TestAccountUpdateMask(t *testing.T) {
createAccount(t, "user1")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
user1 := getAccount("user1")
client := service.Client()
client := mgrpcc.NewClient()
req := &proto.UpdateAccountRequest{
// We only want to update the display-name, rest should be ignored
UpdateMask: &field_mask.FieldMask{Paths: []string{"DisplayName"}},
@@ -1252,9 +1278,11 @@ func TestAccountUpdateMask(t *testing.T) {
}
func TestAccountUpdateReadOnlyField(t *testing.T) {
createAccount(t, "user1")
_, err := createAccount(t, "user1")
assert.NoError(t, err)
user1 := getAccount("user1")
client := service.Client()
client := mgrpcc.NewClient()
req := &proto.UpdateAccountRequest{
// We only want to update the display-name, rest should be ignored
UpdateMask: &field_mask.FieldMask{Paths: []string{"CreatedDateTime"}},

View File

@@ -1,8 +1,8 @@
syntax = "proto3";
option go_package = "pkg/proto/v0;proto";
package com.owncloud.ocis.accounts.v0;
package accounts;
option go_package = "github.com/owncloud/ocis/accounts/pkg/proto/v0;proto";
import "google/api/field_behavior.proto";
import "google/api/annotations.proto";
@@ -13,27 +13,27 @@ import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "ownCloud Infinite Scale accounts";
version: "1.0.0";
contact: {
name: "ownCloud GmbH";
url: "https://github.com/owncloud/ocis";
email: "support@owncloud.com";
};
license: {
name: "Apache-2.0";
url: "https://github.com/owncloud/ocis/blob/master/LICENSE";
};
};
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
external_docs: {
description: "Developer Manual";
url: "https://owncloud.github.io/extensions/accounts/";
};
info: {
title: "ownCloud Infinite Scale accounts";
version: "1.0.0";
contact: {
name: "ownCloud GmbH";
url: "https://github.com/owncloud/ocis";
email: "support@owncloud.com";
};
license: {
name: "Apache-2.0";
url: "https://github.com/owncloud/ocis/blob/master/LICENSE";
};
};
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
external_docs: {
description: "Developer Manual";
url: "https://owncloud.dev/extensions/accounts/";
};
};
// Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods

View File

@@ -43,7 +43,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
}
},
"default": {
@@ -59,7 +59,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsCreateAccountRequest"
"$ref": "#/definitions/v0CreateAccountRequest"
}
}
],
@@ -92,7 +92,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsDeleteAccountRequest"
"$ref": "#/definitions/v0DeleteAccountRequest"
}
}
],
@@ -109,7 +109,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
}
},
"default": {
@@ -125,7 +125,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsGetAccountRequest"
"$ref": "#/definitions/v0GetAccountRequest"
}
}
],
@@ -142,7 +142,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsListAccountsResponse"
"$ref": "#/definitions/v0ListAccountsResponse"
}
},
"default": {
@@ -158,7 +158,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsListAccountsRequest"
"$ref": "#/definitions/v0ListAccountsRequest"
}
}
],
@@ -175,7 +175,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
}
},
"default": {
@@ -191,7 +191,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsUpdateAccountRequest"
"$ref": "#/definitions/v0UpdateAccountRequest"
}
}
],
@@ -208,7 +208,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
}
},
"default": {
@@ -224,7 +224,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsCreateGroupRequest"
"$ref": "#/definitions/v0CreateGroupRequest"
}
}
],
@@ -257,7 +257,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsDeleteGroupRequest"
"$ref": "#/definitions/v0DeleteGroupRequest"
}
}
],
@@ -274,7 +274,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
}
},
"default": {
@@ -290,7 +290,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsGetGroupRequest"
"$ref": "#/definitions/v0GetGroupRequest"
}
}
],
@@ -307,7 +307,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsListGroupsResponse"
"$ref": "#/definitions/v0ListGroupsResponse"
}
},
"default": {
@@ -323,7 +323,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsListGroupsRequest"
"$ref": "#/definitions/v0ListGroupsRequest"
}
}
],
@@ -340,7 +340,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
}
},
"default": {
@@ -356,7 +356,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsUpdateGroupRequest"
"$ref": "#/definitions/v0UpdateGroupRequest"
}
}
],
@@ -373,7 +373,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
}
},
"default": {
@@ -396,7 +396,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsAddMemberRequest"
"$ref": "#/definitions/v0AddMemberRequest"
}
}
],
@@ -413,7 +413,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
}
},
"default": {
@@ -443,7 +443,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsRemoveMemberRequest"
"$ref": "#/definitions/v0RemoveMemberRequest"
}
}
],
@@ -460,7 +460,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsListMembersResponse"
"$ref": "#/definitions/v0ListMembersResponse"
}
},
"default": {
@@ -483,7 +483,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsListMembersRequest"
"$ref": "#/definitions/v0ListMembersRequest"
}
}
],
@@ -499,7 +499,7 @@
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/accountsRebuildIndexResponse"
"$ref": "#/definitions/v0RebuildIndexResponse"
}
},
"default": {
@@ -515,7 +515,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/accountsRebuildIndexRequest"
"$ref": "#/definitions/v0RebuildIndexRequest"
}
}
],
@@ -526,7 +526,37 @@
}
},
"definitions": {
"accountsAccount": {
"protobufAny": {
"type": "object",
"properties": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v0Account": {
"type": "object",
"properties": {
"id": {
@@ -548,7 +578,7 @@
"identities": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsIdentities"
"$ref": "#/definitions/v0Identities"
},
"description": "Represents the identities that can be used to sign in to this account.\nAn identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account.\nMay contain multiple items with the same signInType value. Supports $filter."
},
@@ -579,13 +609,13 @@
"title": "A description, useful for resource accounts\nposixaccount MAY description"
},
"passwordProfile": {
"$ref": "#/definitions/accountsPasswordProfile",
"$ref": "#/definitions/v0PasswordProfile",
"title": "Specifies the password profile for the user.\nThe profile contains the users password. This property is required when a user is created.\nThe password in the profile must satisfy minimum requirements as specified by the passwordPolicies property.\nBy default, a strong password is required.\nposixaccount MAY authPassword"
},
"memberOf": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
},
"title": "The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable.\nshould we only respond with repeated strings of ids? no clients should a proper filter mask!"
},
@@ -635,7 +665,7 @@
"onPremisesProvisioningErrors": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsOnPremisesProvisioningError"
"$ref": "#/definitions/v0OnPremisesProvisioningError"
},
"description": "Errors when using synchronization during provisioning."
},
@@ -661,7 +691,7 @@
},
"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"
},
"accountsAddMemberRequest": {
"v0AddMemberRequest": {
"type": "object",
"properties": {
"groupId": {
@@ -674,25 +704,25 @@
}
}
},
"accountsCreateAccountRequest": {
"v0CreateAccountRequest": {
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/accountsAccount",
"$ref": "#/definitions/v0Account",
"title": "The account resource to create"
}
}
},
"accountsCreateGroupRequest": {
"v0CreateGroupRequest": {
"type": "object",
"properties": {
"group": {
"$ref": "#/definitions/accountsGroup",
"$ref": "#/definitions/v0Group",
"title": "The account resource to create"
}
}
},
"accountsDeleteAccountRequest": {
"v0DeleteAccountRequest": {
"type": "object",
"properties": {
"id": {
@@ -700,7 +730,7 @@
}
}
},
"accountsDeleteGroupRequest": {
"v0DeleteGroupRequest": {
"type": "object",
"properties": {
"id": {
@@ -708,7 +738,7 @@
}
}
},
"accountsGetAccountRequest": {
"v0GetAccountRequest": {
"type": "object",
"properties": {
"id": {
@@ -716,7 +746,7 @@
}
}
},
"accountsGetGroupRequest": {
"v0GetGroupRequest": {
"type": "object",
"properties": {
"id": {
@@ -724,7 +754,7 @@
}
}
},
"accountsGroup": {
"v0Group": {
"type": "object",
"properties": {
"id": {
@@ -738,14 +768,14 @@
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
},
"title": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable.\nTODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later"
},
"owners": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
},
"title": "groupofnames MAY businessCategory\ngroupofnames MAY o\ngroupofnames MAY ou\ngroupofnames MAY owner, SINGLE-VALUE but there might be multiple owners"
},
@@ -816,13 +846,13 @@
"onPremisesProvisioningErrors": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsOnPremisesProvisioningError"
"$ref": "#/definitions/v0OnPremisesProvisioningError"
},
"description": "Errors when using synchronization during provisioning."
}
}
},
"accountsIdentities": {
"v0Identities": {
"type": "object",
"properties": {
"signInType": {
@@ -840,7 +870,7 @@
},
"description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames."
},
"accountsListAccountsRequest": {
"v0ListAccountsRequest": {
"type": "object",
"properties": {
"pageSize": {
@@ -863,13 +893,13 @@
}
}
},
"accountsListAccountsResponse": {
"v0ListAccountsResponse": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
},
"title": "The field name should match the noun \"accounts\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request"
},
@@ -879,7 +909,7 @@
}
}
},
"accountsListGroupsRequest": {
"v0ListGroupsRequest": {
"type": "object",
"properties": {
"pageSize": {
@@ -902,13 +932,13 @@
}
}
},
"accountsListGroupsResponse": {
"v0ListGroupsResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsGroup"
"$ref": "#/definitions/v0Group"
},
"title": "The field name should match the noun \"group\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request"
},
@@ -918,7 +948,7 @@
}
}
},
"accountsListMembersRequest": {
"v0ListMembersRequest": {
"type": "object",
"properties": {
"pageSize": {
@@ -944,13 +974,13 @@
}
}
},
"accountsListMembersResponse": {
"v0ListMembersResponse": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/accountsAccount"
"$ref": "#/definitions/v0Account"
},
"title": "The field name should match the noun \"members\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request"
},
@@ -960,7 +990,7 @@
}
}
},
"accountsOnPremisesProvisioningError": {
"v0OnPremisesProvisioningError": {
"type": "object",
"properties": {
"category": {
@@ -982,7 +1012,7 @@
}
}
},
"accountsPasswordProfile": {
"v0PasswordProfile": {
"type": "object",
"properties": {
"password": {
@@ -1011,13 +1041,13 @@
}
}
},
"accountsRebuildIndexRequest": {
"v0RebuildIndexRequest": {
"type": "object"
},
"accountsRebuildIndexResponse": {
"v0RebuildIndexResponse": {
"type": "object"
},
"accountsRemoveMemberRequest": {
"v0RemoveMemberRequest": {
"type": "object",
"properties": {
"groupId": {
@@ -1030,11 +1060,11 @@
}
}
},
"accountsUpdateAccountRequest": {
"v0UpdateAccountRequest": {
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/accountsAccount",
"$ref": "#/definitions/v0Account",
"title": "The account resource which replaces the resource on the server"
},
"updateMask": {
@@ -1043,11 +1073,11 @@
}
}
},
"accountsUpdateGroupRequest": {
"v0UpdateGroupRequest": {
"type": "object",
"properties": {
"group": {
"$ref": "#/definitions/accountsGroup",
"$ref": "#/definitions/v0Group",
"title": "The group resource which replaces the resource on the server"
},
"updateMask": {
@@ -1055,40 +1085,10 @@
"title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"externalDocs": {
"description": "Developer Manual",
"url": "https://owncloud.github.io/extensions/accounts/"
"url": "https://owncloud.dev/extensions/accounts/"
}
}

View File

@@ -61,7 +61,10 @@ func Server(opts ...Option) http.Service {
proto.RegisterGroupsServiceWeb(r, handler)
})
micro.RegisterHandler(service.Server(), mux)
err := micro.RegisterHandler(service.Server(), mux)
if err != nil {
options.Logger.Fatal().Err(err).Msg("failed to register the handler")
}
return service
}

View File

@@ -6,6 +6,7 @@ import (
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"path"
"regexp"
"strconv"
@@ -19,7 +20,6 @@ import (
merrors "github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/metadata"
"github.com/gofrs/uuid"
p "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/empty"
fieldmask_utils "github.com/mennanov/fieldmask-utils"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
@@ -30,6 +30,7 @@ import (
settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0"
"github.com/rs/zerolog"
"google.golang.org/genproto/protobuf/field_mask"
p "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -172,11 +173,11 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest
var suspicious bool
kh := sha256.New()
kh.Write([]byte(a.Id))
mustWrite(kh, []byte(a.Id))
k := hex.EncodeToString(kh.Sum([]byte(a.PasswordProfile.LastPasswordChangeDateTime.String())))
vh := sha256.New()
vh.Write([]byte(a.PasswordProfile.Password))
mustWrite(vh, []byte(a.PasswordProfile.Password))
v := vh.Sum([]byte(password))
e := passwordValidCache.Load(k)
@@ -838,3 +839,9 @@ func isPasswordValid(logger log.Logger, hash string, pwd string) (ok bool) {
return bcrypt.CompareHashAndPassword([]byte(hash), []byte(pwd)) == nil
}
func mustWrite(w io.Writer, val []byte) {
if _, err := w.Write(val); err != nil {
panic(err)
}
}

View File

@@ -7,10 +7,10 @@ import (
merrors "github.com/asim/go-micro/v3/errors"
"github.com/gofrs/uuid"
p "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/accounts/pkg/storage"
p "google.golang.org/protobuf/proto"
)
func (s Service) expandMembers(g *proto.Group) {

View File

@@ -63,11 +63,11 @@ func recreateContainers(idx *indexer.Indexer, cfg *config.Config) error {
}
// Groups
if err := idx.AddIndex(&proto.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, true); err != nil {
if err := idx.AddIndex(&proto.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, false); err != nil {
return err
}
if err := idx.AddIndex(&proto.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, true); err != nil {
if err := idx.AddIndex(&proto.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, false); err != nil {
return err
}

View File

@@ -19,9 +19,9 @@ import (
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
oreg "github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/owncloud/ocis/ocis-pkg/roles"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0"
)
// userDefaultGID is the default integer representing the "users" group.
@@ -57,6 +57,18 @@ func New(opts ...Option) (s *Service, err error) {
repo: createMetadataStorage(cfg, logger),
}
r := oreg.GetRegistry()
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
}
}
// we want to wait anyway. If it depends on a reva service it could be the case that the entry on the registry
// happens prior to the reva service being up and running
time.Sleep(500 * time.Millisecond)
if s.index, err = s.buildIndex(); err != nil {
return nil, err
}
@@ -68,7 +80,6 @@ func New(opts ...Option) (s *Service, err error) {
if err = s.createDefaultGroups(); err != nil {
return nil, err
}
// TODO watch folders for new records
return
}
@@ -267,6 +278,7 @@ func (s Service) createDefaultAccounts() (err error) {
},
},
}
// this only deals with the metadata service.
for i := range accounts {
a := &proto.Account{}
err := s.repo.LoadAccount(context.Background(), accounts[i].Id, a)
@@ -287,7 +299,6 @@ func (s Service) createDefaultAccounts() (err error) {
}
}
// TODO: can be removed again as soon as we respect the predefined UIDs and GIDs from the account. Then no autoincrement is happening, therefore we don't need to update accounts.
changed := false
for _, r := range results {
if r.Field == "UidNumber" || r.Field == "GidNumber" {
@@ -309,24 +320,6 @@ func (s Service) createDefaultAccounts() (err error) {
}
}
}
// set role for admin users and regular users
assignRoleToUser("058bff95-6708-4fe5-91e4-9ea3d377588b", settings_svc.BundleUUIDRoleAdmin, s.RoleService, s.log)
for _, accountID := range []string{
"058bff95-6708-4fe5-91e4-9ea3d377588b", //moss
"ddc2004c-0977-11eb-9d3f-a793888cd0f8", //admin
"820ba2a1-3f54-4538-80a4-2d73007e30bf", //idp
"bc596f3c-c955-4328-80a0-60d018b4ad57", //reva
} {
assignRoleToUser(accountID, settings_svc.BundleUUIDRoleAdmin, s.RoleService, s.log)
}
for _, accountID := range []string{
"4c510ada-c86b-4815-8820-42cdf82c3d51", //einstein
"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", //marie
"932b4540-8d16-481e-8ef4-588e4b6b151c", //richard
} {
assignRoleToUser(accountID, settings_svc.BundleUUIDRoleUser, s.RoleService, s.log)
}
return nil
}
@@ -403,18 +396,6 @@ func (s Service) createDefaultGroups() (err error) {
return nil
}
func assignRoleToUser(accountID, roleID string, rs settings.RoleService, logger log.Logger) (ok bool) {
_, err := rs.AssignRoleToUser(context.Background(), &settings.AssignRoleToUserRequest{
AccountUuid: accountID,
RoleId: roleID,
})
if err != nil {
logger.Error().Err(err).Str("accountID", accountID).Str("roleID", roleID).Msg("could not set role for account")
return false
}
return true
}
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

View File

@@ -1,194 +0,0 @@
package service
import (
"context"
olog "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
ssvc "github.com/owncloud/ocis/settings/pkg/service/v0"
)
const (
settingUUIDProfileLanguage = "aa8cfbe5-95d4-4f7e-a032-c3c01f5f062f"
)
// RegisterSettingsBundles pushes the settings bundle definitions for this extension to the ocis-settings service.
func RegisterSettingsBundles(l *olog.Logger) {
service := settings.NewBundleService("com.owncloud.api.settings", grpc.DefaultClient)
bundleRequests := []settings.SaveBundleRequest{
generateBundleProfileRequest(),
}
for i := range bundleRequests {
res, err := service.SaveBundle(context.Background(), &bundleRequests[i])
if err != nil {
l.Err(err).Str("bundle", bundleRequests[i].Bundle.Id).Msg("Error registering bundle")
} else {
l.Info().Str("bundle", res.Bundle.Id).Msg("Successfully registered bundle")
}
}
permissionRequests := generateProfilePermissionsRequests()
for i := range permissionRequests {
res, err := service.AddSettingToBundle(context.Background(), &permissionRequests[i])
bundleID := permissionRequests[i].BundleId
if err != nil {
l.Err(err).Str("bundle", bundleID).Str("setting", permissionRequests[i].Setting.Id).Msg("Error adding setting to bundle")
} else {
l.Info().Str("bundle", bundleID).Str("setting", res.Setting.Id).Msg("Successfully added setting to bundle")
}
}
}
var languageSetting = settings.Setting_SingleChoiceValue{
SingleChoiceValue: &settings.SingleChoiceList{
Options: []*settings.ListOption{
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "cs",
},
},
DisplayValue: "Czech",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "de",
},
},
DisplayValue: "Deutsch",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "en",
},
},
DisplayValue: "English",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "es",
},
},
DisplayValue: "Español",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "fr",
},
},
DisplayValue: "Français",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "gl",
},
},
DisplayValue: "Galego",
},
{
Value: &settings.ListOptionValue{
Option: &settings.ListOptionValue_StringValue{
StringValue: "it",
},
},
DisplayValue: "Italiano",
},
},
},
}
func generateBundleProfileRequest() settings.SaveBundleRequest {
return settings.SaveBundleRequest{
Bundle: &settings.Bundle{
Id: "2a506de7-99bd-4f0d-994e-c38e72c28fd9",
Name: "profile",
Extension: "ocis-accounts",
Type: settings.Bundle_TYPE_DEFAULT,
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SYSTEM,
},
DisplayName: "Profile",
Settings: []*settings.Setting{
{
Id: settingUUIDProfileLanguage,
Name: "language",
DisplayName: "Language",
Description: "User language",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_USER,
},
Value: &languageSetting,
},
},
},
}
}
func generateProfilePermissionsRequests() []settings.AddSettingToBundleRequest {
// TODO: we don't want to set up permissions for settings manually in the future. Instead each setting should come with
// a set of default permissions for the default roles (guest, user, admin).
return []settings.AddSettingToBundleRequest{
{
BundleId: ssvc.BundleUUIDRoleAdmin,
Setting: &settings.Setting{
Id: "7d81f103-0488-4853-bce5-98dcce36d649",
Name: "language-readwrite",
DisplayName: "Permission to read and set the language (anyone)",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SETTING,
Id: settingUUIDProfileLanguage,
},
Value: &settings.Setting_PermissionValue{
PermissionValue: &settings.Permission{
Operation: settings.Permission_OPERATION_READWRITE,
Constraint: settings.Permission_CONSTRAINT_ALL,
},
},
},
},
{
BundleId: ssvc.BundleUUIDRoleUser,
Setting: &settings.Setting{
Id: "640e00d2-4df8-41bd-b1c2-9f30a01e0e99",
Name: "language-readwrite",
DisplayName: "Permission to read and set the language (self)",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SETTING,
Id: settingUUIDProfileLanguage,
},
Value: &settings.Setting_PermissionValue{
PermissionValue: &settings.Permission{
Operation: settings.Permission_OPERATION_READWRITE,
Constraint: settings.Permission_CONSTRAINT_OWN,
},
},
},
},
{
BundleId: ssvc.BundleUUIDRoleGuest,
Setting: &settings.Setting{
Id: "ca878636-8b1a-4fae-8282-8617a4c13597",
Name: "language-readwrite",
DisplayName: "Permission to read and set the language (self)",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SETTING,
Id: settingUUIDProfileLanguage,
},
Value: &settings.Setting_PermissionValue{
PermissionValue: &settings.Permission{
Operation: settings.Permission_OPERATION_READWRITE,
Constraint: settings.Permission_CONSTRAINT_OWN,
},
},
},
},
}
}

View File

@@ -9,13 +9,13 @@ import (
"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"
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"
@@ -107,7 +107,7 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Spec: &provider.Reference_Path{Path: path.Join("/meta", accountsFolder)},
Path: path.Join("/meta", accountsFolder),
},
})
if err != nil {
@@ -158,7 +158,7 @@ func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Spec: &provider.Reference_Path{Path: path.Join("/meta", accountsFolder, id)},
Path: path.Join("/meta", accountsFolder, id),
},
})
@@ -221,7 +221,7 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
ctx = metadata.AppendToOutgoingContext(ctx, token.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Spec: &provider.Reference_Path{Path: path.Join("/meta", groupsFolder)},
Path: path.Join("/meta", groupsFolder),
},
})
if err != nil {
@@ -272,7 +272,7 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Spec: &provider.Reference_Path{Path: path.Join("/meta", groupsFolder, id)},
Path: path.Join("/meta", groupsFolder, id),
},
})
@@ -298,21 +298,15 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
Id: &user.UserId{
OpaqueId: su.UUID,
},
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)),
},
},
},
Groups: []string{},
UidNumber: su.UID,
GidNumber: su.GID,
}
return tm.MintToken(ctx, u)
s, err := scope.GetOwnerScope()
if err != nil {
return
}
return tm.MintToken(ctx, u, s)
}
func (r CS3Repo) accountURL(id string) string {
@@ -330,7 +324,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{
Spec: &provider.Reference_Path{Path: path.Join("/meta", folder)},
Path: path.Join("/meta", folder),
}
resp, err := sp.Stat(ctx, &provider.StatRequest{

View File

@@ -0,0 +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"
"github.com/owncloud/ocis/ocis-pkg/log"
"go.opencensus.io/stats/view"
"go.opencensus.io/trace"
)
func Configure(cfg *config.Config, logger log.Logger) error {
if cfg.Tracing.Enabled {
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
}

View File

@@ -7,8 +7,9 @@ geekdocEditPath: edit/master/accounts/templates
geekdocFilePath: CONFIGURATION.tmpl
---
{{- define "options"}}
{{ $fnName := (last . ).Flags -}}
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $fnNames := (last . ).Flags -}}
{{ range $opt := first . }}
{{ range $fnName := $fnNames }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
@@ -17,6 +18,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end }}
{{`{{< toc >}}`}}

View File

@@ -1,7 +0,0 @@
// +build tools
package main
import (
_ "github.com/restic/calens"
)

View File

@@ -1,9 +1,15 @@
import 'regenerator-runtime/runtime'
import App from './components/App.vue'
import store from './store'
import translations from './../l10n/translations.json'
// just a dummy function to trick gettext tools
function $gettext (msg) {
return msg
}
const appInfo = {
name: 'Accounts',
name: $gettext('Accounts'),
id: 'accounts',
icon: 'text-vcard',
isFileEditor: false,
@@ -22,7 +28,7 @@ const routes = [
const navItems = [
{
name: 'Accounts',
name: $gettext('Accounts'),
iconMaterial: appInfo.icon,
route: {
name: 'accounts',
@@ -36,5 +42,6 @@ export default {
appInfo,
routes,
navItems,
store
store,
translations
}

View File

@@ -1,7 +1,10 @@
<template>
<div>
<div class="uk-flex uk-flex-column uk-height-1-1" id="accounts-app">
<main class="uk-flex uk-flex-column uk-height-1-1" id="accounts-app">
<template v-if="isInitialized">
<h1 class="oc-invisible-sr">
<translate>Accounts</translate>
</h1>
<div class="oc-app-bar">
<accounts-batch-actions
v-if="isAnyAccountSelected"
@@ -23,7 +26,7 @@
</oc-alert>
</template>
<oc-loader id="accounts-list-loader" v-else />
</div>
</main>
</div>
</template>
@@ -55,17 +58,3 @@ export default {
}
}
</script>
<style>
/* TODO: After https://github.com/owncloud/owncloud-design-system/pull/418 gets merged
there won't be an extra span and this won't be needed anymore */
.accounts-selection-actions-btn > span {
display: flex;
align-items: center;
}
/* TODO: Adjust in ODS */
.oc-dropdown-menu {
width: 150px;
}
</style>

View File

@@ -3,20 +3,20 @@
<span v-text="selectionInfoText" />
<span>|</span>
<div>
<oc-button v-text="$gettext('Clear selection')" variation="raw" @click="RESET_ACCOUNTS_SELECTION" />
<oc-button v-text="$gettext('Clear selection')" appearance="raw" @click="RESET_ACCOUNTS_SELECTION" />
</div>
<oc-grid gutter="small" id="accounts-batch-actions">
<div v-for="action in actions" :key="action.label">
<oc-alert v-if="isConfirmationInProgress[action.id]" :variation="action.confirmation.variation || 'default'" noClose class="uk-flex uk-flex-middle tmp-alert-fixes">
<div v-if="isConfirmationInProgress[action.id]" :variation="action.confirmation.variation || 'primary'" noClose class="uk-flex uk-flex-middle tmp-alert-fixes">
<span>{{ action.confirmation.message }}</span>
<oc-button size="small" :id="action.confirmation.cancel.id" @click="action.confirmation.cancel.handler" :variation="action.confirmation.cancel.variation || 'default'">
<oc-button :id="action.confirmation.cancel.id" @click="action.confirmation.cancel.handler" :variation="action.confirmation.cancel.variation || 'passive'">
{{ action.confirmation.cancel.label }}
</oc-button>
<oc-button size="small" :id="action.confirmation.confirm.id" @click="action.confirmation.confirm.handler" :variation="action.confirmation.confirm.variation || 'default'">
<oc-button :id="action.confirmation.confirm.id" @click="action.confirmation.confirm.handler" :variation="action.confirmation.confirm.variation || 'primary'">
{{ action.confirmation.confirm.label }}
</oc-button>
</oc-alert>
<oc-button v-else :id="action.id" @click="action.handler" :variation="action.variation || 'default'" :icon="action.icon">
</div>
<oc-button v-else :id="action.id" @click="action.handler" :variation="action.variation || 'primary'" :icon="action.icon">
{{ action.label }}
</oc-button>
</div>
@@ -78,6 +78,7 @@ export default {
id: idDeleteAction,
label: this.$gettext('Delete'),
icon: 'delete',
variation: 'danger',
handler: () => this.showConfirmationRequest(idDeleteAction),
confirmation: {
variation: 'danger',
@@ -89,7 +90,6 @@ export default {
cancel: {
id: 'accounts-batch-action-delete-cancel',
label: this.$gettext('Cancel'),
variation: 'secondary',
handler: () => this.hideConfirmationRequest(idDeleteAction)
},
confirm: {
@@ -119,13 +119,9 @@ export default {
<style lang="scss" scoped>
.tmp-alert-fixes {
padding: 4px 11px 5px !important;
border-radius: 3px !important;
background-color: #fff !important;
border: 1px solid rgb(224, 0, 0) !important;
color: rgb(224, 0, 0) !important;
font-size: 1.1rem !important;
font-size: 1.125rem !important;
font-weight: 600 !important;
line-height: 1.4 !important;
}

View File

@@ -1,50 +1,45 @@
<template>
<div>
<oc-grid v-if="isFormInProgress" gutter="small">
<label>
<oc-text-input
id="accounts-new-account-input-username"
type="text"
v-model="formData.username"
:error-message="formValidation.usernameError"
:placeholder="$gettext('Username')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
</label>
<label>
<oc-text-input
id="accounts-new-account-input-email"
type="email"
v-model="formData.email"
:error-message="formValidation.emailError"
:placeholder="$gettext('Email')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
</label>
<label>
<oc-text-input
id="accounts-new-account-input-password"
type="password"
v-model="formData.password"
:error-message="formValidation.passwordError"
:placeholder="$gettext('Password')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
</label>
<div>
<oc-text-input
id="accounts-new-account-input-username"
type="text"
v-model="formData.username"
:error-message="formValidation.usernameError"
:label="$gettext('Username')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
<oc-text-input
id="accounts-new-account-input-email"
type="email"
v-model="formData.email"
:error-message="formValidation.emailError"
:label="$gettext('Email')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
<oc-text-input
id="accounts-new-account-input-password"
type="password"
v-model="formData.password"
:error-message="formValidation.passwordError"
:label="$gettext('Password')"
:disabled="isRequestInProgress"
@keydown.enter="createAccount"
/>
<div class="uk-flex">
<oc-button
class="oc-mr-s oc-mb-s"
v-text="$gettext('Cancel')"
@click="cancelForm"
:disabled="isRequestInProgress"
/>
</div>
<div>
<oc-button
id="accounts-new-account-button-confirm"
class="oc-mr-s oc-mb-s"
variation="primary"
appearance="filled"
:disabled="isRequestInProgress"
@click="createAccount"
gap-size="small"
@@ -66,6 +61,7 @@
id="accounts-new-account-trigger"
key="create-accounts-button"
variation="primary"
appearance="filled"
gap-size="small"
@click="setFormInProgress(true)"
>
@@ -194,9 +190,3 @@ export default {
align-items: center;
}
</style>
<style scoped>
.border-ods-tmp-fix {
/* TODO: somehow the primary button receives a 2px border-width. remove it until we fix it in ODS. */
border-width: 0 !important;
}
</style>

View File

@@ -2,7 +2,7 @@
<div>
<oc-table-simple id="accounts-user-list">
<oc-thead>
<oc-tr class="fix-table-header">
<oc-tr>
<oc-th shrink type="head" align-h="center">
<oc-checkbox
class="oc-ml-s"
@@ -58,9 +58,3 @@ export default {
}
}
</script>
<style scoped>
.fix-table-header > th {
text-transform: none;
}
</style>

View File

@@ -18,7 +18,7 @@
<oc-td v-text="account.displayName || '-'" />
<oc-td v-text="account.mail" />
<oc-td>
<oc-button :id="`accounts-roles-select-trigger-${account.id}`" class="accounts-roles-select-trigger" variation="raw">
<oc-button :id="`accounts-roles-select-trigger-${account.id}`" class="accounts-roles-select-trigger" appearance="outline">
<span class="uk-flex uk-flex-middle accounts-roles-current-role">
{{ currentRole ? currentRole.displayName : $gettext('Select role') }}
<oc-icon name="expand_more" aria-hidden="true" />

16
accounts/ui/dictionary.js Normal file
View File

@@ -0,0 +1,16 @@
/**
* This file contains strings that should be synced to transifex but not exist in the UI directly,
* moreover, they get loaded for example by API requests
*/
// just a dummy function to trick gettext tools
function $gettext (msg) {
return msg
}
// eslint-disable-next-line no-unused-vars
const dictionary = [
$gettext('Guest'),
$gettext('Admin'),
$gettext('User')
]

View File

@@ -119,7 +119,7 @@ module.exports = {
locateStrategy: 'xpath'
},
roleInRolesDropdown: {
selector: '//label[contains(@class, "accounts-roles-dropdown-role")]/span[normalize-space()="%s"]',
selector: '//span[contains(@class, "accounts-roles-dropdown-role")]/label[normalize-space()="%s"]',
locateStrategy: 'xpath'
},
rolesDropdownTrigger: {

View File

@@ -29,9 +29,9 @@ trap clean_up SIGHUP SIGINT SIGTERM
if [ -z "$TEST_INFRA_DIRECTORY" ]
then
cleanup=true
testFolder=$(< /dev/urandom LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
testFolder=$(mktemp -d -p .)
printf "creating folder $testFolder for Test infrastructure setup\n\n"
export TEST_INFRA_DIRECTORY=$testFolder
export TEST_INFRA_DIRECTORY=$testFolder/tests
fi
clean_up() {
@@ -46,11 +46,10 @@ clean_up() {
trap clean_up SIGHUP SIGINT SIGTERM EXIT
cp -r "$WEB_PATH"/tests ./"$testFolder"
cp -r "$WEB_PATH"/tests "$testFolder"
export SERVER_HOST=${SERVER_HOST:-https://localhost:9200}
export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200}
export RUN_ON_OCIS='true'
export TEST_TAGS=${TEST_TAGS:-"not @skip"}
yarn run acceptance-tests "$1"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
Bugfix: Purposely delay accounts service startup
As it turns out the race condition between `accounts <-> storage-metadata` still remains. This PR is a hotfix, and it should be followed up with a proper fix. Either:
- block the accounts' initialization until the storage metadata is ready (using the registry) or
- allow the accounts service to initialize and use a message broker to signal the accounts the metadata storage is ready to receive requests.
https://github.com/owncloud/ocis/pull/1734

View File

@@ -0,0 +1,5 @@
Bugfix: Add missing gateway config
The auth provider `ldap` and `oidc` drivers now need to be able talk to the reva gateway. We added the `gatewayscv` to the config that is passed to reva.
https://github.com/owncloud/ocis/pull/1716

View File

@@ -0,0 +1,11 @@
Bugfix: Fix accounts initialization
Originally the accounts service relies on both the `settings` and `storage-metadata` to be up and running at the moment it starts. This is an antipattern as it will cause the entire service to panic if the dependants are not present.
We inverted this dependency and moved the default initialization data (i.e: creating roles, permissions, settings bundles) and instead of notifying the settings service that the account has to provide with such options, the settings is instead initialized with the options the accounts rely on. Essentially saving bandwith as there is no longer a gRPC call to the settings service.
For the `storage-metadata` a retry mechanism was added that retries by default 20 times to fetch the `com.owncloud.storage.metadata` from the service registry every `500` miliseconds. If this retry expires the accounts panics, as its dependency on the `storage-metadata` service cannot be resolved.
We also introduced a client wrapper that acts as middleware between a client and a server. For more information on how it works further read [here](https://github.com/sony/gobreaker)
https://github.com/owncloud/ocis/pull/1696

View File

@@ -0,0 +1,5 @@
Enhancement: Remove the JWT from the log
We were logging the JWT in some places. Secrets should not be exposed in logs so it got removed.
https://github.com/owncloud/ocis/pull/1758

View File

@@ -0,0 +1,6 @@
Enhancement: Update reva to v1.6.1-0.20210223065028-53f39499762e
* quota querying and tree accounting [cs3org/reva#1405](https://github.com/cs3org/reva/pull/1405)
https://github.com/owncloud/ocis/pull/1683
https://github.com/cs3org/reva/pull/1405

View File

@@ -0,0 +1,8 @@
Change: Update ownCloud Web to v2.0.2
Tags: web
We updated ownCloud Web to v2.0.2. Please refer to the changelog (linked) for details on the web release.
https://github.com/owncloud/ocis/pull/1776
https://github.com/owncloud/web/releases/tag/v2.0.2

View File

@@ -0,0 +1,4 @@
Enhancement: Add focus to input elements on login page
https://github.com/owncloud/ocis/pull/1792
https://github.com/owncloud/web/issues/4322

View File

@@ -0,0 +1,5 @@
Enhancement: Improve accessibility to input elements on login page
https://github.com/owncloud/ocis/pull/1794
https://github.com/owncloud/ocis/pull/1811
https://github.com/owncloud/web/issues/4319

View File

@@ -0,0 +1,8 @@
Enhancement: Add new build targets
Make build target `build` used to build a binary twice, the second occurrence having symbols for debugging. We split this step in two and added `build-all` and `build-debug` targets.
- `build-all` now behaves as the previous `build` target, it will generate 2 binaries, one for debug.
- `build-debug` will build a single binary for debugging.
https://github.com/owncloud/ocis/pull/1824

View File

@@ -0,0 +1,10 @@
Enhancement: clarify expected failures
Some features, while covered by the ownCloud 10 acceptance tests, will not be implmented for now:
- blacklisted / ignored files, because ocis does not need to blacklist `.htaccess` files
- `OC-LazyOps` support was [removed from the clients](https://github.com/owncloud/client/pull/8398). We are thinking about [a state machine for uploads to properly solve that scenario and also list the state of files in progress in the web ui](https://github.com/owncloud/ocis/issues/214).
The expected failures files now have a dedicated _Won't fix_ section for these items.
https://github.com/owncloud/ocis/pull/1790
https://github.com/owncloud/client/pull/8398
https://github.com/owncloud/ocis/issues/214

View File

@@ -0,0 +1,3 @@
Enhancement: Replace special character in login page title with a regular minus
https://github.com/owncloud/ocis/pull/1813

View File

@@ -0,0 +1,6 @@
Bugfix: Fix thumbnail generation for jpegs
Images with the extension `.jpeg` were not properly supported.
https://github.com/owncloud/ocis/pull/1785
https://github.com/owncloud/ocis/issues/1490

View File

@@ -0,0 +1,9 @@
Enhancement: File Logging
When running supervised, support for configuring all logs to a single log file:
`OCIS_LOG_FILE=/Users/foo/bar/ocis.log MICRO_REGISTRY=etcd bin/ocis server`
Supports directing log from single extensions to a log file:
`PROXY_LOG_FILE=/Users/foo/bar/proxy.log MICRO_REGISTRY=etcd bin/ocis proxy`
https://github.com/owncloud/ocis/pull/1816

View File

@@ -0,0 +1,17 @@
Enhancement: Runtime Hostname and Port are now configurable
Without any configuration the ocis runtime will start on `localhost:9250` unless specified otherwise. Usage:
- `OCIS_RUNTIME_PORT=6061 bin/ocis server`
- overrides the oCIS runtime and starts on port 6061
- `OCIS_RUNTIME_PORT=6061 bin/ocis list`
- lists running extensions for the runtime on `localhost:6061`
All subcommands are updated and expected to work with the following environment variables:
```
OCIS_RUNTIME_HOST
OCIS_RUNTIME_PORT
```
https://github.com/owncloud/ocis/pull/1822

View File

@@ -0,0 +1,5 @@
Enhancement: Generate thumbnails for .gif files
Added support for gifs to the thumbnails service.
https://github.com/owncloud/ocis/pull/1791

View File

@@ -0,0 +1,5 @@
Enhancement: Tracing Refactor
Centralize tracing handling per extension.
https://github.com/owncloud/ocis/pull/1819

View File

@@ -0,0 +1,11 @@
Enhancement: Update reva to v1.6.1-0.20210326165326-e8a00d9b2368
* quota querying and tree accounting [cs3org/reva#1405](https://github.com/cs3org/reva/pull/1405)
* Fix webdav file versions endpoint bugs [cs3org/reva#1526](https://github.com/cs3org/reva/pull/1526)
* Fix etag changing only once a second [cs3org/reva#1576](https://github.com/cs3org/reva/pull/1576)
* Trashbin API parity [cs3org/reva#1552](https://github.com/cs3org/reva/pull/1552)
* Signature authentication for public links [cs3org/reva#1590](https://github.com/cs3org/reva/pull/1590)
https://github.com/owncloud/ocis/pull/1683
https://github.com/cs3org/reva/pull/1405
https://github.com/owncloud/ocis/pull/1861

View File

@@ -0,0 +1,8 @@
Change: Update ownCloud Web to v2.1.0
Tags: web
We updated ownCloud Web to v2.1.0. Please refer to the changelog (linked) for details on the web release.
https://github.com/owncloud/ocis/pull/1870
https://github.com/owncloud/web/releases/tag/v2.1.0

Some files were not shown because too many files have changed in this diff Show More