Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
203f4ed4f0 |
No files matched your search
@@ -47,6 +47,12 @@ $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.43.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.43.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
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.91.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.
|
||||
@@ -100,3 +106,4 @@ $(REFLEX): $(BINGO_DIR)/reflex.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/reflex-v0.3.1"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.1 "github.com/cespare/reflex"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/mitchellh/gox v1.0.1
|
||||
@@ -0,0 +1,6 @@
|
||||
github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8=
|
||||
github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI=
|
||||
github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
|
||||
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
@@ -18,6 +18,8 @@ CALENS="${GOBIN}/calens-v0.2.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.43.0"
|
||||
|
||||
GOX="${GOBIN}/gox-v1.0.1"
|
||||
|
||||
HUGO="${GOBIN}/hugo-v0.91.0"
|
||||
|
||||
MOCKERY="${GOBIN}/mockery-v2.9.4"
|
||||
@@ -35,3 +37,4 @@ PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20211219183901-997c02ca
|
||||
PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.7.2"
|
||||
|
||||
REFLEX="${GOBIN}/reflex-v0.3.1"
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
# The test runner source for API tests
|
||||
CORE_COMMITID=df1a1eb2816775fe9c202c50ec8e8a1e01ecb256
|
||||
CORE_COMMITID=20bf0ed4f460b55c68e10fbdfeeaa98284ee0a01
|
||||
CORE_BRANCH=master
|
||||
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=80d9bb6962cb034dc861116f59ae25f39fb3a52c
|
||||
WEB_BRANCH=no-shares-folder
|
||||
WEB_COMMITID=905b4e342db0202cdbaa8c21096bf87f179b25f6
|
||||
WEB_BRANCH=master
|
||||
+62
-83
@@ -2,48 +2,20 @@
|
||||
"""
|
||||
|
||||
# images
|
||||
ALPINE_GIT = "alpine/git:latest"
|
||||
CHKO_DOCKER_PUSHRM = "chko/docker-pushrm:1"
|
||||
DRONE_CLI = "drone/cli:alpine"
|
||||
MARIADB = "mariadb:10.6"
|
||||
MELTWATER_DRONE_CACHE = "meltwater/drone-cache:v1"
|
||||
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
|
||||
OC_CI_ALPINE = "owncloudci/alpine:latest"
|
||||
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier:latest"
|
||||
OC_CI_DRONE_ANSIBLE = "owncloudci/drone-ansible:latest"
|
||||
OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS = "owncloudci/drone-cancel-previous-builds"
|
||||
OC_CI_DRONE_SKIP_PIPELINE = "owncloudci/drone-skip-pipeline"
|
||||
OC_CI_GOLANG = "owncloudci/golang:1.17"
|
||||
OC_CI_NODEJS = "owncloudci/nodejs:%s"
|
||||
OC_CI_PHP = "owncloudci/php:%s"
|
||||
OC_CI_NODEJS = "owncloudci/nodejs:14"
|
||||
OC_CI_PHP = "owncloudci/php:7.4"
|
||||
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
|
||||
OC_OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.3.1"
|
||||
OC_SERVER = "owncloud/server:10"
|
||||
OC_UBUNTU = "owncloud/ubuntu:18.04"
|
||||
OSIXIA_OPEN_LDAP = "osixia/openldap:latest"
|
||||
PLUGINS_CODACY = "plugins/codacy:1"
|
||||
PLUGINS_DOCKER = "plugins/docker:latest"
|
||||
PLUGINS_DOWNSTREAM = "plugins/downstream:latest"
|
||||
PLUGINS_GH_PAGES = "plugins/gh-pages:1"
|
||||
PLUGINS_GITHUB_RELEASE = "plugins/github-release:1"
|
||||
PLUGINS_GIT_ACTION = "plugins/git-action:1"
|
||||
PLUGINS_MANIFEST = "plugins/manifest:1"
|
||||
PLUGINS_S3 = "plugins/s3:latest"
|
||||
PLUGINS_SLACK = "plugins/slack:1"
|
||||
OC_TESTING_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.3.1"
|
||||
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
|
||||
REDIS = "redis:6-alpine"
|
||||
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59"
|
||||
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:latest"
|
||||
THEGEEKLAB_DRONE_GITHUB_COMMENT = "thegeeklab/drone-github-comment:1"
|
||||
|
||||
DEFAULT_PHP_VERSION = "7.4"
|
||||
DEFAULT_NODEJS_VERSION = "14"
|
||||
|
||||
# configuration
|
||||
config = {
|
||||
"modules": [
|
||||
# if you add a module here please also add it to the root level Makefile
|
||||
"accounts",
|
||||
"audit",
|
||||
"glauth",
|
||||
"graph-explorer",
|
||||
"graph",
|
||||
@@ -245,7 +217,7 @@ def cancelPreviousBuilds():
|
||||
},
|
||||
"steps": [{
|
||||
"name": "cancel-previous-builds",
|
||||
"image": OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS,
|
||||
"image": "owncloudci/drone-cancel-previous-builds",
|
||||
"settings": {
|
||||
"DRONE_TOKEN": {
|
||||
"from_secret": "drone_token",
|
||||
@@ -309,7 +281,7 @@ def testOcisModule(ctx, module):
|
||||
},
|
||||
{
|
||||
"name": "scan-result-cache",
|
||||
"image": PLUGINS_S3,
|
||||
"image": "plugins/s3:latest",
|
||||
"settings": {
|
||||
"endpoint": {
|
||||
"from_secret": "cache_s3_endpoint",
|
||||
@@ -406,7 +378,7 @@ def uploadScanResults(ctx):
|
||||
"steps": [
|
||||
{
|
||||
"name": "clone",
|
||||
"image": ALPINE_GIT,
|
||||
"image": "alpine/git:latest",
|
||||
"commands": [
|
||||
# Always use the owncloud/ocis repository as base to have an up to date default branch.
|
||||
# This is needed for the skipIfUnchanged step, since it references a commit on master (which could be absent on a fork)
|
||||
@@ -432,7 +404,7 @@ def uploadScanResults(ctx):
|
||||
},
|
||||
{
|
||||
"name": "codacy",
|
||||
"image": PLUGINS_CODACY,
|
||||
"image": "plugins/codacy:1",
|
||||
"settings": {
|
||||
"token": {
|
||||
"from_secret": "codacy_token",
|
||||
@@ -441,7 +413,7 @@ def uploadScanResults(ctx):
|
||||
},
|
||||
{
|
||||
"name": "sonarcloud",
|
||||
"image": SONARSOURCE_SONAR_SCANNER_CLI,
|
||||
"image": "sonarsource/sonar-scanner-cli:latest",
|
||||
"environment": sonar_env,
|
||||
},
|
||||
{
|
||||
@@ -482,7 +454,7 @@ def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
|
||||
cloneCoreRepos() + [
|
||||
{
|
||||
"name": "localApiTests-%s-%s" % (suite, storage),
|
||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||
"image": OC_CI_PHP,
|
||||
"environment": {
|
||||
"TEST_SERVER_URL": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
|
||||
@@ -531,7 +503,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
|
||||
cloneCoreRepos() + [
|
||||
{
|
||||
"name": "oC10ApiTests-%s-storage-%s" % (storage, part_number),
|
||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||
"image": OC_CI_PHP,
|
||||
"environment": {
|
||||
"TEST_SERVER_URL": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
|
||||
@@ -641,7 +613,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "webUITests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"image": OC_CI_NODEJS,
|
||||
"environment": {
|
||||
"SERVER_HOST": "https://ocis-server:9200",
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
@@ -700,7 +672,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "WebUIAcceptanceTests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"image": OC_CI_NODEJS,
|
||||
"environment": {
|
||||
"SERVER_HOST": "https://ocis-server:9200",
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
@@ -764,7 +736,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "WebUIAcceptanceTests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"image": OC_CI_NODEJS,
|
||||
"environment": {
|
||||
"SERVER_HOST": "https://ocis-server:9200",
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
@@ -800,7 +772,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"services": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": REDIS,
|
||||
"image": "redis:6-alpine",
|
||||
},
|
||||
] + selenium() + middlewareService(),
|
||||
"volumes": [stepVolumeOC10Tests] +
|
||||
@@ -835,7 +807,7 @@ def failEarly(ctx, early_fail):
|
||||
return [
|
||||
{
|
||||
"name": "github-comment",
|
||||
"image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
|
||||
"image": "thegeeklab/drone-github-comment:1",
|
||||
"settings": {
|
||||
"message": ":boom: Acceptance test [<strong>${DRONE_STAGE_NAME}</strong>](${DRONE_BUILD_LINK}/${DRONE_STAGE_NUMBER}/1) failed. Further test are cancelled...",
|
||||
"key": "pr-${DRONE_PULL_REQUEST}", #TODO: we could delete the comment after a successful CI run
|
||||
@@ -855,7 +827,7 @@ def failEarly(ctx, early_fail):
|
||||
},
|
||||
{
|
||||
"name": "stop-build",
|
||||
"image": DRONE_CLI,
|
||||
"image": "drone/cli:alpine",
|
||||
# # https://github.com/drone/runner-go/blob/0bd0f8fc31c489817572060d17c6e24aaa487470/pipeline/runtime/const.go#L95-L102
|
||||
# "failure": "fail-fast",
|
||||
# would be an alternative, but is currently broken
|
||||
@@ -922,7 +894,7 @@ def dockerRelease(ctx, arch):
|
||||
},
|
||||
{
|
||||
"name": "dryrun",
|
||||
"image": PLUGINS_DOCKER,
|
||||
"image": "plugins/docker:latest",
|
||||
"settings": {
|
||||
"dry_run": True,
|
||||
"context": "ocis",
|
||||
@@ -941,7 +913,7 @@ def dockerRelease(ctx, arch):
|
||||
},
|
||||
{
|
||||
"name": "docker",
|
||||
"image": PLUGINS_DOCKER,
|
||||
"image": "plugins/docker:latest",
|
||||
"settings": {
|
||||
"username": {
|
||||
"from_secret": "docker_username",
|
||||
@@ -984,16 +956,11 @@ def binaryReleases(ctx):
|
||||
return pipelines
|
||||
|
||||
def binaryRelease(ctx, name):
|
||||
# uploads binary to https://download.owncloud.com/ocis/ocis/daily/
|
||||
target = "/ocis/%s/daily" % (ctx.repo.name.replace("ocis-", ""))
|
||||
# uploads binary to https://download.owncloud.com/ocis/ocis/testing/
|
||||
target = "/ocis/%s/testing" % (ctx.repo.name.replace("ocis-", ""))
|
||||
if ctx.build.event == "tag":
|
||||
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
|
||||
folder = "stable"
|
||||
buildref = ctx.build.ref.replace("refs/tags/v", "")
|
||||
buildref = buildref.lower()
|
||||
if buildref.find("-") != -1: # "x.x.x-alpha", "x.x.x-beta", "x.x.x-rc"
|
||||
folder = "testing"
|
||||
target = "/ocis/%s/%s/%s" % (ctx.repo.name.replace("ocis-", ""), folder, buildref)
|
||||
target = "/ocis/%s/%s" % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", ""))
|
||||
|
||||
settings = {
|
||||
"endpoint": {
|
||||
@@ -1047,7 +1014,7 @@ def binaryRelease(ctx, name):
|
||||
},
|
||||
{
|
||||
"name": "upload",
|
||||
"image": PLUGINS_S3,
|
||||
"image": "plugins/s3:latest",
|
||||
"settings": settings,
|
||||
"when": {
|
||||
"ref": [
|
||||
@@ -1070,7 +1037,7 @@ def binaryRelease(ctx, name):
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"image": PLUGINS_GITHUB_RELEASE,
|
||||
"image": "plugins/github-release:1",
|
||||
"settings": {
|
||||
"api_key": {
|
||||
"from_secret": "github_token",
|
||||
@@ -1117,7 +1084,7 @@ def releaseSubmodule(ctx):
|
||||
"steps": [
|
||||
{
|
||||
"name": "release-submodule",
|
||||
"image": PLUGINS_GITHUB_RELEASE,
|
||||
"image": "plugins/github-release:1",
|
||||
"settings": {
|
||||
"api_key": {
|
||||
"from_secret": "github_token",
|
||||
@@ -1156,7 +1123,7 @@ def releaseDockerManifest(ctx):
|
||||
"steps": [
|
||||
{
|
||||
"name": "execute",
|
||||
"image": PLUGINS_MANIFEST,
|
||||
"image": "plugins/manifest:1",
|
||||
"settings": {
|
||||
"username": {
|
||||
"from_secret": "docker_username",
|
||||
@@ -1211,7 +1178,7 @@ def changelog(ctx):
|
||||
},
|
||||
{
|
||||
"name": "publish",
|
||||
"image": PLUGINS_GIT_ACTION,
|
||||
"image": "plugins/git-action:1",
|
||||
"settings": {
|
||||
"actions": [
|
||||
"commit",
|
||||
@@ -1258,7 +1225,7 @@ def releaseDockerReadme(ctx):
|
||||
"steps": [
|
||||
{
|
||||
"name": "execute",
|
||||
"image": CHKO_DOCKER_PUSHRM,
|
||||
"image": "chko/docker-pushrm:1",
|
||||
"environment": {
|
||||
"DOCKER_USER": {
|
||||
"from_secret": "docker_username",
|
||||
@@ -1293,7 +1260,7 @@ def docs(ctx):
|
||||
{
|
||||
"name": "docs-generate",
|
||||
"image": OC_CI_GOLANG,
|
||||
"commands": ["make -C docs docs-generate"],
|
||||
"commands": ["make -C %s docs-generate" % (module) for module in config["modules"]],
|
||||
},
|
||||
{
|
||||
"name": "prepare",
|
||||
@@ -1311,7 +1278,7 @@ def docs(ctx):
|
||||
},
|
||||
{
|
||||
"name": "publish",
|
||||
"image": PLUGINS_GH_PAGES,
|
||||
"image": "plugins/gh-pages:1",
|
||||
"settings": {
|
||||
"username": {
|
||||
"from_secret": "github_username",
|
||||
@@ -1340,7 +1307,7 @@ def docs(ctx):
|
||||
},
|
||||
{
|
||||
"name": "downstream",
|
||||
"image": PLUGINS_DOWNSTREAM,
|
||||
"image": "plugins/downstream:latest",
|
||||
"settings": {
|
||||
"server": "https://drone.owncloud.com/",
|
||||
"token": {
|
||||
@@ -1375,7 +1342,7 @@ def makeNodeGenerate(module):
|
||||
return [
|
||||
{
|
||||
"name": "generate nodejs",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"image": OC_CI_NODEJS,
|
||||
"commands": [
|
||||
"%s ci-node-generate" % (make),
|
||||
],
|
||||
@@ -1410,7 +1377,7 @@ def notify(ctx):
|
||||
"steps": [
|
||||
{
|
||||
"name": "notify-rocketchat",
|
||||
"image": PLUGINS_SLACK,
|
||||
"image": "plugins/slack:1",
|
||||
"settings": {
|
||||
"webhook": {
|
||||
"from_secret": config["rocketchat"]["from_secret"],
|
||||
@@ -1454,7 +1421,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
user = "33:33"
|
||||
environment = {
|
||||
# Keycloak IDP specific configuration
|
||||
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realms/owncloud",
|
||||
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realmsowncloud",
|
||||
"WEB_OIDC_AUTHORITY": "https://keycloak/auth/realms/owncloud",
|
||||
"WEB_OIDC_CLIENT_ID": "ocis-web",
|
||||
"WEB_OIDC_METADATA_URL": "https://keycloak/auth/realms/owncloud/.well-known/openid-configuration",
|
||||
@@ -1553,7 +1520,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
},
|
||||
{
|
||||
"name": "wait-for-ocis-server",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"image": "owncloudci/wait-for:latest",
|
||||
"commands": [
|
||||
"wait-for -it ocis-server:9200 -t 300",
|
||||
],
|
||||
@@ -1564,7 +1531,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
def middlewareService():
|
||||
return [{
|
||||
"name": "middleware",
|
||||
"image": OC_OC_TEST_MIDDLEWARE,
|
||||
"image": OC_TESTING_MIDDLEWARE,
|
||||
"environment": {
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/storage/owncloud/",
|
||||
@@ -1626,7 +1593,7 @@ def selenium():
|
||||
return [
|
||||
{
|
||||
"name": "selenium",
|
||||
"image": SELENIUM_STANDALONE_CHROME_DEBUG,
|
||||
"image": "selenium/standalone-chrome-debug:3.141.59",
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"path": "/uploads",
|
||||
@@ -1686,7 +1653,8 @@ def skipIfUnchanged(ctx, type):
|
||||
|
||||
return [{
|
||||
"name": "skip-if-unchanged",
|
||||
"image": OC_CI_DRONE_SKIP_PIPELINE,
|
||||
"image": "owncloudci/drone-skip-pipeline",
|
||||
"pull": "always",
|
||||
"settings": {
|
||||
"ALLOW_SKIP_CHANGED": skip,
|
||||
},
|
||||
@@ -1706,7 +1674,6 @@ def example_deploys(ctx):
|
||||
"ocis_hello/latest.yml",
|
||||
"ocis_s3/latest.yml",
|
||||
"oc10_ocis_parallel/latest.yml",
|
||||
"ocis_individual_services/latest.yml",
|
||||
]
|
||||
released_configs = [
|
||||
"ocis_ldap/released.yml",
|
||||
@@ -1745,7 +1712,7 @@ def deploy(ctx, config, rebuild):
|
||||
"steps": [
|
||||
{
|
||||
"name": "clone continuous deployment playbook",
|
||||
"image": ALPINE_GIT,
|
||||
"image": "alpine/git:latest",
|
||||
"commands": [
|
||||
"cd deployments/continuous-deployment-config",
|
||||
"git clone https://github.com/owncloud-devops/continuous-deployment.git",
|
||||
@@ -1753,7 +1720,7 @@ def deploy(ctx, config, rebuild):
|
||||
},
|
||||
{
|
||||
"name": "deploy",
|
||||
"image": OC_CI_DRONE_ANSIBLE,
|
||||
"image": "owncloudci/drone-ansible:latest",
|
||||
"failure": "ignore",
|
||||
"environment": {
|
||||
"CONTINUOUS_DEPLOY_SERVERS_CONFIG": "../%s" % (config),
|
||||
@@ -1792,14 +1759,14 @@ def checkStarlark():
|
||||
"steps": [
|
||||
{
|
||||
"name": "format-check-starlark",
|
||||
"image": OC_CI_BAZEL_BUILDIFIER,
|
||||
"image": "owncloudci/bazel-buildifier:latest",
|
||||
"commands": [
|
||||
"buildifier --mode=check .drone.star",
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "show-diff",
|
||||
"image": OC_CI_BAZEL_BUILDIFIER,
|
||||
"image": "owncloudci/bazel-buildifier:latest",
|
||||
"commands": [
|
||||
"buildifier --mode=fix .drone.star",
|
||||
"git diff",
|
||||
@@ -1831,7 +1798,7 @@ def genericCache(name, action, mounts, cache_key):
|
||||
|
||||
step = {
|
||||
"name": "%s_%s" % (action, name),
|
||||
"image": MELTWATER_DRONE_CACHE,
|
||||
"image": "meltwater/drone-cache:v1",
|
||||
"environment": {
|
||||
"AWS_ACCESS_KEY_ID": {
|
||||
"from_secret": "cache_s3_access_key",
|
||||
@@ -1980,6 +1947,12 @@ def pipelineSanityChecks(ctx, pipelines):
|
||||
"""Parallel Deployment configs
|
||||
"""
|
||||
|
||||
#images
|
||||
OC_OC10 = "owncloud/server:10"
|
||||
OC_UBUNTU = "owncloud/ubuntu:18.04"
|
||||
MARIADB = "mariadb:10.6"
|
||||
OSIXIA_OPENLDAP = "osixia/openldap:latest"
|
||||
|
||||
# configs
|
||||
OCIS_URL = "https://ocis-server:9200"
|
||||
OCIS_DOMAIN = "ocis-server:9200"
|
||||
@@ -2144,7 +2117,7 @@ def parallelAcceptance(env):
|
||||
|
||||
return [{
|
||||
"name": "acceptance-tests",
|
||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||
"image": OC_CI_PHP,
|
||||
"environment": environment,
|
||||
"commands": [
|
||||
"make test-paralleldeployment-api",
|
||||
@@ -2161,7 +2134,8 @@ def parallelDeploymentOC10Server():
|
||||
return [
|
||||
{
|
||||
"name": "oc10",
|
||||
"image": OC_SERVER,
|
||||
"image": OC_OC10,
|
||||
"pull": "always",
|
||||
"detach": True,
|
||||
"environment": {
|
||||
# can be switched to "web"
|
||||
@@ -2229,7 +2203,8 @@ def parallelDeploymentOC10Server():
|
||||
def ldapService():
|
||||
return [{
|
||||
"name": "openldap",
|
||||
"image": OSIXIA_OPEN_LDAP,
|
||||
"image": OSIXIA_OPENLDAP,
|
||||
"pull": "always",
|
||||
"environment": {
|
||||
"LDAP_TLS_VERIFY_CLIENT": "never",
|
||||
"LDAP_DOMAIN": "owncloud.com",
|
||||
@@ -2251,6 +2226,7 @@ def oc10DbService():
|
||||
{
|
||||
"name": "oc10-db",
|
||||
"image": MARIADB,
|
||||
"pull": "always",
|
||||
"environment": {
|
||||
"MYSQL_ROOT_PASSWORD": "owncloud",
|
||||
"MYSQL_USER": "owncloud",
|
||||
@@ -2268,11 +2244,12 @@ def oc10DbService():
|
||||
def copyConfigs():
|
||||
return [{
|
||||
"name": "copy-configs",
|
||||
"image": OC_SERVER,
|
||||
"image": OC_OC10,
|
||||
"pull": "always",
|
||||
"commands": [
|
||||
# ocis proxy config
|
||||
"mkdir -p /etc/ocis",
|
||||
"cp %s/ocis/proxy.yaml /etc/ocis/proxy.yaml" % (PARALLEL_DEPLOY_CONFIG_PATH),
|
||||
"cp %s/ocis/proxy.json /etc/ocis/proxy.json" % (PARALLEL_DEPLOY_CONFIG_PATH),
|
||||
# oc10 configs
|
||||
"mkdir -p /etc/templates",
|
||||
"mkdir -p /etc/pre_server.d",
|
||||
@@ -2291,6 +2268,7 @@ def owncloudLog():
|
||||
return [{
|
||||
"name": "owncloud-log",
|
||||
"image": OC_UBUNTU,
|
||||
"pull": "always",
|
||||
"detach": True,
|
||||
"commands": [
|
||||
"tail -f /mnt/data/owncloud.log",
|
||||
@@ -2304,7 +2282,8 @@ def owncloudLog():
|
||||
def fixSharedDataPermissions():
|
||||
return [{
|
||||
"name": "fix-shared-data-permissions",
|
||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||
"image": OC_CI_PHP,
|
||||
"pull": "always",
|
||||
"commands": [
|
||||
"chown -R 33:33 /var/www/owncloud", # www-data user
|
||||
"chmod -R 777 /var/www/owncloud",
|
||||
|
||||
@@ -10,7 +10,7 @@ repository:
|
||||
private: false
|
||||
has_issues: true
|
||||
has_projects: false
|
||||
has_wiki: false
|
||||
has_wiki: true
|
||||
has_downloads: false
|
||||
|
||||
default_branch: master
|
||||
@@ -35,7 +35,7 @@ labels:
|
||||
color: "#3F7A62"
|
||||
- name: Storage:ownCloudSQL
|
||||
color: "#3F7A62"
|
||||
|
||||
|
||||
teams:
|
||||
- name: ci
|
||||
permission: admin
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ ci-golangci-lint: $(GOLANGCI_LINT)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@go test -v -tags '$(TAGS)' -coverprofile coverage.out ./...
|
||||
@go test -v -coverprofile coverage.out ./...
|
||||
|
||||
.PHONY: go-coverage
|
||||
go-coverage:
|
||||
|
||||
+12
-104
@@ -11,118 +11,26 @@ release-dirs:
|
||||
|
||||
# docker specific packaging flags
|
||||
DOCKER_LDFLAGS += -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathType=path" -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis"
|
||||
release-linux-docker-amd64: $(GOX) release-dirs
|
||||
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
release-linux-docker-amd64: release-dirs
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
|
||||
./cmd/$(NAME)
|
||||
release-linux-docker-arm: $(GOX) release-dirs
|
||||
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
release-linux-docker-arm: release-dirs
|
||||
GOOS=linux \
|
||||
GOARCH=arm \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
@# https://github.com/golang/go/issues/50405
|
||||
@# -buildmode=pie not easily doable for arm
|
||||
|
||||
release-linux-docker-arm64: release-dirs
|
||||
GOOS=linux \
|
||||
GOARCH=arm64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
|
||||
./cmd/$(NAME)
|
||||
release-linux-docker-arm64: $(GOX) release-dirs
|
||||
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: release-linux
|
||||
release-linux: release-dirs
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
GOOS=linux \
|
||||
GOARCH=386 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-386' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
GOOS=linux \
|
||||
GOARCH=arm64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
GOOS=linux \
|
||||
GOARCH=arm \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
@# https://github.com/golang/go/issues/50405
|
||||
@# -buildmode=pie not easily doable for arm
|
||||
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)
|
||||
|
||||
.PHONY: release-windows
|
||||
release-windows: release-dirs
|
||||
GOOS=windows \
|
||||
GOARCH=amd64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '-extldflags "-static" $(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-windows-amd64' \
|
||||
./cmd/$(NAME)
|
||||
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: release-dirs
|
||||
GOOS=darwin \
|
||||
GOARCH=amd64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '$(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-amd64' \
|
||||
./cmd/$(NAME)
|
||||
|
||||
GOOS=darwin \
|
||||
GOARCH=arm64 \
|
||||
go build \
|
||||
-tags 'netgo $(TAGS)' \
|
||||
-buildmode=pie \
|
||||
-trimpath \
|
||||
-ldflags '$(LDFLAGS)' \
|
||||
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-arm64' \
|
||||
./cmd/$(NAME)
|
||||
release-darwin: $(GOX) release-dirs
|
||||
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64 arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
|
||||
|
||||
.PHONY: release-copy
|
||||
release-copy:
|
||||
|
||||
+4
-433
@@ -2,436 +2,7 @@
|
||||
|
||||
The following sections list the changes for unreleased.
|
||||
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v1.19.1...master
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Ensure the same data on /ocs/v?.php/config like oC10: [#3113](https://github.com/owncloud/ocis/pull/3113)
|
||||
* Enhancement - Add sorting to GraphAPI users and groups: [#3360](https://github.com/owncloud/ocis/issues/3360)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Ensure the same data on /ocs/v?.php/config like oC10: [#3113](https://github.com/owncloud/ocis/pull/3113)
|
||||
|
||||
We've fixed the returned values on the /ocs/v?.php/config endpoints, so that they now return
|
||||
the same values as an oC10 would do.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3113
|
||||
|
||||
* Enhancement - Add sorting to GraphAPI users and groups: [#3360](https://github.com/owncloud/ocis/issues/3360)
|
||||
|
||||
The GraphAPI endpoints for users and groups support ordering now. User can be ordered by
|
||||
displayName, onPremisesSamAccountName and mail. Groups can be ordered by displayName.
|
||||
|
||||
Example: https://localhost:9200/graph/v1.0/groups?$orderby=displayName asc
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3360
|
||||
# Changelog for [1.19.1] (2022-03-29)
|
||||
|
||||
The following sections list the changes for 1.19.1.
|
||||
|
||||
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.19.1
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
URLs for Special items (space image, readme) were broken.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3419
|
||||
# Changelog for [1.19.0] (2022-03-29)
|
||||
|
||||
The following sections list the changes for 1.19.0.
|
||||
|
||||
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.0
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)
|
||||
* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
|
||||
* Bugfix - Fix error handling in GraphAPI GetUsers call: [#3357](https://github.com/owncloud/ocis/pull/3357)
|
||||
* Bugfix - Fix request validation on GraphAPI User updates: [#3167](https://github.com/owncloud/ocis/issues/3167)
|
||||
* Bugfix - Replace public mountpoint fileid with grant fileid: [#3349](https://github.com/owncloud/ocis/pull/3349)
|
||||
* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
|
||||
* Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
|
||||
* Change - Drop json config file support: [#3366](https://github.com/owncloud/ocis/pull/3366)
|
||||
* Change - Settings service now stores its data via metadata service: [#3232](https://github.com/owncloud/ocis/pull/3232)
|
||||
* Enhancement - Audit logger will now log file events: [#3332](https://github.com/owncloud/ocis/pull/3332)
|
||||
* Enhancement - Add password reset link to login page: [#3329](https://github.com/owncloud/ocis/pull/3329)
|
||||
* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)
|
||||
* Enhancement - Add space aliases: [#3283](https://github.com/owncloud/ocis/pull/3283)
|
||||
* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)
|
||||
* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)
|
||||
* Enhancement - Update reva to v2.1.0: [#3330](https://github.com/owncloud/ocis/pull/3330)
|
||||
* Enhancement - Update ownCloud Web to v5.3.0: [#6561](https://github.com/owncloud/web/pull/6561)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)
|
||||
|
||||
Tidy up the deployments/examples/ocis_individual_services example so that the
|
||||
instructions work.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3238
|
||||
|
||||
* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
|
||||
|
||||
Improved the gif thumbnail generation for gifs with different disposal strategies.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3305
|
||||
|
||||
* Bugfix - Fix error handling in GraphAPI GetUsers call: [#3357](https://github.com/owncloud/ocis/pull/3357)
|
||||
|
||||
A missing return statement caused GetUsers to return misleading results when the identity
|
||||
backend returned an error.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3357
|
||||
|
||||
* Bugfix - Fix request validation on GraphAPI User updates: [#3167](https://github.com/owncloud/ocis/issues/3167)
|
||||
|
||||
Fix PATCH on graph/v1.0/users when no 'mail' attribute is present in the request body
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3167
|
||||
|
||||
* Bugfix - Replace public mountpoint fileid with grant fileid: [#3349](https://github.com/owncloud/ocis/pull/3349)
|
||||
|
||||
We now show the same resoucre id for resources when accessing them via a public links as when
|
||||
using a logged in user. This allows the web ui to start a WOPI session with the correct resource
|
||||
id.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3349
|
||||
|
||||
* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
|
||||
|
||||
A mountpoint represents the mounted share on the share receivers side. The original resource
|
||||
is located where the grant has been set. This item is now shown as libregraph remoteItem on the
|
||||
mountpoint. While adding this, we fixed the spaceID for mountpoints.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3365
|
||||
|
||||
* Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
|
||||
|
||||
We've switched the NATS backend from Streaming to JetStream, since NATS Streaming is
|
||||
depreciated.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3192
|
||||
https://github.com/cs3org/reva/pull/2574
|
||||
|
||||
* Change - Drop json config file support: [#3366](https://github.com/owncloud/ocis/pull/3366)
|
||||
|
||||
We've remove the support to configure oCIS and it's service with a json file. From now on we only
|
||||
support yaml configuration files, since they have the possibility to add comments.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3366
|
||||
|
||||
* Change - Settings service now stores its data via metadata service: [#3232](https://github.com/owncloud/ocis/pull/3232)
|
||||
|
||||
Instead of writing files to disk it will use metadata service to do so
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3232
|
||||
|
||||
* Enhancement - Audit logger will now log file events: [#3332](https://github.com/owncloud/ocis/pull/3332)
|
||||
|
||||
See full list of supported events in `audit/pkg/types/types.go`
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3332
|
||||
|
||||
* Enhancement - Add password reset link to login page: [#3329](https://github.com/owncloud/ocis/pull/3329)
|
||||
|
||||
Added a configurable passwort reset link to the login page. It can be set via
|
||||
`IDP_PASSWORD_RESET_URI`. If the option is not set the link will not be shown.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3329
|
||||
|
||||
* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)
|
||||
|
||||
Contains sharing related events. See full list in audit/pkg/types/events.go
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3301
|
||||
|
||||
* Enhancement - Add space aliases: [#3283](https://github.com/owncloud/ocis/pull/3283)
|
||||
|
||||
Space aliases can be used to resolve spaceIDs in a client.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3283
|
||||
|
||||
* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)
|
||||
|
||||
Added etags in the response of list drives.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3267
|
||||
|
||||
* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)
|
||||
|
||||
Changed the thumbnails API to no longer transfer images via GRPC. GRPC has a limited message
|
||||
size and isn't very efficient with large binary data. The new API transports the images over
|
||||
HTTP.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3272
|
||||
|
||||
* Enhancement - Update reva to v2.1.0: [#3330](https://github.com/owncloud/ocis/pull/3330)
|
||||
|
||||
Updated reva to version 2.1.0. This update includes:
|
||||
|
||||
* Fix [cs3org/reva#2636](https://github.com/cs3org/reva/pull/2636): Delay reconnect log for events
|
||||
* Fix [cs3org/reva#2645](https://github.com/cs3org/reva/pull/2645): Avoid warning about missing .flock files
|
||||
* Fix [cs3org/reva#2625](https://github.com/cs3org/reva/pull/2625): Fix locking on publik links and the decomposed filesystem
|
||||
* Fix [cs3org/reva#2643](https://github.com/cs3org/reva/pull/2643): Emit linkaccessfailed event when share is nil
|
||||
* Fix [cs3org/reva#2646](https://github.com/cs3org/reva/pull/2646): Replace public mountpoint fileid with grant fileid in ocdav
|
||||
* Fix [cs3org/reva#2612](https://github.com/cs3org/reva/pull/2612): Adjust the scope handling to support the spaces architecture
|
||||
* Fix [cs3org/reva#2621](https://github.com/cs3org/reva/pull/2621): Send events only if response code is `OK`
|
||||
* Chg [cs3org/reva#2574](https://github.com/cs3org/reva/pull/2574): Switch NATS backend
|
||||
* Chg [cs3org/reva#2667](https://github.com/cs3org/reva/pull/2667): Allow LDAP groups to have no gidNumber
|
||||
* Chg [cs3org/reva#3233](https://github.com/cs3org/reva/pull/3233): Improve quota handling
|
||||
* Chg [cs3org/reva#2600](https://github.com/cs3org/reva/pull/2600): Use the cs3 share api to manage spaces
|
||||
* Enh [cs3org/reva#2644](https://github.com/cs3org/reva/pull/2644): Add new public share manager
|
||||
* Enh [cs3org/reva#2626](https://github.com/cs3org/reva/pull/2626): Add new share manager
|
||||
* Enh [cs3org/reva#2624](https://github.com/cs3org/reva/pull/2624): Add etags to virtual spaces
|
||||
* Enh [cs3org/reva#2639](https://github.com/cs3org/reva/pull/2639): File Events
|
||||
* Enh [cs3org/reva#2627](https://github.com/cs3org/reva/pull/2627): Add events for sharing action
|
||||
* Enh [cs3org/reva#2664](https://github.com/cs3org/reva/pull/2664): Add grantID to mountpoint
|
||||
* Enh [cs3org/reva#2622](https://github.com/cs3org/reva/pull/2622): Allow listing shares in spaces via the OCS API
|
||||
* Enh [cs3org/reva#2623](https://github.com/cs3org/reva/pull/2623): Add space aliases
|
||||
* Enh [cs3org/reva#2647](https://github.com/cs3org/reva/pull/2647): Add space specific events
|
||||
* Enh [cs3org/reva#3345](https://github.com/cs3org/reva/pull/3345): Add the spaceid to propfind responses
|
||||
* Enh [cs3org/reva#2616](https://github.com/cs3org/reva/pull/2616): Add etag to spaces response
|
||||
* Enh [cs3org/reva#2628](https://github.com/cs3org/reva/pull/2628): Add spaces aware trash-bin API
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3330
|
||||
https://github.com/owncloud/ocis/pull/3405
|
||||
https://github.com/owncloud/ocis/pull/3416
|
||||
|
||||
* Enhancement - Update ownCloud Web to v5.3.0: [#6561](https://github.com/owncloud/web/pull/6561)
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.3.0. Please refer to the changelog (linked) for details on the web
|
||||
release.
|
||||
|
||||
https://github.com/owncloud/web/pull/6561
|
||||
https://github.com/owncloud/ocis/pull/3291
|
||||
https://github.com/owncloud/ocis/pull/3375
|
||||
https://github.com/owncloud/web/releases/tag/v5.3.0
|
||||
# Changelog for [1.18.0] (2022-03-03)
|
||||
|
||||
The following sections list the changes for 1.18.0.
|
||||
|
||||
[1.18.0]: https://github.com/owncloud/ocis/compare/v1.17.0...v1.18.0
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Capabilities for password protected public links: [#3229](https://github.com/owncloud/ocis/pull/3229)
|
||||
* Bugfix - Make events settings configurable: [#3214](https://github.com/owncloud/ocis/pull/3214)
|
||||
* Bugfix - Align storage metadata GPRC bind port with other variable names: [#3169](https://github.com/owncloud/ocis/pull/3169)
|
||||
* Change - Unify file IDs: [#3185](https://github.com/owncloud/ocis/pull/3185)
|
||||
* Enhancement - Add sorting to list Spaces: [#3200](https://github.com/owncloud/ocis/issues/3200)
|
||||
* Enhancement - Change NATS port: [#3210](https://github.com/owncloud/ocis/pull/3210)
|
||||
* Enhancement - Re-Enabling web cache control: [#3109](https://github.com/owncloud/ocis/pull/3109)
|
||||
* Enhancement - Add SPA conform fileserver for web: [#3109](https://github.com/owncloud/ocis/pull/3109)
|
||||
* Enhancement - Implement notifications service: [#3217](https://github.com/owncloud/ocis/pull/3217)
|
||||
* Enhancement - Thumbnails in spaces: [#3219](https://github.com/owncloud/ocis/pull/3219)
|
||||
* Enhancement - Update reva to v2.0.0: [#3231](https://github.com/owncloud/ocis/pull/3231)
|
||||
* Enhancement - Update ownCloud Web to v5.2.0: [#6506](https://github.com/owncloud/web/pull/6506)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Capabilities for password protected public links: [#3229](https://github.com/owncloud/ocis/pull/3229)
|
||||
|
||||
Allow password protected public links to request capabilities.
|
||||
|
||||
https://github.com/owncloud/web/issues/5863
|
||||
https://github.com/owncloud/ocis/pull/3229
|
||||
https://github.com/owncloud/web/pull/6471
|
||||
|
||||
* Bugfix - Make events settings configurable: [#3214](https://github.com/owncloud/ocis/pull/3214)
|
||||
|
||||
We've fixed the hardcoded events settings to be configurable.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3214
|
||||
|
||||
* Bugfix - Align storage metadata GPRC bind port with other variable names: [#3169](https://github.com/owncloud/ocis/pull/3169)
|
||||
|
||||
Changed STORAGE_METADATA_GRPC_PROVIDER_ADDR to STORAGE_METADATA_GRPC_ADDR so it aligns
|
||||
with standard environment variable naming conventions used in oCIS.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3169
|
||||
|
||||
* Change - Unify file IDs: [#3185](https://github.com/owncloud/ocis/pull/3185)
|
||||
|
||||
We changed the file IDs to be consistent across all our APIs (WebDAV, LibreGraph, OCS). We
|
||||
removed the base64 encoding. Now they are formatted like <storageID>!<opaqueID>. They are
|
||||
using a reserved character ``!`` as a URL safe separator.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3185
|
||||
|
||||
* Enhancement - Add sorting to list Spaces: [#3200](https://github.com/owncloud/ocis/issues/3200)
|
||||
|
||||
We added the OData query param "orderBy" for listing spaces. We can now order by Space Name and
|
||||
LastModifiedDateTime.
|
||||
|
||||
Example 1:
|
||||
https://localhost:9200/graph/v1.0/me/drives/?$orderby=lastModifiedDateTime desc
|
||||
Example 2: https://localhost:9200/graph/v1.0/me/drives/?$orderby=name asc
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3200
|
||||
https://github.com/owncloud/ocis/pull/3201
|
||||
https://github.com/owncloud/ocis/pull/3218
|
||||
|
||||
* Enhancement - Change NATS port: [#3210](https://github.com/owncloud/ocis/pull/3210)
|
||||
|
||||
Currently only a certain range of ports is allowed for ocis application. Use a supported port
|
||||
for nats server
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3210
|
||||
|
||||
* Enhancement - Re-Enabling web cache control: [#3109](https://github.com/owncloud/ocis/pull/3109)
|
||||
|
||||
We've re-enable browser caching headers (`Expires` and `Last-Modified`) for the web
|
||||
service, this was disabled due to a problem in the fileserver used before. Since we're now using
|
||||
our own fileserver implementation this works again and is enabled by default.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3109
|
||||
|
||||
* Enhancement - Add SPA conform fileserver for web: [#3109](https://github.com/owncloud/ocis/pull/3109)
|
||||
|
||||
We've added an SPA conform fileserver to the web service. It enables web to use vue's history
|
||||
mode and behaves like nginx try_files.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3109
|
||||
|
||||
* Enhancement - Implement notifications service: [#3217](https://github.com/owncloud/ocis/pull/3217)
|
||||
|
||||
Implemented the minimal version of the notifications service to be able to notify a user when
|
||||
they received a share.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3217
|
||||
|
||||
* Enhancement - Thumbnails in spaces: [#3219](https://github.com/owncloud/ocis/pull/3219)
|
||||
|
||||
Added support for thumbnails in spaces.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3219
|
||||
https://github.com/owncloud/ocis/pull/3235
|
||||
|
||||
* Enhancement - Update reva to v2.0.0: [#3231](https://github.com/owncloud/ocis/pull/3231)
|
||||
|
||||
We updated reva to the version 2.0.0.
|
||||
|
||||
* Fix [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457) : Do not swallow error
|
||||
* Fix [cs3org/reva#2422](https://github.com/cs3org/reva/pull/2422) : Handle non existing spaces correctly
|
||||
* Fix [cs3org/reva#2327](https://github.com/cs3org/reva/pull/2327) : Enable changelog on edge branch
|
||||
* Fix [cs3org/reva#2370](https://github.com/cs3org/reva/pull/2370) : Fixes for apps in public shares, project spaces for EOS driver
|
||||
* Fix [cs3org/reva#2464](https://github.com/cs3org/reva/pull/2464) : Pass spacegrants when adding member to space
|
||||
* Fix [cs3org/reva#2430](https://github.com/cs3org/reva/pull/2430) : Fix aggregated child folder id
|
||||
* Fix [cs3org/reva#2348](https://github.com/cs3org/reva/pull/2348) : Make archiver handle spaces protocol
|
||||
* Fix [cs3org/reva#2452](https://github.com/cs3org/reva/pull/2452) : Fix create space error message
|
||||
* Fix [cs3org/reva#2445](https://github.com/cs3org/reva/pull/2445) : Don't handle ids containing "/" in decomposedfs
|
||||
* Fix [cs3org/reva#2285](https://github.com/cs3org/reva/pull/2285) : Accept new userid idp format
|
||||
* Fix [cs3org/reva#2503](https://github.com/cs3org/reva/pull/2503) : Remove the protection from /v?.php/config endpoints
|
||||
* Fix [cs3org/reva#2462](https://github.com/cs3org/reva/pull/2462) : Public shares path needs to be set
|
||||
* Fix [cs3org/reva#2427](https://github.com/cs3org/reva/pull/2427) : Fix registry caching
|
||||
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298) : Remove share refs from trashbin
|
||||
* Fix [cs3org/reva#2433](https://github.com/cs3org/reva/pull/2433) : Fix shares provider filter
|
||||
* Fix [cs3org/reva#2351](https://github.com/cs3org/reva/pull/2351) : Fix Statcache removing
|
||||
* Fix [cs3org/reva#2374](https://github.com/cs3org/reva/pull/2374) : Fix webdav copy of zero byte files
|
||||
* Fix [cs3org/reva#2336](https://github.com/cs3org/reva/pull/2336) : Handle sending all permissions when creating public links
|
||||
* Fix [cs3org/reva#2440](https://github.com/cs3org/reva/pull/2440) : Add ArbitraryMetadataKeys to statcache key
|
||||
* Fix [cs3org/reva#2582](https://github.com/cs3org/reva/pull/2582) : Keep lock structs in a local map protected by a mutex
|
||||
* Fix [cs3org/reva#2372](https://github.com/cs3org/reva/pull/2372) : Make owncloudsql work with the spaces registry
|
||||
* Fix [cs3org/reva#2416](https://github.com/cs3org/reva/pull/2416) : The registry now returns complete space structs
|
||||
* Fix [cs3org/reva#3066](https://github.com/cs3org/reva/pull/3066) : Fix propfind listing for files
|
||||
* Fix [cs3org/reva#2428](https://github.com/cs3org/reva/pull/2428) : Remove unused home provider from config
|
||||
* Fix [cs3org/reva#2334](https://github.com/cs3org/reva/pull/2334) : Revert fix decomposedfs upload
|
||||
* Fix [cs3org/reva#2415](https://github.com/cs3org/reva/pull/2415) : Services should never return transport level errors
|
||||
* Fix [cs3org/reva#2419](https://github.com/cs3org/reva/pull/2419) : List project spaces for share recipients
|
||||
* Fix [cs3org/reva#2501](https://github.com/cs3org/reva/pull/2501) : Fix spaces stat
|
||||
* Fix [cs3org/reva#2432](https://github.com/cs3org/reva/pull/2432) : Use space reference when listing containers
|
||||
* Fix [cs3org/reva#2572](https://github.com/cs3org/reva/pull/2572) : Wait for nats server on middleware start
|
||||
* Fix [cs3org/reva#2454](https://github.com/cs3org/reva/pull/2454) : Fix webdav paths in PROPFINDS
|
||||
* Chg [cs3org/reva#2329](https://github.com/cs3org/reva/pull/2329) : Activate the statcache
|
||||
* Chg [cs3org/reva#2596](https://github.com/cs3org/reva/pull/2596) : Remove hash from public link urls
|
||||
* Chg [cs3org/reva#2495](https://github.com/cs3org/reva/pull/2495) : Remove the ownCloud storage driver
|
||||
* Chg [cs3org/reva#2527](https://github.com/cs3org/reva/pull/2527) : Store space attributes in decomposedFS
|
||||
* Chg [cs3org/reva#2581](https://github.com/cs3org/reva/pull/2581) : Update hard-coded status values
|
||||
* Chg [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524) : Use description during space creation
|
||||
* Chg [cs3org/reva#2554](https://github.com/cs3org/reva/pull/2554) : Shard nodes per space in decomposedfs
|
||||
* Chg [cs3org/reva#2576](https://github.com/cs3org/reva/pull/2576) : Harden xattrs errors
|
||||
* Chg [cs3org/reva#2436](https://github.com/cs3org/reva/pull/2436) : Replace template in GroupFilter for UserProvider with a simple string
|
||||
* Chg [cs3org/reva#2429](https://github.com/cs3org/reva/pull/2429) : Make archiver id based
|
||||
* Chg [cs3org/reva#2340](https://github.com/cs3org/reva/pull/2340) : Allow multiple space configurations per provider
|
||||
* Chg [cs3org/reva#2396](https://github.com/cs3org/reva/pull/2396) : The ocdav handler is now spaces aware
|
||||
* Chg [cs3org/reva#2349](https://github.com/cs3org/reva/pull/2349) : Require `ListRecycle` when listing trashbin
|
||||
* Chg [cs3org/reva#2353](https://github.com/cs3org/reva/pull/2353) : Reduce log output
|
||||
* Chg [cs3org/reva#2542](https://github.com/cs3org/reva/pull/2542) : Do not encode webDAV ids to base64
|
||||
* Chg [cs3org/reva#2519](https://github.com/cs3org/reva/pull/2519) : Remove the auto creation of the .space folder
|
||||
* Chg [cs3org/reva#2394](https://github.com/cs3org/reva/pull/2394) : Remove logic from gateway
|
||||
* Chg [cs3org/reva#2023](https://github.com/cs3org/reva/pull/2023) : Add a sharestorageprovider
|
||||
* Chg [cs3org/reva#2234](https://github.com/cs3org/reva/pull/2234) : Add a spaces registry
|
||||
* Chg [cs3org/reva#2339](https://github.com/cs3org/reva/pull/2339) : Fix static registry regressions
|
||||
* Chg [cs3org/reva#2370](https://github.com/cs3org/reva/pull/2370) : Fix static registry regressions
|
||||
* Chg [cs3org/reva#2354](https://github.com/cs3org/reva/pull/2354) : Return not found when updating non existent space
|
||||
* Chg [cs3org/reva#2589](https://github.com/cs3org/reva/pull/2589) : Remove deprecated linter modules
|
||||
* Chg [cs3org/reva#2016](https://github.com/cs3org/reva/pull/2016) : Move wrapping and unwrapping of paths to the storage gateway
|
||||
* Enh [cs3org/reva#2591](https://github.com/cs3org/reva/pull/2591) : Set up App Locks with basic locks
|
||||
* Enh [cs3org/reva#1209](https://github.com/cs3org/reva/pull/1209) : Reva CephFS module v0.2.1
|
||||
* Enh [cs3org/reva#2511](https://github.com/cs3org/reva/pull/2511) : Error handling cleanup in decomposed FS
|
||||
* Enh [cs3org/reva#2516](https://github.com/cs3org/reva/pull/2516) : Cleaned up some code
|
||||
* Enh [cs3org/reva#2512](https://github.com/cs3org/reva/pull/2512) : Consolidate xattr setter and getter
|
||||
* Enh [cs3org/reva#2341](https://github.com/cs3org/reva/pull/2341) : Use CS3 permissions API
|
||||
* Enh [cs3org/reva#2343](https://github.com/cs3org/reva/pull/2343) : Allow multiple space type fileters on decomposedfs
|
||||
* Enh [cs3org/reva#2460](https://github.com/cs3org/reva/pull/2460) : Add locking support to decomposedfs
|
||||
* Enh [cs3org/reva#2540](https://github.com/cs3org/reva/pull/2540) : Refactored the xattrs package in the decomposedfs
|
||||
* Enh [cs3org/reva#2463](https://github.com/cs3org/reva/pull/2463) : Do not log whole nodes
|
||||
* Enh [cs3org/reva#2350](https://github.com/cs3org/reva/pull/2350) : Add file locking methods to the storage and filesystem interfaces
|
||||
* Enh [cs3org/reva#2379](https://github.com/cs3org/reva/pull/2379) : Add new file url of the app provider to the ocs capabilities
|
||||
* Enh [cs3org/reva#2369](https://github.com/cs3org/reva/pull/2369) : Implement TouchFile from the CS3apis
|
||||
* Enh [cs3org/reva#2385](https://github.com/cs3org/reva/pull/2385) : Allow to create new files with the app provider on public links
|
||||
* Enh [cs3org/reva#2397](https://github.com/cs3org/reva/pull/2397) : Product field in OCS version
|
||||
* Enh [cs3org/reva#2393](https://github.com/cs3org/reva/pull/2393) : Update tus/tusd to version 1.8.0
|
||||
* Enh [cs3org/reva#2522](https://github.com/cs3org/reva/pull/2522) : Introduce events
|
||||
* Enh [cs3org/reva#2528](https://github.com/cs3org/reva/pull/2528) : Use an exclcusive write lock when writing multiple attributes
|
||||
* Enh [cs3org/reva#2595](https://github.com/cs3org/reva/pull/2595) : Add integration test for the groupprovider
|
||||
* Enh [cs3org/reva#2439](https://github.com/cs3org/reva/pull/2439) : Ignore handled errors when creating spaces
|
||||
* Enh [cs3org/reva#2500](https://github.com/cs3org/reva/pull/2500) : Invalidate listproviders cache
|
||||
* Enh [cs3org/reva#2345](https://github.com/cs3org/reva/pull/2345) : Don't assume that the LDAP groupid in reva matches the name
|
||||
* Enh [cs3org/reva#2525](https://github.com/cs3org/reva/pull/2525) : Allow using AD UUID as userId values
|
||||
* Enh [cs3org/reva#2584](https://github.com/cs3org/reva/pull/2584) : Allow running userprovider integration tests for the LDAP driver
|
||||
* Enh [cs3org/reva#2585](https://github.com/cs3org/reva/pull/2585) : Add metadata storage layer and indexer
|
||||
* Enh [cs3org/reva#2163](https://github.com/cs3org/reva/pull/2163) : Nextcloud-based share manager for pkg/ocm/share
|
||||
* Enh [cs3org/reva#2278](https://github.com/cs3org/reva/pull/2278) : OIDC driver changes for lightweight users
|
||||
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315) : Add new attributes to public link propfinds
|
||||
* Enh [cs3org/reva#2431](https://github.com/cs3org/reva/pull/2431) : Delete shares when purging spaces
|
||||
* Enh [cs3org/reva#2434](https://github.com/cs3org/reva/pull/2434) : Refactor ocdav into smaller chunks
|
||||
* Enh [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524) : Add checks when removing space members
|
||||
* Enh [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457) : Restore spaces that were previously deleted
|
||||
* Enh [cs3org/reva#2498](https://github.com/cs3org/reva/pull/2498) : Include grants in list storage spaces response
|
||||
* Enh [cs3org/reva#2344](https://github.com/cs3org/reva/pull/2344) : Allow listing all storage spaces
|
||||
* Enh [cs3org/reva#2547](https://github.com/cs3org/reva/pull/2547) : Add an if-match check to the storage provider
|
||||
* Enh [cs3org/reva#2486](https://github.com/cs3org/reva/pull/2486) : Update cs3apis to include lock api changes
|
||||
* Enh [cs3org/reva#2526](https://github.com/cs3org/reva/pull/2526) : Upgrade ginkgo to v2
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3231
|
||||
https://github.com/owncloud/ocis/pull/3258
|
||||
|
||||
* Enhancement - Update ownCloud Web to v5.2.0: [#6506](https://github.com/owncloud/web/pull/6506)
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.2.0. Please refer to the changelog (linked) for details on the web
|
||||
release.
|
||||
|
||||
https://github.com/owncloud/web/pull/6506
|
||||
https://github.com/owncloud/ocis/pull/3202
|
||||
https://github.com/owncloud/web/releases/tag/v5.2.0
|
||||
# Changelog for [1.17.0] (2022-02-16)
|
||||
|
||||
The following sections list the changes for 1.17.0.
|
||||
|
||||
[1.17.0]: https://github.com/owncloud/ocis/compare/v1.16.0...v1.17.0
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v1.16.0...master
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -461,7 +32,7 @@ The following sections list the changes for 1.17.0.
|
||||
* Enhancement - Update REVA to v1.16.1-0.20220112085026-07451f6cd806: [#2953](https://github.com/owncloud/ocis/pull/2953)
|
||||
* Enhancement - Add endpoint to retrieve a single space: [#2978](https://github.com/owncloud/ocis/pull/2978)
|
||||
* Enhancement - Add filter by driveType and id to /me/drives: [#2946](https://github.com/owncloud/ocis/pull/2946)
|
||||
* Enhancement - Update REVA to v1.16.1-0.20220215130802-df1264deff58: [#2878](https://github.com/owncloud/ocis/pull/2878)
|
||||
* Enhancement - Update REVA to xxx: [#2878](https://github.com/owncloud/ocis/pull/2878)
|
||||
* Enhancement - Update ownCloud Web to v5.0.0: [#2895](https://github.com/owncloud/ocis/pull/2895)
|
||||
|
||||
## Details
|
||||
@@ -650,9 +221,9 @@ The following sections list the changes for 1.17.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2946
|
||||
|
||||
* Enhancement - Update REVA to v1.16.1-0.20220215130802-df1264deff58: [#2878](https://github.com/owncloud/ocis/pull/2878)
|
||||
* Enhancement - Update REVA to xxx: [#2878](https://github.com/owncloud/ocis/pull/2878)
|
||||
|
||||
Updated REVA to v1.16.1-0.20220215130802-df1264deff58 This update includes:
|
||||
Updated REVA to xxx This update includes:
|
||||
|
||||
* Enh [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524): Remove space members
|
||||
* Fix [cs3org/reva#2541](https://github.com/cs3org/reva/pull/2541): fix xattr error types, remove error wrapper
|
||||
|
||||
@@ -17,7 +17,6 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'
|
||||
# if you add a module here please also add it to the .drone.star file
|
||||
OCIS_MODULES = \
|
||||
accounts \
|
||||
audit \
|
||||
glauth \
|
||||
graph \
|
||||
graph-explorer \
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/command"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(defaults.DefaultConfig()); err != nil {
|
||||
if err := command.Execute(config.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
accountsdefaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
|
||||
idpdefaults "github.com/owncloud/ocis/idp/pkg/config/defaults"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
fn1 := accountsdefaults.FullDefaultConfig
|
||||
fn2 := idpdefaults.FullDefaultConfig
|
||||
|
||||
b, err := yaml.Marshal(fn1())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println(string(b))
|
||||
|
||||
b, err = yaml.Marshal(fn2())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println(string(b))
|
||||
}
|
||||
@@ -80,7 +80,7 @@
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"owncloud-design-system": "^12.2.2"
|
||||
"owncloud-design-system": "^12.1.0"
|
||||
},
|
||||
"packageManager": "yarn@3.1.0"
|
||||
}
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
||||
*shared.Commons
|
||||
|
||||
Service Service `ocisConfig:"-" yaml:"-"`
|
||||
Service Service
|
||||
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
@@ -25,45 +25,45 @@ type Config struct {
|
||||
Repo Repo `ocisConfig:"repo"`
|
||||
Index Index `ocisConfig:"index"`
|
||||
ServiceUser ServiceUser `ocisConfig:"service_user"`
|
||||
HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
|
||||
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
|
||||
HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY"`
|
||||
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS"`
|
||||
|
||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
||||
Context context.Context
|
||||
}
|
||||
|
||||
// Asset defines the available asset configuration.
|
||||
type Asset struct {
|
||||
Path string `ocisConfig:"path" env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."`
|
||||
Path string `ocisConfig:"path" env:"ACCOUNTS_ASSET_PATH"`
|
||||
}
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."`
|
||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET"`
|
||||
}
|
||||
|
||||
// Repo defines which storage implementation is to be used.
|
||||
type Repo struct {
|
||||
Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"`
|
||||
Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND"`
|
||||
Disk Disk `ocisConfig:"disk"`
|
||||
CS3 CS3 `ocisConfig:"cs3"`
|
||||
}
|
||||
|
||||
// Disk is the local disk implementation of the storage.
|
||||
type Disk struct {
|
||||
Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."`
|
||||
Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH"`
|
||||
}
|
||||
|
||||
// CS3 is the cs3 implementation of the storage.
|
||||
type CS3 struct {
|
||||
ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."`
|
||||
ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"`
|
||||
}
|
||||
|
||||
// ServiceUser defines the user required for EOS.
|
||||
type ServiceUser struct {
|
||||
UUID string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."`
|
||||
Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."`
|
||||
UID int64 `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."`
|
||||
GID int64 `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."`
|
||||
UUID string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID"`
|
||||
Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME"`
|
||||
UID int64 `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID"`
|
||||
GID int64 `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID"`
|
||||
}
|
||||
|
||||
// Index defines config for indexes.
|
||||
@@ -74,12 +74,12 @@ type Index struct {
|
||||
|
||||
// GIDBound defines a lower and upper bound.
|
||||
type GIDBound struct {
|
||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."`
|
||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."`
|
||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"`
|
||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"`
|
||||
}
|
||||
|
||||
// UIDBound defines a lower and upper bound.
|
||||
type UIDBound struct {
|
||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."`
|
||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."`
|
||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"`
|
||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"`
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
)
|
||||
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9182",
|
||||
Token: "",
|
||||
Pprof: false,
|
||||
Zpages: false,
|
||||
},
|
||||
HTTP: HTTP{
|
||||
Addr: "127.0.0.1:9181",
|
||||
Namespace: "com.owncloud.web",
|
||||
Root: "/",
|
||||
CacheTTL: 604800, // 7 days
|
||||
CORS: CORS{
|
||||
AllowedOrigins: []string{"*"},
|
||||
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
|
||||
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
|
||||
AllowCredentials: true,
|
||||
},
|
||||
},
|
||||
GRPC: GRPC{
|
||||
Addr: "127.0.0.1:9180",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
Service: Service{
|
||||
Name: "accounts",
|
||||
},
|
||||
Asset: Asset{},
|
||||
TokenManager: TokenManager{
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
HashDifficulty: 11,
|
||||
DemoUsersAndGroups: true,
|
||||
Repo: Repo{
|
||||
Backend: "CS3",
|
||||
Disk: Disk{
|
||||
Path: path.Join(defaults.BaseDataPath(), "accounts"),
|
||||
},
|
||||
CS3: CS3{
|
||||
ProviderAddr: "localhost:9215",
|
||||
},
|
||||
},
|
||||
Index: Index{
|
||||
UID: UIDBound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
GID: GIDBound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
},
|
||||
ServiceUser: ServiceUser{
|
||||
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
|
||||
Username: "",
|
||||
UID: 0,
|
||||
GID: 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package defaults
|
||||
|
||||
import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
)
|
||||
|
||||
func FullDefaultConfig() *config.Config {
|
||||
cfg := DefaultConfig()
|
||||
|
||||
EnsureDefaults(cfg)
|
||||
Sanitize(cfg)
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func DefaultConfig() *config.Config {
|
||||
return &config.Config{
|
||||
Debug: config.Debug{
|
||||
Addr: "127.0.0.1:9182",
|
||||
Token: "",
|
||||
Pprof: false,
|
||||
Zpages: false,
|
||||
},
|
||||
HTTP: config.HTTP{
|
||||
Addr: "127.0.0.1:9181",
|
||||
Namespace: "com.owncloud.web",
|
||||
Root: "/",
|
||||
CacheTTL: 604800, // 7 days
|
||||
CORS: config.CORS{
|
||||
AllowedOrigins: []string{"*"},
|
||||
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
|
||||
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
|
||||
AllowCredentials: true,
|
||||
},
|
||||
},
|
||||
GRPC: config.GRPC{
|
||||
Addr: "127.0.0.1:9180",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
Service: config.Service{
|
||||
Name: "accounts",
|
||||
},
|
||||
Asset: config.Asset{},
|
||||
TokenManager: config.TokenManager{
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
HashDifficulty: 11,
|
||||
DemoUsersAndGroups: true,
|
||||
Repo: config.Repo{
|
||||
Backend: "CS3",
|
||||
Disk: config.Disk{
|
||||
Path: path.Join(defaults.BaseDataPath(), "accounts"),
|
||||
},
|
||||
CS3: config.CS3{
|
||||
ProviderAddr: "localhost:9215",
|
||||
},
|
||||
},
|
||||
Index: config.Index{
|
||||
UID: config.UIDBound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
GID: config.GIDBound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
},
|
||||
ServiceUser: config.ServiceUser{
|
||||
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
|
||||
Username: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
|
||||
UID: 0,
|
||||
GID: 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func EnsureDefaults(cfg *config.Config) {
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &config.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
|
||||
cfg.Tracing = &config.Tracing{
|
||||
Enabled: cfg.Commons.Tracing.Enabled,
|
||||
Type: cfg.Commons.Tracing.Type,
|
||||
Endpoint: cfg.Commons.Tracing.Endpoint,
|
||||
Collector: cfg.Commons.Tracing.Collector,
|
||||
}
|
||||
} else if cfg.Tracing == nil {
|
||||
cfg.Tracing = &config.Tracing{}
|
||||
}
|
||||
}
|
||||
|
||||
func Sanitize(cfg *config.Config) {
|
||||
// sanitize config
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
|
||||
}
|
||||
@@ -2,6 +2,6 @@ package config
|
||||
|
||||
// GRPC defines the available grpc configuration.
|
||||
type GRPC struct {
|
||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
|
||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR"`
|
||||
Namespace string
|
||||
}
|
||||
@@ -2,10 +2,10 @@ package config
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
|
||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
||||
Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
|
||||
CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
|
||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR"`
|
||||
Namespace string
|
||||
Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT"`
|
||||
CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL"`
|
||||
CORS CORS `ocisConfig:"cors"`
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package config
|
||||
|
||||
// Log defines the available log configuration.
|
||||
type Log struct {
|
||||
Level string `ocisConfig:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."`
|
||||
Pretty bool `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."`
|
||||
Color bool `ocisConfig:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."`
|
||||
File string `ocisConfig:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."`
|
||||
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL"`
|
||||
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"`
|
||||
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"`
|
||||
File string `mapstructure:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"`
|
||||
}
|
||||
@@ -2,11 +2,11 @@ package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
defaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,28 @@ func ParseConfig(cfg *config.Config) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defaults.EnsureDefaults(cfg)
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &config.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
|
||||
cfg.Tracing = &config.Tracing{
|
||||
Enabled: cfg.Commons.Tracing.Enabled,
|
||||
Type: cfg.Commons.Tracing.Type,
|
||||
Endpoint: cfg.Commons.Tracing.Endpoint,
|
||||
Collector: cfg.Commons.Tracing.Collector,
|
||||
}
|
||||
} else if cfg.Tracing == nil {
|
||||
cfg.Tracing = &config.Tracing{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
@@ -27,7 +48,11 @@ func ParseConfig(cfg *config.Config) error {
|
||||
}
|
||||
}
|
||||
|
||||
defaults.Sanitize(cfg)
|
||||
// sanitize config
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -2,5 +2,5 @@ package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string `ocisConfig:"-" yaml:"-"`
|
||||
Name string
|
||||
}
|
||||
@@ -2,8 +2,8 @@ package config
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."`
|
||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED"`
|
||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"`
|
||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
|
||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"`
|
||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"`
|
||||
}
|
||||
@@ -99,6 +99,33 @@ func (s Service) hasSelfManagementPermissions(ctx context.Context) bool {
|
||||
return s.RoleManager.FindPermissionByID(ctx, roleIDs, SelfManagementPermissionID) != nil
|
||||
}
|
||||
|
||||
// serviceUserToIndex temporarily adds a service user to the index, which is supposed to be removed before the lock on the handler function is released
|
||||
func (s Service) serviceUserToIndex() (teardownServiceUser func()) {
|
||||
if s.Config.ServiceUser.Username != "" && s.Config.ServiceUser.UUID != "" {
|
||||
_, err := s.index.Add(s.getInMemoryServiceUser())
|
||||
if err != nil {
|
||||
s.log.Logger.Err(err).Msg("service user was configured but failed to be added to the index")
|
||||
} else {
|
||||
return func() {
|
||||
_ = s.index.Delete(s.getInMemoryServiceUser())
|
||||
}
|
||||
}
|
||||
}
|
||||
return func() {}
|
||||
}
|
||||
|
||||
func (s Service) getInMemoryServiceUser() accountsmsg.Account {
|
||||
return accountsmsg.Account{
|
||||
AccountEnabled: true,
|
||||
Id: s.Config.ServiceUser.UUID,
|
||||
PreferredName: s.Config.ServiceUser.Username,
|
||||
OnPremisesSamAccountName: s.Config.ServiceUser.Username,
|
||||
DisplayName: s.Config.ServiceUser.Username,
|
||||
UidNumber: s.Config.ServiceUser.UID,
|
||||
GidNumber: s.Config.ServiceUser.GID,
|
||||
}
|
||||
}
|
||||
|
||||
// ListAccounts implements the AccountsServiceHandler interface
|
||||
// the query contains account properties
|
||||
func (s Service) ListAccounts(ctx context.Context, in *accountssvc.ListAccountsRequest, out *accountssvc.ListAccountsResponse) (err error) {
|
||||
@@ -118,6 +145,8 @@ func (s Service) ListAccounts(ctx context.Context, in *accountssvc.ListAccountsR
|
||||
}
|
||||
onlySelf := hasSelf && !hasManagement
|
||||
|
||||
teardownServiceUser := s.serviceUserToIndex()
|
||||
defer teardownServiceUser()
|
||||
match, authRequest := getAuthQueryMatch(in.Query)
|
||||
if authRequest {
|
||||
password := match[2]
|
||||
@@ -717,7 +746,7 @@ func validateAccountEmail(serviceID string, a *accountsmsg.Account) error {
|
||||
// We want to allow email addresses as usernames so they show up when using them in ACLs on storages that allow integration with our glauth LDAP service
|
||||
// so we are adding a few restrictions from https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6
|
||||
// names should not start with numbers
|
||||
var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$")
|
||||
var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$")
|
||||
|
||||
func isValidUsername(e string) bool {
|
||||
if len(e) < 1 && len(e) > 254 {
|
||||
@@ -727,7 +756,7 @@ func isValidUsername(e string) bool {
|
||||
}
|
||||
|
||||
// regex from https://www.w3.org/TR/2016/REC-html51-20161101/sec-forms.html#valid-e-mail-address
|
||||
var emailRegex = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
|
||||
var emailRegex = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
|
||||
|
||||
func isValidEmail(e string) bool {
|
||||
if len(e) < 3 && len(e) > 254 {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
config "github.com/owncloud/ocis/accounts/pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
olog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/middleware"
|
||||
"github.com/owncloud/ocis/ocis-pkg/roles"
|
||||
|
||||
@@ -86,33 +86,9 @@ func New(opts ...Option) (s *Service, err error) {
|
||||
if err = s.createDefaultGroups(cfg.DemoUsersAndGroups); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s.serviceUserToIndex()
|
||||
return
|
||||
}
|
||||
|
||||
// serviceUserToIndex temporarily adds a service user to the index, which is supposed to be removed before the lock on the handler function is released
|
||||
func (s Service) serviceUserToIndex() {
|
||||
if s.Config.ServiceUser.Username != "" && s.Config.ServiceUser.UUID != "" {
|
||||
_, err := s.index.Add(s.getInMemoryServiceUser())
|
||||
if err != nil {
|
||||
s.log.Logger.Err(err).Msg("service user was configured but failed to be added to the index")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s Service) getInMemoryServiceUser() accountsmsg.Account {
|
||||
return accountsmsg.Account{
|
||||
AccountEnabled: true,
|
||||
Id: s.Config.ServiceUser.UUID,
|
||||
PreferredName: s.Config.ServiceUser.Username,
|
||||
OnPremisesSamAccountName: s.Config.ServiceUser.Username,
|
||||
DisplayName: s.Config.ServiceUser.Username,
|
||||
UidNumber: s.Config.ServiceUser.UID,
|
||||
GidNumber: s.Config.ServiceUser.GID,
|
||||
}
|
||||
}
|
||||
|
||||
func (s Service) buildIndex() (*indexer.Indexer, error) {
|
||||
var indexcfg *idxcfg.Config
|
||||
|
||||
@@ -277,25 +253,6 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) {
|
||||
{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "534bb038-6f9d-4093-946f-133be61fa4e7",
|
||||
PreferredName: "katherine",
|
||||
OnPremisesSamAccountName: "katherine",
|
||||
Mail: "katherine@example.org",
|
||||
DisplayName: "Katherine Johnson",
|
||||
UidNumber: 20005,
|
||||
GidNumber: 30000,
|
||||
PasswordProfile: &accountsmsg.PasswordProfile{
|
||||
Password: "$2a$11$6SIBlZ.8BzjBsDTRrThUyuz6OvP.XLo7101oFiwHHB.jufKGS9.Ji",
|
||||
},
|
||||
AccountEnabled: true,
|
||||
MemberOf: []*accountsmsg.Group{
|
||||
{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users
|
||||
{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0"}, // sailing-lovers
|
||||
{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a"}, // quantum-lovers
|
||||
{Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e"}, // physics-lovers
|
||||
},
|
||||
},
|
||||
// technical users for kopano and reva
|
||||
{
|
||||
Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf",
|
||||
@@ -396,11 +353,9 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
|
||||
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
|
||||
{Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie
|
||||
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
|
||||
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
|
||||
}},
|
||||
{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*accountsmsg.Account{
|
||||
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
|
||||
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
|
||||
}},
|
||||
{Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*accountsmsg.Account{
|
||||
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
|
||||
@@ -413,7 +368,6 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
|
||||
}},
|
||||
{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*accountsmsg.Account{
|
||||
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
|
||||
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
|
||||
}},
|
||||
{Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*accountsmsg.Account{
|
||||
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
|
||||
@@ -422,7 +376,6 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
|
||||
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
|
||||
{Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie
|
||||
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
|
||||
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
|
||||
}},
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@ import (
|
||||
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"
|
||||
"github.com/cs3org/reva/v2/pkg/auth/scope"
|
||||
revactx "github.com/cs3org/reva/v2/pkg/ctx"
|
||||
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
||||
"github.com/cs3org/reva/v2/pkg/token"
|
||||
"github.com/cs3org/reva/v2/pkg/token/manager/jwt"
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
"github.com/cs3org/reva/pkg/auth/scope"
|
||||
revactx "github.com/cs3org/reva/pkg/ctx"
|
||||
"github.com/cs3org/reva/pkg/rgrpc/todo/pool"
|
||||
"github.com/cs3org/reva/pkg/token"
|
||||
"github.com/cs3org/reva/pkg/token/manager/jwt"
|
||||
"github.com/cs3org/reva/pkg/utils"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
olog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage"
|
||||
|
||||
@@ -2,7 +2,7 @@ const util = require('util')
|
||||
|
||||
module.exports = {
|
||||
url: function () {
|
||||
return this.api.launchUrl + '/accounts'
|
||||
return this.api.launchUrl + '/#/accounts'
|
||||
},
|
||||
|
||||
commands: {
|
||||
|
||||
+1
-1
@@ -8347,7 +8347,7 @@ __metadata:
|
||||
vuex: ^3.5.1
|
||||
xml-js: ^1.6.11
|
||||
peerDependencies:
|
||||
owncloud-design-system: ^12.2.2
|
||||
owncloud-design-system: ^12.1.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
SHELL := bash
|
||||
NAME := audit
|
||||
|
||||
include ../.make/recursion.mk
|
||||
|
||||
.PHONY: test-acceptance-webui
|
||||
test-acceptance-webui:
|
||||
./ui/tests/run-acceptance-test.sh $(FEATURE_PATH)
|
||||
|
||||
|
||||
############ tooling ############
|
||||
ifneq (, $(shell which go 2> /dev/null)) # suppress `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
|
||||
|
||||
############ generate ############
|
||||
include ../.make/generate.mk
|
||||
|
||||
.PHONY: ci-go-generate
|
||||
ci-go-generate: protobuf # CI runs ci-node-generate automatically before this target
|
||||
|
||||
.PHONY: ci-node-generate
|
||||
ci-node-generate: yarn-build
|
||||
|
||||
.PHONY: yarn-build
|
||||
yarn-build: node_modules
|
||||
yarn lint
|
||||
yarn test
|
||||
yarn build
|
||||
|
||||
.PHONY: node_modules
|
||||
node_modules:
|
||||
yarn install --immutable
|
||||
|
||||
############ protobuf ############
|
||||
include ../.make/protobuf.mk
|
||||
|
||||
.PHONY: protobuf
|
||||
protobuf: buf-generate
|
||||
@@ -1,14 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/audit/pkg/command"
|
||||
"github.com/owncloud/ocis/audit/pkg/config/defaults"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(defaults.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Health is the entrypoint for the health command.
|
||||
func Health(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "health",
|
||||
Usage: "Check health status",
|
||||
Action: func(c *cli.Context) error {
|
||||
// Not implemented
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/clihelper"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/thejerf/suture/v4"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// GetCommands provides all commands for this service
|
||||
func GetCommands(cfg *config.Config) cli.Commands {
|
||||
return []*cli.Command{
|
||||
// start this service
|
||||
Server(cfg),
|
||||
|
||||
// interaction with this service
|
||||
|
||||
// infos about this service
|
||||
Health(cfg),
|
||||
Version(cfg),
|
||||
}
|
||||
}
|
||||
|
||||
// Execute is the entry point for the audit command.
|
||||
func Execute(cfg *config.Config) error {
|
||||
app := clihelper.DefaultApp(&cli.App{
|
||||
Name: "audit",
|
||||
Usage: "starts audit service",
|
||||
Commands: GetCommands(cfg),
|
||||
})
|
||||
|
||||
cli.HelpFlag = &cli.BoolFlag{
|
||||
Name: "help,h",
|
||||
Usage: "Show the help",
|
||||
}
|
||||
|
||||
return app.Run(os.Args)
|
||||
}
|
||||
|
||||
// SutureService allows for the audit command to be embedded and supervised by a suture supervisor tree.
|
||||
type SutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewSutureService creates a new audit.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
cfg.Settings.Commons = cfg.Commons
|
||||
return SutureService{
|
||||
cfg: cfg.Audit,
|
||||
}
|
||||
}
|
||||
|
||||
func (s SutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Context = ctx
|
||||
if err := Execute(s.cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/asim/go-micro/plugins/events/natsjs/v4"
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/audit/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/audit/pkg/logging"
|
||||
svc "github.com/owncloud/ocis/audit/pkg/service"
|
||||
"github.com/owncloud/ocis/audit/pkg/types"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Server is the entrypoint for the server command.
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
return parser.ParseConfig(cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
ctx := cfg.Context
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
evtsCfg := cfg.Events
|
||||
client, err := server.NewNatsStream(
|
||||
natsjs.Address(evtsCfg.Endpoint),
|
||||
natsjs.ClusterID(evtsCfg.Cluster),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
evts, err := events.Consume(client, evtsCfg.ConsumerGroup, types.RegisteredEvents()...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
svc.AuditLoggerFromConfig(ctx, cfg.Auditlog, evts, logger)
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Version prints the service versions of all running instances.
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
// not implemented
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
||||
|
||||
Service Service `ocisConfig:"-" yaml:"-"`
|
||||
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
Events Events `ocisConfig:"events"`
|
||||
Auditlog Auditlog `ocisConfig:"auditlog"`
|
||||
|
||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
||||
}
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
type Events struct {
|
||||
Endpoint string `ocisConfig:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
|
||||
Cluster string `ocisConfig:"events_cluster" env:"AUDIT_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
|
||||
ConsumerGroup string `ocisConfig:"events_group" env:"AUDIT_EVENTS_GROUP" desc:"the customergroup of the service. One group will only get one vopy of an event"`
|
||||
}
|
||||
|
||||
// Auditlog holds audit log information
|
||||
type Auditlog struct {
|
||||
LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
|
||||
LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"`
|
||||
FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"`
|
||||
Format string `ocisConfig:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"`
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package config
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string `ocisConfig:"addr" env:"AUDIT_DEBUG_ADDR"`
|
||||
Token string `ocisConfig:"token" env:"AUDIT_DEBUG_TOKEN"`
|
||||
Pprof bool `ocisConfig:"pprof" env:"AUDIT_DEBUG_PPROF"`
|
||||
Zpages bool `ocisConfig:"zpages" env:"AUDIT_DEBUG_ZPAGES"`
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package defaults
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
)
|
||||
|
||||
func FullDefaultConfig() *config.Config {
|
||||
cfg := DefaultConfig()
|
||||
|
||||
EnsureDefaults(cfg)
|
||||
Sanitize(cfg)
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func DefaultConfig() *config.Config {
|
||||
return &config.Config{
|
||||
Service: config.Service{
|
||||
Name: "audit",
|
||||
},
|
||||
Events: config.Events{
|
||||
Endpoint: "127.0.0.1:9233",
|
||||
Cluster: "ocis-cluster",
|
||||
ConsumerGroup: "audit",
|
||||
},
|
||||
Auditlog: config.Auditlog{
|
||||
LogToConsole: true,
|
||||
Format: "json",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func EnsureDefaults(cfg *config.Config) {
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &config.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
}
|
||||
|
||||
func Sanitize(cfg *config.Config) {
|
||||
// sanitize config
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package config
|
||||
|
||||
// Log defines the available log configuration.
|
||||
type Log struct {
|
||||
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;AUDIT_LOG_LEVEL"`
|
||||
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;AUDIT_LOG_PRETTY"`
|
||||
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;AUDIT_LOG_COLOR"`
|
||||
File string `mapstructure:"file" env:"OCIS_LOG_FILE;AUDIT_LOG_FILE"`
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/audit/pkg/config/defaults"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
|
||||
)
|
||||
|
||||
// ParseConfig loads accounts configuration from known paths.
|
||||
func ParseConfig(cfg *config.Config) error {
|
||||
_, err := ociscfg.BindSourcesToStructs(cfg.Service.Name, cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defaults.EnsureDefaults(cfg)
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
// no environment variable set for this config is an expected "error"
|
||||
if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
defaults.Sanitize(cfg)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string `ocisConfig:"-" yaml:"-"`
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
)
|
||||
|
||||
// LoggerFromConfig initializes a service-specific logger instance.
|
||||
func Configure(name string, cfg *config.Log) log.Logger {
|
||||
return log.NewLogger(
|
||||
log.Name(name),
|
||||
log.Level(cfg.Level),
|
||||
log.Pretty(cfg.Pretty),
|
||||
log.Color(cfg.Color),
|
||||
log.File(cfg.File),
|
||||
)
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/owncloud/ocis/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/audit/pkg/types"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
)
|
||||
|
||||
// Log is used to log to different outputs
|
||||
type Log func([]byte)
|
||||
|
||||
// Marshaller is used to marshal events
|
||||
type Marshaller func(interface{}) ([]byte, error)
|
||||
|
||||
// AuditLoggerFromConfig will start a new AuditLogger generated from the config
|
||||
func AuditLoggerFromConfig(ctx context.Context, cfg config.Auditlog, ch <-chan interface{}, log log.Logger) {
|
||||
var logs []Log
|
||||
|
||||
if cfg.LogToConsole {
|
||||
logs = append(logs, WriteToStdout())
|
||||
}
|
||||
|
||||
if cfg.LogToFile {
|
||||
logs = append(logs, WriteToFile(cfg.FilePath, log))
|
||||
}
|
||||
|
||||
StartAuditLogger(ctx, ch, log, Marshal(cfg.Format, log), logs...)
|
||||
|
||||
}
|
||||
|
||||
// StartAuditLogger will block. run in seperate go routine
|
||||
func StartAuditLogger(ctx context.Context, ch <-chan interface{}, log log.Logger, marshaller Marshaller, logto ...Log) {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case i := <-ch:
|
||||
var auditEvent interface{}
|
||||
switch ev := i.(type) {
|
||||
case events.ShareCreated:
|
||||
auditEvent = types.ShareCreated(ev)
|
||||
case events.LinkCreated:
|
||||
auditEvent = types.LinkCreated(ev)
|
||||
case events.ShareUpdated:
|
||||
auditEvent = types.ShareUpdated(ev)
|
||||
case events.LinkUpdated:
|
||||
auditEvent = types.LinkUpdated(ev)
|
||||
case events.ShareRemoved:
|
||||
auditEvent = types.ShareRemoved(ev)
|
||||
case events.LinkRemoved:
|
||||
auditEvent = types.LinkRemoved(ev)
|
||||
case events.ReceivedShareUpdated:
|
||||
auditEvent = types.ReceivedShareUpdated(ev)
|
||||
case events.LinkAccessed:
|
||||
auditEvent = types.LinkAccessed(ev)
|
||||
case events.LinkAccessFailed:
|
||||
auditEvent = types.LinkAccessFailed(ev)
|
||||
case events.FileUploaded:
|
||||
auditEvent = types.FileUploaded(ev)
|
||||
case events.FileDownloaded:
|
||||
auditEvent = types.FileDownloaded(ev)
|
||||
case events.ItemMoved:
|
||||
auditEvent = types.ItemMoved(ev)
|
||||
case events.ItemTrashed:
|
||||
auditEvent = types.ItemTrashed(ev)
|
||||
case events.ItemPurged:
|
||||
auditEvent = types.ItemPurged(ev)
|
||||
case events.ItemRestored:
|
||||
auditEvent = types.ItemRestored(ev)
|
||||
case events.FileVersionRestored:
|
||||
auditEvent = types.FileVersionRestored(ev)
|
||||
case events.SpaceCreated:
|
||||
auditEvent = types.SpaceCreated(ev)
|
||||
case events.SpaceRenamed:
|
||||
auditEvent = types.SpaceRenamed(ev)
|
||||
case events.SpaceDisabled:
|
||||
auditEvent = types.SpaceDisabled(ev)
|
||||
case events.SpaceEnabled:
|
||||
auditEvent = types.SpaceEnabled(ev)
|
||||
case events.SpaceDeleted:
|
||||
auditEvent = types.SpaceDeleted(ev)
|
||||
default:
|
||||
log.Error().Interface("event", ev).Msg(fmt.Sprintf("can't handle event of type '%T'", ev))
|
||||
continue
|
||||
|
||||
}
|
||||
|
||||
b, err := marshaller(auditEvent)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("error marshaling the event")
|
||||
continue
|
||||
}
|
||||
|
||||
for _, l := range logto {
|
||||
l(b)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// WriteToFile returns a Log function writing to a file
|
||||
func WriteToFile(path string, log log.Logger) Log {
|
||||
return func(content []byte) {
|
||||
file, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msgf("error opening file '%s'", path)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
if _, err := fmt.Fprintln(file, string(content)); err != nil {
|
||||
log.Error().Err(err).Msgf("error writing to file '%s'", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WriteToStdout return a Log function writing to Stdout
|
||||
func WriteToStdout() Log {
|
||||
return func(content []byte) {
|
||||
fmt.Println(string(content))
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal returns a Marshaller from the `format` string
|
||||
func Marshal(format string, log log.Logger) Marshaller {
|
||||
switch format {
|
||||
default:
|
||||
log.Error().Msgf("unknown format '%s'", format)
|
||||
return nil
|
||||
case "json":
|
||||
return json.Marshal
|
||||
case "minimal":
|
||||
return func(ev interface{}) ([]byte, error) {
|
||||
b, err := json.Marshal(ev)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
m := make(map[string]interface{})
|
||||
if err := json.Unmarshal(b, &m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
format := fmt.Sprintf("%s)\n %s", m["Action"], m["Message"])
|
||||
return []byte(format), nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,635 +0,0 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/owncloud/ocis/audit/pkg/types"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/test-go/testify/require"
|
||||
|
||||
group "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
|
||||
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
rtypes "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
|
||||
)
|
||||
|
||||
var testCases = []struct {
|
||||
Alias string
|
||||
SystemEvent interface{}
|
||||
CheckAuditEvent func(*testing.T, []byte)
|
||||
}{
|
||||
{
|
||||
Alias: "ShareCreated - user",
|
||||
SystemEvent: events.ShareCreated{
|
||||
Sharer: userID("sharing-userid"),
|
||||
GranteeUserID: userID("beshared-userid"),
|
||||
GranteeGroupID: nil,
|
||||
ItemID: resourceID("storage-1", "itemid-1"),
|
||||
CTime: timestamp(0),
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareCreated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "1970-01-01T00:00:00Z", "user 'sharing-userid' shared file 'itemid-1' with 'beshared-userid'", "file_shared")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "")
|
||||
// AuditEventShareCreated fields
|
||||
require.Equal(t, "", ev.ItemType)
|
||||
require.Equal(t, "", ev.ExpirationDate)
|
||||
require.Equal(t, false, ev.SharePass)
|
||||
//require.Equal(t, "stat:true ", ev.Permissions) // TODO: BUG! Should work
|
||||
require.Equal(t, "user", ev.ShareType)
|
||||
require.Equal(t, "beshared-userid", ev.ShareWith)
|
||||
require.Equal(t, "sharing-userid", ev.ShareOwner)
|
||||
require.Equal(t, "", ev.ShareToken)
|
||||
},
|
||||
}, {
|
||||
Alias: "ShareCreated - group",
|
||||
SystemEvent: events.ShareCreated{
|
||||
Sharer: userID("sharing-userid"),
|
||||
GranteeUserID: nil,
|
||||
GranteeGroupID: groupID("beshared-groupid"),
|
||||
ItemID: resourceID("storage-1", "itemid-1"),
|
||||
CTime: timestamp(10e8),
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareCreated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' shared file 'itemid-1' with 'beshared-groupid'", "file_shared")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "")
|
||||
// AuditEventShareCreated fields
|
||||
require.Equal(t, "", ev.ItemType)
|
||||
require.Equal(t, "", ev.ExpirationDate)
|
||||
require.Equal(t, false, ev.SharePass)
|
||||
//require.Equal(t, "stat:true ", ev.Permissions) // TODO: BUG! Should work
|
||||
require.Equal(t, "group", ev.ShareType)
|
||||
require.Equal(t, "beshared-groupid", ev.ShareWith)
|
||||
require.Equal(t, "sharing-userid", ev.ShareOwner)
|
||||
require.Equal(t, "", ev.ShareToken)
|
||||
|
||||
},
|
||||
}, {
|
||||
Alias: "ShareUpdated",
|
||||
SystemEvent: events.ShareUpdated{
|
||||
ShareID: shareID("shareid"),
|
||||
Sharer: userID("sharing-userid"),
|
||||
GranteeUserID: nil,
|
||||
GranteeGroupID: groupID("beshared-groupid"),
|
||||
ItemID: resourceID("storage-1", "itemid-1"),
|
||||
Permissions: sharePermissions("stat", "get_quota"),
|
||||
MTime: timestamp(10e8),
|
||||
Updated: "permissions",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareUpdated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' updated field 'permissions' of share 'shareid'", "share_permission_updated")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "", ev.ExpirationDate) // no expiration for shares
|
||||
require.Equal(t, false, ev.SharePass)
|
||||
require.Equal(t, "get_quota:true stat:true ", ev.Permissions)
|
||||
require.Equal(t, "group", ev.ShareType)
|
||||
require.Equal(t, "beshared-groupid", ev.ShareWith)
|
||||
require.Equal(t, "sharing-userid", ev.ShareOwner)
|
||||
require.Equal(t, "", ev.ShareToken) // token not filled for shares
|
||||
},
|
||||
}, {
|
||||
Alias: "LinkUpdated - permissions",
|
||||
SystemEvent: events.LinkUpdated{
|
||||
ShareID: linkID("shareid"),
|
||||
Sharer: userID("sharing-userid"),
|
||||
ItemID: resourceID("storage-1", "itemid-1"),
|
||||
Permissions: linkPermissions("stat"),
|
||||
CTime: timestamp(10e8),
|
||||
DisplayName: "link",
|
||||
Expiration: timestamp(10e8 + 10e5),
|
||||
PasswordProtected: true,
|
||||
Token: "token-123",
|
||||
FieldUpdated: "permissions",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareUpdated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' updated field 'permissions' of public link 'shareid'", "share_permission_updated")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "2001-09-20T15:33:20Z", ev.ExpirationDate)
|
||||
require.Equal(t, true, ev.SharePass)
|
||||
require.Equal(t, "stat:true ", ev.Permissions)
|
||||
require.Equal(t, "link", ev.ShareType)
|
||||
require.Equal(t, "", ev.ShareWith) // not filled on links
|
||||
require.Equal(t, "sharing-userid", ev.ShareOwner)
|
||||
require.Equal(t, "token-123", ev.ShareToken)
|
||||
},
|
||||
}, {
|
||||
Alias: "ShareRemoved",
|
||||
SystemEvent: events.ShareRemoved{
|
||||
ShareID: shareID("shareid"),
|
||||
ShareKey: nil,
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareRemoved{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "share id:'shareid' uid:'' item-id:'' was removed", "file_unshared")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "", ev.ShareType)
|
||||
require.Equal(t, "", ev.ShareWith) // not filled on links
|
||||
},
|
||||
}, {
|
||||
Alias: "LinkRemoved - id",
|
||||
SystemEvent: events.LinkRemoved{
|
||||
ShareID: linkID("shareid"),
|
||||
ShareToken: "",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareRemoved{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "public link id:'shareid' was removed", "file_unshared")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "link", ev.ShareType)
|
||||
require.Equal(t, "", ev.ShareWith) // not filled on links
|
||||
},
|
||||
}, {
|
||||
Alias: "LinkRemoved - token",
|
||||
SystemEvent: events.LinkRemoved{
|
||||
ShareID: nil,
|
||||
ShareToken: "token-123",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventShareRemoved{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "public link id:'token-123' was removed", "file_unshared")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "token-123")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "link", ev.ShareType)
|
||||
require.Equal(t, "", ev.ShareWith) // not filled on links
|
||||
},
|
||||
}, {
|
||||
Alias: "Share accepted",
|
||||
SystemEvent: events.ReceivedShareUpdated{
|
||||
ShareID: shareID("shareid"),
|
||||
ItemID: resourceID("storageid-1", "itemid-1"),
|
||||
Permissions: sharePermissions("get_quota"),
|
||||
GranteeUserID: userID("beshared-userid"),
|
||||
GranteeGroupID: nil,
|
||||
Sharer: userID("sharing-userid"),
|
||||
MTime: timestamp(10e8),
|
||||
State: "SHARE_STATE_ACCEPTED",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventReceivedShareUpdated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "beshared-userid", "2001-09-09T01:46:40Z", "user 'beshared-userid' accepted share 'shareid' from user 'sharing-userid'", "share_accepted")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType)
|
||||
require.Equal(t, "user", ev.ShareType)
|
||||
require.Equal(t, "beshared-userid", ev.ShareWith)
|
||||
},
|
||||
}, {
|
||||
Alias: "Share declined",
|
||||
SystemEvent: events.ReceivedShareUpdated{
|
||||
ShareID: shareID("shareid"),
|
||||
ItemID: resourceID("storageid-1", "itemid-1"),
|
||||
Permissions: sharePermissions("get_quota"),
|
||||
GranteeUserID: userID("beshared-userid"),
|
||||
GranteeGroupID: nil,
|
||||
Sharer: userID("sharing-userid"),
|
||||
MTime: timestamp(10e8),
|
||||
State: "SHARE_STATE_DECLINED",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventReceivedShareUpdated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "beshared-userid", "2001-09-09T01:46:40Z", "user 'beshared-userid' declined share 'shareid' from user 'sharing-userid'", "share_declined")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType)
|
||||
require.Equal(t, "user", ev.ShareType)
|
||||
require.Equal(t, "beshared-userid", ev.ShareWith)
|
||||
},
|
||||
}, {
|
||||
Alias: "Link accessed - success",
|
||||
SystemEvent: events.LinkAccessed{
|
||||
ShareID: linkID("shareid"),
|
||||
Sharer: userID("sharing-userid"),
|
||||
ItemID: resourceID("storage-1", "itemid-1"),
|
||||
Permissions: linkPermissions("stat"),
|
||||
DisplayName: "link",
|
||||
Expiration: timestamp(10e8 + 10e5),
|
||||
PasswordProtected: true,
|
||||
CTime: timestamp(10e8),
|
||||
Token: "token-123",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventLinkAccessed{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "link 'shareid' was accessed. Success: true", "public_link_accessed")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "token-123", ev.ShareToken)
|
||||
require.Equal(t, true, ev.Success)
|
||||
},
|
||||
}, {
|
||||
Alias: "Link accessed - failure",
|
||||
SystemEvent: events.LinkAccessFailed{
|
||||
ShareID: linkID("shareid"),
|
||||
Token: "token-123",
|
||||
Status: 8,
|
||||
Message: "access denied",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventLinkAccessed{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "link 'shareid' was accessed. Success: false", "public_link_accessed")
|
||||
// AuditEventSharing fields
|
||||
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
|
||||
// AuditEventShareUpdated fields
|
||||
require.Equal(t, "", ev.ItemType) // not implemented atm
|
||||
require.Equal(t, "token-123", ev.ShareToken)
|
||||
require.Equal(t, false, ev.Success)
|
||||
},
|
||||
}, {
|
||||
Alias: "File created",
|
||||
SystemEvent: events.FileUploaded{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileCreated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was created", "file_create")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File read",
|
||||
SystemEvent: events.FileDownloaded{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileRead{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was read", "file_read")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File trashed",
|
||||
SystemEvent: events.ItemTrashed{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileDeleted{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was trashed", "file_delete")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File renamed",
|
||||
SystemEvent: events.ItemMoved{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
OldReference: reference("sto-123", "iid-123", "./anotheritem"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileRenamed{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was moved from './anotheritem' to './item'", "file_rename")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRenamed fields
|
||||
require.Equal(t, "./anotheritem", ev.OldPath)
|
||||
|
||||
},
|
||||
}, {
|
||||
Alias: "File purged",
|
||||
SystemEvent: events.ItemPurged{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFilePurged{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was removed from trashbin", "file_trash_delete")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File restored",
|
||||
SystemEvent: events.ItemRestored{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
OldReference: reference("sto-123", "sto-123!iid-123/item", "./oldpath"),
|
||||
Key: "",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileRestored{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was restored from trashbin to './item'", "file_trash_restore")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "./oldpath", ev.OldPath)
|
||||
|
||||
},
|
||||
}, {
|
||||
Alias: "File version restored",
|
||||
SystemEvent: events.FileVersionRestored{
|
||||
FileID: reference("sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
Key: "v1",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventFileVersionRestored{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was restored in version 'v1'", "file_version_restore")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "v1", ev.Key)
|
||||
|
||||
},
|
||||
}, {
|
||||
Alias: "Space created",
|
||||
SystemEvent: events.SpaceCreated{
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
|
||||
Owner: userID("uid-123"),
|
||||
Root: resourceID("sto-123", "iid-123"),
|
||||
Name: "test-space",
|
||||
Type: "project",
|
||||
Quota: nil, // Quota not interesting atm
|
||||
MTime: timestamp(10e9),
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventSpaceCreated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "2286-11-20T17:46:40Z", "Space 'space-123' with name 'test-space' was created", "space_created")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "uid-123", ev.Owner)
|
||||
require.Equal(t, "sto-123!iid-123", ev.RootItem)
|
||||
require.Equal(t, "test-space", ev.Name)
|
||||
require.Equal(t, "project", ev.Type)
|
||||
},
|
||||
}, {
|
||||
Alias: "Space renamed",
|
||||
SystemEvent: events.SpaceRenamed{
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
|
||||
Owner: userID("uid-123"),
|
||||
Name: "new-name",
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventSpaceRenamed{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was renamed to 'new-name'", "space_renamed")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
|
||||
// AuditEventSpaceRenamed fields
|
||||
require.Equal(t, "new-name", ev.NewName)
|
||||
},
|
||||
}, {
|
||||
Alias: "Space disabled",
|
||||
SystemEvent: events.SpaceDisabled{
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventSpaceDisabled{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was disabled", "space_disabled")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
|
||||
},
|
||||
}, {
|
||||
Alias: "Space enabled",
|
||||
SystemEvent: events.SpaceEnabled{
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventSpaceEnabled{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was (re-) enabled", "space_enabled")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
|
||||
},
|
||||
}, {
|
||||
Alias: "Space deleted",
|
||||
SystemEvent: events.SpaceDeleted{
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventSpaceDeleted{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was deleted", "space_deleted")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestAuditLogging(t *testing.T) {
|
||||
log := log.NewLogger()
|
||||
|
||||
inch := make(chan interface{})
|
||||
defer close(inch)
|
||||
|
||||
outch := make(chan []byte)
|
||||
defer close(outch)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.TODO())
|
||||
defer cancel()
|
||||
|
||||
go StartAuditLogger(ctx, inch, log, Marshal("json", log), func(b []byte) {
|
||||
outch <- b
|
||||
})
|
||||
|
||||
for i := range testCases {
|
||||
tc := testCases[i]
|
||||
t.Run(tc.Alias, func(t *testing.T) {
|
||||
inch <- tc.SystemEvent
|
||||
tc.CheckAuditEvent(t, <-outch)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func checkBaseAuditEvent(t *testing.T, ev types.AuditEvent, user string, time string, message string, action string) {
|
||||
require.Equal(t, "", ev.RemoteAddr) // not implemented atm
|
||||
require.Equal(t, user, ev.User)
|
||||
require.Equal(t, "", ev.URL) // not implemented atm
|
||||
require.Equal(t, "", ev.Method) // not implemented atm
|
||||
require.Equal(t, "", ev.UserAgent) // not implemented atm
|
||||
require.Equal(t, time, ev.Time)
|
||||
require.Equal(t, "admin_audit", ev.App)
|
||||
require.Equal(t, message, ev.Message)
|
||||
require.Equal(t, action, ev.Action)
|
||||
require.Equal(t, false, ev.CLI) // not implemented atm
|
||||
require.Equal(t, 1, ev.Level)
|
||||
}
|
||||
|
||||
func checkSharingAuditEvent(t *testing.T, ev types.AuditEventSharing, itemID string, owner string, shareID string) {
|
||||
require.Equal(t, itemID, ev.FileID)
|
||||
require.Equal(t, owner, ev.Owner)
|
||||
require.Equal(t, "", ev.Path) // not implemented atm
|
||||
require.Equal(t, shareID, ev.ShareID)
|
||||
}
|
||||
|
||||
func checkFilesAuditEvent(t *testing.T, ev types.AuditEventFiles, itemID string, owner string, path string) {
|
||||
require.Equal(t, itemID, ev.FileID)
|
||||
require.Equal(t, owner, ev.Owner)
|
||||
require.Equal(t, path, ev.Path)
|
||||
}
|
||||
|
||||
func checkSpacesAuditEvent(t *testing.T, ev types.AuditEventSpaces, spaceID string) {
|
||||
require.Equal(t, spaceID, ev.SpaceID)
|
||||
}
|
||||
func shareID(id string) *collaboration.ShareId {
|
||||
return &collaboration.ShareId{
|
||||
OpaqueId: id,
|
||||
}
|
||||
}
|
||||
|
||||
func linkID(id string) *link.PublicShareId {
|
||||
return &link.PublicShareId{
|
||||
OpaqueId: id,
|
||||
}
|
||||
}
|
||||
|
||||
func userID(id string) *user.UserId {
|
||||
return &user.UserId{
|
||||
OpaqueId: id,
|
||||
Idp: "idp",
|
||||
}
|
||||
}
|
||||
|
||||
func groupID(id string) *group.GroupId {
|
||||
return &group.GroupId{
|
||||
OpaqueId: id,
|
||||
Idp: "idp",
|
||||
}
|
||||
}
|
||||
|
||||
func resourceID(sid, oid string) *provider.ResourceId {
|
||||
return &provider.ResourceId{
|
||||
StorageId: sid,
|
||||
OpaqueId: oid,
|
||||
}
|
||||
}
|
||||
|
||||
func reference(sid, oid, path string) *provider.Reference {
|
||||
return &provider.Reference{
|
||||
ResourceId: resourceID(sid, oid),
|
||||
Path: path,
|
||||
}
|
||||
}
|
||||
|
||||
func timestamp(seconds uint64) *rtypes.Timestamp {
|
||||
return &rtypes.Timestamp{
|
||||
Seconds: seconds,
|
||||
Nanos: 0,
|
||||
}
|
||||
}
|
||||
|
||||
func sharePermissions(perms ...string) *collaboration.SharePermissions {
|
||||
return &collaboration.SharePermissions{
|
||||
Permissions: permissions(perms...),
|
||||
}
|
||||
}
|
||||
|
||||
func linkPermissions(perms ...string) *link.PublicSharePermissions {
|
||||
return &link.PublicSharePermissions{
|
||||
Permissions: permissions(perms...),
|
||||
}
|
||||
}
|
||||
|
||||
func permissions(permissions ...string) *provider.ResourcePermissions {
|
||||
perms := &provider.ResourcePermissions{}
|
||||
|
||||
for _, p := range permissions {
|
||||
switch p {
|
||||
case "stat":
|
||||
perms.Stat = true
|
||||
case "get_path":
|
||||
perms.GetPath = true
|
||||
case "list_container":
|
||||
perms.ListContainer = true
|
||||
case "get_quota":
|
||||
perms.GetQuota = true
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return perms
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
package types
|
||||
|
||||
import "fmt"
|
||||
|
||||
// short identifiers for audit actions
|
||||
const (
|
||||
// Sharing
|
||||
ActionShareCreated = "file_shared"
|
||||
ActionSharePermissionUpdated = "share_permission_updated"
|
||||
ActionShareDisplayNameUpdated = "share_name_updated"
|
||||
ActionSharePasswordUpdated = "share_password_updated"
|
||||
ActionShareExpirationUpdated = "share_expiration_updated"
|
||||
ActionShareRemoved = "file_unshared"
|
||||
ActionShareAccepted = "share_accepted"
|
||||
ActionShareDeclined = "share_declined"
|
||||
ActionLinkAccessed = "public_link_accessed"
|
||||
|
||||
// Files
|
||||
ActionFileCreated = "file_create"
|
||||
ActionFileRead = "file_read"
|
||||
ActionFileTrashed = "file_delete"
|
||||
ActionFileRenamed = "file_rename"
|
||||
ActionFilePurged = "file_trash_delete"
|
||||
ActionFileRestored = "file_trash_restore"
|
||||
ActionFileVersionRestored = "file_version_restore"
|
||||
|
||||
// Spaces
|
||||
ActionSpaceCreated = "space_created"
|
||||
ActionSpaceRenamed = "space_renamed"
|
||||
ActionSpaceDisabled = "space_disabled"
|
||||
ActionSpaceEnabled = "space_enabled"
|
||||
ActionSpaceDeleted = "space_deleted"
|
||||
)
|
||||
|
||||
// MessageShareCreated returns the human readable string that describes the action
|
||||
func MessageShareCreated(sharer, item, grantee string) string {
|
||||
return fmt.Sprintf("user '%s' shared file '%s' with '%s'", sharer, item, grantee)
|
||||
}
|
||||
|
||||
// MessageLinkCreated returns the human readable string that describes the action
|
||||
func MessageLinkCreated(sharer, item, shareid string) string {
|
||||
return fmt.Sprintf("user '%s' created a public to file '%s' with id '%s'", sharer, item, shareid)
|
||||
}
|
||||
|
||||
// MessageShareUpdated returns the human readable string that describes the action
|
||||
func MessageShareUpdated(sharer, shareID, fieldUpdated string) string {
|
||||
return fmt.Sprintf("user '%s' updated field '%s' of share '%s'", sharer, fieldUpdated, shareID)
|
||||
}
|
||||
|
||||
// MessageLinkUpdated returns the human readable string that describes the action
|
||||
func MessageLinkUpdated(sharer, shareid, fieldUpdated string) string {
|
||||
return fmt.Sprintf("user '%s' updated field '%s' of public link '%s'", sharer, fieldUpdated, shareid)
|
||||
}
|
||||
|
||||
// MessageShareRemoved returns the human readable string that describes the action
|
||||
func MessageShareRemoved(sharer, shareid, itemid string) string {
|
||||
return fmt.Sprintf("share id:'%s' uid:'%s' item-id:'%s' was removed", shareid, sharer, itemid)
|
||||
}
|
||||
|
||||
// MessageLinkRemoved returns the human readable string that describes the action
|
||||
func MessageLinkRemoved(shareid string) string {
|
||||
return fmt.Sprintf("public link id:'%s' was removed", shareid)
|
||||
}
|
||||
|
||||
// MessageShareAccepted returns the human readable string that describes the action
|
||||
func MessageShareAccepted(userid, shareid, sharerid string) string {
|
||||
return fmt.Sprintf("user '%s' accepted share '%s' from user '%s'", userid, shareid, sharerid)
|
||||
}
|
||||
|
||||
// MessageShareDeclined returns the human readable string that describes the action
|
||||
func MessageShareDeclined(userid, shareid, sharerid string) string {
|
||||
return fmt.Sprintf("user '%s' declined share '%s' from user '%s'", userid, shareid, sharerid)
|
||||
}
|
||||
|
||||
// MessageLinkAccessed returns the human readable string that describes the action
|
||||
func MessageLinkAccessed(linkid string, success bool) string {
|
||||
return fmt.Sprintf("link '%s' was accessed. Success: %v", linkid, success)
|
||||
}
|
||||
|
||||
// MessageFileCreated returns the human readable string that describes the action
|
||||
func MessageFileCreated(item string) string {
|
||||
return fmt.Sprintf("File '%s' was created", item)
|
||||
}
|
||||
|
||||
// MessageFileRead returns the human readable string that describes the action
|
||||
func MessageFileRead(item string) string {
|
||||
return fmt.Sprintf("File '%s' was read", item)
|
||||
}
|
||||
|
||||
// MessageFileTrashed returns the human readable string that describes the action
|
||||
func MessageFileTrashed(item string) string {
|
||||
return fmt.Sprintf("File '%s' was trashed", item)
|
||||
}
|
||||
|
||||
// MessageFileRenamed returns the human readable string that describes the action
|
||||
func MessageFileRenamed(item, oldpath, newpath string) string {
|
||||
return fmt.Sprintf("File '%s' was moved from '%s' to '%s'", item, oldpath, newpath)
|
||||
}
|
||||
|
||||
// MessageFilePurged returns the human readable string that describes the action
|
||||
func MessageFilePurged(item string) string {
|
||||
return fmt.Sprintf("File '%s' was removed from trashbin", item)
|
||||
}
|
||||
|
||||
// MessageFileRestored returns the human readable string that describes the action
|
||||
func MessageFileRestored(item, path string) string {
|
||||
return fmt.Sprintf("File '%s' was restored from trashbin to '%s'", item, path)
|
||||
}
|
||||
|
||||
// MessageFileVersionRestored returns the human readable string that describes the action
|
||||
func MessageFileVersionRestored(item string, version string) string {
|
||||
return fmt.Sprintf("File '%s' was restored in version '%s'", item, version)
|
||||
}
|
||||
|
||||
// MessageSpaceCreated returns the human readable string that describes the action
|
||||
func MessageSpaceCreated(spaceID string, name string) string {
|
||||
return fmt.Sprintf("Space '%s' with name '%s' was created", spaceID, name)
|
||||
}
|
||||
|
||||
// MessageSpaceRenamed returns the human readable string that describes the action
|
||||
func MessageSpaceRenamed(spaceID string, name string) string {
|
||||
return fmt.Sprintf("Space '%s' was renamed to '%s'", spaceID, name)
|
||||
}
|
||||
|
||||
// MessageSpaceDisabled returns the human readable string that describes the action
|
||||
func MessageSpaceDisabled(spaceID string) string {
|
||||
return fmt.Sprintf("Space '%s' was disabled", spaceID)
|
||||
}
|
||||
|
||||
// MessageSpaceEnabled returns the human readable string that describes the action
|
||||
func MessageSpaceEnabled(spaceID string) string {
|
||||
return fmt.Sprintf("Space '%s' was (re-) enabled", spaceID)
|
||||
}
|
||||
|
||||
// MessageSpaceDeleted returns the human readable string that describes the action
|
||||
func MessageSpaceDeleted(spaceID string) string {
|
||||
return fmt.Sprintf("Space '%s' was deleted", spaceID)
|
||||
}
|
||||
@@ -1,422 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
|
||||
group "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
|
||||
)
|
||||
|
||||
// BasicAuditEvent creates an AuditEvent from given values
|
||||
func BasicAuditEvent(uid string, ctime string, msg string, action string) AuditEvent {
|
||||
return AuditEvent{
|
||||
User: uid,
|
||||
Time: ctime,
|
||||
App: "admin_audit",
|
||||
Message: msg,
|
||||
Action: action,
|
||||
Level: 1,
|
||||
|
||||
// NOTE: those values are not in the events and can therefore not be filled at the moment
|
||||
RemoteAddr: "",
|
||||
URL: "",
|
||||
Method: "",
|
||||
UserAgent: "",
|
||||
CLI: false,
|
||||
}
|
||||
}
|
||||
|
||||
// SharingAuditEvent creates an AuditEventSharing from given values
|
||||
func SharingAuditEvent(shareid string, fileid string, uid string, base AuditEvent) AuditEventSharing {
|
||||
return AuditEventSharing{
|
||||
AuditEvent: base,
|
||||
FileID: fileid,
|
||||
Owner: uid,
|
||||
ShareID: shareid,
|
||||
|
||||
// NOTE: those values are not in the events and can therefore not be filled at the moment
|
||||
Path: "",
|
||||
}
|
||||
}
|
||||
|
||||
// ShareCreated converts a ShareCreated Event to an AuditEventShareCreated
|
||||
func ShareCreated(ev events.ShareCreated) AuditEventShareCreated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageShareCreated(uid, ev.ItemID.OpaqueId, with), ActionShareCreated)
|
||||
return AuditEventShareCreated{
|
||||
AuditEventSharing: SharingAuditEvent("", ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
ShareWith: with,
|
||||
ShareType: typ,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
ExpirationDate: "",
|
||||
SharePass: false,
|
||||
Permissions: "",
|
||||
ShareToken: "",
|
||||
}
|
||||
}
|
||||
|
||||
// LinkCreated converts a ShareCreated Event to an AuditEventShareCreated
|
||||
func LinkCreated(ev events.LinkCreated) AuditEventShareCreated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := "", "link"
|
||||
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkCreated(uid, ev.ItemID.OpaqueId, ev.ShareID.OpaqueId), ActionShareCreated)
|
||||
return AuditEventShareCreated{
|
||||
AuditEventSharing: SharingAuditEvent("", ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
ShareWith: with,
|
||||
ShareType: typ,
|
||||
ExpirationDate: formatTime(ev.Expiration),
|
||||
SharePass: ev.PasswordProtected,
|
||||
Permissions: ev.Permissions.String(),
|
||||
ShareToken: ev.Token,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// ShareUpdated converts a ShareUpdated event to an AuditEventShareUpdated
|
||||
func ShareUpdated(ev events.ShareUpdated) AuditEventShareUpdated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageShareUpdated(uid, ev.ShareID.OpaqueId, ev.Updated), updateType(ev.Updated))
|
||||
return AuditEventShareUpdated{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
ShareWith: with,
|
||||
ShareType: typ,
|
||||
Permissions: ev.Permissions.Permissions.String(),
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
ExpirationDate: "",
|
||||
SharePass: false,
|
||||
ShareToken: "",
|
||||
}
|
||||
}
|
||||
|
||||
// LinkUpdated converts a LinkUpdated event to an AuditEventShareUpdated
|
||||
func LinkUpdated(ev events.LinkUpdated) AuditEventShareUpdated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := "", "link"
|
||||
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkUpdated(uid, ev.ShareID.OpaqueId, ev.FieldUpdated), updateType(ev.FieldUpdated))
|
||||
return AuditEventShareUpdated{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
ShareWith: with,
|
||||
ShareType: typ,
|
||||
Permissions: ev.Permissions.Permissions.String(),
|
||||
ExpirationDate: formatTime(ev.Expiration),
|
||||
SharePass: ev.PasswordProtected,
|
||||
ShareToken: ev.Token,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// ShareRemoved converts a ShareRemoved event to an AuditEventShareRemoved
|
||||
func ShareRemoved(ev events.ShareRemoved) AuditEventShareRemoved {
|
||||
sid, uid, iid, with, typ := "", "", "", "", ""
|
||||
if ev.ShareID != nil {
|
||||
sid = ev.ShareID.GetOpaqueId()
|
||||
}
|
||||
|
||||
if ev.ShareKey != nil {
|
||||
uid = ev.ShareKey.GetOwner().GetOpaqueId()
|
||||
iid = ev.ShareKey.GetResourceId().GetOpaqueId()
|
||||
with, typ = extractGrantee(ev.ShareKey.GetGrantee().GetUserId(), ev.ShareKey.GetGrantee().GetGroupId())
|
||||
}
|
||||
base := BasicAuditEvent(uid, "", MessageShareRemoved(uid, sid, iid), ActionShareRemoved)
|
||||
return AuditEventShareRemoved{
|
||||
AuditEventSharing: SharingAuditEvent(sid, iid, uid, base),
|
||||
ShareWith: with,
|
||||
ShareType: typ,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// LinkRemoved converts a LinkRemoved event to an AuditEventShareRemoved
|
||||
func LinkRemoved(ev events.LinkRemoved) AuditEventShareRemoved {
|
||||
uid, sid, typ := "", "", "link"
|
||||
if ev.ShareID != nil {
|
||||
sid = ev.ShareID.GetOpaqueId()
|
||||
} else {
|
||||
sid = ev.ShareToken
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(uid, "", MessageLinkRemoved(sid), ActionShareRemoved)
|
||||
return AuditEventShareRemoved{
|
||||
AuditEventSharing: SharingAuditEvent(sid, "", uid, base),
|
||||
ShareWith: "",
|
||||
ShareType: typ,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// ReceivedShareUpdated converts a ReceivedShareUpdated event to an AuditEventReceivedShareUpdated
|
||||
func ReceivedShareUpdated(ev events.ReceivedShareUpdated) AuditEventReceivedShareUpdated {
|
||||
uid := ev.Sharer.GetOpaqueId()
|
||||
sid := ev.ShareID.GetOpaqueId()
|
||||
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
|
||||
itemID := ev.ItemID.GetOpaqueId()
|
||||
|
||||
msg, utype := "", ""
|
||||
switch ev.State {
|
||||
case "SHARE_STATE_ACCEPTED":
|
||||
msg = MessageShareAccepted(with, sid, uid)
|
||||
utype = ActionShareAccepted
|
||||
case "SHARE_STATE_DECLINED":
|
||||
msg = MessageShareDeclined(with, sid, uid)
|
||||
utype = ActionShareDeclined
|
||||
}
|
||||
base := BasicAuditEvent(with, formatTime(ev.MTime), msg, utype)
|
||||
return AuditEventReceivedShareUpdated{
|
||||
AuditEventSharing: SharingAuditEvent(sid, itemID, uid, base),
|
||||
ShareType: typ,
|
||||
ShareWith: with,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// LinkAccessed converts a LinkAccessed event to an AuditEventLinkAccessed
|
||||
func LinkAccessed(ev events.LinkAccessed) AuditEventLinkAccessed {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkAccessed(ev.ShareID.GetOpaqueId(), true), ActionLinkAccessed)
|
||||
return AuditEventLinkAccessed{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
|
||||
ShareToken: ev.Token,
|
||||
Success: true,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// LinkAccessFailed converts a LinkAccessFailed event to an AuditEventLinkAccessed
|
||||
func LinkAccessFailed(ev events.LinkAccessFailed) AuditEventLinkAccessed {
|
||||
base := BasicAuditEvent("", "", MessageLinkAccessed(ev.ShareID.GetOpaqueId(), false), ActionLinkAccessed)
|
||||
return AuditEventLinkAccessed{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), "", "", base),
|
||||
ShareToken: ev.Token,
|
||||
Success: false,
|
||||
|
||||
// NOTE: those values are not in the event and can therefore not be filled at the moment
|
||||
ItemType: "",
|
||||
}
|
||||
}
|
||||
|
||||
// FilesAuditEvent creates an AuditEventFiles from the given values
|
||||
func FilesAuditEvent(base AuditEvent, itemid, owner, path string) AuditEventFiles {
|
||||
return AuditEventFiles{
|
||||
AuditEvent: base,
|
||||
FileID: itemid,
|
||||
Owner: owner,
|
||||
Path: path,
|
||||
}
|
||||
}
|
||||
|
||||
// FileUploaded converts a FileUploaded event to an AuditEventFileCreated
|
||||
func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
base := BasicAuditEvent(uid, "", MessageFileCreated(iid), ActionFileCreated)
|
||||
return AuditEventFileCreated{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
}
|
||||
|
||||
// FileDownloaded converts a FileDownloaded event to an AuditEventFileRead
|
||||
func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
base := BasicAuditEvent(uid, "", MessageFileRead(iid), ActionFileRead)
|
||||
return AuditEventFileRead{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
}
|
||||
|
||||
// ItemMoved converts a ItemMoved event to an AuditEventFileRenamed
|
||||
func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
|
||||
oldpath := ""
|
||||
if ev.OldReference != nil {
|
||||
oldpath = ev.OldReference.GetPath()
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(uid, "", MessageFileRenamed(iid, oldpath, path), ActionFileRenamed)
|
||||
return AuditEventFileRenamed{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
OldPath: oldpath,
|
||||
}
|
||||
}
|
||||
|
||||
// ItemTrashed converts a ItemTrashed event to an AuditEventFileDeleted
|
||||
func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
base := BasicAuditEvent(uid, "", MessageFileTrashed(iid), ActionFileTrashed)
|
||||
return AuditEventFileDeleted{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
}
|
||||
|
||||
// ItemPurged converts a ItemPurged event to an AuditEventFilePurged
|
||||
func ItemPurged(ev events.ItemPurged) AuditEventFilePurged {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
base := BasicAuditEvent(uid, "", MessageFilePurged(iid), ActionFilePurged)
|
||||
return AuditEventFilePurged{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
}
|
||||
|
||||
// ItemRestored converts a ItemRestored event to an AuditEventFileRestored
|
||||
func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
|
||||
oldpath := ""
|
||||
if ev.OldReference != nil {
|
||||
oldpath = ev.OldReference.GetPath()
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(uid, "", MessageFileRestored(iid, path), ActionFileRestored)
|
||||
return AuditEventFileRestored{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
OldPath: oldpath,
|
||||
}
|
||||
}
|
||||
|
||||
// FileVersionRestored converts a FileVersionRestored event to an AuditEventFileVersionRestored
|
||||
func FileVersionRestored(ev events.FileVersionRestored) AuditEventFileVersionRestored {
|
||||
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
|
||||
base := BasicAuditEvent(uid, "", MessageFileVersionRestored(iid, ev.Key), ActionFileVersionRestored)
|
||||
return AuditEventFileVersionRestored{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
Key: ev.Key,
|
||||
}
|
||||
}
|
||||
|
||||
// SpacesAuditEvent creates an AuditEventSpaces from the given values
|
||||
func SpacesAuditEvent(base AuditEvent, spaceID string) AuditEventSpaces {
|
||||
return AuditEventSpaces{
|
||||
AuditEvent: base,
|
||||
SpaceID: spaceID,
|
||||
}
|
||||
}
|
||||
|
||||
// SpaceCreated converts a SpaceCreated event to an AuditEventSpaceCreated
|
||||
func SpaceCreated(ev events.SpaceCreated) AuditEventSpaceCreated {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
iid, _, owner := extractFileDetails(&provider.Reference{ResourceId: ev.Root}, ev.Owner)
|
||||
base := BasicAuditEvent("", formatTime(ev.MTime), MessageSpaceCreated(sid, ev.Name), ActionSpaceCreated)
|
||||
return AuditEventSpaceCreated{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
Owner: owner,
|
||||
RootItem: iid,
|
||||
Name: ev.Name,
|
||||
Type: ev.Type,
|
||||
}
|
||||
}
|
||||
|
||||
// SpaceRenamed converts a SpaceRenamed event to an AuditEventSpaceRenamed
|
||||
func SpaceRenamed(ev events.SpaceRenamed) AuditEventSpaceRenamed {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent("", "", MessageSpaceRenamed(sid, ev.Name), ActionSpaceRenamed)
|
||||
return AuditEventSpaceRenamed{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
NewName: ev.Name,
|
||||
}
|
||||
}
|
||||
|
||||
// SpaceDisabled converts a SpaceDisabled event to an AuditEventSpaceDisabled
|
||||
func SpaceDisabled(ev events.SpaceDisabled) AuditEventSpaceDisabled {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent("", "", MessageSpaceDisabled(sid), ActionSpaceDisabled)
|
||||
return AuditEventSpaceDisabled{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
}
|
||||
|
||||
// SpaceEnabled converts a SpaceEnabled event to an AuditEventSpaceEnabled
|
||||
func SpaceEnabled(ev events.SpaceEnabled) AuditEventSpaceEnabled {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent("", "", MessageSpaceEnabled(sid), ActionSpaceEnabled)
|
||||
return AuditEventSpaceEnabled{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
}
|
||||
|
||||
// SpaceDeleted converts a SpaceDeleted event to an AuditEventSpaceDeleted
|
||||
func SpaceDeleted(ev events.SpaceDeleted) AuditEventSpaceDeleted {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent("", "", MessageSpaceDeleted(sid), ActionSpaceDeleted)
|
||||
return AuditEventSpaceDeleted{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
}
|
||||
|
||||
func extractGrantee(uid *user.UserId, gid *group.GroupId) (string, string) {
|
||||
switch {
|
||||
case uid != nil && uid.OpaqueId != "":
|
||||
return uid.OpaqueId, "user"
|
||||
case gid != nil && gid.OpaqueId != "":
|
||||
return gid.OpaqueId, "group"
|
||||
}
|
||||
|
||||
return "", ""
|
||||
}
|
||||
|
||||
func extractFileDetails(ref *provider.Reference, owner *user.UserId) (string, string, string) {
|
||||
id, path := "", ""
|
||||
if ref != nil {
|
||||
path = ref.GetPath()
|
||||
id, _ = utils.FormatStorageSpaceReference(ref)
|
||||
}
|
||||
|
||||
uid := ""
|
||||
if owner != nil {
|
||||
uid = owner.GetOpaqueId()
|
||||
}
|
||||
return id, path, uid
|
||||
}
|
||||
|
||||
func formatTime(t *types.Timestamp) string {
|
||||
if t == nil {
|
||||
return ""
|
||||
}
|
||||
return time.Unix(int64(t.Seconds), int64(t.Nanos)).UTC().Format(time.RFC3339)
|
||||
}
|
||||
|
||||
func updateType(u string) string {
|
||||
switch {
|
||||
case u == "permissions":
|
||||
return ActionSharePermissionUpdated
|
||||
case u == "displayname":
|
||||
return ActionShareDisplayNameUpdated
|
||||
case u == "TYPE_PERMISSIONS":
|
||||
return ActionSharePermissionUpdated
|
||||
case u == "TYPE_DISPLAYNAME":
|
||||
return ActionShareDisplayNameUpdated
|
||||
case u == "TYPE_PASSWORD":
|
||||
return ActionSharePasswordUpdated
|
||||
case u == "TYPE_EXPIRATION":
|
||||
return ActionShareExpirationUpdated
|
||||
default:
|
||||
fmt.Println("Unknown update type", u)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
)
|
||||
|
||||
// RegisteredEvents returns the events the service is registered for
|
||||
func RegisteredEvents() []events.Unmarshaller {
|
||||
return []events.Unmarshaller{
|
||||
events.ShareCreated{},
|
||||
events.ShareUpdated{},
|
||||
events.LinkCreated{},
|
||||
events.LinkUpdated{},
|
||||
events.ShareRemoved{},
|
||||
events.LinkRemoved{},
|
||||
events.ReceivedShareUpdated{},
|
||||
events.LinkAccessed{},
|
||||
events.LinkAccessFailed{},
|
||||
events.FileUploaded{},
|
||||
events.FileDownloaded{},
|
||||
events.ItemTrashed{},
|
||||
events.ItemMoved{},
|
||||
events.ItemPurged{},
|
||||
events.ItemRestored{},
|
||||
events.FileVersionRestored{},
|
||||
events.SpaceCreated{},
|
||||
events.SpaceRenamed{},
|
||||
events.SpaceEnabled{},
|
||||
events.SpaceDisabled{},
|
||||
events.SpaceDeleted{},
|
||||
}
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
package types
|
||||
|
||||
// AuditEvent is the basic audit event
|
||||
type AuditEvent struct {
|
||||
RemoteAddr string // the remote client IP
|
||||
User string // the UID of the user performing the action. Or "IP x.x.x.x.", "cron", "CLI", "unknown"
|
||||
URL string // the process request URI
|
||||
Method string // the HTTP request method
|
||||
UserAgent string // the HTTP request user agent
|
||||
Time string // the time of the event eg: 2018-05-08T08:26:00+00:00
|
||||
App string // always 'admin_audit'
|
||||
Message string // sentence explaining the action
|
||||
Action string // unique action identifier eg: file_delete or public_link_created
|
||||
CLI bool // if the action was performed from the CLI
|
||||
Level int // the log level of the entry (usually 1 for audit events)
|
||||
}
|
||||
|
||||
/*
|
||||
Sharing
|
||||
*/
|
||||
|
||||
// AuditEventSharing is the basic audit event for shares
|
||||
type AuditEventSharing struct {
|
||||
AuditEvent
|
||||
|
||||
FileID string // The file identifier for the item shared.
|
||||
Owner string // The UID of the owner of the shared item.
|
||||
Path string // The path to the shared item.
|
||||
ShareID string // The sharing identifier. (not available for public_link_accessed or when recipient unshares)
|
||||
}
|
||||
|
||||
// AuditEventShareCreated is the event logged when a share is created
|
||||
type AuditEventShareCreated struct {
|
||||
AuditEventSharing
|
||||
|
||||
ItemType string // file or folder
|
||||
ExpirationDate string // The text expiration date in format 'yyyy-mm-dd'
|
||||
SharePass bool // If the share is password protected.
|
||||
Permissions string // The permissions string eg: "READ"
|
||||
ShareType string // group user or link
|
||||
ShareWith string // The UID or GID of the share recipient. (not available for public link)
|
||||
ShareOwner string // The UID of the share owner.
|
||||
ShareToken string // For link shares the unique token, else null
|
||||
}
|
||||
|
||||
// AuditEventShareUpdated is the event logged when a share is updated
|
||||
type AuditEventShareUpdated struct {
|
||||
AuditEventSharing
|
||||
|
||||
ItemType string // file or folder
|
||||
ExpirationDate string // The text expiration date in format 'yyyy-mm-dd'
|
||||
SharePass bool // If the share is password protected.
|
||||
Permissions string // The permissions string eg: "READ"
|
||||
ShareType string // group user or link
|
||||
ShareWith string // The UID or GID of the share recipient. (not available for public link)
|
||||
ShareOwner string // The UID of the share owner.
|
||||
ShareToken string // For link shares the unique token, else null
|
||||
}
|
||||
|
||||
// AuditEventShareRemoved is the event logged when a share is removed
|
||||
type AuditEventShareRemoved struct {
|
||||
AuditEventSharing
|
||||
ItemType string // file or folder
|
||||
ShareType string // group user or link
|
||||
ShareWith string // The UID or GID of the share recipient.
|
||||
}
|
||||
|
||||
// AuditEventReceivedShareUpdated is the event logged when a share is accepted or declined
|
||||
type AuditEventReceivedShareUpdated struct {
|
||||
AuditEventSharing
|
||||
ItemType string // file or folder
|
||||
ShareType string // group user or link
|
||||
ShareWith string // The UID or GID of the share recipient.
|
||||
}
|
||||
|
||||
// AuditEventLinkAccessed is the event logged when a link is accessed
|
||||
type AuditEventLinkAccessed struct {
|
||||
AuditEventSharing
|
||||
ShareToken string // The share token.
|
||||
Success bool // If the request was successful.
|
||||
ItemType string // file or folder
|
||||
}
|
||||
|
||||
/*
|
||||
Files
|
||||
*/
|
||||
|
||||
// AuditEventFiles is the basic audit event for files
|
||||
type AuditEventFiles struct {
|
||||
AuditEvent
|
||||
|
||||
Path string // The full path to the create file.
|
||||
Owner string // The UID of the owner of the file.
|
||||
FileID string // The newly created files identifier.
|
||||
}
|
||||
|
||||
// AuditEventFileCreated is the event logged when a file is created
|
||||
type AuditEventFileCreated struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileRead is the event logged when a file is read (aka downloaded)
|
||||
type AuditEventFileRead struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileUpdated is the event logged when a file is updated
|
||||
// TODO: How to differentiate between new uploads and new version uploads?
|
||||
// FIXME: implement
|
||||
type AuditEventFileUpdated struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileDeleted is the event logged when a file is deleted (aka trashed)
|
||||
type AuditEventFileDeleted struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileCopied is the event logged when a file is copied
|
||||
// TODO: copy is a download&upload for now. How to know it was a copy?
|
||||
// FIXME: implement
|
||||
type AuditEventFileCopied struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileRenamed is the event logged when a file is renamed (moved)
|
||||
type AuditEventFileRenamed struct {
|
||||
AuditEventFiles
|
||||
|
||||
OldPath string
|
||||
}
|
||||
|
||||
// AuditEventFilePurged is the event logged when a file is purged (deleted from trashbin)
|
||||
type AuditEventFilePurged struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
// AuditEventFileRestored is the event logged when a file is restored (from trashbin)
|
||||
type AuditEventFileRestored struct {
|
||||
AuditEventFiles
|
||||
|
||||
OldPath string
|
||||
}
|
||||
|
||||
// AuditEventFileVersionRestored is the event logged when a file version is restored
|
||||
type AuditEventFileVersionRestored struct {
|
||||
AuditEventFiles
|
||||
|
||||
Key string
|
||||
}
|
||||
|
||||
// AuditEventFileVersionDeleted is the event logged when a file version is deleted
|
||||
// TODO: is this even possible?
|
||||
type AuditEventFileVersionDeleted struct {
|
||||
AuditEventFiles
|
||||
}
|
||||
|
||||
/*
|
||||
Spaces
|
||||
*/
|
||||
|
||||
// AuditEventSpaces is the basic audit event for spaces
|
||||
type AuditEventSpaces struct {
|
||||
AuditEvent
|
||||
|
||||
SpaceID string
|
||||
}
|
||||
|
||||
// AuditEventSpaceCreated is the event logged when a space is created
|
||||
type AuditEventSpaceCreated struct {
|
||||
AuditEventSpaces
|
||||
|
||||
Owner string
|
||||
RootItem string
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// AuditEventSpaceRenamed is the event logged when a space is renamed
|
||||
type AuditEventSpaceRenamed struct {
|
||||
AuditEventSpaces
|
||||
|
||||
NewName string
|
||||
}
|
||||
|
||||
// AuditEventSpaceDisabled is the event logged when a space is disabled
|
||||
type AuditEventSpaceDisabled struct {
|
||||
AuditEventSpaces
|
||||
}
|
||||
|
||||
// AuditEventSpaceEnabled is the event logged when a space is (re-)enabled
|
||||
type AuditEventSpaceEnabled struct {
|
||||
AuditEventSpaces
|
||||
}
|
||||
|
||||
// AuditEventSpaceDeleted is the event logged when a space is deleted
|
||||
type AuditEventSpaceDeleted struct {
|
||||
AuditEventSpaces
|
||||
}
|
||||
@@ -1,65 +1,65 @@
|
||||
Enhancement: Update REVA to v1.16.1-0.20220215130802-df1264deff58
|
||||
Enhancement: Update REVA to xxx
|
||||
|
||||
Updated REVA to v1.16.1-0.20220215130802-df1264deff58
|
||||
Updated REVA to xxx
|
||||
This update includes:
|
||||
|
||||
* Enh [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524): Remove space members
|
||||
* Fix [cs3org/reva#2541](https://github.com/cs3org/reva/pull/2541): fix xattr error types, remove error wrapper
|
||||
* Chg [cs3org/reva#2540](https://github.com/cs3org/reva/pull/2540): decomposedfs: refactor xattrs package errors
|
||||
* Enh [cs3org/reva#2533](https://github.com/cs3org/reva/pull/2533): Use space description on creation
|
||||
* Enh [cs3org/reva#2527](https://github.com/cs3org/reva/pull/2527): Add space props
|
||||
* Enh [cs3org/reva#2522](https://github.com/cs3org/reva/pull/2522): Events
|
||||
* Chg [cs3org/reva#2512](https://github.com/cs3org/reva/pull/2512): Consolidate all metadata Get's and Set's to central functions.
|
||||
* Chg [cs3org/reva#2511](https://github.com/cs3org/reva/pull/2511): Some error cleanup steps in the decomposed FS
|
||||
* Enh [cs3org/reva#2460](https://github.com/cs3org/reva/pull/2460): decomposedfs: add locking support
|
||||
* Chg [cs3org/reva#2519](https://github.com/cs3org/reva/pull/2519): remove creation of .space folder
|
||||
* Fix [cs3org/reva#2506](https://github.com/cs3org/reva/pull/2506): fix propfind listing for files
|
||||
* Chg [cs3org/reva#2503](https://github.com/cs3org/reva/pull/2503): unprotected ocs config endpoint
|
||||
* Enh [cs3org/reva#2458](https://github.com/cs3org/reva/pull/2458): Restoring Spaces
|
||||
* Enh [cs3org/reva#2498](https://github.com/cs3org/reva/pull/2498): add grants to list-spaces
|
||||
* Fix [cs3org/reva#2500](https://github.com/cs3org/reva/pull/2500): invalidate cache when modifying or deleting a space
|
||||
* Fix [cs3org/reva#2501](https://github.com/cs3org/reva/pull/2501): fix spaces stat requests
|
||||
* Enh [cs3org/reva#2472](https://github.com/cs3org/reva/pull/2472): Make owncloudsql spaces aware
|
||||
* Enh [cs3org/reva#2464](https://github.com/cs3org/reva/pull/2464): Space grants
|
||||
* Fix [cs3org/reva#2463](https://github.com/cs3org/reva/pull/2463): Do not log nodes
|
||||
* Enh [cs3org/reva#2437](https://github.com/cs3org/reva/pull/2437): Make gateway dumb again
|
||||
* Enh [cs3org/reva#2459](https://github.com/cs3org/reva/pull/2459): prevent purging of enabled spaces
|
||||
* Fix [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457): decomposedfs: do not swallow errors when creating nodes
|
||||
* Fix [cs3org/reva#2454](https://github.com/cs3org/reva/pull/2454): fix path construction in webdav propfind
|
||||
* Fix [cs3org/reva#2452](https://github.com/cs3org/reva/pull/2452): fix create space error message
|
||||
* Enh [cs3org/reva#2431](https://github.com/cs3org/reva/pull/2431): Purge spaces
|
||||
* Fix [cs3org/reva#2445](https://github.com/cs3org/reva/pull/2445): Fix publiclinks and decomposedfs
|
||||
* Chg [cs3org/reva#2439](https://github.com/cs3org/reva/pull/2439): ignore handled errors when creating spaces
|
||||
* Enh [cs3org/reva#2436](https://github.com/cs3org/reva/pull/2436): Adjust "groupfilter" to be able to search by member name
|
||||
* Fix [cs3org/reva#2434](https://github.com/cs3org/reva/pull/2434): Start splitting up ocdav
|
||||
* Fix [cs3org/reva#2433](https://github.com/cs3org/reva/pull/2433): fix shares provider filter
|
||||
* Chg [cs3org/reva#2432](https://github.com/cs3org/reva/pull/2432): use space reference when listing containers
|
||||
* Fix [cs3org/reva#2430](https://github.com/cs3org/reva/pull/2430): fix aggregated child folder id
|
||||
* Enh [cs3org/reva#2429](https://github.com/cs3org/reva/pull/2429): make archiver id based
|
||||
* Fix [cs3org/reva#2427](https://github.com/cs3org/reva/pull/2427): fix registry caching
|
||||
* Fix [cs3org/reva#2422](https://github.com/cs3org/reva/pull/2422): handle space does not exist
|
||||
* Fix [cs3org/reva#2419](https://github.com/cs3org/reva/pull/2419): Spaces fixes
|
||||
* Chg [cs3org/reva#2415](https://github.com/cs3org/reva/pull/2415): services should never return transport level errors
|
||||
* Chg [cs3org/reva#2396](https://github.com/cs3org/reva/pull/2396): Ocdav spaces aware
|
||||
* Fix [cs3org/reva#2348](https://github.com/cs3org/reva/pull/2348): fix-archiver
|
||||
* Chg [cs3org/reva#2344](https://github.com/cs3org/reva/pull/2344): allow listing all storage spaces
|
||||
* Chg [cs3org/reva#2345](https://github.com/cs3org/reva/pull/2345): Switch LDAP test to use entryUUID as unique id for groups
|
||||
* Chg [cs3org/reva#2343](https://github.com/cs3org/reva/pull/2343): allow multiple space type filters on decomposedfs
|
||||
* Enh [cs3org/reva#2329](https://github.com/cs3org/reva/pull/2329): Activate Statcache
|
||||
* Enh [cs3org/reva#2340](https://github.com/cs3org/reva/pull/2340): Space registry multiple spaces per provider
|
||||
* Chg [cs3org/reva#2336](https://github.com/cs3org/reva/pull/2336): handle sending all permissions when creating public links
|
||||
* Fix [cs3org/reva#2330](https://github.com/cs3org/reva/pull/2330): fix decomposedfs upload
|
||||
* Enh [cs3org/reva#2234](https://github.com/cs3org/reva/pull/2234): Spaces registry
|
||||
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): New OIDC ESCAPE auth driver.
|
||||
* Enh [cs3org/reva#2250](https://github.com/cs3org/reva/pull/2250): Implement space membership endpoints
|
||||
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): fix tus with transfer token only
|
||||
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Bugfix: Remove early finish for zero byte file uploads
|
||||
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition
|
||||
* Fix [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback to "email" if IDP doesn't provide "preferred_username" claim
|
||||
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
|
||||
* Enh [cs3org/reva#2310](https://github.com/cs3org/reva/pull/2310): Implement setting arbitrary metadata for the public storage provider
|
||||
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes target as absolute path
|
||||
* Fix [cs3org/reva#2297](https://github.com/cs3org/reva/pull/2297): Fix public link paths for file shares
|
||||
* Enh [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524): Remove space members
|
||||
* Fix [cs3org/reva#2541](https://github.com/cs3org/reva/pull/2541): fix xattr error types, remove error wrapper
|
||||
* Chg [cs3org/reva#2540](https://github.com/cs3org/reva/pull/2540): decomposedfs: refactor xattrs package errors
|
||||
* Enh [cs3org/reva#2533](https://github.com/cs3org/reva/pull/2533): Use space description on creation
|
||||
* Enh [cs3org/reva#2527](https://github.com/cs3org/reva/pull/2527): Add space props
|
||||
* Enh [cs3org/reva#2522](https://github.com/cs3org/reva/pull/2522): Events
|
||||
* Chg [cs3org/reva#2512](https://github.com/cs3org/reva/pull/2512): Consolidate all metadata Get's and Set's to central functions.
|
||||
* Chg [cs3org/reva#2511](https://github.com/cs3org/reva/pull/2511): Some error cleanup steps in the decomposed FS
|
||||
* Enh [cs3org/reva#2460](https://github.com/cs3org/reva/pull/2460): decomposedfs: add locking support
|
||||
* Chg [cs3org/reva#2519](https://github.com/cs3org/reva/pull/2519): remove creation of .space folder
|
||||
* Fix [cs3org/reva#2506](https://github.com/cs3org/reva/pull/2506): fix propfind listing for files
|
||||
* Chg [cs3org/reva#2503](https://github.com/cs3org/reva/pull/2503): unprotected ocs config endpoint
|
||||
* Enh [cs3org/reva#2458](https://github.com/cs3org/reva/pull/2458): Restoring Spaces
|
||||
* Enh [cs3org/reva#2498](https://github.com/cs3org/reva/pull/2498): add grants to list-spaces
|
||||
* Fix [cs3org/reva#2500](https://github.com/cs3org/reva/pull/2500): invalidate cache when modifying or deleting a space
|
||||
* Fix [cs3org/reva#2501](https://github.com/cs3org/reva/pull/2501): fix spaces stat requests
|
||||
* Enh [cs3org/reva#2472](https://github.com/cs3org/reva/pull/2472): Make owncloudsql spaces aware
|
||||
* Enh [cs3org/reva#2464](https://github.com/cs3org/reva/pull/2464): Space grants
|
||||
* Fix [cs3org/reva#2463](https://github.com/cs3org/reva/pull/2463): Do not log nodes
|
||||
* Enh [cs3org/reva#2437](https://github.com/cs3org/reva/pull/2437): Make gateway dumb again
|
||||
* Enh [cs3org/reva#2459](https://github.com/cs3org/reva/pull/2459): prevent purging of enabled spaces
|
||||
* Fix [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457): decomposedfs: do not swallow errors when creating nodes
|
||||
* Fix [cs3org/reva#2454](https://github.com/cs3org/reva/pull/2454): fix path construction in webdav propfind
|
||||
* Fix [cs3org/reva#2452](https://github.com/cs3org/reva/pull/2452): fix create space error message
|
||||
* Enh [cs3org/reva#2431](https://github.com/cs3org/reva/pull/2431): Purge spaces
|
||||
* Fix [cs3org/reva#2445](https://github.com/cs3org/reva/pull/2445): Fix publiclinks and decomposedfs
|
||||
* Chg [cs3org/reva#2439](https://github.com/cs3org/reva/pull/2439): ignore handled errors when creating spaces
|
||||
* Enh [cs3org/reva#2436](https://github.com/cs3org/reva/pull/2436): Adjust "groupfilter" to be able to search by member name
|
||||
* Fix [cs3org/reva#2434](https://github.com/cs3org/reva/pull/2434): Start splitting up ocdav
|
||||
* Fix [cs3org/reva#2433](https://github.com/cs3org/reva/pull/2433): fix shares provider filter
|
||||
* Chg [cs3org/reva#2432](https://github.com/cs3org/reva/pull/2432): use space reference when listing containers
|
||||
* Fix [cs3org/reva#2430](https://github.com/cs3org/reva/pull/2430): fix aggregated child folder id
|
||||
* Enh [cs3org/reva#2429](https://github.com/cs3org/reva/pull/2429): make archiver id based
|
||||
* Fix [cs3org/reva#2427](https://github.com/cs3org/reva/pull/2427): fix registry caching
|
||||
* Fix [cs3org/reva#2422](https://github.com/cs3org/reva/pull/2422): handle space does not exist
|
||||
* Fix [cs3org/reva#2419](https://github.com/cs3org/reva/pull/2419): Spaces fixes
|
||||
* Chg [cs3org/reva#2415](https://github.com/cs3org/reva/pull/2415): services should never return transport level errors
|
||||
* Chg [cs3org/reva#2396](https://github.com/cs3org/reva/pull/2396): Ocdav spaces aware
|
||||
* Fix [cs3org/reva#2348](https://github.com/cs3org/reva/pull/2348): fix-archiver
|
||||
* Chg [cs3org/reva#2344](https://github.com/cs3org/reva/pull/2344): allow listing all storage spaces
|
||||
* Chg [cs3org/reva#2345](https://github.com/cs3org/reva/pull/2345): Switch LDAP test to use entryUUID as unique id for groups
|
||||
* Chg [cs3org/reva#2343](https://github.com/cs3org/reva/pull/2343): allow multiple space type filters on decomposedfs
|
||||
* Enh [cs3org/reva#2329](https://github.com/cs3org/reva/pull/2329): Activate Statcache
|
||||
* Enh [cs3org/reva#2340](https://github.com/cs3org/reva/pull/2340): Space registry multiple spaces per provider
|
||||
* Chg [cs3org/reva#2336](https://github.com/cs3org/reva/pull/2336): handle sending all permissions when creating public links
|
||||
* Fix [cs3org/reva#2330](https://github.com/cs3org/reva/pull/2330): fix decomposedfs upload
|
||||
* Enh [cs3org/reva#2234](https://github.com/cs3org/reva/pull/2234): Spaces registry
|
||||
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): New OIDC ESCAPE auth driver.
|
||||
* Enh [cs3org/reva#2250](https://github.com/cs3org/reva/pull/2250): Implement space membership endpoints
|
||||
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): fix tus with transfer token only
|
||||
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Bugfix: Remove early finish for zero byte file uploads
|
||||
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition
|
||||
* Fix [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback to "email" if IDP doesn't provide "preferred_username" claim
|
||||
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
|
||||
* Enh [cs3org/reva#2310](https://github.com/cs3org/reva/pull/2310): Implement setting arbitrary metadata for the public storage provider
|
||||
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes target as absolute path
|
||||
* Fix [cs3org/reva#2297](https://github.com/cs3org/reva/pull/2297): Fix public link paths for file shares
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2878
|
||||
https://github.com/owncloud/ocis/pull/2901
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Enhancement: Add sorting to list Spaces
|
||||
|
||||
We added the OData query param "orderBy" for listing spaces. We can now order by Space Name and LastModifiedDateTime.
|
||||
|
||||
Example 1: https://localhost:9200/graph/v1.0/me/drives/?$orderby=lastModifiedDateTime desc
|
||||
Example 2: https://localhost:9200/graph/v1.0/me/drives/?$orderby=name asc
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3200
|
||||
https://github.com/owncloud/ocis/pull/3201
|
||||
https://github.com/owncloud/ocis/pull/3218
|
||||
@@ -1,6 +0,0 @@
|
||||
Enhancement: change NATS port
|
||||
|
||||
Currently only a certain range of ports is allowed for ocis application. Use a supported port
|
||||
for nats server
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3210
|
||||
@@ -1,6 +0,0 @@
|
||||
Enhancement: Re-Enabling web cache control
|
||||
|
||||
We've re-enable browser caching headers (`Expires` and `Last-Modified`) for the web service, this was disabled due to a problem in the fileserver used before.
|
||||
Since we're now using our own fileserver implementation this works again and is enabled by default.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3109
|
||||
@@ -1,6 +0,0 @@
|
||||
Enhancement: Add SPA conform fileserver for web
|
||||
|
||||
We've added an SPA conform fileserver to the web service.
|
||||
It enables web to use vue's history mode and behaves like nginx try_files.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3109
|
||||
@@ -1,7 +0,0 @@
|
||||
Bugfix: Capabilities for password protected public links
|
||||
|
||||
Allow password protected public links to request capabilities.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3229
|
||||
https://github.com/owncloud/web/pull/6471
|
||||
https://github.com/owncloud/web/issues/5863
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: Make events settings configurable
|
||||
|
||||
We've fixed the hardcoded events settings to be configurable.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3214
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: Align storage metadata GPRC bind port with other variable names
|
||||
|
||||
Changed STORAGE_METADATA_GRPC_PROVIDER_ADDR to STORAGE_METADATA_GRPC_ADDR so it aligns with standard environment variable naming conventions used in oCIS.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3169
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Implement notifications service
|
||||
|
||||
Implemented the minimal version of the notifications service to be able to notify a user when they received a share.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3217
|
||||
@@ -1,6 +0,0 @@
|
||||
Enhancement: Thumbnails in spaces
|
||||
|
||||
Added support for thumbnails in spaces.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3219
|
||||
https://github.com/owncloud/ocis/pull/3235
|
||||
@@ -1,5 +0,0 @@
|
||||
Change: Unify file IDs
|
||||
|
||||
We changed the file IDs to be consistent across all our APIs (WebDAV, LibreGraph, OCS). We removed the base64 encoding. Now they are formatted like <storageID>!<opaqueID>. They are using a reserved character ``!`` as a URL safe separator.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3185
|
||||
@@ -1,99 +0,0 @@
|
||||
Enhancement: Update reva to v2.0.0
|
||||
|
||||
We updated reva to the version 2.0.0.
|
||||
|
||||
* Fix [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457) : Do not swallow error
|
||||
* Fix [cs3org/reva#2422](https://github.com/cs3org/reva/pull/2422) : Handle non existing spaces correctly
|
||||
* Fix [cs3org/reva#2327](https://github.com/cs3org/reva/pull/2327) : Enable changelog on edge branch
|
||||
* Fix [cs3org/reva#2370](https://github.com/cs3org/reva/pull/2370) : Fixes for apps in public shares, project spaces for EOS driver
|
||||
* Fix [cs3org/reva#2464](https://github.com/cs3org/reva/pull/2464) : Pass spacegrants when adding member to space
|
||||
* Fix [cs3org/reva#2430](https://github.com/cs3org/reva/pull/2430) : Fix aggregated child folder id
|
||||
* Fix [cs3org/reva#2348](https://github.com/cs3org/reva/pull/2348) : Make archiver handle spaces protocol
|
||||
* Fix [cs3org/reva#2452](https://github.com/cs3org/reva/pull/2452) : Fix create space error message
|
||||
* Fix [cs3org/reva#2445](https://github.com/cs3org/reva/pull/2445) : Don't handle ids containing "/" in decomposedfs
|
||||
* Fix [cs3org/reva#2285](https://github.com/cs3org/reva/pull/2285) : Accept new userid idp format
|
||||
* Fix [cs3org/reva#2503](https://github.com/cs3org/reva/pull/2503) : Remove the protection from /v?.php/config endpoints
|
||||
* Fix [cs3org/reva#2462](https://github.com/cs3org/reva/pull/2462) : Public shares path needs to be set
|
||||
* Fix [cs3org/reva#2427](https://github.com/cs3org/reva/pull/2427) : Fix registry caching
|
||||
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298) : Remove share refs from trashbin
|
||||
* Fix [cs3org/reva#2433](https://github.com/cs3org/reva/pull/2433) : Fix shares provider filter
|
||||
* Fix [cs3org/reva#2351](https://github.com/cs3org/reva/pull/2351) : Fix Statcache removing
|
||||
* Fix [cs3org/reva#2374](https://github.com/cs3org/reva/pull/2374) : Fix webdav copy of zero byte files
|
||||
* Fix [cs3org/reva#2336](https://github.com/cs3org/reva/pull/2336) : Handle sending all permissions when creating public links
|
||||
* Fix [cs3org/reva#2440](https://github.com/cs3org/reva/pull/2440) : Add ArbitraryMetadataKeys to statcache key
|
||||
* Fix [cs3org/reva#2582](https://github.com/cs3org/reva/pull/2582) : Keep lock structs in a local map protected by a mutex
|
||||
* Fix [cs3org/reva#2372](https://github.com/cs3org/reva/pull/2372) : Make owncloudsql work with the spaces registry
|
||||
* Fix [cs3org/reva#2416](https://github.com/cs3org/reva/pull/2416) : The registry now returns complete space structs
|
||||
* Fix [cs3org/reva#3066](https://github.com/cs3org/reva/pull/3066) : Fix propfind listing for files
|
||||
* Fix [cs3org/reva#2428](https://github.com/cs3org/reva/pull/2428) : Remove unused home provider from config
|
||||
* Fix [cs3org/reva#2334](https://github.com/cs3org/reva/pull/2334) : Revert fix decomposedfs upload
|
||||
* Fix [cs3org/reva#2415](https://github.com/cs3org/reva/pull/2415) : Services should never return transport level errors
|
||||
* Fix [cs3org/reva#2419](https://github.com/cs3org/reva/pull/2419) : List project spaces for share recipients
|
||||
* Fix [cs3org/reva#2501](https://github.com/cs3org/reva/pull/2501) : Fix spaces stat
|
||||
* Fix [cs3org/reva#2432](https://github.com/cs3org/reva/pull/2432) : Use space reference when listing containers
|
||||
* Fix [cs3org/reva#2572](https://github.com/cs3org/reva/pull/2572) : Wait for nats server on middleware start
|
||||
* Fix [cs3org/reva#2454](https://github.com/cs3org/reva/pull/2454) : Fix webdav paths in PROPFINDS
|
||||
* Chg [cs3org/reva#2329](https://github.com/cs3org/reva/pull/2329) : Activate the statcache
|
||||
* Chg [cs3org/reva#2596](https://github.com/cs3org/reva/pull/2596) : Remove hash from public link urls
|
||||
* Chg [cs3org/reva#2495](https://github.com/cs3org/reva/pull/2495) : Remove the ownCloud storage driver
|
||||
* Chg [cs3org/reva#2527](https://github.com/cs3org/reva/pull/2527) : Store space attributes in decomposedFS
|
||||
* Chg [cs3org/reva#2581](https://github.com/cs3org/reva/pull/2581) : Update hard-coded status values
|
||||
* Chg [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524) : Use description during space creation
|
||||
* Chg [cs3org/reva#2554](https://github.com/cs3org/reva/pull/2554) : Shard nodes per space in decomposedfs
|
||||
* Chg [cs3org/reva#2576](https://github.com/cs3org/reva/pull/2576) : Harden xattrs errors
|
||||
* Chg [cs3org/reva#2436](https://github.com/cs3org/reva/pull/2436) : Replace template in GroupFilter for UserProvider with a simple string
|
||||
* Chg [cs3org/reva#2429](https://github.com/cs3org/reva/pull/2429) : Make archiver id based
|
||||
* Chg [cs3org/reva#2340](https://github.com/cs3org/reva/pull/2340) : Allow multiple space configurations per provider
|
||||
* Chg [cs3org/reva#2396](https://github.com/cs3org/reva/pull/2396) : The ocdav handler is now spaces aware
|
||||
* Chg [cs3org/reva#2349](https://github.com/cs3org/reva/pull/2349) : Require `ListRecycle` when listing trashbin
|
||||
* Chg [cs3org/reva#2353](https://github.com/cs3org/reva/pull/2353) : Reduce log output
|
||||
* Chg [cs3org/reva#2542](https://github.com/cs3org/reva/pull/2542) : Do not encode webDAV ids to base64
|
||||
* Chg [cs3org/reva#2519](https://github.com/cs3org/reva/pull/2519) : Remove the auto creation of the .space folder
|
||||
* Chg [cs3org/reva#2394](https://github.com/cs3org/reva/pull/2394) : Remove logic from gateway
|
||||
* Chg [cs3org/reva#2023](https://github.com/cs3org/reva/pull/2023) : Add a sharestorageprovider
|
||||
* Chg [cs3org/reva#2234](https://github.com/cs3org/reva/pull/2234) : Add a spaces registry
|
||||
* Chg [cs3org/reva#2339](https://github.com/cs3org/reva/pull/2339) : Fix static registry regressions
|
||||
* Chg [cs3org/reva#2370](https://github.com/cs3org/reva/pull/2370) : Fix static registry regressions
|
||||
* Chg [cs3org/reva#2354](https://github.com/cs3org/reva/pull/2354) : Return not found when updating non existent space
|
||||
* Chg [cs3org/reva#2589](https://github.com/cs3org/reva/pull/2589) : Remove deprecated linter modules
|
||||
* Chg [cs3org/reva#2016](https://github.com/cs3org/reva/pull/2016) : Move wrapping and unwrapping of paths to the storage gateway
|
||||
* Enh [cs3org/reva#2591](https://github.com/cs3org/reva/pull/2591) : Set up App Locks with basic locks
|
||||
* Enh [cs3org/reva#1209](https://github.com/cs3org/reva/pull/1209) : Reva CephFS module v0.2.1
|
||||
* Enh [cs3org/reva#2511](https://github.com/cs3org/reva/pull/2511) : Error handling cleanup in decomposed FS
|
||||
* Enh [cs3org/reva#2516](https://github.com/cs3org/reva/pull/2516) : Cleaned up some code
|
||||
* Enh [cs3org/reva#2512](https://github.com/cs3org/reva/pull/2512) : Consolidate xattr setter and getter
|
||||
* Enh [cs3org/reva#2341](https://github.com/cs3org/reva/pull/2341) : Use CS3 permissions API
|
||||
* Enh [cs3org/reva#2343](https://github.com/cs3org/reva/pull/2343) : Allow multiple space type fileters on decomposedfs
|
||||
* Enh [cs3org/reva#2460](https://github.com/cs3org/reva/pull/2460) : Add locking support to decomposedfs
|
||||
* Enh [cs3org/reva#2540](https://github.com/cs3org/reva/pull/2540) : Refactored the xattrs package in the decomposedfs
|
||||
* Enh [cs3org/reva#2463](https://github.com/cs3org/reva/pull/2463) : Do not log whole nodes
|
||||
* Enh [cs3org/reva#2350](https://github.com/cs3org/reva/pull/2350) : Add file locking methods to the storage and filesystem interfaces
|
||||
* Enh [cs3org/reva#2379](https://github.com/cs3org/reva/pull/2379) : Add new file url of the app provider to the ocs capabilities
|
||||
* Enh [cs3org/reva#2369](https://github.com/cs3org/reva/pull/2369) : Implement TouchFile from the CS3apis
|
||||
* Enh [cs3org/reva#2385](https://github.com/cs3org/reva/pull/2385) : Allow to create new files with the app provider on public links
|
||||
* Enh [cs3org/reva#2397](https://github.com/cs3org/reva/pull/2397) : Product field in OCS version
|
||||
* Enh [cs3org/reva#2393](https://github.com/cs3org/reva/pull/2393) : Update tus/tusd to version 1.8.0
|
||||
* Enh [cs3org/reva#2522](https://github.com/cs3org/reva/pull/2522) : Introduce events
|
||||
* Enh [cs3org/reva#2528](https://github.com/cs3org/reva/pull/2528) : Use an exclcusive write lock when writing multiple attributes
|
||||
* Enh [cs3org/reva#2595](https://github.com/cs3org/reva/pull/2595) : Add integration test for the groupprovider
|
||||
* Enh [cs3org/reva#2439](https://github.com/cs3org/reva/pull/2439) : Ignore handled errors when creating spaces
|
||||
* Enh [cs3org/reva#2500](https://github.com/cs3org/reva/pull/2500) : Invalidate listproviders cache
|
||||
* Enh [cs3org/reva#2345](https://github.com/cs3org/reva/pull/2345) : Don't assume that the LDAP groupid in reva matches the name
|
||||
* Enh [cs3org/reva#2525](https://github.com/cs3org/reva/pull/2525) : Allow using AD UUID as userId values
|
||||
* Enh [cs3org/reva#2584](https://github.com/cs3org/reva/pull/2584) : Allow running userprovider integration tests for the LDAP driver
|
||||
* Enh [cs3org/reva#2585](https://github.com/cs3org/reva/pull/2585) : Add metadata storage layer and indexer
|
||||
* Enh [cs3org/reva#2163](https://github.com/cs3org/reva/pull/2163) : Nextcloud-based share manager for pkg/ocm/share
|
||||
* Enh [cs3org/reva#2278](https://github.com/cs3org/reva/pull/2278) : OIDC driver changes for lightweight users
|
||||
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315) : Add new attributes to public link propfinds
|
||||
* Enh [cs3org/reva#2431](https://github.com/cs3org/reva/pull/2431) : Delete shares when purging spaces
|
||||
* Enh [cs3org/reva#2434](https://github.com/cs3org/reva/pull/2434) : Refactor ocdav into smaller chunks
|
||||
* Enh [cs3org/reva#2524](https://github.com/cs3org/reva/pull/2524) : Add checks when removing space members
|
||||
* Enh [cs3org/reva#2457](https://github.com/cs3org/reva/pull/2457) : Restore spaces that were previously deleted
|
||||
* Enh [cs3org/reva#2498](https://github.com/cs3org/reva/pull/2498) : Include grants in list storage spaces response
|
||||
* Enh [cs3org/reva#2344](https://github.com/cs3org/reva/pull/2344) : Allow listing all storage spaces
|
||||
* Enh [cs3org/reva#2547](https://github.com/cs3org/reva/pull/2547) : Add an if-match check to the storage provider
|
||||
* Enh [cs3org/reva#2486](https://github.com/cs3org/reva/pull/2486) : Update cs3apis to include lock api changes
|
||||
* Enh [cs3org/reva#2526](https://github.com/cs3org/reva/pull/2526) : Upgrade ginkgo to v2
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3231
|
||||
https://github.com/owncloud/ocis/pull/3258
|
||||
@@ -1,9 +0,0 @@
|
||||
Enhancement: Update ownCloud Web to v5.2.0
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.2.0. Please refer to the changelog (linked) for details on the web release.
|
||||
|
||||
https://github.com/owncloud/web/pull/6506
|
||||
https://github.com/owncloud/ocis/pull/3202
|
||||
https://github.com/owncloud/web/releases/tag/v5.2.0
|
||||
@@ -1,5 +0,0 @@
|
||||
Change: Add remote item to mountpoint and fix spaceID
|
||||
|
||||
A mountpoint represents the mounted share on the share receivers side. The original resource is located where the grant has been set. This item is now shown as libregraph remoteItem on the mountpoint. While adding this, we fixed the spaceID for mountpoints.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3365
|
||||
@@ -1,6 +0,0 @@
|
||||
Change: Switch NATS backend
|
||||
|
||||
We've switched the NATS backend from Streaming to JetStream, since NATS Streaming is depreciated.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3192
|
||||
https://github.com/cs3org/reva/pull/2574
|
||||
@@ -1,7 +0,0 @@
|
||||
Change: Drop json config file support
|
||||
|
||||
We've remove the support to configure oCIS and it's service with a json file.
|
||||
From now on we only support yaml configuration files, since they have the possibility
|
||||
to add comments.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3366
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Audit logger will now log file events
|
||||
|
||||
See full list of supported events in `audit/pkg/types/types.go`
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3332
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: Network configuration in individiual_services example
|
||||
|
||||
Tidy up the deployments/examples/ocis_individual_services example so that the instructions work.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3238
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: Improve gif thumbnails
|
||||
|
||||
Improved the gif thumbnail generation for gifs with different disposal strategies.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3305
|
||||
@@ -1,6 +0,0 @@
|
||||
Bugfix: Fix error handling in GraphAPI GetUsers call
|
||||
|
||||
A missing return statement caused GetUsers to return misleading results when
|
||||
the identity backend returned an error.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3357
|
||||
@@ -1,6 +0,0 @@
|
||||
Bugfix: Fix request validation on GraphAPI User updates
|
||||
|
||||
Fix PATCH on graph/v1.0/users when no 'mail' attribute
|
||||
is present in the request body
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3167
|
||||
@@ -1,7 +0,0 @@
|
||||
Enhancement: Add password reset link to login page
|
||||
|
||||
Added a configurable passwort reset link to the login page.
|
||||
It can be set via `IDP_PASSWORD_RESET_URI`. If the option is not set
|
||||
the link will not be shown.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3329
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: replace public mountpoint fileid with grant fileid
|
||||
|
||||
We now show the same resoucre id for resources when accessing them via a public links as when using a logged in user. This allows the web ui to start a WOPI session with the correct resource id.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3349
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: log sharing events in audit service
|
||||
|
||||
Contains sharing related events. See full list in audit/pkg/types/events.go
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3301
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Add space aliases
|
||||
|
||||
Space aliases can be used to resolve spaceIDs in a client.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3283
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Include etags in drives listing
|
||||
|
||||
Added etags in the response of list drives.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3267
|
||||
@@ -1,5 +0,0 @@
|
||||
Change: settings service now stores its data via metadata service
|
||||
|
||||
Instead of writing files to disk it will use metadata service to do so
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3232
|
||||
@@ -1,7 +0,0 @@
|
||||
Enhancement: Improve thumbnails API
|
||||
|
||||
Changed the thumbnails API to no longer transfer images via GRPC.
|
||||
GRPC has a limited message size and isn't very efficient with large binary data.
|
||||
The new API transports the images over HTTP.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3272
|
||||
@@ -1,31 +0,0 @@
|
||||
Enhancement: update reva to v2.1.0
|
||||
|
||||
Updated reva to version 2.1.0. This update includes:
|
||||
|
||||
* Fix [cs3org/reva#2636](https://github.com/cs3org/reva/pull/2636): Delay reconnect log for events
|
||||
* Fix [cs3org/reva#2645](https://github.com/cs3org/reva/pull/2645): Avoid warning about missing .flock files
|
||||
* Fix [cs3org/reva#2625](https://github.com/cs3org/reva/pull/2625): Fix locking on publik links and the decomposed filesystem
|
||||
* Fix [cs3org/reva#2643](https://github.com/cs3org/reva/pull/2643): Emit linkaccessfailed event when share is nil
|
||||
* Fix [cs3org/reva#2646](https://github.com/cs3org/reva/pull/2646): Replace public mountpoint fileid with grant fileid in ocdav
|
||||
* Fix [cs3org/reva#2612](https://github.com/cs3org/reva/pull/2612): Adjust the scope handling to support the spaces architecture
|
||||
* Fix [cs3org/reva#2621](https://github.com/cs3org/reva/pull/2621): Send events only if response code is `OK`
|
||||
* Chg [cs3org/reva#2574](https://github.com/cs3org/reva/pull/2574): Switch NATS backend
|
||||
* Chg [cs3org/reva#2667](https://github.com/cs3org/reva/pull/2667): Allow LDAP groups to have no gidNumber
|
||||
* Chg [cs3org/reva#3233](https://github.com/cs3org/reva/pull/3233): Improve quota handling
|
||||
* Chg [cs3org/reva#2600](https://github.com/cs3org/reva/pull/2600): Use the cs3 share api to manage spaces
|
||||
* Enh [cs3org/reva#2644](https://github.com/cs3org/reva/pull/2644): Add new public share manager
|
||||
* Enh [cs3org/reva#2626](https://github.com/cs3org/reva/pull/2626): Add new share manager
|
||||
* Enh [cs3org/reva#2624](https://github.com/cs3org/reva/pull/2624): Add etags to virtual spaces
|
||||
* Enh [cs3org/reva#2639](https://github.com/cs3org/reva/pull/2639): File Events
|
||||
* Enh [cs3org/reva#2627](https://github.com/cs3org/reva/pull/2627): Add events for sharing action
|
||||
* Enh [cs3org/reva#2664](https://github.com/cs3org/reva/pull/2664): Add grantID to mountpoint
|
||||
* Enh [cs3org/reva#2622](https://github.com/cs3org/reva/pull/2622): Allow listing shares in spaces via the OCS API
|
||||
* Enh [cs3org/reva#2623](https://github.com/cs3org/reva/pull/2623): Add space aliases
|
||||
* Enh [cs3org/reva#2647](https://github.com/cs3org/reva/pull/2647): Add space specific events
|
||||
* Enh [cs3org/reva#3345](https://github.com/cs3org/reva/pull/3345): Add the spaceid to propfind responses
|
||||
* Enh [cs3org/reva#2616](https://github.com/cs3org/reva/pull/2616): Add etag to spaces response
|
||||
* Enh [cs3org/reva#2628](https://github.com/cs3org/reva/pull/2628): Add spaces aware trash-bin API
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3330
|
||||
https://github.com/owncloud/ocis/pull/3405
|
||||
https://github.com/owncloud/ocis/pull/3416
|
||||
@@ -1,10 +0,0 @@
|
||||
Enhancement: Update ownCloud Web to v5.3.0
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.3.0. Please refer to the changelog (linked) for details on the web release.
|
||||
|
||||
https://github.com/owncloud/web/pull/6561
|
||||
https://github.com/owncloud/ocis/pull/3291
|
||||
https://github.com/owncloud/ocis/pull/3375
|
||||
https://github.com/owncloud/web/releases/tag/v5.3.0
|
||||
@@ -1,5 +0,0 @@
|
||||
Bugfix: Return correct special item urls
|
||||
|
||||
URLs for Special items (space image, readme) were broken.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3419
|
||||
@@ -1,6 +0,0 @@
|
||||
Bugfix: ensure the same data on /ocs/v?.php/config like oC10
|
||||
|
||||
We've fixed the returned values on the /ocs/v?.php/config endpoints,
|
||||
so that they now return the same values as an oC10 would do.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3113
|
||||
@@ -1,10 +0,0 @@
|
||||
Enhancement: Add sorting to GraphAPI users and groups
|
||||
|
||||
The GraphAPI endpoints for users and groups support ordering now.
|
||||
User can be ordered by displayName, onPremisesSamAccountName and mail.
|
||||
Groups can be ordered by displayName.
|
||||
|
||||
Example:
|
||||
https://localhost:9200/graph/v1.0/groups?$orderby=displayName asc
|
||||
|
||||
https://github.com/owncloud/ocis/issues/3360
|
||||
@@ -25,6 +25,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
- name: continuous-deployment-ocis-individual-services-latest
|
||||
server:
|
||||
server_type: cx31
|
||||
image: ubuntu-20.04
|
||||
location: nbg1
|
||||
initial_ssh_key_names:
|
||||
- owncloud-ocis@drone.owncloud.com
|
||||
labels:
|
||||
owner: wkloucek
|
||||
for: oCIS-continuous-deployment-examples
|
||||
rebuild: $REBUILD
|
||||
rebuild_carry_paths:
|
||||
- /var/lib/docker/volumes/ocis_certs
|
||||
|
||||
domains:
|
||||
- "*.ocis-individual-services.latest.owncloud.works"
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/C0rby.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
git_url: https://github.com/owncloud/ocis.git
|
||||
ref: master
|
||||
docker_compose_path: deployments/examples/ocis_individual_services
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
|
||||
OCIS_DOCKER_TAG: latest
|
||||
OCIS_SCALE: 6
|
||||
OCIS_DOMAIN: ocis.ocis-individual-services.latest.owncloud.works
|
||||
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
|
||||
- name: monitoring
|
||||
git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git
|
||||
ref: master
|
||||
env:
|
||||
NETWORK_NAME: ocis-net
|
||||
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-individual-services.latest.owncloud.works
|
||||
JAEGER_COLLECTOR: jaeger-collector.infra.owncloud.works:443
|
||||
TELEGRAF_SPECIFIC_CONFIG: ocis_individual_services
|
||||
OCIS_URL: ocis.ocis-individual-services.latest.owncloud.works
|
||||
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-individual-services-latest
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/pascalwengerter.keys
|
||||
- https://github.com/paulcod3.keys
|
||||
- https://github.com/refs.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "PROXY_LOG_LEVEL"
|
||||
},
|
||||
"policy_selector": {
|
||||
"claims": {
|
||||
"default_policy": "oc10",
|
||||
"unauthenticated_policy": "oc10"
|
||||
}
|
||||
},
|
||||
"policies": [
|
||||
{
|
||||
"name": "ocis",
|
||||
"routes": [
|
||||
{
|
||||
"endpoint": "/",
|
||||
"backend": "http://localhost:9100"
|
||||
},
|
||||
{
|
||||
"endpoint": "/.well-known/",
|
||||
"backend": "http://localhost:9130"
|
||||
},
|
||||
{
|
||||
"type": "regex",
|
||||
"endpoint": "/ocs/v[12].php/cloud/user/signing-key",
|
||||
"backend": "http://localhost:9110"
|
||||
},
|
||||
{
|
||||
"endpoint": "/ocs/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"endpoint": "/remote.php/?preview=1",
|
||||
"backend": "http://localhost:9115"
|
||||
},
|
||||
{
|
||||
"endpoint": "/remote.php/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/dav/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/webdav/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/status.php",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/index.php/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/index.php/login",
|
||||
"backend": "http://localhost:9100"
|
||||
},
|
||||
{
|
||||
"endpoint": "/login",
|
||||
"backend": "http://localhost:9100"
|
||||
},
|
||||
{
|
||||
"endpoint": "/data",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/graph/",
|
||||
"backend": "http://localhost:9120"
|
||||
},
|
||||
{
|
||||
"endpoint": "/app/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/archiver",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/graph-explorer/",
|
||||
"backend": "http://localhost:9135"
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v0/settings",
|
||||
"backend": "http://localhost:9190"
|
||||
},
|
||||
{
|
||||
"endpoint": "/settings.js",
|
||||
"backend": "http://localhost:9190"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "oc10",
|
||||
"routes": [
|
||||
{
|
||||
"endpoint": "/",
|
||||
"backend": "http://oc10:8080"
|
||||
},
|
||||
{
|
||||
"endpoint": "/data",
|
||||
"backend": "http://localhost:9140"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
policy_selector:
|
||||
claims:
|
||||
default_policy: oc10
|
||||
unauthenticated_policy: oc10
|
||||
policies:
|
||||
- name: ocis
|
||||
routes:
|
||||
- endpoint: "/"
|
||||
backend: http://localhost:9100
|
||||
- endpoint: "/.well-known/"
|
||||
backend: http://localhost:9130
|
||||
- type: regex
|
||||
endpoint: "/ocs/v[12].php/cloud/user/signing-key"
|
||||
backend: http://localhost:9110
|
||||
- endpoint: "/ocs/"
|
||||
backend: http://localhost:9140
|
||||
- type: query
|
||||
endpoint: "/remote.php/?preview=1"
|
||||
backend: http://localhost:9115
|
||||
- endpoint: "/remote.php/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/dav/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/webdav/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/status.php"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/index.php/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/index.php/login"
|
||||
backend: http://localhost:9100
|
||||
- endpoint: "/login"
|
||||
backend: http://localhost:9100
|
||||
- endpoint: "/data"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/graph/"
|
||||
backend: http://localhost:9120
|
||||
- endpoint: "/app/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/archiver"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/graph-explorer/"
|
||||
backend: http://localhost:9135
|
||||
- endpoint: "/api/v0/settings"
|
||||
backend: http://localhost:9190
|
||||
- endpoint: "/settings.js"
|
||||
backend: http://localhost:9190
|
||||
- name: oc10
|
||||
routes:
|
||||
- endpoint: "/"
|
||||
backend: http://oc10:8080
|
||||
- endpoint: "/data"
|
||||
backend: http://localhost:9140
|
||||
@@ -116,6 +116,7 @@ services:
|
||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
||||
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
|
||||
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
|
||||
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
|
||||
# change default secrets
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
STORAGE_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
|
||||
@@ -125,7 +126,7 @@ services:
|
||||
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
|
||||
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
|
||||
volumes:
|
||||
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
|
||||
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
|
||||
- ocis-data:/var/lib/ocis
|
||||
# shared volume with oC10
|
||||
- oc10-data:/mnt/data
|
||||
@@ -202,8 +203,7 @@ services:
|
||||
restart: always
|
||||
|
||||
keycloak:
|
||||
# Keycloak WildFly distribution, Quarkus is not ready yet for automatic setup https://github.com/keycloak/keycloak/issues/10216
|
||||
image: quay.io/keycloak/keycloak:legacy
|
||||
image: quay.io/keycloak/keycloak:latest
|
||||
networks:
|
||||
ocis-net:
|
||||
entrypoint: ["/bin/sh", "/opt/jboss/tools/docker-entrypoint-override.sh"]
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"HTTP": {
|
||||
"Namespace": "com.owncloud"
|
||||
},
|
||||
"policy_selector": {
|
||||
"static": {
|
||||
"policy": "ocis"
|
||||
}
|
||||
},
|
||||
"policies": [
|
||||
{
|
||||
"name": "ocis",
|
||||
"routes": [
|
||||
{
|
||||
"endpoint": "/",
|
||||
"backend": "http://localhost:9100"
|
||||
},
|
||||
{
|
||||
"endpoint": "/.well-known/",
|
||||
"backend": "http://localhost:9130"
|
||||
},
|
||||
{
|
||||
"endpoint": "/konnect/",
|
||||
"backend": "http://localhost:9130"
|
||||
},
|
||||
{
|
||||
"endpoint": "/signin/",
|
||||
"backend": "http://localhost:9130"
|
||||
},
|
||||
{
|
||||
"type": "regex",
|
||||
"endpoint": "/ocs/v[12].php/cloud/(users?|groups)",
|
||||
"backend": "http://localhost:9110"
|
||||
},
|
||||
{
|
||||
"endpoint": "/ocs/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"endpoint": "/remote.php/?preview=1",
|
||||
"backend": "http://localhost:9115"
|
||||
},
|
||||
{
|
||||
"endpoint": "/remote.php/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/dav/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/webdav/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/status.php",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/index.php/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/data",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/app/",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/archiver",
|
||||
"backend": "http://localhost:9140"
|
||||
},
|
||||
{
|
||||
"endpoint": "/graph/",
|
||||
"backend": "http://localhost:9120"
|
||||
},
|
||||
{
|
||||
"endpoint": "/graph-explorer/",
|
||||
"backend": "http://localhost:9135"
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v0/accounts",
|
||||
"backend": "http://localhost:9181"
|
||||
},
|
||||
{
|
||||
"endpoint": "/accounts.js",
|
||||
"backend": "http://localhost:9181"
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v0/settings",
|
||||
"backend": "http://localhost:9190"
|
||||
},
|
||||
{
|
||||
"endpoint": "/settings.js",
|
||||
"backend": "http://localhost:9190"
|
||||
},
|
||||
{
|
||||
"endpoint": "/api/v0/greet",
|
||||
"backend": "http://ocis-hello:9105"
|
||||
},
|
||||
{
|
||||
"endpoint": "/hello.js",
|
||||
"backend": "http://ocis-hello:9105"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
policy_selector:
|
||||
static:
|
||||
policy: ocis
|
||||
policies:
|
||||
- name: ocis
|
||||
routes:
|
||||
- endpoint: "/"
|
||||
backend: http://localhost:9100
|
||||
- endpoint: "/.well-known/"
|
||||
backend: http://localhost:9130
|
||||
- endpoint: "/konnect/"
|
||||
backend: http://localhost:9130
|
||||
- endpoint: "/signin/"
|
||||
backend: http://localhost:9130
|
||||
- type: regex
|
||||
endpoint: "/ocs/v[12].php/cloud/(users?|groups)"
|
||||
backend: http://localhost:9110
|
||||
- endpoint: "/ocs/"
|
||||
backend: http://localhost:9140
|
||||
- type: query
|
||||
endpoint: "/remote.php/?preview=1"
|
||||
backend: http://localhost:9115
|
||||
- endpoint: "/remote.php/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/dav/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/webdav/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/status.php"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/index.php/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/data"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/app/"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/archiver"
|
||||
backend: http://localhost:9140
|
||||
- endpoint: "/graph/"
|
||||
backend: http://localhost:9120
|
||||
- endpoint: "/graph-explorer/"
|
||||
backend: http://localhost:9135
|
||||
- endpoint: "/api/v0/accounts"
|
||||
backend: http://localhost:9181
|
||||
- endpoint: "/accounts.js"
|
||||
backend: http://localhost:9181
|
||||
- endpoint: "/api/v0/settings"
|
||||
backend: http://localhost:9190
|
||||
- endpoint: "/settings.js"
|
||||
backend: http://localhost:9190
|
||||
- endpoint: "/api/v0/greet"
|
||||
backend: http://ocis-hello:9105
|
||||
- endpoint: "/hello.js"
|
||||
backend: http://ocis-hello:9105
|
||||
@@ -71,7 +71,7 @@ services:
|
||||
volumes:
|
||||
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
|
||||
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
|
||||
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
|
||||
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
|
||||
- ocis-data:/var/lib/ocis
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# If you're on a internet facing server please comment out following line.
|
||||
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
|
||||
INSECURE=true
|
||||
|
||||
### Traefik settings ###
|
||||
# Serve Treafik dashboard. Defaults to "false".
|
||||
TRAEFIK_DASHBOARD=
|
||||
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
|
||||
TRAEFIK_DOMAIN=
|
||||
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
|
||||
TRAEFIK_BASIC_AUTH_USERS=
|
||||
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
|
||||
TRAEFIK_ACME_MAIL=
|
||||
|
||||
### oCIS settings ###
|
||||
# oCIS version. Defaults to "latest"
|
||||
OCIS_DOCKER_TAG=
|
||||
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
|
||||
OCIS_DOMAIN=
|
||||
# IDP LDAP bind password. Must be changed in order to have a secure oCIS. Defaults to "idp".
|
||||
IDP_LDAP_BIND_PASSWORD=
|
||||
# Storage LDAP bind password. Must be changed in order to have a secure oCIS. Defaults to "reva".
|
||||
STORAGE_LDAP_BIND_PASSWORD=
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
# Machine auth api key secret. Must be changed in order to have a secure oCIS. Defaults to "change-me-please"
|
||||
OCIS_MACHINE_AUTH_API_KEY=
|
||||
# Number of services to run for extensions, that currently can be easily scaled. Defaults to 1.
|
||||
OCIS_SCALE=
|
||||
|
||||
# If you want to use debugging and tracing with this stack,
|
||||
# you need uncomment following line. Please see documentation at
|
||||
# https://owncloud.dev/ocis/deployment/monitoring-tracing/
|
||||
#COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
|
||||
Loaded 100 of 471 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user