From 59bd9a93d215959e827a1a0277da4dcfef80210e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 14 Feb 2020 15:42:48 +0100 Subject: [PATCH 001/213] Initial Commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .codacy.yml | 8 + .dockerignore | 2 + .drone.star | 698 +++++++++++++++++++++++ .editorconfig | 35 ++ .github/config.yml | 12 + .github/issue_template.md | 0 .github/pull_request_template.md | 0 .github/settings.yml | 98 ++++ .gitignore | 5 + CHANGELOG.md | 16 + LICENSE | 202 +++++++ Makefile | 155 ++++++ Readme.md | 45 ++ changelog/CHANGELOG.tmpl | 50 ++ changelog/README.md | 6 + changelog/TEMPLATE | 11 + changelog/unreleased/.keep | 0 changelog/unreleased/inital-release | 5 + cmd/ocis-proxy/main.go | 13 + docker/Dockerfile.linux.amd64 | 19 + docker/Dockerfile.linux.arm | 19 + docker/Dockerfile.linux.arm64 | 19 + docker/manifest.tmpl | 22 + docs/_index.md | 6 + docs/about.md | 8 + docs/building.md | 24 + docs/getting-started.md | 57 ++ go.mod | 19 + go.sum | 827 ++++++++++++++++++++++++++++ pkg/command/health.go | 49 ++ pkg/command/root.go | 103 ++++ pkg/command/server.go | 222 ++++++++ pkg/config/config.go | 52 ++ pkg/flagset/flagset.go | 145 +++++ pkg/metrics/metrics.go | 58 ++ pkg/server/debug/option.go | 50 ++ pkg/server/debug/server.go | 51 ++ pkg/server/http/option.go | 76 +++ pkg/server/http/server.go | 159 ++++++ pkg/version/version.go | 19 + tools.go | 7 + 41 files changed, 3372 insertions(+) create mode 100644 .codacy.yml create mode 100644 .dockerignore create mode 100644 .drone.star create mode 100644 .editorconfig create mode 100644 .github/config.yml create mode 100644 .github/issue_template.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/settings.yml create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 Readme.md create mode 100644 changelog/CHANGELOG.tmpl create mode 100644 changelog/README.md create mode 100644 changelog/TEMPLATE create mode 100644 changelog/unreleased/.keep create mode 100644 changelog/unreleased/inital-release create mode 100644 cmd/ocis-proxy/main.go create mode 100644 docker/Dockerfile.linux.amd64 create mode 100644 docker/Dockerfile.linux.arm create mode 100644 docker/Dockerfile.linux.arm64 create mode 100644 docker/manifest.tmpl create mode 100644 docs/_index.md create mode 100644 docs/about.md create mode 100644 docs/building.md create mode 100644 docs/getting-started.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 pkg/command/health.go create mode 100644 pkg/command/root.go create mode 100644 pkg/command/server.go create mode 100644 pkg/config/config.go create mode 100644 pkg/flagset/flagset.go create mode 100644 pkg/metrics/metrics.go create mode 100644 pkg/server/debug/option.go create mode 100644 pkg/server/debug/server.go create mode 100644 pkg/server/http/option.go create mode 100644 pkg/server/http/server.go create mode 100644 pkg/version/version.go create mode 100644 tools.go diff --git a/.codacy.yml b/.codacy.yml new file mode 100644 index 0000000000..855b4f298b --- /dev/null +++ b/.codacy.yml @@ -0,0 +1,8 @@ +--- +exclude_paths: + - CHANGELOG.md + - changelog/** + - docs/** + - pkg/proto/** + +... diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..4ec85b5e4f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +* +!bin/ diff --git a/.drone.star b/.drone.star new file mode 100644 index 0000000000..94d7e35b90 --- /dev/null +++ b/.drone.star @@ -0,0 +1,698 @@ +def main(ctx): + before = [ + testing(ctx), + ] + + stages = [ + docker(ctx, 'amd64'), + docker(ctx, 'arm64'), + docker(ctx, 'arm'), + binary(ctx, 'linux'), + binary(ctx, 'darwin'), + binary(ctx, 'windows'), + ] + + after = [ + manifest(ctx), + changelog(ctx), + readme(ctx), + badges(ctx), + website(ctx), + ] + + return before + stages + after + +def testing(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'testing', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'vet', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make vet', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'staticcheck', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make staticcheck', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'lint', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make lint', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make build', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'test', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make test', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'codacy', + 'image': 'plugins/codacy:1', + 'pull': 'always', + 'settings': { + 'token': { + 'from_secret': 'codacy_token', + }, + }, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def docker(ctx, arch): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': arch, + 'platform': { + 'os': 'linux', + 'arch': arch, + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make build', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'dryrun', + 'image': 'plugins/docker:18.09', + 'pull': 'always', + 'settings': { + 'dry_run': True, + 'tags': 'linux-%s' % (arch), + 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), + 'repo': ctx.repo.slug, + }, + 'when': { + 'ref': { + 'include': [ + 'refs/pull/**', + ], + }, + }, + }, + { + 'name': 'docker', + 'image': 'plugins/docker:18.09', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'docker_username', + }, + 'password': { + 'from_secret': 'docker_password', + }, + 'auto_tag': True, + 'auto_tag_suffix': 'linux-%s' % (arch), + 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), + 'repo': ctx.repo.slug, + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'depends_on': [ + 'testing', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def binary(ctx, name): + if ctx.build.event == "tag": + settings = { + 'endpoint': { + 'from_secret': 's3_endpoint', + }, + 'access_key': { + 'from_secret': 'aws_access_key_id', + }, + 'secret_key': { + 'from_secret': 'aws_secret_access_key', + }, + 'bucket': { + 'from_secret': 's3_bucket', + }, + 'path_style': True, + 'strip_prefix': 'dist/release/', + 'source': 'dist/release/*', + 'target': '/ocis/%s/%s' % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", "")), + } + else: + settings = { + 'endpoint': { + 'from_secret': 's3_endpoint', + }, + 'access_key': { + 'from_secret': 'aws_access_key_id', + }, + 'secret_key': { + 'from_secret': 'aws_secret_access_key', + }, + 'bucket': { + 'from_secret': 's3_bucket', + }, + 'path_style': True, + 'strip_prefix': 'dist/release/', + 'source': 'dist/release/*', + 'target': '/ocis/%s/testing' % (ctx.repo.name.replace("ocis-", "")), + } + + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': name, + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make release-%s' % (name), + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'finish', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make release-finish', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'upload', + 'image': 'plugins/s3:1', + 'pull': 'always', + 'settings': settings, + 'when': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + }, + { + 'name': 'changelog', + 'image': 'toolhippie/calens:latest', + 'pull': 'always', + 'commands': [ + 'calens --version %s -o dist/CHANGELOG.md' % ctx.build.ref.replace("refs/tags/v", "").split("-")[0], + ], + 'when': { + 'ref': [ + 'refs/tags/**', + ], + }, + }, + { + 'name': 'release', + 'image': 'plugins/github-release:1', + 'pull': 'always', + 'settings': { + 'api_key': { + 'from_secret': 'github_token', + }, + 'files': [ + 'dist/release/*', + ], + 'title': ctx.build.ref.replace("refs/tags/v", ""), + 'note': 'dist/CHANGELOG.md', + 'overwrite': True, + 'prerelease': len(ctx.build.ref.split("-")) > 1, + }, + 'when': { + 'ref': [ + 'refs/tags/**', + ], + }, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'depends_on': [ + 'testing', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def manifest(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'manifest', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'plugins/manifest:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'docker_username', + }, + 'password': { + 'from_secret': 'docker_password', + }, + 'spec': 'docker/manifest.tmpl', + 'auto_tag': True, + 'ignore_missing': True, + }, + }, + ], + 'depends_on': [ + 'amd64', + 'arm64', + 'arm', + 'linux', + 'darwin', + 'windows', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + } + +def changelog(ctx): + repo_slug = ctx.build.source_repo if ctx.build.source_repo else ctx.repo.slug + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'changelog', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'clone': { + 'disable': True, + }, + 'steps': [ + { + 'name': 'clone', + 'image': 'plugins/git-action:1', + 'pull': 'always', + 'settings': { + 'actions': [ + 'clone', + ], + 'remote': 'https://github.com/%s' % (repo_slug), + 'branch': ctx.build.source if ctx.build.event == 'pull_request' else 'master', + 'path': '/drone/src', + 'netrc_machine': 'github.com', + 'netrc_username': { + 'from_secret': 'github_username', + }, + 'netrc_password': { + 'from_secret': 'github_token', + }, + }, + }, + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make changelog', + ], + }, + { + 'name': 'diff', + 'image': 'owncloud/alpine:latest', + 'pull': 'always', + 'commands': [ + 'git diff', + ], + }, + { + 'name': 'output', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'cat CHANGELOG.md', + ], + }, + { + 'name': 'publish', + 'image': 'plugins/git-action:1', + 'pull': 'always', + 'settings': { + 'actions': [ + 'commit', + 'push', + ], + 'message': 'Automated changelog update [skip ci]', + 'branch': 'master', + 'author_email': 'devops@owncloud.com', + 'author_name': 'ownClouders', + 'netrc_machine': 'github.com', + 'netrc_username': { + 'from_secret': 'github_username', + }, + 'netrc_password': { + 'from_secret': 'github_token', + }, + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, + ], + 'depends_on': [ + 'manifest', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/pull/**', + ], + }, + } + +def readme(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'readme', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'sheogorath/readme-to-dockerhub:latest', + 'pull': 'always', + 'environment': { + 'DOCKERHUB_USERNAME': { + 'from_secret': 'docker_username', + }, + 'DOCKERHUB_PASSWORD': { + 'from_secret': 'docker_password', + }, + 'DOCKERHUB_REPO_PREFIX': ctx.repo.namespace, + 'DOCKERHUB_REPO_NAME': ctx.repo.name, + 'SHORT_DESCRIPTION': 'Docker images for %s' % (ctx.repo.name), + 'README_PATH': 'README.md', + }, + }, + ], + 'depends_on': [ + 'changelog', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + } + +def badges(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'badges', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'plugins/webhook:1', + 'pull': 'always', + 'settings': { + 'urls': { + 'from_secret': 'microbadger_url', + }, + }, + }, + ], + 'depends_on': [ + 'readme', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + } + +def website(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'website', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'prepare', + 'image': 'owncloudci/alpine:latest', + 'commands': [ + 'make docs-copy' + ], + }, + { + 'name': 'test', + 'image': 'webhippie/hugo:latest', + 'commands': [ + 'cd hugo', + 'hugo', + ], + }, + { + 'name': 'list', + 'image': 'owncloudci/alpine:latest', + 'commands': [ + 'tree hugo/public', + ], + }, + { + 'name': 'publish', + 'image': 'plugins/gh-pages:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'github_username', + }, + 'password': { + 'from_secret': 'github_token', + }, + 'pages_directory': 'docs/', + 'target_branch': 'docs', + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, + { + 'name': 'downstream', + 'image': 'plugins/downstream', + 'settings': { + 'server': 'https://cloud.drone.io/', + 'token': { + 'from_secret': 'drone_token', + }, + 'repositories': [ + 'owncloud/owncloud.github.io@source', + ], + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, + ], + 'depends_on': [ + 'badges', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/pull/**', + ], + }, + } diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..7b368379e8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,35 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[Makefile] +indent_style = tab +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 4 + +[*.starlark] +indent_style = space +indent_size = 2 + +[*.{yml,json}] +indent_style = space +indent_size = 2 + +[*.{js,vue}] +indent_style = space +indent_size = 2 + +[*.{css,less}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = true \ No newline at end of file diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000000..e418e6bdd5 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,12 @@ +# Configuration for update-docs - https://github.com/behaviorbot/update-docs + +# Comment to be posted to on PRs that don't update documentation +updateDocsComment: > + Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a [changelog](https://github.com/owncloud/ocis-proxy/blob/master/changelog/README.md) item based on your changes. +updateDocsWhiteList: + - Tests-only + - tests-only + - Tests-Only + +updateDocsTargetFiles: + - changelog/unreleased/ diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000000..88826501b1 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,98 @@ +--- +repository: + name: ocis-proxy + description: ':bridge_at_night: Reverse proxy for oCIS' + homepage: https://owncloud.github.io/ocis-proxy/ + topics: ocis + + private: false + has_issues: true + has_projects: false + has_wiki: false + has_downloads: false + + default_branch: master + + allow_squash_merge: true + allow_merge_commit: true + allow_rebase_merge: true + +labels: + - name: bug + color: d73a4a + description: Something isn't working + - name: documentation + color: 0075ca + description: Improvements or additions to documentation + - name: duplicate + color: cfd3d7 + description: This issue or pull request already exists + - name: enhancement + color: a2eeef + description: New feature or request + - name: good first issue + color: 7057ff + description: Good for newcomers + - name: help wanted + color: 008672 + description: Extra attention is needed + - name: invalid + color: e4e669 + description: This doesn't seem right + - name: question + color: d876e3 + description: Further information is requested + - name: wontfix + color: ffffff + description: This will not be worked on + - name: effort/trivial + color: c2e0c6 + description: Required effort to finish task + - name: effort/0.25d + color: c2e0c6 + description: Required effort to finish task + - name: effort/0.5d + color: c2e0c6 + description: Required effort to finish task + - name: effort/1d + color: c2e0c6 + description: Required effort to finish task + - name: effort/2d + color: c2e0c6 + description: Required effort to finish task + - name: effort/4d + color: c2e0c6 + description: Required effort to finish task + - name: effort/5d + color: c2e0c6 + description: Required effort to finish task + - name: effort/10d + color: c2e0c6 + description: Required effort to finish task + +teams: + - name: ci + permission: admin + - name: employees + permission: push + +branches: + - name: master + protection: + required_pull_request_reviews: + required_approving_review_count: 1 + dismiss_stale_reviews: false + require_code_owner_reviews: false + dismissal_restrictions: {} + required_status_checks: + strict: true + contexts: + - continuous-integration/drone/pr + enforce_admins: false + restrictions: + users: [] + teams: + - ci + - employees + +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..9307ed7203 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +coverage.out + +/bin +/dist +/hugo \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..fad55b4968 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for unreleased. + +## Summary + + * Chg #1: Initial release of basic version + +## Details + + * Change #1: Initial release of basic version + + Just prepared an initial basic version. + + https://github.com/owncloud/ocis-proxy/issues/1 + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..daa565f2e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,155 @@ +SHELL := bash +NAME := ocis-proxy +IMPORT := github.com/owncloud/$(NAME) +BIN := bin +DIST := dist +HUGO := hugo + +ifeq ($(OS), Windows_NT) + EXECUTABLE := $(NAME).exe + UNAME := Windows +else + EXECUTABLE := $(NAME) + UNAME := $(shell uname -s) +endif + +ifeq ($(UNAME), Darwin) + GOBUILD ?= go build -i +else + GOBUILD ?= go build +endif + +PACKAGES ?= $(shell go list ./...) +SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*") +GENERATE ?= $(PACKAGES) + +TAGS ?= + +ifndef OUTPUT + ifneq ($(DRONE_TAG),) + OUTPUT ?= $(subst v,,$(DRONE_TAG)) + else + OUTPUT ?= testing + endif +endif + +ifndef VERSION + ifneq ($(DRONE_TAG),) + VERSION ?= $(subst v,,$(DRONE_TAG)) + else + VERSION ?= $(shell git rev-parse --short HEAD) + endif +endif + +ifndef DATE + DATE := $(shell date -u '+%Y%m%d') +endif + +LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" +GCFLAGS += all=-N -l + +.PHONY: all +all: build + +.PHONY: sync +sync: + go mod download + +.PHONY: clean +clean: + go clean -i ./... + rm -rf $(BIN) $(DIST) + +.PHONY: fmt +fmt: + gofmt -s -w $(SOURCES) + +.PHONY: vet +vet: + go vet $(PACKAGES) + +.PHONY: staticcheck +staticcheck: + go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES) + +.PHONY: lint +lint: + for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done; + +.PHONY: generate +generate: + go generate $(GENERATE) + +.PHONY: changelog +changelog: + go run github.com/restic/calens >| CHANGELOG.md + +.PHONY: test +test: + go run github.com/haya14busa/goverage -v -coverprofile coverage.out $(PACKAGES) + +.PHONY: install +install: $(SOURCES) + go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME) + +.PHONY: build +build: $(BIN)/$(EXECUTABLE) $(BIN)/$(EXECUTABLE)-debug + +$(BIN)/$(EXECUTABLE): $(SOURCES) + $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME) + +$(BIN)/$(EXECUTABLE)-debug: $(SOURCES) + $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME) + +.PHONY: release +release: release-dirs release-linux release-windows release-darwin release-copy release-check + +.PHONY: release-dirs +release-dirs: + mkdir -p $(DIST)/binaries $(DIST)/release + +.PHONY: release-linux +release-linux: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) + +.PHONY: release-windows +release-windows: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) + +.PHONY: release-darwin +release-darwin: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) + +.PHONY: release-copy +release-copy: + $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));) + +.PHONY: release-check +release-check: + cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;) + +.PHONY: release-finish +release-finish: release-copy release-check + +.PHONY: docs-copy +docs-copy: + mkdir -p $(HUGO); \ + mkdir -p $(HUGO)/content/extensions; \ + cd $(HUGO); \ + git init; \ + git remote rm origin; \ + git remote add origin https://github.com/owncloud/owncloud.github.io; \ + git fetch; \ + git checkout origin/source -f; \ + rsync --delete -ax ../docs/ content/extensions/$(NAME) + +.PHONY: docs-build +docs-build: + cd $(HUGO); hugo + +.PHONY: docs +docs: docs-copy docs-build + +.PHONY: watch +watch: + go run github.com/cespare/reflex -c reflex.conf diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000000..1c08a4f41d --- /dev/null +++ b/Readme.md @@ -0,0 +1,45 @@ +# ownCloud Infinite Scale: Proxy + +[![Build Status](https://cloud.drone.io/api/badges/owncloud/ocis-proxy/status.svg)](https://cloud.drone.io/owncloud/ocis-proxy) +[![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d005a4722c1b463b9b95060479018e99)](https://www.codacy.com/gh/owncloud/ocis-proxy?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-proxy&utm_campaign=Badge_Grade) +[![Go Doc](https://godoc.org/github.com/owncloud/ocis-proxy?status.svg)](http://godoc.org/github.com/owncloud/ocis-proxy) +[![Go Report](http://goreportcard.com/badge/github.com/owncloud/ocis-proxy)](http://goreportcard.com/report/github.com/owncloud/ocis-proxy) +[![](https://images.microbadger.com/badges/image/owncloud/ocis-proxy.svg)](http://microbadger.com/images/owncloud/ocis-proxy "Get your own image badge on microbadger.com") + +**This project is under heavy development, it's not in a working state yet!** + +## Install + +You can download prebuilt binaries from the GitHub releases or from our [download mirrors](http://download.owncloud.com/ocis/proxy/). For instructions how to install this on your platform you should take a look at our [documentation](https://owncloud.github.io/ocis-proxy/) +**** +## Development + +Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html). This project requires Go >= v1.13. + +```console +git clone https://github.com/owncloud/ocis-proxy.git +cd ocis-proxy + +make generate build + +./bin/ocis-proxy -h +``` + +## Security + +If you find a security issue please contact security@owncloud.com first. + +## Contributing + +Fork -> Patch -> Push -> Pull Request + +## License + +Apache-2.0 + +## Copyright + +```console +Copyright (c) 2019 ownCloud GmbH +``` diff --git a/changelog/CHANGELOG.tmpl b/changelog/CHANGELOG.tmpl new file mode 100644 index 0000000000..cabe3e71e1 --- /dev/null +++ b/changelog/CHANGELOG.tmpl @@ -0,0 +1,50 @@ +{{ $allVersions := . }} +{{- range $index, $changes := . }}{{ with $changes -}} +# Changelog for [{{ .Version }}] ({{ .Date }}) + +The following sections list the changes for {{ .Version }}. + +{{ if gt (len $allVersions) 1 -}} +{{/* creating version compare links */ -}} +{{ $next := add1 $index -}} +{{ if ne (len $allVersions) $next -}} +{{ $previousVersion := (index $allVersions $next).Version -}} +{{ if eq .Version "unreleased" -}} +[{{ .Version }}]: https://github.com/owncloud/ocis-proxy/compare/v{{ $previousVersion }}...master + +{{ else -}} +[{{ .Version }}]: https://github.com/owncloud/ocis-proxy/compare/v{{ $previousVersion }}...v{{ .Version }} + +{{ end -}} +{{ end -}} + +{{- /* last version managed by calens, end of the loop */ -}} +{{ if eq .Version "0.1.0" -}} +[{{ .Version }}]: https://github.com/owncloud/ocis-proxy/compare/500e303cb544ed93d84153f01219d77eeee44929...v{{ .Version }} + +{{ end -}} +{{- end -}} + +## Summary +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .TypeShort }} #{{ .PrimaryID }}: {{ .Title }} +{{- end }}{{ end }} + +## Details +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +{{ range $par := .Paragraphs }} + {{ wrapIndent $par 80 3 }} +{{ end -}} +{{ range $url := .IssueURLs }} + {{ $url -}} +{{ end -}} +{{ range $url := .PRURLs }} + {{ $url -}} +{{ end -}} +{{ range $url := .OtherURLs }} + {{ $url -}} +{{ end }} + +{{ end }}{{ end -}} +{{ end }}{{ end -}} diff --git a/changelog/README.md b/changelog/README.md new file mode 100644 index 0000000000..0ae5d5b3e2 --- /dev/null +++ b/changelog/README.md @@ -0,0 +1,6 @@ +# Changelog + +We are using [calens](https://github.com/restic/calens) to properly generate a +changelog before we are tagging a new release. To get an idea how this could +look like would be the +best reference. diff --git a/changelog/TEMPLATE b/changelog/TEMPLATE new file mode 100644 index 0000000000..224e662117 --- /dev/null +++ b/changelog/TEMPLATE @@ -0,0 +1,11 @@ +Bugfix: Fix behavior for foobar (in present tense) + +We've fixed the behavior for foobar, a long-standing annoyance for users. The +text should be wrapped at 80 characters length. + +The text in the paragraphs is written in past tense. The last section is a list +of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID, +in case there aren't any issue links) is used as the primary ID. + +https://github.com/owncloud/ocis-proxy/issues/1234 +https://github.com/owncloud/ocis-proxy/pull/55555 diff --git a/changelog/unreleased/.keep b/changelog/unreleased/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/changelog/unreleased/inital-release b/changelog/unreleased/inital-release new file mode 100644 index 0000000000..40235f36e7 --- /dev/null +++ b/changelog/unreleased/inital-release @@ -0,0 +1,5 @@ +Change: Initial release of basic version + +Just prepared an initial basic version. + +https://github.com/owncloud/ocis-proxy/issues/1 \ No newline at end of file diff --git a/cmd/ocis-proxy/main.go b/cmd/ocis-proxy/main.go new file mode 100644 index 0000000000..b5d6282fd9 --- /dev/null +++ b/cmd/ocis-proxy/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "os" + + "github.com/owncloud/ocis-proxy/pkg/command" +) + +func main() { + if err := command.Execute(); err != nil { + os.Exit(1) + } +} diff --git a/docker/Dockerfile.linux.amd64 b/docker/Dockerfile.linux.amd64 new file mode 100644 index 0000000000..253b4e7519 --- /dev/null +++ b/docker/Dockerfile.linux.amd64 @@ -0,0 +1,19 @@ +FROM amd64/alpine:edge + +RUN apk update && \ + apk upgrade && \ + apk add ca-certificates mailcap && \ + rm -rf /var/cache/apk/* && \ + echo 'hosts: files dns' >| /etc/nsswitch.conf + +LABEL maintainer="ownCloud GmbH " \ + org.label-schema.name="oCIS Proxy" \ + org.label-schema.vendor="ownCloud GmbH" \ + org.label-schema.schema-version="1.0" + +EXPOSE 9180 + +ENTRYPOINT ["/usr/bin/ocis-proxy"] +CMD ["server"] + +COPY bin/ocis-proxy /usr/bin/ocis-proxy diff --git a/docker/Dockerfile.linux.arm b/docker/Dockerfile.linux.arm new file mode 100644 index 0000000000..e07e473007 --- /dev/null +++ b/docker/Dockerfile.linux.arm @@ -0,0 +1,19 @@ +FROM arm32v6/alpine:edge + +RUN apk update && \ + apk upgrade && \ + apk add ca-certificates mailcap && \ + rm -rf /var/cache/apk/* && \ + echo 'hosts: files dns' >| /etc/nsswitch.conf + +LABEL maintainer="ownCloud GmbH " \ + org.label-schema.name="oCIS Proxy" \ + org.label-schema.vendor="ownCloud GmbH" \ + org.label-schema.schema-version="1.0" + +EXPOSE 9180 + +ENTRYPOINT ["/usr/bin/ocis-proxy"] +CMD ["server"] + +COPY bin/ocis-proxy /usr/bin/ocis-proxy diff --git a/docker/Dockerfile.linux.arm64 b/docker/Dockerfile.linux.arm64 new file mode 100644 index 0000000000..a21fdcd160 --- /dev/null +++ b/docker/Dockerfile.linux.arm64 @@ -0,0 +1,19 @@ +FROM arm64v8/alpine:edge + +RUN apk update && \ + apk upgrade && \ + apk add ca-certificates mailcap && \ + rm -rf /var/cache/apk/* && \ + echo 'hosts: files dns' >| /etc/nsswitch.conf + +LABEL maintainer="ownCloud GmbH " \ + org.label-schema.name="oCIS Proxy" \ + org.label-schema.vendor="ownCloud GmbH" \ + org.label-schema.schema-version="1.0" + +EXPOSE 9180 + +ENTRYPOINT ["/usr/bin/ocis-proxy"] +CMD ["server"] + +COPY bin/ocis-proxy /usr/bin/ocis-proxy diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl new file mode 100644 index 0000000000..17a758689f --- /dev/null +++ b/docker/manifest.tmpl @@ -0,0 +1,22 @@ +image: owncloud/ocis-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: owncloud/ocis-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: owncloud/ocis-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + variant: v8 + os: linux + - image: owncloud/ocis-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + variant: v6 + os: linux diff --git a/docs/_index.md b/docs/_index.md new file mode 100644 index 0000000000..398726da58 --- /dev/null +++ b/docs/_index.md @@ -0,0 +1,6 @@ +--- +title: Proxy +anchor: "ocis-proxy" +--- + +This service provides a basic proxy in front of the public ocis services. diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 0000000000..bdb5142664 --- /dev/null +++ b/docs/about.md @@ -0,0 +1,8 @@ +--- +title: "About" +date: 2020-02-07T00:00:00+00:00 +anchor: "about" +weight: 10 +--- + +This service provides an proxy service that routes requests to the correct services. diff --git a/docs/building.md b/docs/building.md new file mode 100644 index 0000000000..c693298a4e --- /dev/null +++ b/docs/building.md @@ -0,0 +1,24 @@ +--- +title: "Building" +date: 2018-05-02T00:00:00+00:00 +anchor: "building" +weight: 30 +--- + +As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources: + +{{< highlight txt >}} +git clone https://github.com/owncloud/ocis-proxy.git +cd ocis-proxy +{{< / highlight >}} + +All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. + +### Backend + +{{< highlight txt >}} +make generate +make build +{{< / highlight >}} + +Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-proxy -h` to see all available options and subcommands. diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000000..737df31541 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,57 @@ +--- +title: "Getting Started" +date: 2018-05-02T00:00:00+00:00 +anchor: "getting-started" +weight: 20 +--- + +### Installation + +So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. + +#### Docker + +TBD + +#### Binaries + +TBD + +### Configuration + +We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. + +#### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +##### Server + +OCIS_PROXY_NAME +: Name of the proxy service. It will be part of the namespace. + +OCIS_PROXY_NAMESPACE +: Namespace of the proxy service. + +OCIS_PROXY_ADDRESS +: Endpoint for the http service endpoint. + +#### Commandline flags + +If you prefer to configure the service with commandline flags you can see the available variables below. + +#### Configuration file + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis-proxy/tree/master/pkg/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/proxy.yml`, `${HOME}/.ocis/proxy.yml` or `$(pwd)/config/proxy.yml`. + +### Usage + +The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-proxy --help`. + +#### Server + +The server command is used to start the http server. For further help please execute: + +{{< highlight txt >}} +ocis-proxy server --help +{{< / highlight >}} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000..3918201ae6 --- /dev/null +++ b/go.mod @@ -0,0 +1,19 @@ +module github.com/owncloud/ocis-proxy + +go 1.13 + +require ( + contrib.go.opencensus.io/exporter/jaeger v0.2.0 + contrib.go.opencensus.io/exporter/ocagent v0.5.0 + contrib.go.opencensus.io/exporter/zipkin v0.1.1 + github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c + github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e + github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0 + github.com/oklog/run v1.1.0 + github.com/openzipkin/zipkin-go v0.1.6 + github.com/owncloud/ocis-pkg/v2 v2.0.1 + github.com/prometheus/client_golang v1.2.1 + github.com/restic/calens v0.2.0 + github.com/spf13/viper v1.6.1 + go.opencensus.io v0.22.2 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000000..58beeeda60 --- /dev/null +++ b/go.sum @@ -0,0 +1,827 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk= +contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= +contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= +contrib.go.opencensus.io/exporter/ocagent v0.5.0 h1:TKXjQSRS0/cCDrP7KvkgU6SmILtF/yV2TOs/02K/WZQ= +contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= +contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= +contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= +github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw= +github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest/azure/auth v0.1.0/go.mod h1:Gf7/i2FUpyb/sGBLIFxTBzrNzBo7aPXXE3ZVeDRwdpM= +github.com/Azure/go-autorest/autorest/azure/cli v0.1.0/go.mod h1:Dk8CUAt/b/PzkfeRsWzVG9Yj3ps8mS8ECztu43rdU8U= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= +github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= +github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= +github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= +github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= +github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190808125512-07798873deee/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= +github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU= +github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g= +github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= +github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/bwmarrin/discordgo v0.20.1/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= +github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= +github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo= +github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= +github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnsimple/dnsimple-go v0.30.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c/go.mod h1:pFdJbAhRf7rh6YYMUdIQGyzne6zYL1tCUW8QV2B3UfY= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA= +github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= +github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= +github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= +github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-log/log v0.1.0 h1:wudGTNsiGzrD5ZjgIkVZ517ugi2XRe9Q/xRCzwEO4/U= +github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= +github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= +github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= +github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= +github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= +github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= +github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= +github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= +github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= +github.com/lucas-clemente/quic-go v0.13.1 h1:CxtJTXQIh2aboCPk0M6vf530XOov6DZjVBiSE3nSj8s= +github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= +github.com/lucas-clemente/quic-go v0.14.1 h1:c1aKoBZKOPA+49q96B1wGkibyPP0AxYh45WuAoq+87E= +github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/marten-seemann/chacha20 v0.2.0 h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ= +github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= +github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= +github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= +github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= +github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= +github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= +github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= +github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA= +github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk= +github.com/micro/cli/v2 v2.1.1 h1:uFw0SMIKmGuyHIm8lXns/NOn7V62bM5y7DnlxUM+BEQ= +github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= +github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c h1:oohy8v2QQeXfDe9/BaM0b+5wETzoMiemOs3fhPhnFTg= +github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= +github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM= +github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E= +github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= +github.com/micro/go-micro/v2 v2.0.0 h1:bMx549RwJ9Yuiui8cDVlfYhVNP8I8KBJTMyLthEXpRw= +github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= +github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= +github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= +github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0 h1:zzwivZOd4ZJ2ZA3uG64NvcaYVj6/7FT5sBuF1Tm4z2k= +github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0/go.mod h1:CEYpq2RMuCDKOm+LZ5Yna74Dc9StZ4eNDR/a5GD6a6I= +github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= +github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= +github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= +github.com/micro/micro/v2 v2.0.0 h1:EFaeupiEpJyUGkRlDSojY2JOpCH72u3p0Wi00RJx5i8= +github.com/micro/micro/v2 v2.0.0/go.mod h1:nGOtvMDWPNHLuet1Urf1y40IDghEuCP1gnT97FVVKFc= +github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= +github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.22 h1:Jm64b3bO9kP43ddLjL2EY3Io6bmy1qGb9Xxz6TqS6rc= +github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= +github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= +github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= +github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= +github.com/nats-io/jwt v0.3.0 h1:xdnzwFETV++jNc4W1mw//qFyJGb2ABOombmZJQS4+Qo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.0/go.mod h1:r5y0WgCag0dTj/qiHkHrXAcKQ/f5GMOZaEGdoxxnJ4I= +github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A= +github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= +github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= +github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= +github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= +github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= +github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.1.6 h1:yXiysv1CSK7Q5yjGy1710zZGnsbMUIjluWBxtLXHPBo= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= +github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= +github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= +github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/restic/calens v0.1.0 h1:RHGokdZ72dICyIz1EjEsfZwUhvNZz/zy2SawxJktdWA= +github.com/restic/calens v0.1.0/go.mod h1:u67f5msOjCTDYNzOf/NoAUSdmXP03YXPCwIQLYADy5M= +github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= +github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= +github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= +github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4o2HM0m3DZYQWsj6/MEowD57VzoH0v3d7igeFY= +github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= +github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= +go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8sdVKV1m1WgU4/S5IRQAzc= +golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191109021931-daa7c04131f5 h1:bHNaocaoJxYBo5cw41UyTMLjYlb8wPY7+WFrnklbHOM= +golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX/3HiPdhVEuyj5a59RM= +golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODatUqANFZ+5BPMnzsy4hulY= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1 h1:aQktFqmDE2yjveXJlVIfslDFmFnUXSqG0i6KRcJAeMc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba h1:pRj9OXZbwNtbtZtOB4dLwfK4u+EVRMvP+e9zKkg2grM= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= +gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= +gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= +gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= +gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= +gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/command/health.go b/pkg/command/health.go new file mode 100644 index 0000000000..39210e4d8a --- /dev/null +++ b/pkg/command/health.go @@ -0,0 +1,49 @@ +package command + +import ( + "fmt" + "net/http" + + "github.com/micro/cli/v2" + "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/flagset" +) + +// Health is the entrypoint for the health command. +func Health(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "health", + Usage: "Check health status", + Flags: flagset.HealthWithConfig(cfg), + Action: func(c *cli.Context) error { + logger := NewLogger(cfg) + + resp, err := http.Get( + fmt.Sprintf( + "http://%s/healthz", + cfg.Debug.Addr, + ), + ) + + if err != nil { + logger.Fatal(). + Err(err). + Msg("Failed to request health check") + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + logger.Fatal(). + Int("code", resp.StatusCode). + Msg("Health seems to be in bad state") + } + + logger.Debug(). + Int("code", resp.StatusCode). + Msg("Health got a good state") + + return nil + }, + } +} diff --git a/pkg/command/root.go b/pkg/command/root.go new file mode 100644 index 0000000000..a4691f3f30 --- /dev/null +++ b/pkg/command/root.go @@ -0,0 +1,103 @@ +package command + +import ( + "os" + "strings" + + "github.com/micro/cli/v2" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/flagset" + "github.com/owncloud/ocis-proxy/pkg/version" + "github.com/spf13/viper" +) + +// Execute is the entry point for the ocis-proxy command. +func Execute() error { + cfg := config.New() + + app := &cli.App{ + Name: "ocis-proxy", + Version: version.String, + Usage: "proxy for Reva/oCIS", + Compiled: version.Compiled(), + + Authors: []*cli.Author{ + { + Name: "ownCloud GmbH", + Email: "support@owncloud.com", + }, + }, + + Flags: flagset.RootWithConfig(cfg), + + Before: func(c *cli.Context) error { + logger := NewLogger(cfg) + + viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) + viper.SetEnvPrefix("PROXY") + viper.AutomaticEnv() + + if c.IsSet("config-file") { + viper.SetConfigFile(c.String("config-file")) + } else { + viper.SetConfigName("proxy") + + viper.AddConfigPath("/etc/ocis") + viper.AddConfigPath("$HOME/.ocis") + viper.AddConfigPath("./config") + } + + if err := viper.ReadInConfig(); err != nil { + switch err.(type) { + case viper.ConfigFileNotFoundError: + logger.Info(). + Msg("Continue without config") + case viper.UnsupportedConfigError: + logger.Fatal(). + Err(err). + Msg("Unsupported config type") + default: + logger.Fatal(). + Err(err). + Msg("Failed to read config") + } + } + + if err := viper.Unmarshal(&cfg); err != nil { + logger.Fatal(). + Err(err). + Msg("Failed to parse config") + } + + return nil + }, + + Commands: []*cli.Command{ + Server(cfg), + Health(cfg), + }, + } + + cli.HelpFlag = &cli.BoolFlag{ + Name: "help,h", + Usage: "Show the help", + } + + cli.VersionFlag = &cli.BoolFlag{ + Name: "version,v", + Usage: "Print the version", + } + + return app.Run(os.Args) +} + +// NewLogger initializes a service-specific logger instance. +func NewLogger(cfg *config.Config) log.Logger { + return log.NewLogger( + log.Name("proxy"), + log.Level(cfg.Log.Level), + log.Pretty(cfg.Log.Pretty), + log.Color(cfg.Log.Color), + ) +} diff --git a/pkg/command/server.go b/pkg/command/server.go new file mode 100644 index 0000000000..0f6a139c5a --- /dev/null +++ b/pkg/command/server.go @@ -0,0 +1,222 @@ +package command + +import ( + "context" + "os" + "os/signal" + "strings" + "time" + + "contrib.go.opencensus.io/exporter/jaeger" + "contrib.go.opencensus.io/exporter/ocagent" + "contrib.go.opencensus.io/exporter/zipkin" + "github.com/micro/cli/v2" + "github.com/oklog/run" + openzipkin "github.com/openzipkin/zipkin-go" + zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" + "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/flagset" + "github.com/owncloud/ocis-proxy/pkg/metrics" + "github.com/owncloud/ocis-proxy/pkg/server/debug" + "github.com/owncloud/ocis-proxy/pkg/server/http" + "go.opencensus.io/stats/view" + "go.opencensus.io/trace" +) + +// Server is the entrypoint for the server command. +func Server(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "server", + Usage: "Start integrated server", + Flags: flagset.ServerWithConfig(cfg), + Before: func(c *cli.Context) error { + if cfg.HTTP.Root != "/" { + cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") + } + + return nil + }, + Action: func(c *cli.Context) error { + logger := NewLogger(cfg) + httpNamespace := c.String("http-namespace") + + if cfg.Tracing.Enabled { + switch t := cfg.Tracing.Type; t { + case "agent": + exporter, err := ocagent.NewExporter( + ocagent.WithReconnectionPeriod(5*time.Second), + ocagent.WithAddress(cfg.Tracing.Endpoint), + ocagent.WithServiceName(cfg.Tracing.Service), + ) + + if err != nil { + logger.Error(). + Err(err). + Str("endpoint", cfg.Tracing.Endpoint). + Str("collector", cfg.Tracing.Collector). + Msg("Failed to create agent tracing") + + return err + } + + trace.RegisterExporter(exporter) + view.RegisterExporter(exporter) + + case "jaeger": + exporter, err := jaeger.NewExporter( + jaeger.Options{ + AgentEndpoint: cfg.Tracing.Endpoint, + CollectorEndpoint: cfg.Tracing.Collector, + ServiceName: cfg.Tracing.Service, + }, + ) + + if err != nil { + logger.Error(). + Err(err). + Str("endpoint", cfg.Tracing.Endpoint). + Str("collector", cfg.Tracing.Collector). + Msg("Failed to create jaeger tracing") + + return err + } + + trace.RegisterExporter(exporter) + + case "zipkin": + endpoint, err := openzipkin.NewEndpoint( + cfg.Tracing.Service, + cfg.Tracing.Endpoint, + ) + + if err != nil { + logger.Error(). + Err(err). + Str("endpoint", cfg.Tracing.Endpoint). + Str("collector", cfg.Tracing.Collector). + Msg("Failed to create zipkin tracing") + + return err + } + + exporter := zipkin.NewExporter( + zipkinhttp.NewReporter( + cfg.Tracing.Collector, + ), + endpoint, + ) + + trace.RegisterExporter(exporter) + + default: + logger.Warn(). + Str("type", t). + Msg("Unknown tracing backend") + } + + trace.ApplyConfig( + trace.Config{ + DefaultSampler: trace.AlwaysSample(), + }, + ) + } else { + logger.Debug(). + Msg("Tracing is not enabled") + } + + var ( + gr = run.Group{} + ctx, cancel = context.WithCancel(context.Background()) + metrics = metrics.New() + ) + + defer cancel() + + // Flags have to be injected all the way down to the go-micro service + { + server, err := http.Server( + http.Logger(logger), + http.Namespace(httpNamespace), + http.Context(ctx), + http.Config(cfg), + http.Metrics(metrics), + http.Flags(flagset.RootWithConfig(cfg)), + http.Flags(flagset.ServerWithConfig(cfg)), + ) + + if err != nil { + logger.Error(). + Err(err). + Str("server", "http"). + Msg("Failed to initialize server") + + return err + } + + gr.Add(func() error { + return server.Run() + }, func(_ error) { + logger.Info(). + Str("server", "http"). + Msg("Shutting down server") + + cancel() + }) + } + + { + server, err := debug.Server( + debug.Logger(logger), + debug.Context(ctx), + debug.Config(cfg), + ) + + if err != nil { + logger.Error(). + Err(err). + Str("server", "debug"). + Msg("Failed to initialize server") + + return err + } + + gr.Add(func() error { + return server.ListenAndServe() + }, func(_ error) { + ctx, timeout := context.WithTimeout(ctx, 5*time.Second) + + defer timeout() + defer cancel() + + if err := server.Shutdown(ctx); err != nil { + logger.Error(). + Err(err). + Str("server", "debug"). + Msg("Failed to shutdown server") + } else { + logger.Info(). + Str("server", "debug"). + Msg("Shutting down server") + } + }) + } + + { + stop := make(chan os.Signal, 1) + + gr.Add(func() error { + signal.Notify(stop, os.Interrupt) + + <-stop + + return nil + }, func(err error) { + close(stop) + cancel() + }) + } + + return gr.Run() + }, + } +} diff --git a/pkg/config/config.go b/pkg/config/config.go new file mode 100644 index 0000000000..ae25f1edda --- /dev/null +++ b/pkg/config/config.go @@ -0,0 +1,52 @@ +package config + +// Log defines the available logging configuration. +type Log struct { + Level string + Pretty bool + Color bool +} + +// Debug defines the available debug configuration. +type Debug struct { + Addr string + Token string + Pprof bool + Zpages bool +} + +// HTTP defines the available http configuration. +type HTTP struct { + Addr string + Namespace string + Root string +} + +// Tracing defines the available tracing configuration. +type Tracing struct { + Enabled bool + Type string + Endpoint string + Collector string + Service string +} + +// Asset defines the available asset configuration. +type Asset struct { + Path string +} + +// Config combines all available configuration parts. +type Config struct { + File string + Log Log + Debug Debug + HTTP HTTP + Tracing Tracing + Asset Asset +} + +// New initializes a new configuration with or without defaults. +func New() *Config { + return &Config{} +} diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go new file mode 100644 index 0000000000..7f04f1cd0b --- /dev/null +++ b/pkg/flagset/flagset.go @@ -0,0 +1,145 @@ +package flagset + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis-proxy/pkg/config" +) + +// RootWithConfig applies cfg to the root flagset +func RootWithConfig(cfg *config.Config) []cli.Flag { + return []cli.Flag{ + &cli.StringFlag{ + Name: "config-file", + Value: "", + Usage: "Path to config file", + EnvVars: []string{"PROXY_CONFIG_FILE"}, + Destination: &cfg.File, + }, + &cli.StringFlag{ + Name: "log-level", + Value: "info", + Usage: "Set logging level", + EnvVars: []string{"PROXY_LOG_LEVEL"}, + Destination: &cfg.Log.Level, + }, + &cli.BoolFlag{ + Name: "log-pretty", + Usage: "Enable pretty logging", + EnvVars: []string{"PROXY_LOG_PRETTY"}, + Destination: &cfg.Log.Pretty, + }, + &cli.BoolFlag{ + Name: "log-color", + Usage: "Enable colored logging", + EnvVars: []string{"PROXY_LOG_COLOR"}, + Destination: &cfg.Log.Color, + }, + } +} + +// HealthWithConfig applies cfg to the root flagset +func HealthWithConfig(cfg *config.Config) []cli.Flag { + return []cli.Flag{ + &cli.StringFlag{ + Name: "debug-addr", + Value: "0.0.0.0:9109", + Usage: "Address to debug endpoint", + EnvVars: []string{"PROXY_DEBUG_ADDR"}, + Destination: &cfg.Debug.Addr, + }, + } +} + +// ServerWithConfig applies cfg to the root flagset +func ServerWithConfig(cfg *config.Config) []cli.Flag { + return []cli.Flag{ + &cli.BoolFlag{ + Name: "tracing-enabled", + Usage: "Enable sending traces", + EnvVars: []string{"PROXY_TRACING_ENABLED"}, + Destination: &cfg.Tracing.Enabled, + }, + &cli.StringFlag{ + Name: "tracing-type", + Value: "jaeger", + Usage: "Tracing backend type", + EnvVars: []string{"PROXY_TRACING_TYPE"}, + Destination: &cfg.Tracing.Type, + }, + &cli.StringFlag{ + Name: "tracing-endpoint", + Value: "", + Usage: "Endpoint for the agent", + EnvVars: []string{"PROXY_TRACING_ENDPOINT"}, + Destination: &cfg.Tracing.Endpoint, + }, + &cli.StringFlag{ + Name: "tracing-collector", + Value: "", + Usage: "Endpoint for the collector", + EnvVars: []string{"PROXY_TRACING_COLLECTOR"}, + Destination: &cfg.Tracing.Collector, + }, + &cli.StringFlag{ + Name: "tracing-service", + Value: "proxy", + Usage: "Service name for tracing", + EnvVars: []string{"PROXY_TRACING_SERVICE"}, + Destination: &cfg.Tracing.Service, + }, + &cli.StringFlag{ + Name: "debug-addr", + Value: "0.0.0.0:9205", + Usage: "Address to bind debug server", + EnvVars: []string{"PROXY_DEBUG_ADDR"}, + Destination: &cfg.Debug.Addr, + }, + &cli.StringFlag{ + Name: "debug-token", + Value: "", + Usage: "Token to grant metrics access", + EnvVars: []string{"PROXY_DEBUG_TOKEN"}, + Destination: &cfg.Debug.Token, + }, + &cli.BoolFlag{ + Name: "debug-pprof", + Usage: "Enable pprof debugging", + EnvVars: []string{"PROXY_DEBUG_PPROF"}, + Destination: &cfg.Debug.Pprof, + }, + &cli.BoolFlag{ + Name: "debug-zpages", + Usage: "Enable zpages debugging", + EnvVars: []string{"PROXY_DEBUG_ZPAGES"}, + Destination: &cfg.Debug.Zpages, + }, + &cli.StringFlag{ + Name: "http-addr", + Value: "0.0.0.0:9200", + Usage: "Address to bind http server", + EnvVars: []string{"PROXY_HTTP_ADDR"}, + Destination: &cfg.HTTP.Addr, + }, + &cli.StringFlag{ + Name: "http-root", + Value: "/", + Usage: "Root path of http server", + EnvVars: []string{"PROXY_HTTP_ROOT"}, + Destination: &cfg.HTTP.Root, + }, + &cli.StringFlag{ + Name: "asset-path", + Value: "", + Usage: "Path to custom assets", + EnvVars: []string{"PROXY_ASSET_PATH"}, + Destination: &cfg.Asset.Path, + }, + &cli.StringFlag{ + Name: "http-namespace", + Value: "com.owncloud", + Usage: "Set the base namespace for the http namespace", + EnvVars: []string{"PROXY_HTTP_NAMESPACE"}, + Destination: &cfg.HTTP.Namespace, + }, + } +} diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go new file mode 100644 index 0000000000..ba398fec71 --- /dev/null +++ b/pkg/metrics/metrics.go @@ -0,0 +1,58 @@ +package metrics + +import ( + "github.com/prometheus/client_golang/prometheus" +) + +var ( + // Namespace defines the namespace for the defines metrics. + Namespace = "ocis" + + // Subsystem defines the subsystem for the defines metrics. + Subsystem = "proxy" +) + +// Metrics defines the available metrics of this service. +type Metrics struct { + Counter *prometheus.CounterVec + Latency *prometheus.SummaryVec + Duration *prometheus.HistogramVec +} + +// New initializes the available metrics. +func New() *Metrics { + m := &Metrics{ + Counter: prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: Namespace, + Subsystem: Subsystem, + Name: "proxy_total", + Help: "How many proxy requests processed", + }, []string{}), + Latency: prometheus.NewSummaryVec(prometheus.SummaryOpts{ + Namespace: Namespace, + Subsystem: Subsystem, + Name: "proxy_latency_microseconds", + Help: "proxy request latencies in microseconds", + }, []string{}), + Duration: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: Namespace, + Subsystem: Subsystem, + Name: "proxy_duration_seconds", + Help: "proxy method request time in seconds", + }, []string{}), + } + + prometheus.Register( + m.Counter, + ) + + prometheus.Register( + m.Latency, + ) + + prometheus.Register( + m.Duration, + ) + + return m +} diff --git a/pkg/server/debug/option.go b/pkg/server/debug/option.go new file mode 100644 index 0000000000..14032e6a27 --- /dev/null +++ b/pkg/server/debug/option.go @@ -0,0 +1,50 @@ +package debug + +import ( + "context" + + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/config" +) + +// Option defines a single option function. +type Option func(o *Options) + +// Options defines the available options for this package. +type Options struct { + Logger log.Logger + Context context.Context + Config *config.Config +} + +// newOptions initializes the available default options. +func newOptions(opts ...Option) Options { + opt := Options{} + + for _, o := range opts { + o(&opt) + } + + return opt +} + +// Logger provides a function to set the logger option. +func Logger(val log.Logger) Option { + return func(o *Options) { + o.Logger = val + } +} + +// Context provides a function to set the context option. +func Context(val context.Context) Option { + return func(o *Options) { + o.Context = val + } +} + +// Config provides a function to set the config option. +func Config(val *config.Config) Option { + return func(o *Options) { + o.Config = val + } +} diff --git a/pkg/server/debug/server.go b/pkg/server/debug/server.go new file mode 100644 index 0000000000..6e88455bc6 --- /dev/null +++ b/pkg/server/debug/server.go @@ -0,0 +1,51 @@ +package debug + +import ( + "io" + "net/http" + + "github.com/owncloud/ocis-pkg/v2/service/debug" + "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/version" +) + +// Server initializes the debug service and server. +func Server(opts ...Option) (*http.Server, error) { + options := newOptions(opts...) + + return debug.NewService( + debug.Logger(options.Logger), + debug.Name("proxy"), + debug.Version(version.String), + debug.Address(options.Config.Debug.Addr), + debug.Token(options.Config.Debug.Token), + debug.Pprof(options.Config.Debug.Pprof), + debug.Zpages(options.Config.Debug.Zpages), + debug.Health(health(options.Config)), + debug.Ready(ready(options.Config)), + ), nil +} + +// health implements the health check. +func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + + // TODO(tboerger): check if services are up and running + + io.WriteString(w, http.StatusText(http.StatusOK)) + } +} + +// ready implements the ready check. +func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + + // TODO(tboerger): check if services are up and running + + io.WriteString(w, http.StatusText(http.StatusOK)) + } +} diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go new file mode 100644 index 0000000000..187fa87596 --- /dev/null +++ b/pkg/server/http/option.go @@ -0,0 +1,76 @@ +package http + +import ( + "context" + + "github.com/micro/cli/v2" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/metrics" +) + +// Option defines a single option function. +type Option func(o *Options) + +// Options defines the available options for this package. +type Options struct { + Logger log.Logger + Context context.Context + Config *config.Config + Metrics *metrics.Metrics + Flags []cli.Flag + Namespace string +} + +// newOptions initializes the available default options. +func newOptions(opts ...Option) Options { + opt := Options{} + + for _, o := range opts { + o(&opt) + } + + return opt +} + +// Logger provides a function to set the logger option. +func Logger(val log.Logger) Option { + return func(o *Options) { + o.Logger = val + } +} + +// Context provides a function to set the context option. +func Context(val context.Context) Option { + return func(o *Options) { + o.Context = val + } +} + +// Config provides a function to set the config option. +func Config(val *config.Config) Option { + return func(o *Options) { + o.Config = val + } +} + +// Metrics provides a function to set the metrics option. +func Metrics(val *metrics.Metrics) Option { + return func(o *Options) { + o.Metrics = val + } +} + +// Flags provides a function to set the flags option. +func Flags(val []cli.Flag) Option { + return func(o *Options) { + o.Flags = append(o.Flags, val...) + } +} + +// Namespace provides a function to set the namespace option. +func Namespace(val string) Option { + return func(o *Options) { + o.Namespace = val + } +} diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go new file mode 100644 index 0000000000..6663269aae --- /dev/null +++ b/pkg/server/http/server.go @@ -0,0 +1,159 @@ +package http + +import ( + "encoding/json" + "net/http" + + "github.com/micro/go-micro/v2/config" + "github.com/micro/go-micro/v2/config/source/memory" + "github.com/micro/go-plugins/micro/router/v2" + svc "github.com/owncloud/ocis-pkg/v2/service/http" + "github.com/owncloud/ocis-proxy/pkg/version" +) + +// Server initializes the http service and server. +func Server(opts ...Option) (svc.Service, error) { + options := newOptions(opts...) + + service := svc.NewService( + svc.Logger(options.Logger), + svc.Namespace(options.Namespace), + svc.Name("web.proxy"), + svc.Version(version.String), + svc.Address(options.Config.HTTP.Addr), + svc.Context(options.Context), + svc.Flags(options.Flags...), + ) + + // TODO replace hardcoded adresses with service registry lookups + routes := []router.Route{ + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/.well-known/openid-configuration", + }, + ProxyURL: router.URL{ + Scheme: "https", + Host: "localhost:9130", + Path: "/.well-known/openid-configuration", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/signin/v1", + }, + ProxyURL: router.URL{ + Scheme: "https", + Host: "localhost:9130", + Path: "/signin/v1", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/konnect/v1", + }, + ProxyURL: router.URL{ + Scheme: "https", + Host: "localhost:9130", + Path: "/konnect/v1", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/reva", + }, + ProxyURL: router.URL{ + Scheme: "http", + Host: "localhost:9140", + Path: "/", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/graph/", + }, + ProxyURL: router.URL{ + Scheme: "http", + Host: "localhost:9120", + Path: "/", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/graph-explorer/", + }, + ProxyURL: router.URL{ + Scheme: "http", + Host: "localhost:9135", + Path: "/", + }, + Weight: 2.0, + Type: "proxy", + }, + { + Request: router.Request{ + Method: "GET", + Host: "localhost:9200", + Path: "/", + }, + ProxyURL: router.URL{ + Scheme: "http", + Host: "localhost:9100", + Path: "/", + }, + Weight: 2.0, + Type: "proxy", + }, + } + + apiConfig := map[string]interface{}{ + "api": map[string]interface{}{ + "routes": routes, + }, + } + + b, _ := json.Marshal(apiConfig) + m := memory.NewSource(memory.WithJSON(b)) + conf, err := config.NewConfig(config.WithSource(m)) + if err != nil { + options.Logger.Fatal(). + Err(err). + Msg("could not parse routes") + } + + r := router.NewRouter(router.Config(conf)) + + wr := r.Handler() + h := wr(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "not found", 404) + })) + + service.Handle( + "/", + h, + ) + + service.Init() + return service, nil +} diff --git a/pkg/version/version.go b/pkg/version/version.go new file mode 100644 index 0000000000..81e81815f4 --- /dev/null +++ b/pkg/version/version.go @@ -0,0 +1,19 @@ +package version + +import ( + "time" +) + +var ( + // String gets defined by the build system. + String = "0.0.0" + + // Date indicates the build date. + Date = "00000000" +) + +// Compiled returns the compile time of this service. +func Compiled() time.Time { + t, _ := time.Parse("20060102", Date) + return t +} diff --git a/tools.go b/tools.go new file mode 100644 index 0000000000..f1911ffdcb --- /dev/null +++ b/tools.go @@ -0,0 +1,7 @@ +// +build tools + +package main + +import ( + _ "github.com/restic/calens" +) From 60bd1d8af72d7ce5c5b2b86ba3402c4758fa7f7c Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 11:02:52 +0100 Subject: [PATCH 002/213] added hardcoded routes for the reverse proxy to bypass authentication and phoenix --- pkg/server/http/server.go | 148 +++++--------------------------------- 1 file changed, 18 insertions(+), 130 deletions(-) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 6663269aae..0f26c590a0 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -1,12 +1,10 @@ package http import ( - "encoding/json" - "net/http" + "log" + "net/http/httputil" + "net/url" - "github.com/micro/go-micro/v2/config" - "github.com/micro/go-micro/v2/config/source/memory" - "github.com/micro/go-plugins/micro/router/v2" svc "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-proxy/pkg/version" ) @@ -25,135 +23,25 @@ func Server(opts ...Option) (svc.Service, error) { svc.Flags(options.Flags...), ) - // TODO replace hardcoded adresses with service registry lookups - routes := []router.Route{ - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/.well-known/openid-configuration", - }, - ProxyURL: router.URL{ - Scheme: "https", - Host: "localhost:9130", - Path: "/.well-known/openid-configuration", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/signin/v1", - }, - ProxyURL: router.URL{ - Scheme: "https", - Host: "localhost:9130", - Path: "/signin/v1", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/konnect/v1", - }, - ProxyURL: router.URL{ - Scheme: "https", - Host: "localhost:9130", - Path: "/konnect/v1", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/reva", - }, - ProxyURL: router.URL{ - Scheme: "http", - Host: "localhost:9140", - Path: "/", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/graph/", - }, - ProxyURL: router.URL{ - Scheme: "http", - Host: "localhost:9120", - Path: "/", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/graph-explorer/", - }, - ProxyURL: router.URL{ - Scheme: "http", - Host: "localhost:9135", - Path: "/", - }, - Weight: 2.0, - Type: "proxy", - }, - { - Request: router.Request{ - Method: "GET", - Host: "localhost:9200", - Path: "/", - }, - ProxyURL: router.URL{ - Scheme: "http", - Host: "localhost:9100", - Path: "/", - }, - Weight: 2.0, - Type: "proxy", - }, - } - - apiConfig := map[string]interface{}{ - "api": map[string]interface{}{ - "routes": routes, - }, - } - - b, _ := json.Marshal(apiConfig) - m := memory.NewSource(memory.WithJSON(b)) - conf, err := config.NewConfig(config.WithSource(m)) + phoenixURL, err := url.Parse("http://localhost:9100") if err != nil { - options.Logger.Fatal(). - Err(err). - Msg("could not parse routes") + log.Fatal(err) + } + konnectdURL, err := url.Parse("http://localhost:9130") + if err != nil { + log.Fatal(err) } - r := router.NewRouter(router.Config(conf)) - - wr := r.Handler() - h := wr(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not found", 404) - })) - - service.Handle( - "/", - h, - ) + service.Handle("/", httputil.NewSingleHostReverseProxy(phoenixURL)) + service.Handle("/.well-known/openid-configuration", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/jwks.json/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/token/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/userinfo/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/static/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/session/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/v1/register/", httputil.NewSingleHostReverseProxy(konnectdURL)) service.Init() + return service, nil } From ee23aee6ee05c6aad8c836eb8aad77be8d6057fc Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 11:21:31 +0100 Subject: [PATCH 003/213] added necessary basic routes for the proxy to work nicely with ocis single binary --- pkg/server/http/server.go | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 0f26c590a0..65c04af76b 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -1,10 +1,14 @@ package http import ( + "crypto/tls" "log" "net/http/httputil" "net/url" + "os" + occrypto "github.com/owncloud/ocis-konnectd/pkg/crypto" + logger "github.com/owncloud/ocis-pkg/v2/log" svc "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-proxy/pkg/version" ) @@ -13,6 +17,17 @@ import ( func Server(opts ...Option) (svc.Service, error) { options := newOptions(opts...) + // GenCert has side effects as it writes 2 files to the binary running location + occrypto.GenCert(logger.NewLogger()) + + cer, err := tls.LoadX509KeyPair("server.crt", "server.key") + if err != nil { + options.Logger.Fatal().Err(err).Msg("Could not setup TLS") + os.Exit(1) + } + + config := &tls.Config{Certificates: []tls.Certificate{cer}} + service := svc.NewService( svc.Logger(options.Logger), svc.Namespace(options.Namespace), @@ -20,6 +35,7 @@ func Server(opts ...Option) (svc.Service, error) { svc.Version(version.String), svc.Address(options.Config.HTTP.Addr), svc.Context(options.Context), + svc.TLSConfig(config), svc.Flags(options.Flags...), ) @@ -31,15 +47,18 @@ func Server(opts ...Option) (svc.Service, error) { if err != nil { log.Fatal(err) } + revaURL, err := url.Parse("http://localhost:9140") + if err != nil { + log.Fatal(err) + } service.Handle("/", httputil.NewSingleHostReverseProxy(phoenixURL)) service.Handle("/.well-known/openid-configuration", httputil.NewSingleHostReverseProxy(konnectdURL)) service.Handle("/konnect/v1/jwks.json/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/token/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/userinfo/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/static/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/session/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/register/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/signin/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/konnect/", httputil.NewSingleHostReverseProxy(konnectdURL)) + service.Handle("/ocs/v1.php/", httputil.NewSingleHostReverseProxy(revaURL)) + service.Handle("/remote.php/webdav/", httputil.NewSingleHostReverseProxy(revaURL)) service.Init() From 4267103bd5d3f6e1b6c4e9b79aabee9e40e6e250 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 13:20:39 +0100 Subject: [PATCH 004/213] moved init code away from main routine --- pkg/server/http/server.go | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 65c04af76b..39205ad535 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -2,9 +2,6 @@ package http import ( "crypto/tls" - "log" - "net/http/httputil" - "net/url" "os" occrypto "github.com/owncloud/ocis-konnectd/pkg/crypto" @@ -29,37 +26,16 @@ func Server(opts ...Option) (svc.Service, error) { config := &tls.Config{Certificates: []tls.Certificate{cer}} service := svc.NewService( + svc.Name("web.proxy"), + svc.TLSConfig(config), svc.Logger(options.Logger), svc.Namespace(options.Namespace), - svc.Name("web.proxy"), svc.Version(version.String), svc.Address(options.Config.HTTP.Addr), svc.Context(options.Context), - svc.TLSConfig(config), svc.Flags(options.Flags...), ) - phoenixURL, err := url.Parse("http://localhost:9100") - if err != nil { - log.Fatal(err) - } - konnectdURL, err := url.Parse("http://localhost:9130") - if err != nil { - log.Fatal(err) - } - revaURL, err := url.Parse("http://localhost:9140") - if err != nil { - log.Fatal(err) - } - - service.Handle("/", httputil.NewSingleHostReverseProxy(phoenixURL)) - service.Handle("/.well-known/openid-configuration", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/v1/jwks.json/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/signin/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/konnect/", httputil.NewSingleHostReverseProxy(konnectdURL)) - service.Handle("/ocs/v1.php/", httputil.NewSingleHostReverseProxy(revaURL)) - service.Handle("/remote.php/webdav/", httputil.NewSingleHostReverseProxy(revaURL)) - service.Init() return service, nil From 36aa719b3554453963c54be9007a5931a39488f0 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 13:21:02 +0100 Subject: [PATCH 005/213] added config options --- pkg/config/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index ae25f1edda..9b9e493995 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -36,6 +36,12 @@ type Asset struct { Path string } +// Route define forwarding routes +type Route struct { + Endpoint string `json:"endpoint"` + Location string `json:"location"` +} + // Config combines all available configuration parts. type Config struct { File string @@ -44,6 +50,7 @@ type Config struct { HTTP HTTP Tracing Tracing Asset Asset + Routes []Route } // New initializes a new configuration with or without defaults. From 2690898b1d7b8bb462534645d8c8747749c9df39 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 13:22:13 +0100 Subject: [PATCH 006/213] use options logger instead of creating a new one --- pkg/server/http/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 39205ad535..5933bee376 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -5,7 +5,6 @@ import ( "os" occrypto "github.com/owncloud/ocis-konnectd/pkg/crypto" - logger "github.com/owncloud/ocis-pkg/v2/log" svc "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-proxy/pkg/version" ) @@ -15,7 +14,7 @@ func Server(opts ...Option) (svc.Service, error) { options := newOptions(opts...) // GenCert has side effects as it writes 2 files to the binary running location - occrypto.GenCert(logger.NewLogger()) + occrypto.GenCert(options.Logger) cer, err := tls.LoadX509KeyPair("server.crt", "server.key") if err != nil { From 6b51e70ddc57c7c05339f13f703f13e0b2c89809 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 13:37:39 +0100 Subject: [PATCH 007/213] use ocis-pkg logger --- go.mod | 9 +-- go.sum | 131 ++++++++++++++++++++++++++++++++---------- pkg/command/health.go | 3 +- pkg/command/root.go | 12 +--- pkg/command/server.go | 39 ++++++++++++- 5 files changed, 146 insertions(+), 48 deletions(-) diff --git a/go.mod b/go.mod index 3918201ae6..654457a142 100644 --- a/go.mod +++ b/go.mod @@ -4,16 +4,17 @@ go 1.13 require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 - contrib.go.opencensus.io/exporter/ocagent v0.5.0 + contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c - github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e - github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0 + github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect github.com/oklog/run v1.1.0 - github.com/openzipkin/zipkin-go v0.1.6 + github.com/openzipkin/zipkin-go v0.2.2 + github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a github.com/owncloud/ocis-pkg/v2 v2.0.1 github.com/prometheus/client_golang v1.2.1 github.com/restic/calens v0.2.0 github.com/spf13/viper v1.6.1 go.opencensus.io v0.22.2 + golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect ) diff --git a/go.sum b/go.sum index 58beeeda60..b9eafa4676 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk= contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -contrib.go.opencensus.io/exporter/ocagent v0.5.0 h1:TKXjQSRS0/cCDrP7KvkgU6SmILtF/yV2TOs/02K/WZQ= -contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= +contrib.go.opencensus.io/exporter/ocagent v0.6.0 h1:Z1n6UAyr0QwM284yUuh5Zd8JlvxUGAhFZcgMJkMPrGM= +contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -49,6 +49,7 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ9cgOiZs= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= @@ -68,6 +69,7 @@ github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -75,10 +77,9 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.1/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= @@ -90,12 +91,12 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= -github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -114,6 +115,7 @@ github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -125,13 +127,17 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -146,25 +152,27 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/eternnoir/gncp v0.0.0-20170707042257-c70df2d0cd68/go.mod h1:8FuQ7lU9ZvIJGvc04F/qblkjqIfBahAoEFV+XPxByGw= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c/go.mod h1:pFdJbAhRf7rh6YYMUdIQGyzne6zYL1tCUW8QV2B3UfY= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA= github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= +github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= @@ -173,6 +181,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= github.com/go-log/log v0.1.0 h1:wudGTNsiGzrD5ZjgIkVZ517ugi2XRe9Q/xRCzwEO4/U= github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -187,10 +196,13 @@ github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -204,6 +216,7 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20170622202551-6a1fa9404c0a/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -217,14 +230,12 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -232,11 +243,14 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= @@ -249,8 +263,9 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.4 h1:5xLhQjsk4zqPf9EHCrja2qFZMx+yBqkO3XgJ14bNnU0= +github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -269,6 +284,7 @@ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwP github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -288,8 +304,10 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= +github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= @@ -305,35 +323,43 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.2.7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= +github.com/longsleep/go-metrics v0.0.0-20170706183227-c1943bcf9047/go.mod h1:Eq9KjddJTZCHG0ja+SEJNp739Um4URrcBuccq3Ih/NI= +github.com/longsleep/go-metrics v0.0.0-20191013204616-cddea569b0ea/go.mod h1:w6QO1LBkVla70FZrrF6XcB0YN+jTEYugjkn3+6RYTSM= github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= github.com/lucas-clemente/quic-go v0.13.1 h1:CxtJTXQIh2aboCPk0M6vf530XOov6DZjVBiSE3nSj8s= github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lucas-clemente/quic-go v0.14.1 h1:c1aKoBZKOPA+49q96B1wGkibyPP0AxYh45WuAoq+87E= github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/chacha20 v0.2.0 h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ= github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE= github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= @@ -350,13 +376,9 @@ github.com/micro/go-micro/v2 v2.0.0 h1:bMx549RwJ9Yuiui8cDVlfYhVNP8I8KBJTMyLthEXp github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= -github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0 h1:zzwivZOd4ZJ2ZA3uG64NvcaYVj6/7FT5sBuF1Tm4z2k= -github.com/micro/go-plugins/micro/router/v2 v2.0.3-0.20200221093116-8ed9b03043f0/go.mod h1:CEYpq2RMuCDKOm+LZ5Yna74Dc9StZ4eNDR/a5GD6a6I= github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= -github.com/micro/micro/v2 v2.0.0 h1:EFaeupiEpJyUGkRlDSojY2JOpCH72u3p0Wi00RJx5i8= -github.com/micro/micro/v2 v2.0.0/go.mod h1:nGOtvMDWPNHLuet1Urf1y40IDghEuCP1gnT97FVVKFc= github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -368,6 +390,8 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= @@ -401,22 +425,23 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= @@ -427,28 +452,34 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.6 h1:yXiysv1CSK7Q5yjGy1710zZGnsbMUIjluWBxtLXHPBo= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a h1:Msdczqy0Mt8bPxARn9NiW8Why52zDR10Aw2IZk6gsVc= +github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a/go.mod h1:lfo4oitFbpuHHLCTXrBC/93GP72cpBUokxrVqDgsyQk= +github.com/owncloud/ocis-pkg v1.3.0 h1:2fkgvfd/spTjschuulYMHRuzxkCGGXae9ocebVYkm74= github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -456,11 +487,13 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20170706130215-fb369f752a7f/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -468,6 +501,7 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20170703101242-e645f4e5aaa8/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -475,6 +509,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -484,17 +520,20 @@ github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.3/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= @@ -502,7 +541,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -511,16 +549,23 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -543,9 +588,11 @@ github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -554,7 +601,6 @@ github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -582,8 +628,10 @@ go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20170711145318-dd85ac7e6a88/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -602,6 +650,8 @@ golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8sdVKV1m1WgU4/S5IRQAzc= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -629,6 +679,7 @@ golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -643,6 +694,7 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -671,9 +723,11 @@ golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -690,6 +744,7 @@ golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -699,6 +754,8 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX/3HiPdhVEuyj5a59RM= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -712,6 +769,7 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -757,6 +815,7 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -769,6 +828,7 @@ google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvx google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -779,6 +839,7 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -786,21 +847,22 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= -gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.4.0 h1:0kXPskUMGAXXWJlP05ktEMOV0vmzFQUWw6d+aZJQU8A= +gopkg.in/square/go-jose.v2 v2.4.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= @@ -813,6 +875,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -825,3 +889,8 @@ k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +stash.kopano.io/kc/konnect v0.28.1/go.mod h1:DtAxcWYgNwqm8c9p/U8kDSh2WCvLqcl22N2RQaMrqv8= +stash.kopano.io/kgol/kcc-go/v5 v5.0.1/go.mod h1:0ZmjWapy3zp+TAjZI6iCrcfh+BthZbB2WM1VfhDgNB4= +stash.kopano.io/kgol/ksurveyclient-go v0.6.0/go.mod h1:LJMDQBROS2oXxBN04eSI6j1KhgWlqMFd8xKjXV4Irtw= +stash.kopano.io/kgol/oidc-go v0.3.1/go.mod h1:roVKz8FVmPcdL4pUu+Gzk+GH2kOhz1UvnuMNTkjHyH8= +stash.kopano.io/kgol/rndm v1.1.0/go.mod h1:CBvpAHlOwyu/XipxfLGk02UN3K3P6hQ8E2JoTbNWfJU= diff --git a/pkg/command/health.go b/pkg/command/health.go index 39210e4d8a..cdc66b864a 100644 --- a/pkg/command/health.go +++ b/pkg/command/health.go @@ -5,6 +5,7 @@ import ( "net/http" "github.com/micro/cli/v2" + "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" ) @@ -16,7 +17,7 @@ func Health(cfg *config.Config) *cli.Command { Usage: "Check health status", Flags: flagset.HealthWithConfig(cfg), Action: func(c *cli.Context) error { - logger := NewLogger(cfg) + logger := log.NewLogger() resp, err := http.Get( fmt.Sprintf( diff --git a/pkg/command/root.go b/pkg/command/root.go index a4691f3f30..94836d70d0 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -32,7 +32,7 @@ func Execute() error { Flags: flagset.RootWithConfig(cfg), Before: func(c *cli.Context) error { - logger := NewLogger(cfg) + logger := log.NewLogger() viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) viper.SetEnvPrefix("PROXY") @@ -91,13 +91,3 @@ func Execute() error { return app.Run(os.Args) } - -// NewLogger initializes a service-specific logger instance. -func NewLogger(cfg *config.Config) log.Logger { - return log.NewLogger( - log.Name("proxy"), - log.Level(cfg.Log.Level), - log.Pretty(cfg.Log.Pretty), - log.Color(cfg.Log.Color), - ) -} diff --git a/pkg/command/server.go b/pkg/command/server.go index 0f6a139c5a..aa043970b2 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,6 +2,8 @@ package command import ( "context" + "net/http/httputil" + "net/url" "os" "os/signal" "strings" @@ -14,6 +16,7 @@ import ( "github.com/oklog/run" openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" + "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" "github.com/owncloud/ocis-proxy/pkg/metrics" @@ -34,10 +37,33 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } + // // Default routes + // cfg.Routes = []config.Route{ + // { + // Endpoint: "/", + // Location: "http://localhost:9100", + // }, { + // Endpoint: "/.well-known/openid-configuration", + // Location: "http://localhost:9130", + // }, { + // Endpoint: "/konnect/", + // Location: "http://localhost:9130", + // }, { + // Endpoint: "/signin/", + // Location: "http://localhost:9130", + // }, { + // Endpoint: "/ocs/v1.php/", + // Location: "http://localhost:9140", + // }, { + // Endpoint: "/remote.php/webdav/", + // Location: "http://localhost:9140", + // }, + // } + return nil }, Action: func(c *cli.Context) error { - logger := NewLogger(cfg) + logger := log.NewLogger() httpNamespace := c.String("http-namespace") if cfg.Tracing.Enabled { @@ -144,6 +170,17 @@ func Server(cfg *config.Config) *cli.Command { http.Flags(flagset.ServerWithConfig(cfg)), ) + for _, ep := range cfg.Routes { + uri, err := url.Parse(ep.Location) + if err != nil { + logger.Info(). + Str("server", "http"). + Msg("parsing uri") + } + + server.Handle(ep.Endpoint, httputil.NewSingleHostReverseProxy(uri)) + } + if err != nil { logger.Error(). Err(err). From 23f977f28ec2b40b80d9f2619aa536d547697f0e Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 14:16:54 +0100 Subject: [PATCH 008/213] added json tag on routes --- pkg/command/server.go | 1 - pkg/config/config.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index aa043970b2..e0e6013919 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -158,7 +158,6 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - // Flags have to be injected all the way down to the go-micro service { server, err := http.Server( http.Logger(logger), diff --git a/pkg/config/config.go b/pkg/config/config.go index 9b9e493995..14caa41a3a 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -50,7 +50,7 @@ type Config struct { HTTP HTTP Tracing Tracing Asset Asset - Routes []Route + Routes []Route `json:"routes"` } // New initializes a new configuration with or without defaults. From 42b5399aa3edeb3d8199f8bba709a6cfe60a03da Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 14:18:03 +0100 Subject: [PATCH 009/213] provided an example config file --- config/.proxy-example.yaml | 28 ++++++++++++++++++++++++++++ pkg/command/server.go | 23 ----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 config/.proxy-example.yaml diff --git a/config/.proxy-example.yaml b/config/.proxy-example.yaml new file mode 100644 index 0000000000..5a35023d2c --- /dev/null +++ b/config/.proxy-example.yaml @@ -0,0 +1,28 @@ +{ + "routes": [ + { + "endpoint": "/", + "location": "http://localhost:9100" + }, + { + "endpoint": "/.well-known/openid-configuration", + "location": "http://localhost:9130" + }, + { + "endpoint": "/konnect/", + "location": "http://localhost:9130" + }, + { + "endpoint": "/signin/", + "location": "http://localhost:9130" + }, + { + "endpoint": "/ocs/v1.php/", + "location": "http://localhost:8080" + }, + { + "endpoint": "/remote.php/webdav/", + "location": "http://localhost:8080" + } + ] +} diff --git a/pkg/command/server.go b/pkg/command/server.go index e0e6013919..deffd3f836 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -37,29 +37,6 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } - // // Default routes - // cfg.Routes = []config.Route{ - // { - // Endpoint: "/", - // Location: "http://localhost:9100", - // }, { - // Endpoint: "/.well-known/openid-configuration", - // Location: "http://localhost:9130", - // }, { - // Endpoint: "/konnect/", - // Location: "http://localhost:9130", - // }, { - // Endpoint: "/signin/", - // Location: "http://localhost:9130", - // }, { - // Endpoint: "/ocs/v1.php/", - // Location: "http://localhost:9140", - // }, { - // Endpoint: "/remote.php/webdav/", - // Location: "http://localhost:9140", - // }, - // } - return nil }, Action: func(c *cli.Context) error { From 97215603b6124e4619f2897885f2fc0803c47c91 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 24 Feb 2020 14:24:59 +0100 Subject: [PATCH 010/213] fixed wrong extension --- config/{.proxy-example.yaml => .proxy-example.json} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename config/{.proxy-example.yaml => .proxy-example.json} (84%) diff --git a/config/.proxy-example.yaml b/config/.proxy-example.json similarity index 84% rename from config/.proxy-example.yaml rename to config/.proxy-example.json index 5a35023d2c..dbf54f98c3 100644 --- a/config/.proxy-example.yaml +++ b/config/.proxy-example.json @@ -18,11 +18,11 @@ }, { "endpoint": "/ocs/v1.php/", - "location": "http://localhost:8080" + "location": "http://localhost:9140" }, { "endpoint": "/remote.php/webdav/", - "location": "http://localhost:8080" + "location": "http://localhost:9140" } ] } From 01a805c89d87574de24f3f42e715e14ac2d2a829 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 26 Feb 2020 09:36:21 +0100 Subject: [PATCH 011/213] rename location -> backend --- config/.proxy-example.json | 12 ++++++------ pkg/command/server.go | 2 +- pkg/config/config.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/.proxy-example.json b/config/.proxy-example.json index dbf54f98c3..2e27a3a943 100644 --- a/config/.proxy-example.json +++ b/config/.proxy-example.json @@ -2,27 +2,27 @@ "routes": [ { "endpoint": "/", - "location": "http://localhost:9100" + "backend": "http://localhost:9100" }, { "endpoint": "/.well-known/openid-configuration", - "location": "http://localhost:9130" + "backend": "http://localhost:9130" }, { "endpoint": "/konnect/", - "location": "http://localhost:9130" + "backend": "http://localhost:9130" }, { "endpoint": "/signin/", - "location": "http://localhost:9130" + "backend": "http://localhost:9130" }, { "endpoint": "/ocs/v1.php/", - "location": "http://localhost:9140" + "backend": "http://localhost:4444" }, { "endpoint": "/remote.php/webdav/", - "location": "http://localhost:9140" + "backend": "http://localhost:4444" } ] } diff --git a/pkg/command/server.go b/pkg/command/server.go index deffd3f836..b626062bc5 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -147,7 +147,7 @@ func Server(cfg *config.Config) *cli.Command { ) for _, ep := range cfg.Routes { - uri, err := url.Parse(ep.Location) + uri, err := url.Parse(ep.Backend) if err != nil { logger.Info(). Str("server", "http"). diff --git a/pkg/config/config.go b/pkg/config/config.go index 14caa41a3a..c17cc50990 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -39,7 +39,7 @@ type Asset struct { // Route define forwarding routes type Route struct { Endpoint string `json:"endpoint"` - Location string `json:"location"` + Backend string `json:"backend"` } // Config combines all available configuration parts. From 98ac2967f91dcdba357ae2a590661911c56dfbbf Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 3 Mar 2020 10:44:18 +0100 Subject: [PATCH 012/213] change error message wording --- pkg/command/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index b626062bc5..f05dd44844 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -151,7 +151,7 @@ func Server(cfg *config.Config) *cli.Command { if err != nil { logger.Info(). Str("server", "http"). - Msg("parsing uri") + Msg("error while parsing URL") } server.Handle(ep.Endpoint, httputil.NewSingleHostReverseProxy(uri)) From 6bb4ffe677c1fc2e57e3b345d31914e9a35b6523 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 3 Mar 2020 16:10:50 +0100 Subject: [PATCH 013/213] update proxy config layout --- config/.proxy-example.json | 50 ++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/config/.proxy-example.json b/config/.proxy-example.json index 2e27a3a943..f4bd9aa50c 100644 --- a/config/.proxy-example.json +++ b/config/.proxy-example.json @@ -2,27 +2,63 @@ "routes": [ { "endpoint": "/", - "backend": "http://localhost:9100" + "backend": "http://localhost:9100", + "policy": "reva" }, { - "endpoint": "/.well-known/openid-configuration", - "backend": "http://localhost:9130" + "endpoint": "/.well-known/", + "backend": "http://localhost:9130", + "policy": "reva" }, { "endpoint": "/konnect/", - "backend": "http://localhost:9130" + "backend": "http://localhost:9130", + "policy": "reva" }, { "endpoint": "/signin/", - "backend": "http://localhost:9130" + "backend": "http://localhost:9130", + "policy": "reva" }, { "endpoint": "/ocs/v1.php/", - "backend": "http://localhost:4444" + "backend": "http://localhost:9140", + "policy": "reva" }, { "endpoint": "/remote.php/webdav/", - "backend": "http://localhost:4444" + "backend": "http://localhost:9140", + "policy": "reva" + }, + { + "endpoint": "/", + "backend": "http://localhost:9100", + "policy": "oc10" + }, + { + "endpoint": "/.well-known/", + "backend": "http://localhost:9130", + "policy": "oc10" + }, + { + "endpoint": "/konnect/", + "backend": "http://localhost:9130", + "policy": "oc10" + }, + { + "endpoint": "/signin/", + "backend": "http://localhost:9130", + "policy": "oc10" + }, + { + "endpoint": "/ocs/v1.php/", + "backend": "http://localhost:9140", + "policy": "oc10" + }, + { + "endpoint": "/remote.php/webdav/", + "backend": "http://localhost:9140", + "policy": "oc10" } ] } From cdbb79a401bce3e9ed740e504eb2b2a385206473 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 3 Mar 2020 16:11:21 +0100 Subject: [PATCH 014/213] implement MultiHostReverseProxy --- pkg/command/server.go | 90 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 11 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index f05dd44844..b696b27045 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + gohttp "net/http" "net/http/httputil" "net/url" "os" @@ -26,6 +27,12 @@ import ( "go.opencensus.io/trace" ) +// ReverseProxy extends httputil to support multiple hosts with diffent policies +type ReverseProxy struct { + httputil.ReverseProxy + Directors map[string]map[string]func(req *gohttp.Request) +} + // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ @@ -135,8 +142,11 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() + rp := NewMultiHostReverseProxy(cfg) + { server, err := http.Server( + http.Handler(rp), http.Logger(logger), http.Namespace(httpNamespace), http.Context(ctx), @@ -146,17 +156,6 @@ func Server(cfg *config.Config) *cli.Command { http.Flags(flagset.ServerWithConfig(cfg)), ) - for _, ep := range cfg.Routes { - uri, err := url.Parse(ep.Backend) - if err != nil { - logger.Info(). - Str("server", "http"). - Msg("error while parsing URL") - } - - server.Handle(ep.Endpoint, httputil.NewSingleHostReverseProxy(uri)) - } - if err != nil { logger.Error(). Err(err). @@ -233,3 +232,72 @@ func Server(cfg *config.Config) *cli.Command { }, } } + +// NewMultiHostReverseProxy undocummented +func NewMultiHostReverseProxy(conf *config.Config) *ReverseProxy { + reverseProxy := &ReverseProxy{Directors: make(map[string]map[string]func(req *gohttp.Request))} + + for _, target := range conf.Routes { + uri, err := url.Parse(target.Backend) + if err != nil { /* do something with err */ + } + reverseProxy.AddHost(target.Policy, uri, target.Endpoint) + } + + return reverseProxy +} + +func singleJoiningSlash(a, b string) string { + aslash := strings.HasSuffix(a, "/") + bslash := strings.HasPrefix(b, "/") + switch { + case aslash && bslash: + return a + b[1:] + case !aslash && !bslash: + return a + "/" + b + } + return a + b +} + +// AddHost undocumented +func (p *ReverseProxy) AddHost(policy string, target *url.URL, endpoint string) { + targetQuery := target.RawQuery + if p.Directors[policy] == nil { + p.Directors[policy] = make(map[string]func(req *gohttp.Request)) + } + p.Directors[policy][endpoint] = func(req *gohttp.Request) { + req.URL.Scheme = target.Scheme + req.URL.Host = target.Host + req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path) + if targetQuery == "" || req.URL.RawQuery == "" { + req.URL.RawQuery = targetQuery + req.URL.RawQuery + } else { + req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery + } + if _, ok := req.Header["User-Agent"]; !ok { + // explicitly disable User-Agent so it's not set to default value + req.Header.Set("User-Agent", "") + } + } +} + +func (p *ReverseProxy) ServeHTTP(rw gohttp.ResponseWriter, req *gohttp.Request) { + // TODO need to fetch from the accounts service + policy := "reva" + var hit bool + + for k := range p.Directors[policy] { + if strings.HasPrefix(req.URL.Path, k) && k != "/" { + p.Director = p.Directors[policy][k] + hit = true + } + } + + // override default director with root. If any + if !hit && p.Directors[policy]["/"] != nil { + p.Director = p.Directors[policy]["/"] + } + + // Call upstream ServeHTTP + p.ReverseProxy.ServeHTTP(rw, req) +} From 062cb6ed3614f07b93f53190d4701d69938a6391 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 3 Mar 2020 16:11:39 +0100 Subject: [PATCH 015/213] add policy to config struct --- pkg/config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index c17cc50990..c2f6d9b5ad 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -40,6 +40,7 @@ type Asset struct { type Route struct { Endpoint string `json:"endpoint"` Backend string `json:"backend"` + Policy string `json:"policy"` } // Config combines all available configuration parts. From b8cff1f5562670e6aaa668b00083e06d132e7f65 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 3 Mar 2020 16:12:00 +0100 Subject: [PATCH 016/213] allow for settable handler option --- pkg/server/http/option.go | 9 +++++++++ pkg/server/http/server.go | 1 + 2 files changed, 10 insertions(+) diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go index 187fa87596..b665d95c89 100644 --- a/pkg/server/http/option.go +++ b/pkg/server/http/option.go @@ -2,6 +2,7 @@ package http import ( "context" + "net/http" "github.com/micro/cli/v2" "github.com/owncloud/ocis-pkg/v2/log" @@ -17,6 +18,7 @@ type Options struct { Logger log.Logger Context context.Context Config *config.Config + Handler http.Handler Metrics *metrics.Metrics Flags []cli.Flag Namespace string @@ -74,3 +76,10 @@ func Namespace(val string) Option { o.Namespace = val } } + +// Handler provides a function to set the Handler option. +func Handler(h http.Handler) Option { + return func(o *Options) { + o.Handler = h + } +} diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 5933bee376..f2fb343af0 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -26,6 +26,7 @@ func Server(opts ...Option) (svc.Service, error) { service := svc.NewService( svc.Name("web.proxy"), + svc.Handler(options.Handler), svc.TLSConfig(config), svc.Logger(options.Logger), svc.Namespace(options.Namespace), From 1f04e6857a3de999e1a1845946417939ab01d6ca Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:22:57 +0100 Subject: [PATCH 017/213] update config --- pkg/config/config.go | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index c2f6d9b5ad..d53a925ffc 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -36,22 +36,27 @@ type Asset struct { Path string } +// Policy enables us to use multiple directors. +type Policy struct { + Name string `json:"name"` + Routes []Route `json:"routes"` +} + // Route define forwarding routes type Route struct { Endpoint string `json:"endpoint"` Backend string `json:"backend"` - Policy string `json:"policy"` } // Config combines all available configuration parts. type Config struct { - File string - Log Log - Debug Debug - HTTP HTTP - Tracing Tracing - Asset Asset - Routes []Route `json:"routes"` + File string + Log Log + Debug Debug + HTTP HTTP + Tracing Tracing + Asset Asset + Policies []Policy `json:"policies"` } // New initializes a new configuration with or without defaults. From de2d9bc0d1f523424db1aa5ee7e0103d08091dde Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:23:19 +0100 Subject: [PATCH 018/213] use updated config structure --- pkg/command/server.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index b696b27045..7275ca8e1e 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -237,11 +237,13 @@ func Server(cfg *config.Config) *cli.Command { func NewMultiHostReverseProxy(conf *config.Config) *ReverseProxy { reverseProxy := &ReverseProxy{Directors: make(map[string]map[string]func(req *gohttp.Request))} - for _, target := range conf.Routes { - uri, err := url.Parse(target.Backend) - if err != nil { /* do something with err */ + for _, policy := range conf.Policies { + for _, route := range policy.Routes { + uri, err := url.Parse(route.Backend) + if err != nil { /* do something with err */ + } + reverseProxy.AddHost(policy.Name, uri, route.Endpoint) } - reverseProxy.AddHost(target.Policy, uri, target.Endpoint) } return reverseProxy From 9a2974784a1e9dcbbc7cd1a2fa17e30c3f549554 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:23:32 +0100 Subject: [PATCH 019/213] update provided default config --- config/.proxy-example.json | 120 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 61 deletions(-) diff --git a/config/.proxy-example.json b/config/.proxy-example.json index f4bd9aa50c..f5623fc887 100644 --- a/config/.proxy-example.json +++ b/config/.proxy-example.json @@ -1,64 +1,62 @@ { - "routes": [ - { - "endpoint": "/", - "backend": "http://localhost:9100", - "policy": "reva" - }, - { - "endpoint": "/.well-known/", - "backend": "http://localhost:9130", - "policy": "reva" - }, - { - "endpoint": "/konnect/", - "backend": "http://localhost:9130", - "policy": "reva" - }, - { - "endpoint": "/signin/", - "backend": "http://localhost:9130", - "policy": "reva" - }, - { - "endpoint": "/ocs/v1.php/", - "backend": "http://localhost:9140", - "policy": "reva" - }, - { - "endpoint": "/remote.php/webdav/", - "backend": "http://localhost:9140", - "policy": "reva" + "policies": [ + { + "name": "reva", + "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" + }, + { + "endpoint": "/ocs/v1.php/", + "backend": "http://localhost:9140" + }, + { + "endpoint": "/remote.php/webdav/", + "backend": "http://localhost:9140" + } + ] }, - { - "endpoint": "/", - "backend": "http://localhost:9100", - "policy": "oc10" - }, - { - "endpoint": "/.well-known/", - "backend": "http://localhost:9130", - "policy": "oc10" - }, - { - "endpoint": "/konnect/", - "backend": "http://localhost:9130", - "policy": "oc10" - }, - { - "endpoint": "/signin/", - "backend": "http://localhost:9130", - "policy": "oc10" - }, - { - "endpoint": "/ocs/v1.php/", - "backend": "http://localhost:9140", - "policy": "oc10" - }, - { - "endpoint": "/remote.php/webdav/", - "backend": "http://localhost:9140", - "policy": "oc10" - } - ] + { + "name": "oc10", + "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" + }, + { + "endpoint": "/ocs/v1.php/", + "backend": "http://localhost:9140" + }, + { + "endpoint": "/remote.php/webdav/", + "backend": "http://localhost:9140" + } + ] + } + ] } From ea5dfc8f4fb5f8d49cd9fd1bd607d0a399fb9537 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:34:18 +0100 Subject: [PATCH 020/213] move MultiHostReverseProxy logic away from the server command --- pkg/command/server.go | 83 +---------------------------------------- pkg/proxy/proxy.go | 87 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 81 deletions(-) create mode 100644 pkg/proxy/proxy.go diff --git a/pkg/command/server.go b/pkg/command/server.go index 7275ca8e1e..ce809cad76 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,9 +2,6 @@ package command import ( "context" - gohttp "net/http" - "net/http/httputil" - "net/url" "os" "os/signal" "strings" @@ -21,18 +18,13 @@ import ( "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" "github.com/owncloud/ocis-proxy/pkg/metrics" + "github.com/owncloud/ocis-proxy/pkg/proxy" "github.com/owncloud/ocis-proxy/pkg/server/debug" "github.com/owncloud/ocis-proxy/pkg/server/http" "go.opencensus.io/stats/view" "go.opencensus.io/trace" ) -// ReverseProxy extends httputil to support multiple hosts with diffent policies -type ReverseProxy struct { - httputil.ReverseProxy - Directors map[string]map[string]func(req *gohttp.Request) -} - // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ @@ -142,7 +134,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - rp := NewMultiHostReverseProxy(cfg) + rp := proxy.NewMultiHostReverseProxy(cfg) { server, err := http.Server( @@ -232,74 +224,3 @@ func Server(cfg *config.Config) *cli.Command { }, } } - -// NewMultiHostReverseProxy undocummented -func NewMultiHostReverseProxy(conf *config.Config) *ReverseProxy { - reverseProxy := &ReverseProxy{Directors: make(map[string]map[string]func(req *gohttp.Request))} - - for _, policy := range conf.Policies { - for _, route := range policy.Routes { - uri, err := url.Parse(route.Backend) - if err != nil { /* do something with err */ - } - reverseProxy.AddHost(policy.Name, uri, route.Endpoint) - } - } - - return reverseProxy -} - -func singleJoiningSlash(a, b string) string { - aslash := strings.HasSuffix(a, "/") - bslash := strings.HasPrefix(b, "/") - switch { - case aslash && bslash: - return a + b[1:] - case !aslash && !bslash: - return a + "/" + b - } - return a + b -} - -// AddHost undocumented -func (p *ReverseProxy) AddHost(policy string, target *url.URL, endpoint string) { - targetQuery := target.RawQuery - if p.Directors[policy] == nil { - p.Directors[policy] = make(map[string]func(req *gohttp.Request)) - } - p.Directors[policy][endpoint] = func(req *gohttp.Request) { - req.URL.Scheme = target.Scheme - req.URL.Host = target.Host - req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path) - if targetQuery == "" || req.URL.RawQuery == "" { - req.URL.RawQuery = targetQuery + req.URL.RawQuery - } else { - req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery - } - if _, ok := req.Header["User-Agent"]; !ok { - // explicitly disable User-Agent so it's not set to default value - req.Header.Set("User-Agent", "") - } - } -} - -func (p *ReverseProxy) ServeHTTP(rw gohttp.ResponseWriter, req *gohttp.Request) { - // TODO need to fetch from the accounts service - policy := "reva" - var hit bool - - for k := range p.Directors[policy] { - if strings.HasPrefix(req.URL.Path, k) && k != "/" { - p.Director = p.Directors[policy][k] - hit = true - } - } - - // override default director with root. If any - if !hit && p.Directors[policy]["/"] != nil { - p.Director = p.Directors[policy]["/"] - } - - // Call upstream ServeHTTP - p.ReverseProxy.ServeHTTP(rw, req) -} diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go new file mode 100644 index 0000000000..3ba45f39e8 --- /dev/null +++ b/pkg/proxy/proxy.go @@ -0,0 +1,87 @@ +package proxy + +import ( + "net/http" + "net/http/httputil" + "net/url" + "strings" + + "github.com/owncloud/ocis-proxy/pkg/config" +) + +// MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies +type MultiHostReverseProxy struct { + httputil.ReverseProxy + Directors map[string]map[string]func(req *http.Request) +} + +// NewMultiHostReverseProxy undocummented +func NewMultiHostReverseProxy(conf *config.Config) *MultiHostReverseProxy { + reverseProxy := &MultiHostReverseProxy{Directors: make(map[string]map[string]func(req *http.Request))} + + for _, policy := range conf.Policies { + for _, route := range policy.Routes { + uri, err := url.Parse(route.Backend) + if err != nil { /* do something with err */ + } + reverseProxy.AddHost(policy.Name, uri, route.Endpoint) + } + } + + return reverseProxy +} + +func singleJoiningSlash(a, b string) string { + aslash := strings.HasSuffix(a, "/") + bslash := strings.HasPrefix(b, "/") + switch { + case aslash && bslash: + return a + b[1:] + case !aslash && !bslash: + return a + "/" + b + } + return a + b +} + +// AddHost undocumented +func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, endpoint string) { + targetQuery := target.RawQuery + if p.Directors[policy] == nil { + p.Directors[policy] = make(map[string]func(req *http.Request)) + } + p.Directors[policy][endpoint] = func(req *http.Request) { + req.URL.Scheme = target.Scheme + req.URL.Host = target.Host + req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path) + if targetQuery == "" || req.URL.RawQuery == "" { + req.URL.RawQuery = targetQuery + req.URL.RawQuery + } else { + req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery + } + if _, ok := req.Header["User-Agent"]; !ok { + // explicitly disable User-Agent so it's not set to default value + req.Header.Set("User-Agent", "") + } + } +} + +func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // TODO need to fetch from the accounts service + policy := "reva" + var hit bool + + for k := range p.Directors[policy] { + if strings.HasPrefix(r.URL.Path, k) && k != "/" { + p.Director = p.Directors[policy][k] + hit = true + } + } + + // override default director with root. If any + if !hit && p.Directors[policy]["/"] != nil { + p.Director = p.Directors[policy]["/"] + } + + // Call upstream ServeHTTP + p.ReverseProxy.ServeHTTP(w, r) +} From e0ca0fbd75cfd633e40843ca7c776c88c1807159 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:39:21 +0100 Subject: [PATCH 021/213] add defensive code on policy checks --- pkg/proxy/proxy.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 3ba45f39e8..1126a1c227 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -6,9 +6,13 @@ import ( "net/url" "strings" + "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" ) +// initialize a local logger instance +var logger = log.NewLogger() + // MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies type MultiHostReverseProxy struct { httputil.ReverseProxy @@ -67,8 +71,14 @@ func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, endpoint func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { // TODO need to fetch from the accounts service - policy := "reva" var hit bool + policy := "reva" + + if _, ok := p.Directors[policy]; !ok { + logger. + Error(). + Msgf("policy %v is not configured", policy) + } for k := range p.Directors[policy] { if strings.HasPrefix(r.URL.Path, k) && k != "/" { From 94d83b4f386a161c8f5818cba4bf028e973062cd Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 10:43:30 +0100 Subject: [PATCH 022/213] add structured logging on url parsing failure --- pkg/proxy/proxy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 1126a1c227..af3d7cff88 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -26,7 +26,11 @@ func NewMultiHostReverseProxy(conf *config.Config) *MultiHostReverseProxy { for _, policy := range conf.Policies { for _, route := range policy.Routes { uri, err := url.Parse(route.Backend) - if err != nil { /* do something with err */ + if err != nil { + logger. + Fatal(). + Err(err). + Msgf("malformed url: %v", route.Backend) } reverseProxy.AddHost(policy.Name, uri, route.Endpoint) } From 8ba2488fb327d4b54c3046965e8ddca8540a47e1 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 11:14:59 +0100 Subject: [PATCH 023/213] update ocis-pkg --- go.mod | 2 +- go.sum | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 654457a142..19dd5338fd 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 - github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a + github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 github.com/owncloud/ocis-pkg/v2 v2.0.1 github.com/prometheus/client_golang v1.2.1 github.com/restic/calens v0.2.0 diff --git a/go.sum b/go.sum index b9eafa4676..9ab4603db5 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/UnnoTed/fileb0x v1.1.4 h1:IUgFzgBipF/ujNx9wZgkrKOF3oltUuXMSoaejrBws+A= github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ9cgOiZs= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= @@ -77,6 +78,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= @@ -168,6 +170,7 @@ github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXR github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc= github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= @@ -250,6 +253,8 @@ github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -304,6 +309,7 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= +github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -323,7 +329,9 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/labstack/echo v3.2.1+incompatible h1:J2M7YArHx4gi8p/3fDw8tX19SXhBCoRpviyAZSN3I88= github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.2.7 h1:2qOPq/twXDrQ6ooBGrn3mrmVOC+biLlatwgIu8lbzRM= github.com/labstack/gommon v0.2.7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -349,12 +357,15 @@ github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwm github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -391,6 +402,7 @@ github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFW github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= @@ -431,6 +443,7 @@ github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/Hzq github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -457,9 +470,8 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= -github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a h1:Msdczqy0Mt8bPxARn9NiW8Why52zDR10Aw2IZk6gsVc= -github.com/owncloud/ocis-konnectd v0.0.0-20200221141628-e8420f55da5a/go.mod h1:lfo4oitFbpuHHLCTXrBC/93GP72cpBUokxrVqDgsyQk= -github.com/owncloud/ocis-pkg v1.3.0 h1:2fkgvfd/spTjschuulYMHRuzxkCGGXae9ocebVYkm74= +github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 h1:JqnnJAVSnUB+2Lb20+DjNn553Rvvh1gsEqDfE8+ppK8= +github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393/go.mod h1:RSm/AcbZ+Wq608qRGW28Rp95ktn4Hxi9BvY2c9aj7lU= github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= @@ -591,7 +603,9 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 h1:gKMu1Bf6QINDnvyZuTaACm9ofY+PRh+5vFz4oxBZeF8= github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= @@ -705,6 +719,8 @@ golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= From b2a76bfe47e23888eb7263b80d684de2c34c563f Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 4 Mar 2020 11:16:52 +0100 Subject: [PATCH 024/213] update ocis-pkg -> v2.0.2 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 19dd5338fd..a6edebb911 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 - github.com/owncloud/ocis-pkg/v2 v2.0.1 + github.com/owncloud/ocis-pkg/v2 v2.0.2 github.com/prometheus/client_golang v1.2.1 github.com/restic/calens v0.2.0 - github.com/spf13/viper v1.6.1 + github.com/spf13/viper v1.6.2 go.opencensus.io v0.22.2 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect ) diff --git a/go.sum b/go.sum index 9ab4603db5..844f388501 100644 --- a/go.sum +++ b/go.sum @@ -474,6 +474,8 @@ github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 h1:JqnnJAVS github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393/go.mod h1:RSm/AcbZ+Wq608qRGW28Rp95ktn4Hxi9BvY2c9aj7lU= github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= +github.com/owncloud/ocis-pkg/v2 v2.0.2 h1:aHqvuRXMFsImO/uwL9v8Ul+PByPFLZp/Rdj4MXAhI9A= +github.com/owncloud/ocis-pkg/v2 v2.0.2/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= @@ -576,6 +578,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From 2aba428eb1ef177894fffc9477ad6a091d2cf676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 5 Mar 2020 13:33:14 +0100 Subject: [PATCH 025/213] add apachevhost option, fix logging defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- ....proxy-example.json => proxy-example.json} | 32 ++++++++++++--- pkg/command/health.go | 3 +- pkg/command/root.go | 12 +++++- pkg/command/server.go | 8 ++-- pkg/config/config.go | 11 ++--- pkg/flagset/flagset.go | 2 + pkg/proxy/option.go | 40 ++++++++++++++++++ pkg/proxy/proxy.go | 41 ++++++++++++++----- 8 files changed, 121 insertions(+), 28 deletions(-) rename config/{.proxy-example.json => proxy-example.json} (64%) create mode 100644 pkg/proxy/option.go diff --git a/config/.proxy-example.json b/config/proxy-example.json similarity index 64% rename from config/.proxy-example.json rename to config/proxy-example.json index f5623fc887..03a2a32fa0 100644 --- a/config/.proxy-example.json +++ b/config/proxy-example.json @@ -20,11 +20,19 @@ "backend": "http://localhost:9130" }, { - "endpoint": "/ocs/v1.php/", + "endpoint": "/ocs/", "backend": "http://localhost:9140" }, { - "endpoint": "/remote.php/webdav/", + "endpoint": "/remote.php/", + "backend": "http://localhost:9140" + }, + { + "endpoint": "/dav/", + "backend": "http://localhost:9140" + }, + { + "endpoint": "/webdav/", "backend": "http://localhost:9140" } ] @@ -49,12 +57,24 @@ "backend": "http://localhost:9130" }, { - "endpoint": "/ocs/v1.php/", - "backend": "http://localhost:9140" + "endpoint": "/ocs/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true }, { - "endpoint": "/remote.php/webdav/", - "backend": "http://localhost:9140" + "endpoint": "/remote.php/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/dav/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/webdav/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true } ] } diff --git a/pkg/command/health.go b/pkg/command/health.go index cdc66b864a..39210e4d8a 100644 --- a/pkg/command/health.go +++ b/pkg/command/health.go @@ -5,7 +5,6 @@ import ( "net/http" "github.com/micro/cli/v2" - "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" ) @@ -17,7 +16,7 @@ func Health(cfg *config.Config) *cli.Command { Usage: "Check health status", Flags: flagset.HealthWithConfig(cfg), Action: func(c *cli.Context) error { - logger := log.NewLogger() + logger := NewLogger(cfg) resp, err := http.Get( fmt.Sprintf( diff --git a/pkg/command/root.go b/pkg/command/root.go index 94836d70d0..a4691f3f30 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -32,7 +32,7 @@ func Execute() error { Flags: flagset.RootWithConfig(cfg), Before: func(c *cli.Context) error { - logger := log.NewLogger() + logger := NewLogger(cfg) viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) viper.SetEnvPrefix("PROXY") @@ -91,3 +91,13 @@ func Execute() error { return app.Run(os.Args) } + +// NewLogger initializes a service-specific logger instance. +func NewLogger(cfg *config.Config) log.Logger { + return log.NewLogger( + log.Name("proxy"), + log.Level(cfg.Log.Level), + log.Pretty(cfg.Log.Pretty), + log.Color(cfg.Log.Color), + ) +} diff --git a/pkg/command/server.go b/pkg/command/server.go index ce809cad76..51bd4d6ee2 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -14,7 +14,6 @@ import ( "github.com/oklog/run" openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" - "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" "github.com/owncloud/ocis-proxy/pkg/metrics" @@ -39,7 +38,7 @@ func Server(cfg *config.Config) *cli.Command { return nil }, Action: func(c *cli.Context) error { - logger := log.NewLogger() + logger := NewLogger(cfg) httpNamespace := c.String("http-namespace") if cfg.Tracing.Enabled { @@ -134,7 +133,10 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - rp := proxy.NewMultiHostReverseProxy(cfg) + rp := proxy.NewMultiHostReverseProxy( + proxy.Logger(logger), + proxy.Config(cfg), + ) { server, err := http.Server( diff --git a/pkg/config/config.go b/pkg/config/config.go index d53a925ffc..3fe87f8180 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -38,14 +38,15 @@ type Asset struct { // Policy enables us to use multiple directors. type Policy struct { - Name string `json:"name"` - Routes []Route `json:"routes"` + Name string `mapstructure:"name"` + Routes []Route `mapstructure:"routes"` } // Route define forwarding routes type Route struct { - Endpoint string `json:"endpoint"` - Backend string `json:"backend"` + Endpoint string `mapstructure:"endpoint"` + Backend string `mapstructure:"backend"` + ApacheVHost bool `mapstructure:"apache-vhost"` } // Config combines all available configuration parts. @@ -56,7 +57,7 @@ type Config struct { HTTP HTTP Tracing Tracing Asset Asset - Policies []Policy `json:"policies"` + Policies []Policy `mapstructure:"policies"` } // New initializes a new configuration with or without defaults. diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 7f04f1cd0b..00c9d84cb0 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -24,12 +24,14 @@ func RootWithConfig(cfg *config.Config) []cli.Flag { }, &cli.BoolFlag{ Name: "log-pretty", + Value: true, Usage: "Enable pretty logging", EnvVars: []string{"PROXY_LOG_PRETTY"}, Destination: &cfg.Log.Pretty, }, &cli.BoolFlag{ Name: "log-color", + Value: true, Usage: "Enable colored logging", EnvVars: []string{"PROXY_LOG_COLOR"}, Destination: &cfg.Log.Color, diff --git a/pkg/proxy/option.go b/pkg/proxy/option.go new file mode 100644 index 0000000000..b2de9124dd --- /dev/null +++ b/pkg/proxy/option.go @@ -0,0 +1,40 @@ +package proxy + +import ( + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/config" +) + +// Option defines a single option function. +type Option func(o *Options) + +// Options defines the available options for this package. +type Options struct { + Logger log.Logger + Config *config.Config +} + +// newOptions initializes the available default options. +func newOptions(opts ...Option) Options { + opt := Options{} + + for _, o := range opts { + o(&opt) + } + + return opt +} + +// Logger provides a function to set the logger option. +func Logger(val log.Logger) Option { + return func(o *Options) { + o.Logger = val + } +} + +// Config provides a function to set the config option. +func Config(val *config.Config) Option { + return func(o *Options) { + o.Config = val + } +} diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index af3d7cff88..a34772ddb4 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -10,29 +10,38 @@ import ( "github.com/owncloud/ocis-proxy/pkg/config" ) -// initialize a local logger instance -var logger = log.NewLogger() - // MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies type MultiHostReverseProxy struct { httputil.ReverseProxy Directors map[string]map[string]func(req *http.Request) + logger log.Logger } // NewMultiHostReverseProxy undocummented -func NewMultiHostReverseProxy(conf *config.Config) *MultiHostReverseProxy { - reverseProxy := &MultiHostReverseProxy{Directors: make(map[string]map[string]func(req *http.Request))} +func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { + options := newOptions(opts...) - for _, policy := range conf.Policies { + reverseProxy := &MultiHostReverseProxy{ + Directors: make(map[string]map[string]func(req *http.Request)), + logger: options.Logger, + } + + for _, policy := range options.Config.Policies { for _, route := range policy.Routes { uri, err := url.Parse(route.Backend) if err != nil { - logger. + reverseProxy.logger. Fatal(). Err(err). Msgf("malformed url: %v", route.Backend) } - reverseProxy.AddHost(policy.Name, uri, route.Endpoint) + + reverseProxy.logger. + Debug(). + Interface("route", route). + Msg("adding route") + + reverseProxy.AddHost(policy.Name, uri, route) } } @@ -52,14 +61,18 @@ func singleJoiningSlash(a, b string) string { } // AddHost undocumented -func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, endpoint string) { +func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt config.Route) { targetQuery := target.RawQuery if p.Directors[policy] == nil { p.Directors[policy] = make(map[string]func(req *http.Request)) } - p.Directors[policy][endpoint] = func(req *http.Request) { + p.Directors[policy][rt.Endpoint] = func(req *http.Request) { req.URL.Scheme = target.Scheme req.URL.Host = target.Host + if rt.ApacheVHost { + req.Host = target.Host + } + req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path) if targetQuery == "" || req.URL.RawQuery == "" { req.URL.RawQuery = targetQuery + req.URL.RawQuery @@ -79,7 +92,7 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request policy := "reva" if _, ok := p.Directors[policy]; !ok { - logger. + p.logger. Error(). Msgf("policy %v is not configured", policy) } @@ -88,6 +101,12 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request if strings.HasPrefix(r.URL.Path, k) && k != "/" { p.Director = p.Directors[policy][k] hit = true + p.logger. + Debug(). + Str("policy", policy). + Str("prefix", k). + Str("path", r.URL.Path). + Msg("director found") } } From 0a07d7e663b4e42a1601bd7f0bbc8c94de6b03d9 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 9 Mar 2020 21:50:59 +0100 Subject: [PATCH 026/213] Docs Edit links, Changelog template, Makefile --- .drone.star | 16 ++++++++-------- Makefile | 2 +- changelog/CHANGELOG.tmpl | 13 ++++++++----- docs/_index.md | 4 +++- docs/about.md | 4 +++- docs/building.md | 8 ++++++-- docs/getting-started.md | 26 +++++++++++++++----------- 7 files changed, 44 insertions(+), 29 deletions(-) diff --git a/.drone.star b/.drone.star index 94d7e35b90..a204a15edb 100644 --- a/.drone.star +++ b/.drone.star @@ -484,16 +484,16 @@ def changelog(ctx): ], }, { - 'name': 'diff', - 'image': 'owncloud/alpine:latest', - 'pull': 'always', - 'commands': [ - 'git diff', - ], - }, + 'name': 'diff', + 'image': 'owncloud/alpine:latest', + 'pull': 'always', + 'commands': [ + 'git diff', + ], + }, { 'name': 'output', - 'image': 'webhippie/golang:1.13', + 'image': 'owncloud/alpine:latest', 'pull': 'always', 'commands': [ 'cat CHANGELOG.md', diff --git a/Makefile b/Makefile index daa565f2e6..d4a5bf5646 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ sync: .PHONY: clean clean: go clean -i ./... - rm -rf $(BIN) $(DIST) + rm -rf $(BIN) $(DIST) $(HUGO) .PHONY: fmt fmt: diff --git a/changelog/CHANGELOG.tmpl b/changelog/CHANGELOG.tmpl index cabe3e71e1..1bdc3ace8b 100644 --- a/changelog/CHANGELOG.tmpl +++ b/changelog/CHANGELOG.tmpl @@ -1,10 +1,10 @@ {{ $allVersions := . }} {{- range $index, $changes := . }}{{ with $changes -}} +{{ if gt (len $allVersions) 1 -}} # Changelog for [{{ .Version }}] ({{ .Date }}) -The following sections list the changes for {{ .Version }}. +The following sections list the changes for ocis-proxy {{ .Version }}. -{{ if gt (len $allVersions) 1 -}} {{/* creating version compare links */ -}} {{ $next := add1 $index -}} {{ if ne (len $allVersions) $next -}} @@ -23,16 +23,19 @@ The following sections list the changes for {{ .Version }}. [{{ .Version }}]: https://github.com/owncloud/ocis-proxy/compare/500e303cb544ed93d84153f01219d77eeee44929...v{{ .Version }} {{ end -}} -{{- end -}} +{{ else -}} +# Changes in {{ .Version }} + +{{ end -}} ## Summary {{ range $entry := .Entries }}{{ with $entry }} - * {{ .TypeShort }} #{{ .PrimaryID }}: {{ .Title }} +* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) {{- end }}{{ end }} ## Details {{ range $entry := .Entries }}{{ with $entry }} - * {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) {{ range $par := .Paragraphs }} {{ wrapIndent $par 80 3 }} {{ end -}} diff --git a/docs/_index.md b/docs/_index.md index 398726da58..5ad1d7b5fd 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -1,6 +1,8 @@ --- title: Proxy -anchor: "ocis-proxy" +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: _index.md --- This service provides a basic proxy in front of the public ocis services. diff --git a/docs/about.md b/docs/about.md index bdb5142664..2707afefe1 100644 --- a/docs/about.md +++ b/docs/about.md @@ -1,8 +1,10 @@ --- title: "About" date: 2020-02-07T00:00:00+00:00 -anchor: "about" weight: 10 +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: about.md --- This service provides an proxy service that routes requests to the correct services. diff --git a/docs/building.md b/docs/building.md index c693298a4e..8007e89960 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,10 +1,14 @@ --- title: "Building" date: 2018-05-02T00:00:00+00:00 -anchor: "building" weight: 30 +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: building.md --- +{{< toc >}} + As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources: {{< highlight txt >}} @@ -14,7 +18,7 @@ cd ocis-proxy All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. -### Backend +## Backend {{< highlight txt >}} make generate diff --git a/docs/getting-started.md b/docs/getting-started.md index 737df31541..618b7951be 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,31 +1,35 @@ --- title: "Getting Started" date: 2018-05-02T00:00:00+00:00 -anchor: "getting-started" weight: 20 +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: getting-started.md --- -### Installation +{{< toc >}} + +## Installation So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. -#### Docker +### Docker TBD -#### Binaries +### Binaries TBD -### Configuration +## Configuration We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. -#### Envrionment variables +### Envrionment variables If you prefer to configure the service with environment variables you can see the available variables below. -##### Server +#### Server OCIS_PROXY_NAME : Name of the proxy service. It will be part of the namespace. @@ -36,19 +40,19 @@ OCIS_PROXY_NAMESPACE OCIS_PROXY_ADDRESS : Endpoint for the http service endpoint. -#### Commandline flags +### Commandline flags If you prefer to configure the service with commandline flags you can see the available variables below. -#### Configuration file +### Configuration file So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis-proxy/tree/master/pkg/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/proxy.yml`, `${HOME}/.ocis/proxy.yml` or `$(pwd)/config/proxy.yml`. -### Usage +## Usage The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-proxy --help`. -#### Server +### Server The server command is used to start the http server. For further help please execute: From 5a38d286e52cf283d0abc5c1474cc4136fc53086 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 10 Mar 2020 10:01:27 +0000 Subject: [PATCH 027/213] Automated changelog update [skip ci] --- CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fad55b4968..c84eb551d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,12 @@ -# Changelog for [unreleased] (UNRELEASED) - -The following sections list the changes for unreleased. +# Changes in unreleased ## Summary - * Chg #1: Initial release of basic version +* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis-proxy/issues/1) ## Details - * Change #1: Initial release of basic version +* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis-proxy/issues/1) Just prepared an initial basic version. From b1973f379a63ced50e32b6ef2653449fe0100d30 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 13 Mar 2020 10:51:28 +0100 Subject: [PATCH 028/213] tidy deps --- go.mod | 1 + go.sum | 2 ++ 2 files changed, 3 insertions(+) diff --git a/go.mod b/go.mod index a6edebb911..3b6df4a635 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 + github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 // indirect github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect github.com/oklog/run v1.1.0 diff --git a/go.sum b/go.sum index 844f388501..fa7efed081 100644 --- a/go.sum +++ b/go.sum @@ -197,6 +197,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= From f0d9b00f38b58cf60b1ff00db24cd16f13a5b615 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 13 Mar 2020 10:51:55 +0100 Subject: [PATCH 029/213] load config from embedded-config if running on embedded mode --- pkg/command/server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/command/server.go b/pkg/command/server.go index 51bd4d6ee2..4f0a7f8622 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -35,6 +35,10 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } + if c.String("embedded-config") != "" { + config.Embedded(c, cfg) + } + return nil }, Action: func(c *cli.Context) error { From 8c1f12a16414cb39b593b8f27befd5b5845c2154 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 13 Mar 2020 10:52:22 +0100 Subject: [PATCH 030/213] add loader helper (temporary fix, move away from the helper pattern) --- pkg/config/helpers.go | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkg/config/helpers.go diff --git a/pkg/config/helpers.go b/pkg/config/helpers.go new file mode 100644 index 0000000000..f019dda5c9 --- /dev/null +++ b/pkg/config/helpers.go @@ -0,0 +1,65 @@ +package config + +import ( + "strings" + + "github.com/micro/cli/v2" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/spf13/viper" +) + +// Embedded allows for proxy configuration bypassing root initialization. +// It's usage is intended when embedding a subcommand, like we do on owncloud/ocis. +// TODO this should be a generic function and not hardcode prefixes. +func Embedded(c *cli.Context, cfg *Config) { + logger := NewLogger(cfg) + + viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) + viper.SetEnvPrefix("PROXY") + viper.AutomaticEnv() + + if c.IsSet("embedded-config") { + viper.SetConfigFile(c.String("embedded-config")) + } else { + viper.SetConfigName("proxy") + + viper.AddConfigPath("/etc/ocis") + viper.AddConfigPath("$HOME/.ocis") + viper.AddConfigPath("./config") + } + + if err := viper.ReadInConfig(); err != nil { + switch err.(type) { + case viper.ConfigFileNotFoundError: + logger.Info(). + Msg("Continue without config") + case viper.UnsupportedConfigError: + logger.Fatal(). + Err(err). + Msg("Unsupported config type") + default: + logger.Fatal(). + Err(err). + Msg("Failed to read config") + } + } + + if err := viper.Unmarshal(&cfg); err != nil { + logger.Fatal(). + Err(err). + Msg("Failed to parse config") + } + + logger.Info(). + Msg("Running subcommand on embedded mode") +} + +// NewLogger initializes a service-specific logger instance. +func NewLogger(cfg *Config) log.Logger { + return log.NewLogger( + log.Name("proxy"), + log.Level(cfg.Log.Level), + log.Pretty(cfg.Log.Pretty), + log.Color(cfg.Log.Color), + ) +} From 739d226d0981b7fc54e7c809afdcb0e69594cd87 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 13 Mar 2020 10:52:42 +0100 Subject: [PATCH 031/213] add embedded-config flag, override config.File if present --- pkg/flagset/flagset.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 00c9d84cb0..0a5e591f7e 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -68,6 +68,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_TRACING_TYPE"}, Destination: &cfg.Tracing.Type, }, + &cli.StringFlag{ + Name: "embedded-config", + Usage: "Provided config file while running on single oCIS binary mode.", + EnvVars: []string{"PROXY_EMBEDDED_CONFIG"}, + Destination: &cfg.File, + }, &cli.StringFlag{ Name: "tracing-endpoint", Value: "", From 9105d285bdfb13dced5de66b1039096cf8476674 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 11:24:31 +0100 Subject: [PATCH 032/213] add http info to config --- config/proxy-example.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/proxy-example.json b/config/proxy-example.json index 03a2a32fa0..e764eba597 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -1,4 +1,8 @@ { + "HTTP": { + "Addr": "0.0.0.0:9200", + "Namespace": "com.owncloud" + }, "policies": [ { "name": "reva", From 86f72205263537d0c58d9db4a8ef3863527b2f6f Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 11:25:50 +0100 Subject: [PATCH 033/213] remove hacky embedded-config flag --- pkg/flagset/flagset.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 0a5e591f7e..00c9d84cb0 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -68,12 +68,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_TRACING_TYPE"}, Destination: &cfg.Tracing.Type, }, - &cli.StringFlag{ - Name: "embedded-config", - Usage: "Provided config file while running on single oCIS binary mode.", - EnvVars: []string{"PROXY_EMBEDDED_CONFIG"}, - Destination: &cfg.File, - }, &cli.StringFlag{ Name: "tracing-endpoint", Value: "", From c863d6f71fb383466d1dc3f3aad62fae88f97984 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 11:26:31 +0100 Subject: [PATCH 034/213] abstract ParseConfig to its own scope --- pkg/command/root.go | 84 ++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/pkg/command/root.go b/pkg/command/root.go index a4691f3f30..a14b056079 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -32,45 +32,7 @@ func Execute() error { Flags: flagset.RootWithConfig(cfg), Before: func(c *cli.Context) error { - logger := NewLogger(cfg) - - viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - viper.SetEnvPrefix("PROXY") - viper.AutomaticEnv() - - if c.IsSet("config-file") { - viper.SetConfigFile(c.String("config-file")) - } else { - viper.SetConfigName("proxy") - - viper.AddConfigPath("/etc/ocis") - viper.AddConfigPath("$HOME/.ocis") - viper.AddConfigPath("./config") - } - - if err := viper.ReadInConfig(); err != nil { - switch err.(type) { - case viper.ConfigFileNotFoundError: - logger.Info(). - Msg("Continue without config") - case viper.UnsupportedConfigError: - logger.Fatal(). - Err(err). - Msg("Unsupported config type") - default: - logger.Fatal(). - Err(err). - Msg("Failed to read config") - } - } - - if err := viper.Unmarshal(&cfg); err != nil { - logger.Fatal(). - Err(err). - Msg("Failed to parse config") - } - - return nil + return ParseConfig(c, cfg) }, Commands: []*cli.Command{ @@ -101,3 +63,47 @@ func NewLogger(cfg *config.Config) log.Logger { log.Color(cfg.Log.Color), ) } + +// ParseConfig load configuration for every extension +// TODO: DRY this func, take Environment Prefix as parameter, as it is the only variable +func ParseConfig(c *cli.Context, cfg *config.Config) error { + logger := NewLogger(cfg) + + viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) + viper.SetEnvPrefix("PROXY") + viper.AutomaticEnv() + + if c.IsSet("config-file") { + viper.SetConfigFile(c.String("config-file")) + } else { + viper.SetConfigName("proxy") + + viper.AddConfigPath("/etc/ocis") + viper.AddConfigPath("$HOME/.ocis") + viper.AddConfigPath("./config") + } + + if err := viper.ReadInConfig(); err != nil { + switch err.(type) { + case viper.ConfigFileNotFoundError: + logger.Info(). + Msg("Continue without config") + case viper.UnsupportedConfigError: + logger.Fatal(). + Err(err). + Msg("Unsupported config type") + default: + logger.Fatal(). + Err(err). + Msg("Failed to read config") + } + } + + if err := viper.Unmarshal(&cfg); err != nil { + logger.Fatal(). + Err(err). + Msg("Failed to parse config") + } + + return nil +} From fc1389b0873d81a0588a12c8718ce867ab7e1b16 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 11:26:45 +0100 Subject: [PATCH 035/213] call ParseConfig on server command --- pkg/command/server.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index 4f0a7f8622..ad99e9ecb0 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -30,15 +30,14 @@ func Server(cfg *config.Config) *cli.Command { Name: "server", Usage: "Start integrated server", Flags: flagset.ServerWithConfig(cfg), - Before: func(c *cli.Context) error { + Before: func(ctx *cli.Context) error { + // commands are loaded asynchronously, config gets lost along the way, + // therefore we need to run this routine again, since a new config is passed each time. + ParseConfig(ctx, cfg) + if cfg.HTTP.Root != "/" { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } - - if c.String("embedded-config") != "" { - config.Embedded(c, cfg) - } - return nil }, Action: func(c *cli.Context) error { @@ -150,8 +149,8 @@ func Server(cfg *config.Config) *cli.Command { http.Context(ctx), http.Config(cfg), http.Metrics(metrics), - http.Flags(flagset.RootWithConfig(cfg)), - http.Flags(flagset.ServerWithConfig(cfg)), + http.Flags(flagset.RootWithConfig(config.New())), + http.Flags(flagset.ServerWithConfig(config.New())), ) if err != nil { From 6c1ed02acd37bd9b82ee62a1d2ea03035e48b01d Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 11:27:27 +0100 Subject: [PATCH 036/213] arrange config.Config --- pkg/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 3fe87f8180..81cb915041 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -54,13 +54,13 @@ type Config struct { File string Log Log Debug Debug - HTTP HTTP + HTTP HTTP `mapstructure:"http"` Tracing Tracing Asset Asset Policies []Policy `mapstructure:"policies"` } -// New initializes a new configuration with or without defaults. +// New initializes a new configuration func New() *Config { return &Config{} } From e4fee1917076185bfeace147a1d12bf7bfdd9fbb Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 12:09:28 +0100 Subject: [PATCH 037/213] remove unecessary mapstruct --- pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 81cb915041..4048b63d06 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -54,7 +54,7 @@ type Config struct { File string Log Log Debug Debug - HTTP HTTP `mapstructure:"http"` + HTTP HTTP Tracing Tracing Asset Asset Policies []Policy `mapstructure:"policies"` From 52bb4c0e1a540fd6c9c95300171208c548128ed4 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 12:21:06 +0100 Subject: [PATCH 038/213] delete helpers file --- pkg/config/helpers.go | 65 ------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 pkg/config/helpers.go diff --git a/pkg/config/helpers.go b/pkg/config/helpers.go deleted file mode 100644 index f019dda5c9..0000000000 --- a/pkg/config/helpers.go +++ /dev/null @@ -1,65 +0,0 @@ -package config - -import ( - "strings" - - "github.com/micro/cli/v2" - "github.com/owncloud/ocis-pkg/v2/log" - "github.com/spf13/viper" -) - -// Embedded allows for proxy configuration bypassing root initialization. -// It's usage is intended when embedding a subcommand, like we do on owncloud/ocis. -// TODO this should be a generic function and not hardcode prefixes. -func Embedded(c *cli.Context, cfg *Config) { - logger := NewLogger(cfg) - - viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - viper.SetEnvPrefix("PROXY") - viper.AutomaticEnv() - - if c.IsSet("embedded-config") { - viper.SetConfigFile(c.String("embedded-config")) - } else { - viper.SetConfigName("proxy") - - viper.AddConfigPath("/etc/ocis") - viper.AddConfigPath("$HOME/.ocis") - viper.AddConfigPath("./config") - } - - if err := viper.ReadInConfig(); err != nil { - switch err.(type) { - case viper.ConfigFileNotFoundError: - logger.Info(). - Msg("Continue without config") - case viper.UnsupportedConfigError: - logger.Fatal(). - Err(err). - Msg("Unsupported config type") - default: - logger.Fatal(). - Err(err). - Msg("Failed to read config") - } - } - - if err := viper.Unmarshal(&cfg); err != nil { - logger.Fatal(). - Err(err). - Msg("Failed to parse config") - } - - logger.Info(). - Msg("Running subcommand on embedded mode") -} - -// NewLogger initializes a service-specific logger instance. -func NewLogger(cfg *Config) log.Logger { - return log.NewLogger( - log.Name("proxy"), - log.Level(cfg.Log.Level), - log.Pretty(cfg.Log.Pretty), - log.Color(cfg.Log.Color), - ) -} From c9010a3016a3295bf90d025403b2e79aae6922b7 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 16 Mar 2020 17:17:56 +0100 Subject: [PATCH 039/213] move commands to its scope --- pkg/command/root.go | 13 +++++++++---- pkg/command/server.go | 2 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/command/root.go b/pkg/command/root.go index a14b056079..895070379e 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -35,10 +35,7 @@ func Execute() error { return ParseConfig(c, cfg) }, - Commands: []*cli.Command{ - Server(cfg), - Health(cfg), - }, + Commands: GetCommands(cfg), } cli.HelpFlag = &cli.BoolFlag{ @@ -54,6 +51,14 @@ func Execute() error { return app.Run(os.Args) } +// GetCommands undocummented +func GetCommands(cfg *config.Config) []*cli.Command { + return []*cli.Command{ + Server(cfg), + Health(cfg), + } +} + // NewLogger initializes a service-specific logger instance. func NewLogger(cfg *config.Config) log.Logger { return log.NewLogger( diff --git a/pkg/command/server.go b/pkg/command/server.go index ad99e9ecb0..a6245b2a52 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -31,8 +31,6 @@ func Server(cfg *config.Config) *cli.Command { Usage: "Start integrated server", Flags: flagset.ServerWithConfig(cfg), Before: func(ctx *cli.Context) error { - // commands are loaded asynchronously, config gets lost along the way, - // therefore we need to run this routine again, since a new config is passed each time. ParseConfig(ctx, cfg) if cfg.HTTP.Root != "/" { From 83570eccde6162b5f22faf3e2d6ed04bc2acf7fb Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 17 Mar 2020 14:34:11 +0100 Subject: [PATCH 040/213] update example config --- config/proxy-example.json | 1 - 1 file changed, 1 deletion(-) diff --git a/config/proxy-example.json b/config/proxy-example.json index e764eba597..be74c6fa93 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -1,6 +1,5 @@ { "HTTP": { - "Addr": "0.0.0.0:9200", "Namespace": "com.owncloud" }, "policies": [ From 40a27c9e933200c6c3cf4b0fb14a484e063ee87f Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 17 Mar 2020 14:34:32 +0100 Subject: [PATCH 041/213] save allocation --- pkg/command/root.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkg/command/root.go b/pkg/command/root.go index 895070379e..a14b056079 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -35,7 +35,10 @@ func Execute() error { return ParseConfig(c, cfg) }, - Commands: GetCommands(cfg), + Commands: []*cli.Command{ + Server(cfg), + Health(cfg), + }, } cli.HelpFlag = &cli.BoolFlag{ @@ -51,14 +54,6 @@ func Execute() error { return app.Run(os.Args) } -// GetCommands undocummented -func GetCommands(cfg *config.Config) []*cli.Command { - return []*cli.Command{ - Server(cfg), - Health(cfg), - } -} - // NewLogger initializes a service-specific logger instance. func NewLogger(cfg *config.Config) log.Logger { return log.NewLogger( From e2fec340eb4f70bfc4673a65fed342ef68f8ff2c Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 17 Mar 2020 14:34:45 +0100 Subject: [PATCH 042/213] code style --- pkg/command/server.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index a6245b2a52..6747583da8 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -31,12 +31,11 @@ func Server(cfg *config.Config) *cli.Command { Usage: "Start integrated server", Flags: flagset.ServerWithConfig(cfg), Before: func(ctx *cli.Context) error { - ParseConfig(ctx, cfg) - if cfg.HTTP.Root != "/" { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } - return nil + + return ParseConfig(ctx, cfg) }, Action: func(c *cli.Context) error { logger := NewLogger(cfg) From c74e5f543432bcdc7d11855ca3c6ad90e4d1d84c Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 17 Mar 2020 14:35:40 +0100 Subject: [PATCH 043/213] document ParseConfig --- pkg/command/root.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/command/root.go b/pkg/command/root.go index a14b056079..13f0d9d175 100644 --- a/pkg/command/root.go +++ b/pkg/command/root.go @@ -64,8 +64,7 @@ func NewLogger(cfg *config.Config) log.Logger { ) } -// ParseConfig load configuration for every extension -// TODO: DRY this func, take Environment Prefix as parameter, as it is the only variable +// ParseConfig loads proxy configuration from Viper known paths. func ParseConfig(c *cli.Context, cfg *config.Config) error { logger := NewLogger(cfg) From 972b2ffe30f20b0c1324d6ee5574227849e2b61b Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 17 Mar 2020 14:39:13 +0100 Subject: [PATCH 044/213] document why we use ParseConfig on server before hook --- pkg/command/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/command/server.go b/pkg/command/server.go index 6747583da8..a40f146dbc 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -35,6 +35,8 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } + // When running on single binary mode the before hook from the root command won't get called. We manually + // call this before hook from ocis command, so the configuration can be loaded. return ParseConfig(ctx, cfg) }, Action: func(c *cli.Context) error { From 356ad9c9e7cbb2f892bb63322e6f6335149cc7c4 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 09:59:48 +0100 Subject: [PATCH 045/213] add debug lines --- pkg/proxy/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index a34772ddb4..766129b5ba 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -28,6 +28,7 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { for _, policy := range options.Config.Policies { for _, route := range policy.Routes { + reverseProxy.logger.Debug().Str("fwd: ", route.Endpoint) uri, err := url.Parse(route.Backend) if err != nil { reverseProxy.logger. From b0e8dbba8546de3722b8bfc0999c721fefe325bd Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 10:10:40 +0100 Subject: [PATCH 046/213] remove mapstructure from config directives --- pkg/config/config.go | 12 ++++++------ pkg/proxy/proxy.go | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 4048b63d06..eca858189c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -38,15 +38,15 @@ type Asset struct { // Policy enables us to use multiple directors. type Policy struct { - Name string `mapstructure:"name"` - Routes []Route `mapstructure:"routes"` + Name string + Routes []Route } // Route define forwarding routes type Route struct { - Endpoint string `mapstructure:"endpoint"` - Backend string `mapstructure:"backend"` - ApacheVHost bool `mapstructure:"apache-vhost"` + Endpoint string + Backend string + ApacheVHost bool `mapstructure:"apache-vhost"` } // Config combines all available configuration parts. @@ -57,7 +57,7 @@ type Config struct { HTTP HTTP Tracing Tracing Asset Asset - Policies []Policy `mapstructure:"policies"` + Policies []Policy } // New initializes a new configuration diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 766129b5ba..db30b49175 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -26,6 +26,10 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { logger: options.Logger, } + if options.Config.Policies == nil { + reverseProxy.logger.Debug().Msg("config file not provided") + } + for _, policy := range options.Config.Policies { for _, route := range policy.Routes { reverseProxy.logger.Debug().Str("fwd: ", route.Endpoint) From 52b81a86055d2f06e26c7d73dcc58537f1654f2a Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 10:45:22 +0100 Subject: [PATCH 047/213] add default runtime redirects --- pkg/proxy/proxy.go | 88 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index db30b49175..6e648665d5 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -27,7 +27,8 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { } if options.Config.Policies == nil { - reverseProxy.logger.Debug().Msg("config file not provided") + reverseProxy.logger.Debug().Msg("config file not provided, using oCIS embedded set of redirects") + options.Config.Policies = defaultPolicies() } for _, policy := range options.Config.Policies { @@ -74,6 +75,8 @@ func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt confi p.Directors[policy][rt.Endpoint] = func(req *http.Request) { req.URL.Scheme = target.Scheme req.URL.Host = target.Host + // Apache deployments host addresses need to match on req.Host and req.URL.Host + // see https://stackoverflow.com/questions/34745654/golang-reverseproxy-with-apache2-sni-hostname-error if rt.ApacheVHost { req.Host = target.Host } @@ -123,3 +126,86 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request // Call upstream ServeHTTP p.ReverseProxy.ServeHTTP(w, r) } + +func defaultPolicies() []config.Policy { + return []config.Policy{ + config.Policy{ + Name: "reva", + Routes: []config.Route{ + config.Route{ + Endpoint: "/", + Backend: "http://localhost:9100", + }, + config.Route{ + Endpoint: "/.well-known/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/konnect/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/signin/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/ocs/", + Backend: "http://localhost:9140", + }, + config.Route{ + Endpoint: "/remote.php/", + Backend: "http://localhost:9140", + }, + config.Route{ + Endpoint: "/dav/", + Backend: "http://localhost:9140", + }, + config.Route{ + Endpoint: "/webdav/", + Backend: "http://localhost:9140", + }, + }, + }, + config.Policy{ + Name: "oc10", + Routes: []config.Route{ + config.Route{ + Endpoint: "/", + Backend: "http://localhost:9100", + }, + config.Route{ + Endpoint: "/.well-known/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/konnect/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/signin/", + Backend: "http://localhost:9130", + }, + config.Route{ + Endpoint: "/ocs/", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, + config.Route{ + Endpoint: "/remote.php/", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, + config.Route{ + Endpoint: "/dav/", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, + config.Route{ + Endpoint: "/webdav/", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, + }, + }, + } +} From ae8150dd5712ceec8b8d9cce39fd1a1a8aa0bed8 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 10:50:26 +0100 Subject: [PATCH 048/213] added logging info --- pkg/proxy/proxy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 6e648665d5..e983a561d9 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -27,8 +27,10 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { } if options.Config.Policies == nil { - reverseProxy.logger.Debug().Msg("config file not provided, using oCIS embedded set of redirects") + reverseProxy.logger.Info().Str("policies source", "runtime").Msg("policies provided at runtime") options.Config.Policies = defaultPolicies() + } else { + reverseProxy.logger.Info().Str("policies source", "config file").Msg("policies provided from config file") } for _, policy := range options.Config.Policies { From 747e345b0880fb03c0cd553b4e4437c325b1f7bf Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 10:53:38 +0100 Subject: [PATCH 049/213] rename reverseproxy -> rp --- pkg/proxy/proxy.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index e983a561d9..e8528a9dd3 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -21,39 +21,39 @@ type MultiHostReverseProxy struct { func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { options := newOptions(opts...) - reverseProxy := &MultiHostReverseProxy{ + rp := &MultiHostReverseProxy{ Directors: make(map[string]map[string]func(req *http.Request)), logger: options.Logger, } if options.Config.Policies == nil { - reverseProxy.logger.Info().Str("policies source", "runtime").Msg("policies provided at runtime") + rp.logger.Info().Str("source", "runtime").Msg("Policies") options.Config.Policies = defaultPolicies() } else { - reverseProxy.logger.Info().Str("policies source", "config file").Msg("policies provided from config file") + rp.logger.Info().Str("source", "file").Msg("Policies") } for _, policy := range options.Config.Policies { for _, route := range policy.Routes { - reverseProxy.logger.Debug().Str("fwd: ", route.Endpoint) + rp.logger.Debug().Str("fwd: ", route.Endpoint) uri, err := url.Parse(route.Backend) if err != nil { - reverseProxy.logger. + rp.logger. Fatal(). Err(err). Msgf("malformed url: %v", route.Backend) } - reverseProxy.logger. + rp.logger. Debug(). Interface("route", route). Msg("adding route") - reverseProxy.AddHost(policy.Name, uri, route) + rp.AddHost(policy.Name, uri, route) } } - return reverseProxy + return rp } func singleJoiningSlash(a, b string) string { From e1d0d0715be14e42447a488795d051d25428d490 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 11:14:13 +0100 Subject: [PATCH 050/213] add changelog --- changelog/unreleased/runtime-policies.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/unreleased/runtime-policies.md diff --git a/changelog/unreleased/runtime-policies.md b/changelog/unreleased/runtime-policies.md new file mode 100644 index 0000000000..8eaaa0135b --- /dev/null +++ b/changelog/unreleased/runtime-policies.md @@ -0,0 +1,7 @@ +Enhancement: Load Proxy Policies at Runtime + +While a proxy without policies is of no use, the current state of ocis-proxy expects a config file either at an expected Viper location or specified via -- config-file flag. +To ease deployments and ensure a working set of policies out of the box we need a series of defaults. + +https://github.com/owncloud/ocis-proxy/issues/17 +https://github.com/owncloud/ocis-proxy/pull/16 From 6d47bb809a68a2daa8d6ef79ad41b3c315fe19c8 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 18 Mar 2020 11:17:33 +0000 Subject: [PATCH 051/213] Automated changelog update [skip ci] --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c84eb551d3..521002a346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Summary * Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis-proxy/issues/1) +* Enhancement - Load Proxy Policies at Runtime: [#17](https://github.com/owncloud/ocis-proxy/issues/17) ## Details @@ -12,3 +13,13 @@ https://github.com/owncloud/ocis-proxy/issues/1 + +* Enhancement - Load Proxy Policies at Runtime: [#17](https://github.com/owncloud/ocis-proxy/issues/17) + + While a proxy without policies is of no use, the current state of ocis-proxy expects a config + file either at an expected Viper location or specified via -- config-file flag. To ease + deployments and ensure a working set of policies out of the box we need a series of defaults. + + https://github.com/owncloud/ocis-proxy/issues/17 + https://github.com/owncloud/ocis-proxy/pull/16 + From 52ebfc7c022205d48673c3774a4c0f1d0244c83d Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 18 Mar 2020 15:35:56 +0100 Subject: [PATCH 052/213] Release 0.1.0 --- changelog/{unreleased => 0.1.0_2020-03-18}/inital-release | 0 changelog/{unreleased => 0.1.0_2020-03-18}/runtime-policies.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.1.0_2020-03-18}/inital-release (100%) rename changelog/{unreleased => 0.1.0_2020-03-18}/runtime-policies.md (100%) diff --git a/changelog/unreleased/inital-release b/changelog/0.1.0_2020-03-18/inital-release similarity index 100% rename from changelog/unreleased/inital-release rename to changelog/0.1.0_2020-03-18/inital-release diff --git a/changelog/unreleased/runtime-policies.md b/changelog/0.1.0_2020-03-18/runtime-policies.md similarity index 100% rename from changelog/unreleased/runtime-policies.md rename to changelog/0.1.0_2020-03-18/runtime-policies.md From 5888e10e0c338fc245c120dba5703ac1290e21cd Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 18 Mar 2020 14:52:42 +0000 Subject: [PATCH 053/213] Automated changelog update [skip ci] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 521002a346..1437fc6bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changes in unreleased +# Changes in 0.1.0 ## Summary From 60a1e6a14363c20a2d39998e513595ed19e47ad6 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 20 Mar 2020 17:00:46 +0100 Subject: [PATCH 054/213] Proxy client urls in default configuration #19 --- changelog/unreleased/client-urls.md | 5 +++++ config/proxy-example.json | 16 ++++++++++++++++ pkg/proxy/proxy.go | 18 ++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 changelog/unreleased/client-urls.md diff --git a/changelog/unreleased/client-urls.md b/changelog/unreleased/client-urls.md new file mode 100644 index 0000000000..47e74ce8a7 --- /dev/null +++ b/changelog/unreleased/client-urls.md @@ -0,0 +1,5 @@ +Enhancement: Proxy client urls in default configuration + +Proxy /status.php and index.php/* + +https://github.com/owncloud/ocis-proxy/issues/19 diff --git a/config/proxy-example.json b/config/proxy-example.json index be74c6fa93..1d101bd443 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -37,6 +37,14 @@ { "endpoint": "/webdav/", "backend": "http://localhost:9140" + }, + { + "endpoint": "/status.php", + "backend": "http://localhost:9140" + }, + { + "endpoint": "/index.php/", + "backend": "http://localhost:9140" } ] }, @@ -78,6 +86,14 @@ "endpoint": "/webdav/", "backend": "https://demo.owncloud.com", "apache-vhost": true + }, + { + "endpoint": "/status.php", + "backend": "https://demo.owncloud.com" + }, + { + "endpoint": "/index.php/", + "backend": "https://demo.owncloud.com" } ] } diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index e8528a9dd3..b644820362 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -166,6 +166,14 @@ func defaultPolicies() []config.Policy { Endpoint: "/webdav/", Backend: "http://localhost:9140", }, + config.Route{ + Endpoint: "/status.php", + Backend: "http://localhost:9140", + }, + config.Route{ + Endpoint: "/index.php/", + Backend: "http://localhost:9140", + }, }, }, config.Policy{ @@ -207,6 +215,16 @@ func defaultPolicies() []config.Policy { Backend: "https://demo.owncloud.com", ApacheVHost: true, }, + config.Route{ + Endpoint: "/status.php", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, + config.Route{ + Endpoint: "/index.php/", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, }, }, } From b04f1f9e3682e169fcfbb8fa8e53cd5f0d139798 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Mon, 23 Mar 2020 12:05:29 +0000 Subject: [PATCH 055/213] Automated changelog update [skip ci] --- CHANGELOG.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1437fc6bde..625e7904ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,26 @@ -# Changes in 0.1.0 +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...master + +## Summary + +* Enhancement - Proxy client urls in default configuration: [#19](https://github.com/owncloud/ocis-proxy/issues/19) + +## Details + +* Enhancement - Proxy client urls in default configuration: [#19](https://github.com/owncloud/ocis-proxy/issues/19) + + Proxy /status.php and index.php/* + + https://github.com/owncloud/ocis-proxy/issues/19 + +# Changelog for [0.1.0] (2020-03-18) + +The following sections list the changes for ocis-proxy 0.1.0. + +[0.1.0]: https://github.com/owncloud/ocis-proxy/compare/500e303cb544ed93d84153f01219d77eeee44929...v0.1.0 ## Summary From 88e85e42d3e43b07582e031c0b183cc48edab500 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Mon, 23 Mar 2020 19:10:23 +0100 Subject: [PATCH 056/213] route requests based on pattern or query parameters --- changelog/unreleased/advanced-route-matching.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/advanced-route-matching.md diff --git a/changelog/unreleased/advanced-route-matching.md b/changelog/unreleased/advanced-route-matching.md new file mode 100644 index 0000000000..815add61f6 --- /dev/null +++ b/changelog/unreleased/advanced-route-matching.md @@ -0,0 +1,6 @@ +Change: Route requests based on regex or query parameters + +Some requests needed to be distinguished based on a pattern or a query parameter. +We've implemented the functionality to route requests based on different conditions. + +https://github.com/owncloud/ocis-proxy/issues/21 From a7187777476cbf974ac0ee7f3011ee3dda149cd6 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Mon, 23 Mar 2020 19:13:46 +0100 Subject: [PATCH 057/213] route requests based on pattern or query parameters --- pkg/config/config.go | 20 ++++++++++ pkg/proxy/proxy.go | 94 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 98 insertions(+), 16 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index eca858189c..426e705ba3 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -44,11 +44,31 @@ type Policy struct { // Route define forwarding routes type Route struct { + Type RouteType Endpoint string Backend string ApacheVHost bool `mapstructure:"apache-vhost"` } +// RouteType defines the type of a route +type RouteType string + +const ( + // PrefixRoute are routes matched by a prefix + PrefixRoute RouteType = "Prefix" + // QueryRoute are routes machted by a prefix and query parameters + QueryRoute RouteType = "Query" + // RegexRoute are routes matched by a pattern + RegexRoute RouteType = "Regex" + // DefaultRouteType is the PrefixRoute + DefaultRouteType RouteType = PrefixRoute +) + +var ( + // RouteTypes is an array of the available route types + RouteTypes []RouteType = []RouteType{QueryRoute, RegexRoute, PrefixRoute} +) + // Config combines all available configuration parts. type Config struct { File string diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index b644820362..b3fb92e485 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -4,6 +4,7 @@ import ( "net/http" "net/http/httputil" "net/url" + "regexp" "strings" "github.com/owncloud/ocis-pkg/v2/log" @@ -13,7 +14,7 @@ import ( // MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies type MultiHostReverseProxy struct { httputil.ReverseProxy - Directors map[string]map[string]func(req *http.Request) + Directors map[string]map[config.RouteType]map[string]func(req *http.Request) logger log.Logger } @@ -22,7 +23,7 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { options := newOptions(opts...) rp := &MultiHostReverseProxy{ - Directors: make(map[string]map[string]func(req *http.Request)), + Directors: make(map[string]map[config.RouteType]map[string]func(req *http.Request)), logger: options.Logger, } @@ -72,9 +73,16 @@ func singleJoiningSlash(a, b string) string { func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt config.Route) { targetQuery := target.RawQuery if p.Directors[policy] == nil { - p.Directors[policy] = make(map[string]func(req *http.Request)) + p.Directors[policy] = make(map[config.RouteType]map[string]func(req *http.Request)) } - p.Directors[policy][rt.Endpoint] = func(req *http.Request) { + routeType := config.DefaultRouteType + if rt.Type != "" { + routeType = rt.Type + } + if p.Directors[policy][routeType] == nil { + p.Directors[policy][routeType] = make(map[string]func(req *http.Request)) + } + p.Directors[policy][routeType][rt.Endpoint] = func(req *http.Request) { req.URL.Scheme = target.Scheme req.URL.Host = target.Host // Apache deployments host addresses need to match on req.Host and req.URL.Host @@ -107,28 +115,77 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request Msgf("policy %v is not configured", policy) } - for k := range p.Directors[policy] { - if strings.HasPrefix(r.URL.Path, k) && k != "/" { - p.Director = p.Directors[policy][k] - hit = true - p.logger. - Debug(). - Str("policy", policy). - Str("prefix", k). - Str("path", r.URL.Path). - Msg("director found") + for i := 0; i < len(config.RouteTypes) && !hit; i++ { + routeType := config.RouteTypes[i] + var handler func(string, url.URL) bool + switch routeType { + case config.QueryRoute: + handler = p.queryRouteHandler + case config.RegexRoute: + handler = p.regexRouteHandler + case config.PrefixRoute: + fallthrough + default: + handler = p.prefixRouteHandler + } + for endpoint := range p.Directors[policy][routeType] { + if handler(endpoint, *r.URL) { + p.Director = p.Directors[policy][routeType][endpoint] + hit = true + p.logger. + Info(). + Str("policy", policy). + Str("prefix", endpoint). + Str("path", r.URL.Path). + Str("routeType", string(routeType)). + Msg("director found") + break + } } } // override default director with root. If any - if !hit && p.Directors[policy]["/"] != nil { - p.Director = p.Directors[policy]["/"] + if !hit && p.Directors[policy][config.PrefixRoute]["/"] != nil { + p.Director = p.Directors[policy][config.PrefixRoute]["/"] } // Call upstream ServeHTTP p.ReverseProxy.ServeHTTP(w, r) } +func (p MultiHostReverseProxy) queryRouteHandler(endpoint string, target url.URL) bool { + u, _ := url.Parse(endpoint) + if strings.HasPrefix(target.Path, u.Path) && endpoint != "/" { + query := u.Query() + if len(query) != 0 { + rQuery := target.Query() + match := true + for k := range query { + v := query.Get(k) + rv := rQuery.Get(k) + if rv != v { + match = false + break + } + } + return match + } + } + return false +} + +func (p *MultiHostReverseProxy) regexRouteHandler(endpoint string, target url.URL) bool { + matched, err := regexp.MatchString(endpoint, target.String()) + if err != nil { + p.logger.Warn().Err(err).Msgf("regex with pattern %s failed", endpoint) + } + return matched +} + +func (p *MultiHostReverseProxy) prefixRouteHandler(endpoint string, target url.URL) bool { + return strings.HasPrefix(target.Path, endpoint) && endpoint != "/" +} + func defaultPolicies() []config.Policy { return []config.Policy{ config.Policy{ @@ -154,6 +211,11 @@ func defaultPolicies() []config.Policy { Endpoint: "/ocs/", Backend: "http://localhost:9140", }, + config.Route{ + Type: config.QueryRoute, + Endpoint: "/remote.php/?preview=1", + Backend: "http://localhost:9115", + }, config.Route{ Endpoint: "/remote.php/", Backend: "http://localhost:9140", From eb539bc78ed222149ba8ae1ce4da1d143f6e1c41 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 24 Mar 2020 10:42:47 +0100 Subject: [PATCH 058/213] implement review feedback --- pkg/config/config.go | 6 +++--- pkg/proxy/proxy.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 426e705ba3..f397c25ffa 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -55,11 +55,11 @@ type RouteType string const ( // PrefixRoute are routes matched by a prefix - PrefixRoute RouteType = "Prefix" + PrefixRoute RouteType = "prefix" // QueryRoute are routes machted by a prefix and query parameters - QueryRoute RouteType = "Query" + QueryRoute RouteType = "query" // RegexRoute are routes matched by a pattern - RegexRoute RouteType = "Regex" + RegexRoute RouteType = "regex" // DefaultRouteType is the PrefixRoute DefaultRouteType RouteType = PrefixRoute ) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index b3fb92e485..748105ceaa 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -120,20 +120,20 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request var handler func(string, url.URL) bool switch routeType { case config.QueryRoute: - handler = p.queryRouteHandler + handler = p.queryRouteMatcher case config.RegexRoute: - handler = p.regexRouteHandler + handler = p.regexRouteMatcher case config.PrefixRoute: fallthrough default: - handler = p.prefixRouteHandler + handler = p.prefixRouteMatcher } for endpoint := range p.Directors[policy][routeType] { if handler(endpoint, *r.URL) { p.Director = p.Directors[policy][routeType][endpoint] hit = true p.logger. - Info(). + Debug(). Str("policy", policy). Str("prefix", endpoint). Str("path", r.URL.Path). @@ -153,7 +153,7 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request p.ReverseProxy.ServeHTTP(w, r) } -func (p MultiHostReverseProxy) queryRouteHandler(endpoint string, target url.URL) bool { +func (p MultiHostReverseProxy) queryRouteMatcher(endpoint string, target url.URL) bool { u, _ := url.Parse(endpoint) if strings.HasPrefix(target.Path, u.Path) && endpoint != "/" { query := u.Query() @@ -174,7 +174,7 @@ func (p MultiHostReverseProxy) queryRouteHandler(endpoint string, target url.URL return false } -func (p *MultiHostReverseProxy) regexRouteHandler(endpoint string, target url.URL) bool { +func (p *MultiHostReverseProxy) regexRouteMatcher(endpoint string, target url.URL) bool { matched, err := regexp.MatchString(endpoint, target.String()) if err != nil { p.logger.Warn().Err(err).Msgf("regex with pattern %s failed", endpoint) @@ -182,7 +182,7 @@ func (p *MultiHostReverseProxy) regexRouteHandler(endpoint string, target url.UR return matched } -func (p *MultiHostReverseProxy) prefixRouteHandler(endpoint string, target url.URL) bool { +func (p *MultiHostReverseProxy) prefixRouteMatcher(endpoint string, target url.URL) bool { return strings.HasPrefix(target.Path, endpoint) && endpoint != "/" } From 1cd3f8936d765fcc13996a39e8c259decb52f234 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 24 Mar 2020 10:43:01 +0100 Subject: [PATCH 059/213] add unit tests --- pkg/proxy/proxy_test.go | 112 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 pkg/proxy/proxy_test.go diff --git a/pkg/proxy/proxy_test.go b/pkg/proxy/proxy_test.go new file mode 100644 index 0000000000..7a5d3d64bb --- /dev/null +++ b/pkg/proxy/proxy_test.go @@ -0,0 +1,112 @@ +package proxy + +import ( + "net/url" + "testing" + + "github.com/owncloud/ocis-proxy/pkg/config" +) + +func TestPrefixRouteMatcher(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar" + u, _ := url.Parse("/foobar/baz/some/url") + + matched := p.prefixRouteMatcher(endpoint, *u) + if !matched { + t.Errorf("Endpoint %s and URL %s should match", endpoint, u.String()) + } +} + +func TestQueryRouteMatcher(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar?parameter=true" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.queryRouteMatcher(endpoint, *u) + if !matched { + t.Errorf("Endpoint %s and URL %s should match", endpoint, u.String()) + } +} + +func TestQueryRouteMatcherWithoutParameters(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.queryRouteMatcher(endpoint, *u) + if matched { + t.Errorf("Endpoint %s and URL %s should not match", endpoint, u.String()) + } +} + +func TestQueryRouteMatcherWithDifferingParameters(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar?parameter=false" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.queryRouteMatcher(endpoint, *u) + if matched { + t.Errorf("Endpoint %s and URL %s should not match", endpoint, u.String()) + } +} + +func TestQueryRouteMatcherWithMultipleDifferingParameters(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar?parameter=false&other=true" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.queryRouteMatcher(endpoint, *u) + if matched { + t.Errorf("Endpoint %s and URL %s should not match", endpoint, u.String()) + } +} + +func TestQueryRouteMatcherWithMultipleParameters(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "/foobar?parameter=false&other=true" + u, _ := url.Parse("/foobar/baz/some/url?parameter=false&other=true") + + matched := p.queryRouteMatcher(endpoint, *u) + if !matched { + t.Errorf("Endpoint %s and URL %s should match", endpoint, u.String()) + } +} + +func TestRegexRouteMatcher(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := ".*some\\/url.*parameter=true" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.regexRouteMatcher(endpoint, *u) + if !matched { + t.Errorf("Endpoint %s and URL %s should match", endpoint, u.String()) + } +} + +func TestRegexRouteMatcherWithInvalidPattern(t *testing.T) { + cfg := config.New() + p := NewMultiHostReverseProxy(Config(cfg)) + + endpoint := "([\\])\\w+" + u, _ := url.Parse("/foobar/baz/some/url?parameter=true") + + matched := p.regexRouteMatcher(endpoint, *u) + if matched { + t.Errorf("Endpoint %s and URL %s should not match", endpoint, u.String()) + } +} From a86e745c75e22be9d0678c706808578b1a6005de Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 24 Mar 2020 10:55:09 +0100 Subject: [PATCH 060/213] use labeled break --- pkg/proxy/proxy.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 748105ceaa..3f21fbd9de 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -115,10 +115,10 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request Msgf("policy %v is not configured", policy) } - for i := 0; i < len(config.RouteTypes) && !hit; i++ { - routeType := config.RouteTypes[i] +Loop: + for _, rt := range config.RouteTypes { var handler func(string, url.URL) bool - switch routeType { + switch rt { case config.QueryRoute: handler = p.queryRouteMatcher case config.RegexRoute: @@ -128,18 +128,18 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request default: handler = p.prefixRouteMatcher } - for endpoint := range p.Directors[policy][routeType] { + for endpoint := range p.Directors[policy][rt] { if handler(endpoint, *r.URL) { - p.Director = p.Directors[policy][routeType][endpoint] + p.Director = p.Directors[policy][rt][endpoint] hit = true p.logger. Debug(). Str("policy", policy). Str("prefix", endpoint). Str("path", r.URL.Path). - Str("routeType", string(routeType)). + Str("routeType", string(rt)). Msg("director found") - break + break Loop } } } From 72d1497d1f89f1f55e476d1ee79cd4bb5d452b80 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 24 Mar 2020 10:04:30 +0000 Subject: [PATCH 061/213] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625e7904ad..b5d0b4371e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,19 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Change - Route requests based on regex or query parameters: [#21](https://github.com/owncloud/ocis-proxy/issues/21) * Enhancement - Proxy client urls in default configuration: [#19](https://github.com/owncloud/ocis-proxy/issues/19) ## Details +* Change - Route requests based on regex or query parameters: [#21](https://github.com/owncloud/ocis-proxy/issues/21) + + Some requests needed to be distinguished based on a pattern or a query parameter. We've + implemented the functionality to route requests based on different conditions. + + https://github.com/owncloud/ocis-proxy/issues/21 + + * Enhancement - Proxy client urls in default configuration: [#19](https://github.com/owncloud/ocis-proxy/issues/19) Proxy /status.php and index.php/* From 6e33472b40f463e9b62cb311904fbb5e9f81f183 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 13 Mar 2020 19:52:46 +0100 Subject: [PATCH 062/213] Make TLS-Certificate configurable Currently the proxy generates certificates on every start for dev purposes. This commit adds an option to make this behaviour configurable. This also removes the dependency on konnectd`s crypto code and copies it instead, as this library is a first version which is not meant for usage by other services. A proper cert-generation lib should be added to ocis-pkg instead. Then this code can be refactored to use it. --- changelog/unreleased/tls-cert-configurable.md | 5 + go.mod | 9 +- go.sum | 95 -------------- pkg/config/config.go | 2 + pkg/crypto/gencert.go | 123 ++++++++++++++++++ pkg/flagset/flagset.go | 14 ++ pkg/server/http/server.go | 38 ++++-- 7 files changed, 178 insertions(+), 108 deletions(-) create mode 100644 changelog/unreleased/tls-cert-configurable.md create mode 100644 pkg/crypto/gencert.go diff --git a/changelog/unreleased/tls-cert-configurable.md b/changelog/unreleased/tls-cert-configurable.md new file mode 100644 index 0000000000..4a419af713 --- /dev/null +++ b/changelog/unreleased/tls-cert-configurable.md @@ -0,0 +1,5 @@ +Enhancement: Make TLS-Cert configurable + +Before a generates certificates on every start was used for dev purposes. + +https://github.com/owncloud/ocis-proxy/pull/14 diff --git a/go.mod b/go.mod index 3b6df4a635..8c6d85ba10 100644 --- a/go.mod +++ b/go.mod @@ -6,16 +6,21 @@ require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 - github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 // indirect github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 - github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 github.com/owncloud/ocis-pkg/v2 v2.0.2 github.com/prometheus/client_golang v1.2.1 + github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 + github.com/spf13/afero v1.2.2 // indirect github.com/spf13/viper v1.6.2 go.opencensus.io v0.22.2 + golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect + golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect + golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect + gopkg.in/square/go-jose.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.2.7 // indirect ) diff --git a/go.sum b/go.sum index fa7efed081..850aed7e03 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/UnnoTed/fileb0x v1.1.4 h1:IUgFzgBipF/ujNx9wZgkrKOF3oltUuXMSoaejrBws+A= -github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ9cgOiZs= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= @@ -70,7 +68,6 @@ github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -78,8 +75,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= -github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= @@ -93,8 +88,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -117,7 +110,6 @@ github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -129,17 +121,13 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -159,7 +147,6 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eternnoir/gncp v0.0.0-20170707042257-c70df2d0cd68/go.mod h1:8FuQ7lU9ZvIJGvc04F/qblkjqIfBahAoEFV+XPxByGw= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -170,12 +157,9 @@ github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXR github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc= -github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= @@ -184,7 +168,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= github.com/go-log/log v0.1.0 h1:wudGTNsiGzrD5ZjgIkVZ517ugi2XRe9Q/xRCzwEO4/U= github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -197,8 +180,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -206,8 +187,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -221,7 +200,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20170622202551-6a1fa9404c0a/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -248,16 +226,11 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= @@ -291,7 +264,6 @@ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwP github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -311,11 +283,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= @@ -331,25 +300,18 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= -github.com/labstack/echo v3.2.1+incompatible h1:J2M7YArHx4gi8p/3fDw8tX19SXhBCoRpviyAZSN3I88= -github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= -github.com/labstack/gommon v0.2.7 h1:2qOPq/twXDrQ6ooBGrn3mrmVOC+biLlatwgIu8lbzRM= -github.com/labstack/gommon v0.2.7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= -github.com/longsleep/go-metrics v0.0.0-20170706183227-c1943bcf9047/go.mod h1:Eq9KjddJTZCHG0ja+SEJNp739Um4URrcBuccq3Ih/NI= -github.com/longsleep/go-metrics v0.0.0-20191013204616-cddea569b0ea/go.mod h1:w6QO1LBkVla70FZrrF6XcB0YN+jTEYugjkn3+6RYTSM= github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= github.com/lucas-clemente/quic-go v0.13.1 h1:CxtJTXQIh2aboCPk0M6vf530XOov6DZjVBiSE3nSj8s= github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lucas-clemente/quic-go v0.14.1 h1:c1aKoBZKOPA+49q96B1wGkibyPP0AxYh45WuAoq+87E= github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/marten-seemann/chacha20 v0.2.0 h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ= @@ -358,21 +320,13 @@ github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGD github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE= github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= @@ -403,9 +357,6 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= @@ -445,18 +396,13 @@ github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/Hzq github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= -github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= -github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= @@ -470,12 +416,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= -github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= -github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393 h1:JqnnJAVSnUB+2Lb20+DjNn553Rvvh1gsEqDfE8+ppK8= -github.com/owncloud/ocis-konnectd v0.0.0-20200303180152-937016f63393/go.mod h1:RSm/AcbZ+Wq608qRGW28Rp95ktn4Hxi9BvY2c9aj7lU= -github.com/owncloud/ocis-pkg/v2 v2.0.1 h1:3ISEtfjAz4pDFczTggIJwKuft3bVsAp1C7dFY9BBPEs= -github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/owncloud/ocis-pkg/v2 v2.0.2 h1:aHqvuRXMFsImO/uwL9v8Ul+PByPFLZp/Rdj4MXAhI9A= github.com/owncloud/ocis-pkg/v2 v2.0.2/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= @@ -495,7 +436,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -503,13 +443,11 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20170706130215-fb369f752a7f/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -517,7 +455,6 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/procfs v0.0.0-20170703101242-e645f4e5aaa8/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -536,12 +473,9 @@ github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= @@ -549,7 +483,6 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.3/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= @@ -569,17 +502,11 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= @@ -606,13 +533,8 @@ github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 h1:gKMu1Bf6QINDnvyZuTaACm9ofY+PRh+5vFz4oxBZeF8= -github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -648,10 +570,8 @@ go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20170711145318-dd85ac7e6a88/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -670,8 +590,6 @@ golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8sdVKV1m1WgU4/S5IRQAzc= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -699,7 +617,6 @@ golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -722,7 +639,6 @@ golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5 h1:bHNaocaoJxYBo5cw41UyTMLjYlb8wPY7+WFrnklbHOM= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= @@ -745,16 +661,13 @@ golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -791,7 +704,6 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -861,7 +773,6 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -869,7 +780,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= @@ -911,8 +821,3 @@ k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -stash.kopano.io/kc/konnect v0.28.1/go.mod h1:DtAxcWYgNwqm8c9p/U8kDSh2WCvLqcl22N2RQaMrqv8= -stash.kopano.io/kgol/kcc-go/v5 v5.0.1/go.mod h1:0ZmjWapy3zp+TAjZI6iCrcfh+BthZbB2WM1VfhDgNB4= -stash.kopano.io/kgol/ksurveyclient-go v0.6.0/go.mod h1:LJMDQBROS2oXxBN04eSI6j1KhgWlqMFd8xKjXV4Irtw= -stash.kopano.io/kgol/oidc-go v0.3.1/go.mod h1:roVKz8FVmPcdL4pUu+Gzk+GH2kOhz1UvnuMNTkjHyH8= -stash.kopano.io/kgol/rndm v1.1.0/go.mod h1:CBvpAHlOwyu/XipxfLGk02UN3K3P6hQ8E2JoTbNWfJU= diff --git a/pkg/config/config.go b/pkg/config/config.go index f397c25ffa..b0738a4e1a 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -20,6 +20,8 @@ type HTTP struct { Addr string Namespace string Root string + TLSCert string + TLSKey string } // Tracing defines the available tracing configuration. diff --git a/pkg/crypto/gencert.go b/pkg/crypto/gencert.go new file mode 100644 index 0000000000..e206605248 --- /dev/null +++ b/pkg/crypto/gencert.go @@ -0,0 +1,123 @@ +package crypto + +import ( + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "math/big" + "net" + "os" + "time" + + "github.com/owncloud/ocis-pkg/v2/log" +) + +func publicKey(priv interface{}) interface{} { + switch k := priv.(type) { + case *rsa.PrivateKey: + return &k.PublicKey + case *ecdsa.PrivateKey: + return &k.PublicKey + default: + return nil + } +} + +func pemBlockForKey(priv interface{}, l log.Logger) *pem.Block { + switch k := priv.(type) { + case *rsa.PrivateKey: + return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)} + case *ecdsa.PrivateKey: + b, err := x509.MarshalECPrivateKey(k) + if err != nil { + l.Fatal().Err(err).Msg("Unable to marshal ECDSA private key") + } + return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b} + default: + return nil + } +} + +// GenCert generates TLS-Certificates +func GenCert(l log.Logger) error { + var priv interface{} + var err error + + priv, err = rsa.GenerateKey(rand.Reader, 2048) + + if err != nil { + l.Fatal().Err(err).Msg("Failed to generate private key") + } + + notBefore := time.Now() + notAfter := notBefore.Add(24 * time.Hour * 365) + + serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) + serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) + if err != nil { + l.Fatal().Err(err).Msg("Failed to generate serial number") + } + + template := x509.Certificate{ + SerialNumber: serialNumber, + Subject: pkix.Name{ + Organization: []string{"Acme Corp"}, + CommonName: "OCIS", + }, + NotBefore: notBefore, + NotAfter: notAfter, + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + BasicConstraintsValid: true, + } + + hosts := []string{"127.0.0.1", "localhost"} + for _, h := range hosts { + if ip := net.ParseIP(h); ip != nil { + template.IPAddresses = append(template.IPAddresses, ip) + } else { + template.DNSNames = append(template.DNSNames, h) + } + } + + //template.IsCA = true + //template.KeyUsage |= x509.KeyUsageCertSign + + derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, publicKey(priv), priv) + if err != nil { + l.Fatal().Err(err).Msg("Failed to create certificate") + } + + certOut, err := os.Create("server.crt") + if err != nil { + l.Fatal().Err(err).Msg("Failed to open server.crt for writing") + } + err = pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}) + if err != nil { + l.Fatal().Err(err).Msg("Failed to encode certificate") + } + err = certOut.Close() + if err != nil { + l.Fatal().Err(err).Msg("Failed to write cert") + } + l.Info().Msg("Written server.crt") + + keyOut, err := os.OpenFile("server.key", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) + if err != nil { + l.Fatal().Err(err).Msg("Failed to open server.key for writing") + } + err = pem.Encode(keyOut, pemBlockForKey(priv, l)) + if err != nil { + l.Fatal().Err(err).Msg("Failed to encode key") + } + err = keyOut.Close() + if err != nil { + l.Fatal().Err(err).Msg("Failed to write key") + } + l.Info().Msg("Written server.key") + return nil +} diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 00c9d84cb0..c7b9c01ad0 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -143,5 +143,19 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_HTTP_NAMESPACE"}, Destination: &cfg.HTTP.Namespace, }, + &cli.StringFlag{ + Name: "transport-tls-cert", + Value: "", + Usage: "Certificate file for transport encryption", + EnvVars: []string{"PROXY_TRANSPORT_TLS_CERT"}, + Destination: &cfg.HTTP.TLSCert, + }, + &cli.StringFlag{ + Name: "transport-tls-key", + Value: "", + Usage: "Secret file for transport encryption", + EnvVars: []string{"PROXY_TRANSPORT_TLS_KEY"}, + Destination: &cfg.HTTP.TLSKey, + }, } } diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index f2fb343af0..376fc9183c 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -2,32 +2,46 @@ package http import ( "crypto/tls" - "os" - - occrypto "github.com/owncloud/ocis-konnectd/pkg/crypto" svc "github.com/owncloud/ocis-pkg/v2/service/http" + "github.com/owncloud/ocis-proxy/pkg/crypto" "github.com/owncloud/ocis-proxy/pkg/version" + "os" ) // Server initializes the http service and server. func Server(opts ...Option) (svc.Service, error) { options := newOptions(opts...) + l := options.Logger + httpCfg := options.Config.HTTP - // GenCert has side effects as it writes 2 files to the binary running location - occrypto.GenCert(options.Logger) + var cer tls.Certificate + var certErr error - cer, err := tls.LoadX509KeyPair("server.crt", "server.key") - if err != nil { - options.Logger.Fatal().Err(err).Msg("Could not setup TLS") + if httpCfg.TLSCert == "" || httpCfg.TLSKey == "" { + l.Warn().Msgf("No tls certificate provided, using a generated one") + + // GenCert has side effects as it writes 2 files to the binary running location + if err := crypto.GenCert(l); err != nil { + l.Fatal().Err(err).Msgf("Could not generate test-certificate") + } + + httpCfg.TLSKey = "server.crt" + httpCfg.TLSKey = "server.key" + } + + cer, certErr = tls.LoadX509KeyPair(httpCfg.TLSCert, httpCfg.TLSKey) + + if certErr != nil { + options.Logger.Fatal().Err(certErr).Msg("Could not setup TLS") os.Exit(1) } - config := &tls.Config{Certificates: []tls.Certificate{cer}} + tlsConfig := &tls.Config{Certificates: []tls.Certificate{cer}} service := svc.NewService( svc.Name("web.proxy"), svc.Handler(options.Handler), - svc.TLSConfig(config), + svc.TLSConfig(tlsConfig), svc.Logger(options.Logger), svc.Namespace(options.Namespace), svc.Version(version.String), @@ -36,7 +50,9 @@ func Server(opts ...Option) (svc.Service, error) { svc.Flags(options.Flags...), ) - service.Init() + if err := service.Init(); err != nil { + l.Fatal().Err(err).Msgf("Error initializing") + } return service, nil } From 76ce6402eb0074c1b88d360a8dd06d7a72c73b57 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 08:48:23 +0000 Subject: [PATCH 063/213] Automated changelog update [skip ci] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5d0b4371e..105ab3c1c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The following sections list the changes for ocis-proxy unreleased. * Change - Route requests based on regex or query parameters: [#21](https://github.com/owncloud/ocis-proxy/issues/21) * Enhancement - Proxy client urls in default configuration: [#19](https://github.com/owncloud/ocis-proxy/issues/19) +* Enhancement - Make TLS-Cert configurable: [#14](https://github.com/owncloud/ocis-proxy/pull/14) ## Details @@ -25,6 +26,13 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/issues/19 + +* Enhancement - Make TLS-Cert configurable: [#14](https://github.com/owncloud/ocis-proxy/pull/14) + + Before a generates certificates on every start was used for dev purposes. + + https://github.com/owncloud/ocis-proxy/pull/14 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 651650274abcb4064f9b55e2b52b98594e1af3fb Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 14:54:03 +0100 Subject: [PATCH 064/213] Prepare release 0.2.0 --- .../{unreleased => 0.2.0_2020-03-25}/advanced-route-matching.md | 0 changelog/{unreleased => 0.2.0_2020-03-25}/client-urls.md | 0 .../{unreleased => 0.2.0_2020-03-25}/tls-cert-configurable.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.2.0_2020-03-25}/advanced-route-matching.md (100%) rename changelog/{unreleased => 0.2.0_2020-03-25}/client-urls.md (100%) rename changelog/{unreleased => 0.2.0_2020-03-25}/tls-cert-configurable.md (100%) diff --git a/changelog/unreleased/advanced-route-matching.md b/changelog/0.2.0_2020-03-25/advanced-route-matching.md similarity index 100% rename from changelog/unreleased/advanced-route-matching.md rename to changelog/0.2.0_2020-03-25/advanced-route-matching.md diff --git a/changelog/unreleased/client-urls.md b/changelog/0.2.0_2020-03-25/client-urls.md similarity index 100% rename from changelog/unreleased/client-urls.md rename to changelog/0.2.0_2020-03-25/client-urls.md diff --git a/changelog/unreleased/tls-cert-configurable.md b/changelog/0.2.0_2020-03-25/tls-cert-configurable.md similarity index 100% rename from changelog/unreleased/tls-cert-configurable.md rename to changelog/0.2.0_2020-03-25/tls-cert-configurable.md From 8beb616d221e770d8b8a91c2b1b996287d9da5f0 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 25 Mar 2020 14:04:26 +0000 Subject: [PATCH 065/213] Automated changelog update [skip ci] --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 105ab3c1c2..a17807cd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.2.0] (2020-03-25) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.2.0. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...master +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary From 1aa2b1df0753fb6ff7940528e7fe4c573418d1f1 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 16:28:30 +0100 Subject: [PATCH 066/213] Fix TLS-Certificate not set correctly --- changelog/unreleased/fix-set-tls-cert-correctly.md | 3 +++ pkg/server/http/server.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-set-tls-cert-correctly.md diff --git a/changelog/unreleased/fix-set-tls-cert-correctly.md b/changelog/unreleased/fix-set-tls-cert-correctly.md new file mode 100644 index 0000000000..b3e48e1ed6 --- /dev/null +++ b/changelog/unreleased/fix-set-tls-cert-correctly.md @@ -0,0 +1,3 @@ +Bugfix: Set TLS-Certificate correctly + +https://github.com/owncloud/ocis-proxy/pull/25 diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 376fc9183c..b78082bc95 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -25,7 +25,7 @@ func Server(opts ...Option) (svc.Service, error) { l.Fatal().Err(err).Msgf("Could not generate test-certificate") } - httpCfg.TLSKey = "server.crt" + httpCfg.TLSCert = "server.crt" httpCfg.TLSKey = "server.key" } From b2a2e55ca47494b8a679e08049e05541e6f018a4 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 16:02:19 +0000 Subject: [PATCH 067/213] Automated changelog update [skip ci] --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a17807cd8f..09c1754089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. From be09ea99b537e7aa43485e155b9842209710fbd7 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 17:03:00 +0100 Subject: [PATCH 068/213] Prepare Release 0.2.1 --- .../fix-set-tls-cert-correctly.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.2.1_2020-03-25}/fix-set-tls-cert-correctly.md (100%) diff --git a/changelog/unreleased/fix-set-tls-cert-correctly.md b/changelog/0.2.1_2020-03-25/fix-set-tls-cert-correctly.md similarity index 100% rename from changelog/unreleased/fix-set-tls-cert-correctly.md rename to changelog/0.2.1_2020-03-25/fix-set-tls-cert-correctly.md From baa03421e15a7efb4b90e08e5e99810e7f23b1ea Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 25 Mar 2020 21:44:36 +0000 Subject: [PATCH 069/213] Automated changelog update [skip ci] --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c1754089..4625ba11e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.2.1] (2020-03-25) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.2.1. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 ## Summary From b20b05806ea590bbecf3b4d54d25bae0886ece0e Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 25 Mar 2020 21:17:20 +0100 Subject: [PATCH 070/213] Integrate oid-middleware This feature is required for user-based routing. --- changelog/unreleased/add-oidc.md | 8 +++ config/proxy-example-oidc.json | 107 +++++++++++++++++++++++++++++ go.mod | 3 +- pkg/command/server.go | 44 +++++++++--- pkg/config/config.go | 10 +++ pkg/middleware/openidconnect.go | 114 +++++++++++++++++++++++++++++++ pkg/server/http/option.go | 22 ++++-- pkg/server/http/server.go | 16 ++++- 8 files changed, 305 insertions(+), 19 deletions(-) create mode 100644 changelog/unreleased/add-oidc.md create mode 100644 config/proxy-example-oidc.json create mode 100644 pkg/middleware/openidconnect.go diff --git a/changelog/unreleased/add-oidc.md b/changelog/unreleased/add-oidc.md new file mode 100644 index 0000000000..d1a9684f6c --- /dev/null +++ b/changelog/unreleased/add-oidc.md @@ -0,0 +1,8 @@ +Enhancement: Configurable OpenID Connect client + +The proxy will try to authenticate every request with the configured OIDC provider. + +See configs/proxy-example.oidc.json for an example-configuration. + +https://github.com/owncloud/ocis-proxy/pull/27 + diff --git a/config/proxy-example-oidc.json b/config/proxy-example-oidc.json new file mode 100644 index 0000000000..a174894580 --- /dev/null +++ b/config/proxy-example-oidc.json @@ -0,0 +1,107 @@ +{ + "HTTP": { + "Namespace": "com.owncloud" + }, + "oidc": { + "endpoint": "https://localhost:9200", + "realm": "", + "signing_algs": ["RS256", "PS256"], + "insecure": true + }, + "policies": [ + { + "name": "reva", + "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" + }, + { + "endpoint": "/ocs/", + "backend": "http://localhost:9140" + }, + { + "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" + } + ] + }, + { + "name": "oc10", + "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" + }, + { + "endpoint": "/ocs/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/remote.php/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/dav/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/webdav/", + "backend": "https://demo.owncloud.com", + "apache-vhost": true + }, + { + "endpoint": "/status.php", + "backend": "https://demo.owncloud.com" + }, + { + "endpoint": "/index.php/", + "backend": "https://demo.owncloud.com" + } + ] + } + ] +} diff --git a/go.mod b/go.mod index 8c6d85ba10..aa601ed278 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 + github.com/coreos/go-oidc v2.1.0+incompatible github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect github.com/oklog/run v1.1.0 @@ -18,7 +19,7 @@ require ( github.com/spf13/viper v1.6.2 go.opencensus.io v0.22.2 golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect - golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect + golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect diff --git a/pkg/command/server.go b/pkg/command/server.go index a40f146dbc..3ea351d0c4 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,6 +2,10 @@ package command import ( "context" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/middleware" + "net/http" "os" "os/signal" "strings" @@ -19,7 +23,7 @@ import ( "github.com/owncloud/ocis-proxy/pkg/metrics" "github.com/owncloud/ocis-proxy/pkg/proxy" "github.com/owncloud/ocis-proxy/pkg/server/debug" - "github.com/owncloud/ocis-proxy/pkg/server/http" + proxyHTTP "github.com/owncloud/ocis-proxy/pkg/server/http" "go.opencensus.io/stats/view" "go.opencensus.io/trace" ) @@ -141,15 +145,16 @@ func Server(cfg *config.Config) *cli.Command { ) { - server, err := http.Server( - http.Handler(rp), - http.Logger(logger), - http.Namespace(httpNamespace), - http.Context(ctx), - http.Config(cfg), - http.Metrics(metrics), - http.Flags(flagset.RootWithConfig(config.New())), - http.Flags(flagset.ServerWithConfig(config.New())), + server, err := proxyHTTP.Server( + proxyHTTP.Handler(rp), + proxyHTTP.Logger(logger), + proxyHTTP.Namespace(httpNamespace), + proxyHTTP.Context(ctx), + proxyHTTP.Config(cfg), + proxyHTTP.Metrics(metrics), + proxyHTTP.Flags(flagset.RootWithConfig(config.New())), + proxyHTTP.Flags(flagset.ServerWithConfig(config.New())), + proxyHTTP.Middlewares(loadMiddlewares(cfg, logger)...), ) if err != nil { @@ -228,3 +233,22 @@ func Server(cfg *config.Config) *cli.Command { }, } } + +func loadMiddlewares(cfg *config.Config, l log.Logger) []func(handler http.Handler) http.Handler { + var configuredMiddlewares = make([]func(handler http.Handler) http.Handler, 0) + if cfg.OIDC != nil { + l.Info().Msg("Loading OIDC-Middleware") + l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") + oidcMW := middleware.OpenIDConnect( + oidc.Endpoint(cfg.OIDC.Endpoint), + oidc.Insecure(cfg.OIDC.Insecure), + oidc.Realm(cfg.OIDC.Realm), + oidc.SigningAlgs(cfg.OIDC.SigningAlgs), + oidc.Logger(l), + ) + + configuredMiddlewares = append(configuredMiddlewares, oidcMW) + } + + return configuredMiddlewares +} diff --git a/pkg/config/config.go b/pkg/config/config.go index b0738a4e1a..6750fb716c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -80,6 +80,16 @@ type Config struct { Tracing Tracing Asset Asset Policies []Policy + OIDC *OIDC +} + +// OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request +// with the configured oidc-provider +type OIDC struct { + Endpoint string + Realm string + SigningAlgs []string + Insecure bool } // New initializes a new configuration diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go new file mode 100644 index 0000000000..0e6d0dfbe9 --- /dev/null +++ b/pkg/middleware/openidconnect.go @@ -0,0 +1,114 @@ +package middleware + +import ( + "context" + "crypto/tls" + "errors" + "net/http" + "strings" + "time" + + oidc "github.com/coreos/go-oidc" + ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "golang.org/x/oauth2" +) + +var ( + // ErrInvalidToken is returned when the request token is invalid. + ErrInvalidToken = errors.New("invalid or missing token") +) + +// newOIDCOptions initializes the available default options. +func newOIDCOptions(opts ...ocisoidc.Option) ocisoidc.Options { + opt := ocisoidc.Options{} + + for _, o := range opts { + o(&opt) + } + + return opt +} + +// OpenIDConnect provides a middleware to check access secured by a static token. +func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler { + opt := newOIDCOptions(opts...) + + // set defaults + if opt.Realm == "" { + opt.Realm = opt.Endpoint + } + if len(opt.SigningAlgs) < 1 { + opt.SigningAlgs = []string{"RS256", "PS256"} + } + + var oidcProvider *oidc.Provider + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + header := r.Header.Get("Authorization") + path := r.URL.Path + + // Ignore request to "/konnect/v1/userinfo" as this will cause endless loop when getting userinfo + // needs a better idea on how to not hardcode this + if header == "" || !strings.HasPrefix(header, "Bearer ") || path == "/konnect/v1/userinfo" { + next.ServeHTTP(w, r) + return + } + + token := header[7:] + customHTTPClient := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: opt.Insecure, + }, + }, + Timeout: time.Second * 10, + } + + customCtx := context.WithValue(r.Context(), oauth2.HTTPClient, customHTTPClient) + + // use cached provider + if oidcProvider == nil { + // Initialize a provider by specifying the issuer URL. + // provider needs to be cached as when it is created + // it will fetch the keys from the issuer using the .well-known + // endpoint + provider, err := oidc.NewProvider(customCtx, opt.Endpoint) + if err != nil { + opt.Logger.Error().Err(err).Msg("could not initialize oidc provider") + w.WriteHeader(http.StatusInternalServerError) + return + } + oidcProvider = provider + } + + // The claims we want to have + var claims ocisoidc.StandardClaims + + // TODO cache userinfo for access token if we can determine the expiry (which works in case it is a jwt based access token) + oauth2Token := &oauth2.Token{ + AccessToken: token, + } + userInfo, err := oidcProvider.UserInfo(customCtx, oauth2.StaticTokenSource(oauth2Token)) + if err != nil { + opt.Logger.Error().Err(err).Str("token", token).Msg("Failed to get userinfo") + http.Error(w, ErrInvalidToken.Error(), http.StatusUnauthorized) + return + } + + // parse claims + if err := userInfo.Claims(&claims); err != nil { + opt.Logger.Error().Err(err).Interface("userinfo", userInfo).Msg("failed to unmarshal userinfo claims") + w.WriteHeader(http.StatusInternalServerError) + return + } + + opt.Logger.Debug().Interface("claims", claims).Interface("userInfo", userInfo).Msg("unmarshalled userinfo") + // store claims in context + // uses the original context, not the one with probably reduced security + nr := r.WithContext(ocisoidc.NewContext(r.Context(), &claims)) + + next.ServeHTTP(w, nr) + }) + } +} diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go index b665d95c89..46edc1aef0 100644 --- a/pkg/server/http/option.go +++ b/pkg/server/http/option.go @@ -15,13 +15,14 @@ type Option func(o *Options) // Options defines the available options for this package. type Options struct { - Logger log.Logger - Context context.Context - Config *config.Config - Handler http.Handler - Metrics *metrics.Metrics - Flags []cli.Flag - Namespace string + Logger log.Logger + Context context.Context + Config *config.Config + Handler http.Handler + Metrics *metrics.Metrics + Flags []cli.Flag + Namespace string + Middlewares []func(handler http.Handler) http.Handler } // newOptions initializes the available default options. @@ -83,3 +84,10 @@ func Handler(h http.Handler) Option { o.Handler = h } } + +// Middlewares provides a function to register middlewares +func Middlewares(val ...func(handler http.Handler) http.Handler) Option { + return func(o *Options) { + o.Middlewares = val + } +} diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index b78082bc95..3fd022e502 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -5,6 +5,7 @@ import ( svc "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-proxy/pkg/crypto" "github.com/owncloud/ocis-proxy/pkg/version" + "net/http" "os" ) @@ -40,7 +41,6 @@ func Server(opts ...Option) (svc.Service, error) { service := svc.NewService( svc.Name("web.proxy"), - svc.Handler(options.Handler), svc.TLSConfig(tlsConfig), svc.Logger(options.Logger), svc.Namespace(options.Namespace), @@ -48,6 +48,11 @@ func Server(opts ...Option) (svc.Service, error) { svc.Address(options.Config.HTTP.Addr), svc.Context(options.Context), svc.Flags(options.Flags...), + svc.Handler(applyMiddlewares( + options.Handler, + options.Middlewares..., + ), + ), ) if err := service.Init(); err != nil { @@ -56,3 +61,12 @@ func Server(opts ...Option) (svc.Service, error) { return service, nil } + +func applyMiddlewares(h http.Handler, mws ...func(handler http.Handler) http.Handler) http.Handler { + var han = h + for _, mw := range mws { + han = mw(han) + } + + return han +} From 112552af1d461a1e4713d37ac6875a6d25db984f Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Thu, 26 Mar 2020 08:48:48 +0000 Subject: [PATCH 071/213] Automated changelog update [skip ci] --- CHANGELOG.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4625ba11e6..015721ef60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,28 @@ -# Changelog for [0.2.1] (2020-03-25) +# Changelog for [unreleased] (UNRELEASED) -The following sections list the changes for ocis-proxy 0.2.1. +The following sections list the changes for ocis-proxy unreleased. -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master ## Summary -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) +* Enhancement - Configurable OpenID Connect client: [#27](https://github.com/owncloud/ocis-proxy/pull/27) ## Details -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) +* Enhancement - Configurable OpenID Connect client: [#27](https://github.com/owncloud/ocis-proxy/pull/27) - https://github.com/owncloud/ocis-proxy/pull/25 + The proxy will try to authenticate every request with the configured OIDC provider. + + See configs/proxy-example.oidc.json for an example-configuration. + + https://github.com/owncloud/ocis-proxy/pull/27 # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -49,6 +53,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From c5239428998e207f22423cb61480f5d359473220 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Thu, 26 Mar 2020 23:45:30 +0100 Subject: [PATCH 072/213] User based routing Implements a configurable "migration" policy-selector which reads the preferred_username attribute from the oidc claims and checks if the uid exists in the ocis-accounts service. A configurable policy-name can be selected based on the outcome of the check. --- changelog/unreleased/policy_selectors.md | 10 + ...oidc.json => proxy-example-migration.json} | 7 + config/proxy-example.json | 3 + go.mod | 5 +- go.sum | 293 ++++++++++++++++++ pkg/config/config.go | 35 ++- pkg/proxy/policy/selector.go | 112 +++++++ pkg/proxy/policy/selector_test.go | 127 ++++++++ pkg/proxy/proxy.go | 99 +++--- 9 files changed, 644 insertions(+), 47 deletions(-) create mode 100644 changelog/unreleased/policy_selectors.md rename config/{proxy-example-oidc.json => proxy-example-migration.json} (93%) create mode 100644 pkg/proxy/policy/selector.go create mode 100644 pkg/proxy/policy/selector_test.go diff --git a/changelog/unreleased/policy_selectors.md b/changelog/unreleased/policy_selectors.md new file mode 100644 index 0000000000..31b78946f7 --- /dev/null +++ b/changelog/unreleased/policy_selectors.md @@ -0,0 +1,10 @@ +Enhancement: Add policy selectors + +"Static-Policy" can be configured to always select a specific policy. +See: config/proxy-example.json. + +"Migration-Policy" selects policy depending on existence of the uid in the ocis-accounts service. +See: config/proxy-example-migration.json + +https://github.com/owncloud/ocis-proxy/issues/4 + diff --git a/config/proxy-example-oidc.json b/config/proxy-example-migration.json similarity index 93% rename from config/proxy-example-oidc.json rename to config/proxy-example-migration.json index a174894580..efeb71bad2 100644 --- a/config/proxy-example-oidc.json +++ b/config/proxy-example-migration.json @@ -8,6 +8,13 @@ "signing_algs": ["RS256", "PS256"], "insecure": true }, + "policy_selector": { + "migration": { + "acc_found_policy" : "reva", + "acc_not_found_policy": "oc10", + "unauthenticated_policy": "oc10" + } + }, "policies": [ { "name": "reva", diff --git a/config/proxy-example.json b/config/proxy-example.json index 1d101bd443..e8de52cd85 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -2,6 +2,9 @@ "HTTP": { "Namespace": "com.owncloud" }, + "policy_selector": { + "static": {"policy" : "reva"} + }, "policies": [ { "name": "reva", diff --git a/go.mod b/go.mod index aa601ed278..63fde24f50 100644 --- a/go.mod +++ b/go.mod @@ -7,15 +7,16 @@ require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.1.0+incompatible + github.com/golang/protobuf v1.3.2 github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c - github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e // indirect + github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 + github.com/owncloud/ocis-accounts v0.1.0 github.com/owncloud/ocis-pkg/v2 v2.0.2 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 - github.com/spf13/afero v1.2.2 // indirect github.com/spf13/viper v1.6.2 go.opencensus.io v0.22.2 golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect diff --git a/go.sum b/go.sum index 850aed7e03..3c97f0f372 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -10,16 +11,29 @@ cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbf cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk= contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= +contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/ocagent v0.6.0 h1:Z1n6UAyr0QwM284yUuh5Zd8JlvxUGAhFZcgMJkMPrGM= contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= +contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc= +contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= +contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= +github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-pipeline-go v0.1.9/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= +github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v12.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw= github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= @@ -35,6 +49,8 @@ github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvd github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= @@ -45,10 +61,18 @@ github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jB github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ9cgOiZs= +github.com/abbot/go-http-auth v0.4.1-0.20181019201920-860ed7f246ff/go.mod h1:Cz6ARTIzApMJDzh5bRMSUou6UMSp0IEXg9km/ci7TJM= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= @@ -59,39 +83,68 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190808125512-07798873deee/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= +github.com/anacrolix/envpprof v1.0.0/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= +github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= +github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= +github.com/anacrolix/missinggo/perf v1.0.0/go.mod h1:ljAFWkBuzkO12MQclXzZrosP5urunoLS0Cbvb4V0uMQ= +github.com/anacrolix/sync v0.2.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= +github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= +github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572/go.mod h1:MDwc+vsGEq7RMw6lr2GKOEqjWny5hO5OZXRVNaBJ2Dk= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g= +github.com/asim/go-awsxray v0.0.0-20161209120537-0d8a60b6e205/go.mod h1:frVmN4PtXUuL1EbZn0uL4PHSTKNKFnbMpBIhngqMuNQ= +github.com/asim/go-bson v0.0.0-20160318195205-84522947cabd/go.mod h1:L59ZX7HuzTbNzFBt8g3SJkRraj+GBOgvLAfJYJUcQ5w= +github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.31/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= +github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.1/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/reflex v0.2.0/go.mod h1:ooqOLJ4algvHP/oYvKWfWJ9tFUzCLDk5qkIJduMYrgI= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= +github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -124,10 +177,12 @@ github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMEl github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= +github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -139,47 +194,77 @@ github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c/go.mod h1:pFdJbAhRf7rh6YYMUdIQGyzne6zYL1tCUW8QV2B3UfY= +github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA= github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-log/log v0.1.0 h1:wudGTNsiGzrD5ZjgIkVZ517ugi2XRe9Q/xRCzwEO4/U= github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-redsync/redsync v1.3.1/go.mod h1:qxZwM5JOimfq8y98Wk2+c8dKtxJgG5/yIl2ODz2E5Dk= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stomp/stomp v2.0.3+incompatible/go.mod h1:VqCtqNZv1226A1/79yh+rMiFUcfY3R109np+7ke4n0c= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -187,9 +272,12 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= @@ -200,12 +288,16 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -213,19 +305,32 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= +github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= +github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -243,33 +348,71 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.4 h1:5xLhQjsk4zqPf9EHCrja2qFZMx+yBqkO3XgJ14bNnU0= github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= +github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw= +github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -278,14 +421,20 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= +github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -300,8 +449,11 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.2.7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= @@ -314,14 +466,21 @@ github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgV github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/chacha20 v0.2.0 h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ= github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= @@ -337,28 +496,42 @@ github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOt github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c h1:oohy8v2QQeXfDe9/BaM0b+5wETzoMiemOs3fhPhnFTg= github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM= +github.com/micro/go-micro v1.17.1/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E= github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= github.com/micro/go-micro/v2 v2.0.0 h1:bMx549RwJ9Yuiui8cDVlfYhVNP8I8KBJTMyLthEXpRw= github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= +github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= +github.com/micro/micro v1.16.0/go.mod h1:TO5Ng0KidbfRYIxVM4Q3deZ0A+qwRyP9WeXp+k2fWNA= github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22 h1:Jm64b3bO9kP43ddLjL2EY3Io6bmy1qGb9Xxz6TqS6rc= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= @@ -366,11 +539,15 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= github.com/nats-io/jwt v0.3.0 h1:xdnzwFETV++jNc4W1mw//qFyJGb2ABOombmZJQS4+Qo= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -389,6 +566,7 @@ github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= @@ -396,13 +574,22 @@ github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/Hzq github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= +github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito= +github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= @@ -417,25 +604,40 @@ github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= +github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= +github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8= +github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= +github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= +github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/owncloud/ocis-pkg/v2 v2.0.2 h1:aHqvuRXMFsImO/uwL9v8Ul+PByPFLZp/Rdj4MXAhI9A= github.com/owncloud/ocis-pkg/v2 v2.0.2/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -473,13 +675,21 @@ github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -490,11 +700,14 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= +github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -504,25 +717,33 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -535,19 +756,26 @@ github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMW github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= +github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -563,6 +791,7 @@ go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= +go.uber.org/ratelimit v0.1.0/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -570,8 +799,12 @@ go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +gocloud.dev v0.17.0/go.mod h1:tIHTRdR1V5dlD8sTkzYdTGizBJ314BDykJ8KmadEXwo= +gocloud.dev/pubsub/rabbitpubsub v0.17.0/go.mod h1:7o1XYDiIC+b0mmcwJuofsDg08t0DtU2ubfn7C/Uz7Y0= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -579,6 +812,7 @@ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -613,11 +847,15 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -630,21 +868,27 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5 h1:bHNaocaoJxYBo5cw41UyTMLjYlb8wPY7+WFrnklbHOM= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= @@ -657,17 +901,23 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEha golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -677,11 +927,13 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -691,8 +943,10 @@ golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -704,12 +958,15 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -733,9 +990,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -746,9 +1006,13 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -759,6 +1023,7 @@ google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1 h1:aQktFqmDE2yjveX google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba h1:pRj9OXZbwNtbtZtOB4dLwfK4u+EVRMvP+e9zKkg2grM= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -773,22 +1038,38 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= +gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= +gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= @@ -817,7 +1098,19 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= +k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= +k8s.io/apimachinery v0.0.0-20191111054156-6eb29fdf75dc/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/config/config.go b/pkg/config/config.go index 6750fb716c..2518793aef 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -73,14 +73,15 @@ var ( // Config combines all available configuration parts. type Config struct { - File string - Log Log - Debug Debug - HTTP HTTP - Tracing Tracing - Asset Asset - Policies []Policy - OIDC *OIDC + File string + Log Log + Debug Debug + HTTP HTTP + Tracing Tracing + Asset Asset + Policies []Policy + OIDC *OIDC + PolicySelector *PolicySelector `mapstructure:"policy_selector"` } // OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request @@ -92,6 +93,24 @@ type OIDC struct { Insecure bool } +// PolicySelector is the toplevel-configuration for different selectors +type PolicySelector struct { + Static *StaticSelectorConf + Migration *MigrationSelectorConf +} + +// StaticSelectorConf is the config for the static-policy-selector +type StaticSelectorConf struct { + Policy string +} + +// MigrationSelectorConf is the config for the migration-selector +type MigrationSelectorConf struct { + AccFoundPolicy string `mapstructure:"acc_found_policy"` + AccNotFoundPolicy string `mapstructure:"acc_not_found_policy"` + UnauthenticatedPolicy string `mapstructure:"unauthenticated_policy"` +} + // New initializes a new configuration func New() *Config { return &Config{} diff --git a/pkg/proxy/policy/selector.go b/pkg/proxy/policy/selector.go new file mode 100644 index 0000000000..9f450f88a7 --- /dev/null +++ b/pkg/proxy/policy/selector.go @@ -0,0 +1,112 @@ +package policy + +import ( + "context" + "fmt" + "github.com/micro/go-micro/v2/client/grpc" + accounts "github.com/owncloud/ocis-accounts/pkg/proto/v0" + ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" + "net/http" +) + +var ( + // ErrMultipleSelectors in case there is more then one selector configured. + ErrMultipleSelectors = fmt.Errorf("only one type of policy-selector (static or migration) can be configured") + // ErrSelectorConfigIncomplete if policy_selector conf is missing + ErrSelectorConfigIncomplete = fmt.Errorf("missing either \"static\" or \"migration\" configuration in policy_selector config ") + // ErrUnexpectedConfigError unexpected config error + ErrUnexpectedConfigError = fmt.Errorf("could not initialize policy-selector for given config") +) + +// Selector is a function which selects a proxy-policy based on the request. +// +// A policy is a random name which identifies a set of proxy-routes: +//{ +// "policies": [ +// { +// "name": "us-east-1", +// "routes": [ +// { +// "endpoint": "/", +// "backend": "https://backend.us.example.com:8080/app" +// } +// ] +// }, +// { +// "name": "eu-ams-1", +// "routes": [ +// { +// "endpoint": "/", +// "backend": "https://backend.eu.example.com:8080/app" +// } +// ] +// } +// ] +//} +type Selector func(ctx context.Context, r *http.Request) (string, error) + +// LoadSelector constructs a specific policy-selector from a given configuration +func LoadSelector(cfg *config.PolicySelector) (Selector, error) { + if cfg.Migration != nil && cfg.Static != nil { + return nil, ErrMultipleSelectors + } + + if cfg.Migration == nil && cfg.Static == nil { + return nil, ErrSelectorConfigIncomplete + } + + if cfg.Static != nil { + return NewStaticSelector(cfg.Static), nil + } + + if cfg.Migration != nil { + return NewMigrationSelector( + cfg.Migration, + accounts.NewSettingsService("com.owncloud.accounts", grpc.NewClient())), nil + } + + return nil, ErrUnexpectedConfigError +} + +// NewStaticSelector returns a selector which uses a pre-configured policy. +// +// Configuration: +// +// "policy_selector": { +// "static": {"policy" : "reva"} +// }, +func NewStaticSelector(cfg *config.StaticSelectorConf) Selector { + return func(ctx context.Context, r *http.Request) (s string, err error) { + return cfg.Policy, nil + } +} + +// NewMigrationSelector selects the policy based on the existence of the oidc "preferred_username" claim in the accounts-service. +// The policy for each case is configurable: +// "policy_selector": { +// "migration": { +// "acc_found_policy" : "reva", +// "acc_not_found_policy": "oc10", +// "unauthenticated_policy": "oc10" +// } +// }, +// +// This selector can be used in migration-scenarios where some users have already migrated from ownCloud10 to OCIS and +// thus have an entry in ocis-accounts. All users without accounts entry are routed to the legacy ownCloud10 instance. +func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.SettingsService) Selector { + var acc = ss + return func(ctx context.Context, r *http.Request) (s string, err error) { + var userID string + if claims := ocisoidc.FromContext(r.Context()); claims != nil { + userID = claims.PreferredUsername + if _, err := acc.Get(ctx, &accounts.Query{Key: userID}); err != nil { + return cfg.AccNotFoundPolicy, nil + } + + return cfg.AccFoundPolicy, nil + } + + return cfg.UnauthenticatedPolicy, nil + } +} diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go new file mode 100644 index 0000000000..32eb661657 --- /dev/null +++ b/pkg/proxy/policy/selector_test.go @@ -0,0 +1,127 @@ +package policy + +import ( + "context" + "fmt" + "github.com/golang/protobuf/ptypes/empty" + "github.com/micro/go-micro/v2/client" + "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" + "net/http/httptest" + "testing" +) + +func TestStaticSelector(t *testing.T) { + ctx := context.Background() + req := httptest.NewRequest("GET", "https://example.org/foo", nil) + sel := NewStaticSelector(&config.StaticSelectorConf{Policy: "reva"}) + + want := "reva" + got, err := sel(ctx, req) + if got != want { + t.Errorf("Expected policy %v got %v", want, got) + } + + if err != nil { + t.Errorf("Unexpected error %v", err) + } + + sel = NewStaticSelector(&config.StaticSelectorConf{Policy: "foo"}) + + want = "foo" + got, err = sel(ctx, req) + if got != want { + t.Errorf("Expected policy %v got %v", want, got) + } + + if err != nil { + t.Errorf("Unexpected error %v", err) + } +} + +type testCase struct { + AccSvcShouldReturnError bool + Claims *oidc.StandardClaims + Expected string +} + +func TestMigrationSelector(t *testing.T) { + cfg := config.MigrationSelectorConf{ + AccFoundPolicy: "found", + AccNotFoundPolicy: "not_found", + UnauthenticatedPolicy: "unauth", + } + var tests = []testCase{ + {true, &oidc.StandardClaims{PreferredUsername: "Hans"}, "not_found"}, + {false, &oidc.StandardClaims{PreferredUsername: "Hans"}, "found"}, + {false, nil, "unauth"}, + } + + for k, tc := range tests { + t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { + t.Parallel() + tc := tc + sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) + r := httptest.NewRequest("GET", "https://example.com", nil) + ctx := oidc.NewContext(r.Context(), tc.Claims) + nr := r.WithContext(ctx) + + got, err := sut(ctx, nr) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if got != tc.Expected { + t.Errorf("Expected Policy %v got %v", tc.Expected, got) + } + }) + } +} + +func mockAccSvc(retErr bool) proto.SettingsService { + if retErr { + return &mockSettingsService{ + getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { + return nil, fmt.Errorf("error returned by mockSettingService GET") + }, + } + } + + return &mockSettingsService{ + getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { + return &proto.Record{}, nil + }, + } + +} + +type mockSettingsService struct { + setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) + getFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) + listFunc func(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) +} + +func (m mockSettingsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { + if m.setFunc != nil { + return m.setFunc(ctx, in, opts...) + } + + panic("setFunc was called in test but not mocked") +} + +func (m mockSettingsService) Get(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) { + if m.getFunc != nil { + return m.getFunc(ctx, in, opts...) + } + + panic("getFunc was called in test but not mocked") +} + +func (m mockSettingsService) List(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) { + if m.listFunc != nil { + return m.listFunc(ctx, in, opts...) + } + + panic("listFunc was called in test but not mocked") +} diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 3f21fbd9de..ff5ab8be4f 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -1,6 +1,7 @@ package proxy import ( + "github.com/owncloud/ocis-proxy/pkg/proxy/policy" "net/http" "net/http/httputil" "net/url" @@ -14,8 +15,9 @@ import ( // MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies type MultiHostReverseProxy struct { httputil.ReverseProxy - Directors map[string]map[config.RouteType]map[string]func(req *http.Request) - logger log.Logger + Directors map[string]map[config.RouteType]map[string]func(req *http.Request) + PolicySelector policy.Selector + logger log.Logger } // NewMultiHostReverseProxy undocummented @@ -34,8 +36,29 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { rp.logger.Info().Str("source", "file").Msg("Policies") } - for _, policy := range options.Config.Policies { - for _, route := range policy.Routes { + if options.Config.PolicySelector == nil { + firstPolicy := options.Config.Policies[0].Name + rp.logger.Warn().Msgf("policy-selector not configured. Will always use first policy: '%v'", firstPolicy) + options.Config.PolicySelector = &config.PolicySelector{ + Static: &config.StaticSelectorConf{ + Policy: firstPolicy, + }, + } + } + + rp.logger.Debug(). + Interface("selector_config", options.Config.PolicySelector). + Msg("loading policy-selector") + + policySelector, err := policy.LoadSelector(options.Config.PolicySelector) + if err != nil { + rp.logger.Fatal().Err(err).Msg("Could not load policy-selector") + } + + rp.PolicySelector = policySelector + + for _, pol := range options.Config.Policies { + for _, route := range pol.Routes { rp.logger.Debug().Str("fwd: ", route.Endpoint) uri, err := url.Parse(route.Backend) if err != nil { @@ -50,7 +73,7 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { Interface("route", route). Msg("adding route") - rp.AddHost(policy.Name, uri, route) + rp.AddHost(pol.Name, uri, route) } } @@ -105,14 +128,16 @@ func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt confi } func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // TODO need to fetch from the accounts service var hit bool - policy := "reva" + pol, err := p.PolicySelector(r.Context(), r) + if err != nil { + p.logger.Error().Msgf("Error while selecting pol %v", err) + } - if _, ok := p.Directors[policy]; !ok { + if _, ok := p.Directors[pol]; !ok { p.logger. Error(). - Msgf("policy %v is not configured", policy) + Msgf("policy %v is not configured", pol) } Loop: @@ -128,13 +153,13 @@ Loop: default: handler = p.prefixRouteMatcher } - for endpoint := range p.Directors[policy][rt] { + for endpoint := range p.Directors[pol][rt] { if handler(endpoint, *r.URL) { - p.Director = p.Directors[policy][rt][endpoint] + p.Director = p.Directors[pol][rt][endpoint] hit = true p.logger. Debug(). - Str("policy", policy). + Str("policy", pol). Str("prefix", endpoint). Str("path", r.URL.Path). Str("routeType", string(rt)). @@ -145,8 +170,8 @@ Loop: } // override default director with root. If any - if !hit && p.Directors[policy][config.PrefixRoute]["/"] != nil { - p.Director = p.Directors[policy][config.PrefixRoute]["/"] + if !hit && p.Directors[pol][config.PrefixRoute]["/"] != nil { + p.Director = p.Directors[pol][config.PrefixRoute]["/"] } // Call upstream ServeHTTP @@ -188,101 +213,101 @@ func (p *MultiHostReverseProxy) prefixRouteMatcher(endpoint string, target url.U func defaultPolicies() []config.Policy { return []config.Policy{ - config.Policy{ + { Name: "reva", Routes: []config.Route{ - config.Route{ + { Endpoint: "/", Backend: "http://localhost:9100", }, - config.Route{ + { Endpoint: "/.well-known/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/konnect/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/signin/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/ocs/", Backend: "http://localhost:9140", }, - config.Route{ + { Type: config.QueryRoute, Endpoint: "/remote.php/?preview=1", Backend: "http://localhost:9115", }, - config.Route{ + { Endpoint: "/remote.php/", Backend: "http://localhost:9140", }, - config.Route{ + { Endpoint: "/dav/", Backend: "http://localhost:9140", }, - config.Route{ + { Endpoint: "/webdav/", Backend: "http://localhost:9140", }, - config.Route{ + { Endpoint: "/status.php", Backend: "http://localhost:9140", }, - config.Route{ + { Endpoint: "/index.php/", Backend: "http://localhost:9140", }, }, }, - config.Policy{ + { Name: "oc10", Routes: []config.Route{ - config.Route{ + { Endpoint: "/", Backend: "http://localhost:9100", }, - config.Route{ + { Endpoint: "/.well-known/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/konnect/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/signin/", Backend: "http://localhost:9130", }, - config.Route{ + { Endpoint: "/ocs/", Backend: "https://demo.owncloud.com", ApacheVHost: true, }, - config.Route{ + { Endpoint: "/remote.php/", Backend: "https://demo.owncloud.com", ApacheVHost: true, }, - config.Route{ + { Endpoint: "/dav/", Backend: "https://demo.owncloud.com", ApacheVHost: true, }, - config.Route{ + { Endpoint: "/webdav/", Backend: "https://demo.owncloud.com", ApacheVHost: true, }, - config.Route{ + { Endpoint: "/status.php", Backend: "https://demo.owncloud.com", ApacheVHost: true, }, - config.Route{ + { Endpoint: "/index.php/", Backend: "https://demo.owncloud.com", ApacheVHost: true, From e3bcc0d5aa5c1a25765283d6cb0d598db46dc8e1 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 27 Mar 2020 05:41:03 +0000 Subject: [PATCH 073/213] Automated changelog update [skip ci] --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 015721ef60..48a143bc07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,12 @@ The following sections list the changes for ocis-proxy unreleased. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...master ## Summary * Enhancement - Configurable OpenID Connect client: [#27](https://github.com/owncloud/ocis-proxy/pull/27) +* Enhancement - Add policy selectors: [#4](https://github.com/owncloud/ocis-proxy/issues/4) ## Details @@ -18,11 +19,38 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/27 + +* Enhancement - Add policy selectors: [#4](https://github.com/owncloud/ocis-proxy/issues/4) + + "Static-Policy" can be configured to always select a specific policy. See: + config/proxy-example.json. + + "Migration-Policy" selects policy depending on existence of the uid in the ocis-accounts + service. See: config/proxy-example-migration.json + + https://github.com/owncloud/ocis-proxy/issues/4 + +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -53,22 +81,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 976c13cf62551c708a7ea5a2f4c6f1dd43f8f891 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 27 Mar 2020 10:57:32 +0100 Subject: [PATCH 074/213] Redirect http-requests to https (#29) --- changelog/unreleased/redirect_to_https.md | 4 ++++ pkg/command/server.go | 3 +++ pkg/middleware/https_redirect.go | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 changelog/unreleased/redirect_to_https.md create mode 100644 pkg/middleware/https_redirect.go diff --git a/changelog/unreleased/redirect_to_https.md b/changelog/unreleased/redirect_to_https.md new file mode 100644 index 0000000000..d8a139fbeb --- /dev/null +++ b/changelog/unreleased/redirect_to_https.md @@ -0,0 +1,4 @@ +Change: Insecure http-requests are now redirected to https + +https://github.com/owncloud/ocis-proxy/pull/29 + diff --git a/pkg/command/server.go b/pkg/command/server.go index 3ea351d0c4..fe02b26f60 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -236,6 +236,9 @@ func Server(cfg *config.Config) *cli.Command { func loadMiddlewares(cfg *config.Config, l log.Logger) []func(handler http.Handler) http.Handler { var configuredMiddlewares = make([]func(handler http.Handler) http.Handler, 0) + + configuredMiddlewares = append(configuredMiddlewares, middleware.RedirectToHTTPS) + if cfg.OIDC != nil { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") diff --git a/pkg/middleware/https_redirect.go b/pkg/middleware/https_redirect.go new file mode 100644 index 0000000000..60b4684469 --- /dev/null +++ b/pkg/middleware/https_redirect.go @@ -0,0 +1,19 @@ +package middleware + +import ( + "fmt" + "net/http" +) + +// RedirectToHTTPS redirects insecure requests to https +func RedirectToHTTPS(next http.Handler) http.Handler { + return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + proto := req.Header.Get("x-forwarded-proto") + if proto == "http" || proto == "HTTP" { + http.Redirect(res, req, fmt.Sprintf("https://%s%s", req.Host, req.URL), http.StatusPermanentRedirect) + return + } + + next.ServeHTTP(res, req) + }) +} From 6ce95072a69593037477cbcae6a8465b9bf6c2ab Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 27 Mar 2020 10:01:36 +0000 Subject: [PATCH 075/213] Automated changelog update [skip ci] --- CHANGELOG.md | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a143bc07..f448939b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,21 @@ The following sections list the changes for ocis-proxy unreleased. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...master +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master ## Summary +* Change - Insecure http-requests are now redirected to https: [#29](https://github.com/owncloud/ocis-proxy/pull/29) * Enhancement - Configurable OpenID Connect client: [#27](https://github.com/owncloud/ocis-proxy/pull/27) * Enhancement - Add policy selectors: [#4](https://github.com/owncloud/ocis-proxy/issues/4) ## Details +* Change - Insecure http-requests are now redirected to https: [#29](https://github.com/owncloud/ocis-proxy/pull/29) + + https://github.com/owncloud/ocis-proxy/pull/29 + + * Enhancement - Configurable OpenID Connect client: [#27](https://github.com/owncloud/ocis-proxy/pull/27) The proxy will try to authenticate every request with the configured OIDC provider. @@ -30,27 +36,11 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -81,6 +71,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From b805f3840feb9b104f57d21785b72e1fb6086781 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 30 Mar 2020 12:58:05 +0200 Subject: [PATCH 076/213] Prepare 0.3.0 Release --- changelog/{unreleased => 0.3.0_2020-03-30}/add-oidc.md | 0 changelog/{unreleased => 0.3.0_2020-03-30}/policy_selectors.md | 0 changelog/{unreleased => 0.3.0_2020-03-30}/redirect_to_https.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.3.0_2020-03-30}/add-oidc.md (100%) rename changelog/{unreleased => 0.3.0_2020-03-30}/policy_selectors.md (100%) rename changelog/{unreleased => 0.3.0_2020-03-30}/redirect_to_https.md (100%) diff --git a/changelog/unreleased/add-oidc.md b/changelog/0.3.0_2020-03-30/add-oidc.md similarity index 100% rename from changelog/unreleased/add-oidc.md rename to changelog/0.3.0_2020-03-30/add-oidc.md diff --git a/changelog/unreleased/policy_selectors.md b/changelog/0.3.0_2020-03-30/policy_selectors.md similarity index 100% rename from changelog/unreleased/policy_selectors.md rename to changelog/0.3.0_2020-03-30/policy_selectors.md diff --git a/changelog/unreleased/redirect_to_https.md b/changelog/0.3.0_2020-03-30/redirect_to_https.md similarity index 100% rename from changelog/unreleased/redirect_to_https.md rename to changelog/0.3.0_2020-03-30/redirect_to_https.md From 6ab60e7cc1dc632d70078e6e7772f952329162a3 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 30 Mar 2020 11:04:34 +0000 Subject: [PATCH 077/213] Automated changelog update [skip ci] --- CHANGELOG.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f448939b7d..53d774f4fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.3.0] (2020-03-30) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.3.0. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...master +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -36,11 +36,27 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -71,22 +87,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 72c674909985eebba05124af47fb39252213fa27 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 30 Mar 2020 21:58:14 +0200 Subject: [PATCH 078/213] update ocis-pkg to 2.2.0 --- changelog/0.3.1_2020-03-31/update-pkg | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelog/0.3.1_2020-03-31/update-pkg diff --git a/changelog/0.3.1_2020-03-31/update-pkg b/changelog/0.3.1_2020-03-31/update-pkg new file mode 100644 index 0000000000..b06327d291 --- /dev/null +++ b/changelog/0.3.1_2020-03-31/update-pkg @@ -0,0 +1,5 @@ +Change: Update ocis-pkg + +We updated ocis-pkg from 2.0.2 to 2.2.0. + +https://github.com/owncloud/ocis-proxy/pull/30 \ No newline at end of file diff --git a/go.mod b/go.mod index 63fde24f50..d24baffa26 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/ocis-accounts v0.1.0 - github.com/owncloud/ocis-pkg/v2 v2.0.2 + github.com/owncloud/ocis-pkg/v2 v2.2.0 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 diff --git a/go.sum b/go.sum index 3c97f0f372..21ac62e59c 100644 --- a/go.sum +++ b/go.sum @@ -610,8 +610,8 @@ github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXq github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= -github.com/owncloud/ocis-pkg/v2 v2.0.2 h1:aHqvuRXMFsImO/uwL9v8Ul+PByPFLZp/Rdj4MXAhI9A= -github.com/owncloud/ocis-pkg/v2 v2.0.2/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= +github.com/owncloud/ocis-pkg/v2 v2.2.0 h1:lsb1PSn8F4ppPHOECVc3fqziDM/VdGQ/zqxQnEk+qi8= +github.com/owncloud/ocis-pkg/v2 v2.2.0/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= From dbca1953230da0274b8f5b897f747a84ae3dc3bd Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 31 Mar 2020 09:01:01 +0000 Subject: [PATCH 079/213] Automated changelog update [skip ci] --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d774f4fc..b0e0759e1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,26 @@ +# Changelog for [0.3.1] (2020-03-31) + +The following sections list the changes for ocis-proxy 0.3.1. + +[0.3.1]: https://github.com/owncloud/ocis-proxy/compare/v0.3.0...v0.3.1 + +## Summary + +* Change - Update ocis-pkg: [#30](https://github.com/owncloud/ocis-proxy/pull/30) + +## Details + +* Change - Update ocis-pkg: [#30](https://github.com/owncloud/ocis-proxy/pull/30) + + We updated ocis-pkg from 2.0.2 to 2.2.0. + + https://github.com/owncloud/ocis-proxy/pull/30 + # Changelog for [0.3.0] (2020-03-30) The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -36,27 +54,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -87,6 +89,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 617628b1a6ba3fca35d60aa31c6b1ade8d0c2b79 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Tue, 31 Mar 2020 12:40:07 +0200 Subject: [PATCH 080/213] Integration test --- pkg/proxy/proxy_integration_test.go | 221 ++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 pkg/proxy/proxy_integration_test.go diff --git a/pkg/proxy/proxy_integration_test.go b/pkg/proxy/proxy_integration_test.go new file mode 100644 index 0000000000..2e072fe287 --- /dev/null +++ b/pkg/proxy/proxy_integration_test.go @@ -0,0 +1,221 @@ +package proxy + +import ( + "bytes" + "github.com/owncloud/ocis-proxy/pkg/config" + "io" + "io/ioutil" + "log" + "net/http" + "net/http/httptest" + "net/url" + "testing" +) + +func TestProxyIntegration(t *testing.T) { + var tests = []testCase{ + // Simple prefix route + test("simple_prefix", withPolicy("reva", withRoutes{{ + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com"}, + })).withRequest("GET", "https://example.com/api", nil). + expectProxyTo("http://api.example.com/api"), + + // Complex prefix route, different method + test("complex_prefix_post", withPolicy("reva", withRoutes{{ + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com/service1/"}, + })).withRequest("POST", "https://example.com/api", nil). + expectProxyTo("http://api.example.com/service1/api"), + + // Query route + test("query_route", withPolicy("reva", withRoutes{{ + Type: config.QueryRoute, + Endpoint: "/api?format=json", + Backend: "http://backend/"}, + })).withRequest("GET", "https://example.com/api?format=json", nil). + expectProxyTo("http://backend/api?format=json"), + + // Regex route + test("regex_route", withPolicy("reva", withRoutes{{ + Type: config.RegexRoute, + Endpoint: `\/user\/(\d+)`, + Backend: "http://backend/"}, + })).withRequest("POST", "https://example.com/user/1234", nil). + expectProxyTo("http://backend/user/1234"), + + // Multiple prefix routes 1 + test("multiple_prefix", withPolicy("reva", withRoutes{ + { + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com", + }, + { + Type: config.PrefixRoute, + Endpoint: "/payment", + Backend: "http://payment.example.com", + }, + })).withRequest("GET", "https://example.com/payment", nil). + expectProxyTo("http://payment.example.com/payment"), + + // Multiple prefix routes 2 + test("multiple_prefix", withPolicy("reva", withRoutes{ + { + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com", + }, + { + Type: config.PrefixRoute, + Endpoint: "/payment", + Backend: "http://payment.example.com", + }, + })).withRequest("GET", "https://example.com/api", nil). + expectProxyTo("http://api.example.com/api"), + + // Mixed route types + test("mixed_types", withPolicy("reva", withRoutes{ + { + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com", + }, + { + Type: config.RegexRoute, + Endpoint: `\/user\/(\d+)`, + Backend: "http://users.example.com", + ApacheVHost: false, + }, + })).withRequest("GET", "https://example.com/api", nil). + expectProxyTo("http://api.example.com/api"), + + // Mixed route types + test("mixed_types", withPolicy("reva", withRoutes{ + { + Type: config.PrefixRoute, + Endpoint: "/api", + Backend: "http://api.example.com", + }, + { + Type: config.RegexRoute, + Endpoint: `\/user\/(\d+)`, + Backend: "http://users.example.com", + ApacheVHost: false, + }, + })).withRequest("GET", "https://example.com/user/1234", nil). + expectProxyTo("http://users.example.com/user/1234"), + } + + for k := range tests { + t.Run(tests[k].id, func(t *testing.T) { + t.Parallel() + tc := tests[k] + rp := newTestProxy(testConfig(tc.conf), func(req *http.Request) *http.Response { + if got, want := req.URL.String(), tc.expect.String(); got != want { + t.Errorf("Proxied url should be %v got %v", want, got) + } + + if got, want := req.Method, tc.input.Method; got != want { + t.Errorf("Proxied request method should be %v got %v", want, got) + } + + if got, want := req.Proto, tc.input.Proto; got != want { + t.Errorf("Proxied request proto should be %v got %v", want, got) + } + + return &http.Response{ + StatusCode: 200, + Body: ioutil.NopCloser(bytes.NewBufferString(`OK`)), + Header: make(http.Header), + } + }) + + rr := httptest.NewRecorder() + rp.ServeHTTP(rr, tc.input) + + if rr.Result().StatusCode != 200 { + t.Errorf("Expected status 200 from proxy-response got %v", rr.Result().StatusCode) + } + + resultBody, err := ioutil.ReadAll(rr.Result().Body) + if err != nil { + t.Fatal("Error reading result body") + } + + bodyString := string(resultBody) + if bodyString != `OK` { + t.Errorf("Result body of proxied response should be OK, got %v", bodyString) + } + + }) + } +} + +func newTestProxy(cfg *config.Config, fn RoundTripFunc) *MultiHostReverseProxy { + rp := NewMultiHostReverseProxy(Config(cfg)) + rp.Transport = fn + return rp +} + +type RoundTripFunc func(req *http.Request) *http.Response + +// RoundTrip . +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} + +type withRoutes []config.Route + +type testCase struct { + id string + input *http.Request + expect *url.URL + conf []config.Policy +} + +func test(id string, policies ...config.Policy) *testCase { + tc := &testCase{ + id: id, + } + for k := range policies { + tc.conf = append(tc.conf, policies[k]) + } + + return tc +} + +func withPolicy(name string, r withRoutes) config.Policy { + return config.Policy{Name: name, Routes: r} +} + +func (tc *testCase) withRequest(method string, target string, body io.Reader) *testCase { + tc.input = httptest.NewRequest(method, target, body) + return tc +} + +func (tc *testCase) expectProxyTo(strURL string) testCase { + pu, err := url.Parse(strURL) + if err != nil { + log.Fatalf("Error parsing %v", strURL) + } + + tc.expect = pu + return *tc +} + +func testConfig(policy []config.Policy) *config.Config { + return &config.Config{ + File: "", + Log: config.Log{}, + Debug: config.Debug{}, + HTTP: config.HTTP{}, + Tracing: config.Tracing{}, + Asset: config.Asset{}, + Policies: policy, + OIDC: nil, + PolicySelector: nil, + } +} From a4b63c116ec7696f51d20828ac22bd2b499fb1bc Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 7 Apr 2020 22:36:26 +0200 Subject: [PATCH 081/213] Remove gitter chat from Readme.md --- Readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Readme.md b/Readme.md index 1c08a4f41d..fff328a3b3 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,6 @@ # ownCloud Infinite Scale: Proxy [![Build Status](https://cloud.drone.io/api/badges/owncloud/ocis-proxy/status.svg)](https://cloud.drone.io/owncloud/ocis-proxy) -[![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d005a4722c1b463b9b95060479018e99)](https://www.codacy.com/gh/owncloud/ocis-proxy?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-proxy&utm_campaign=Badge_Grade) [![Go Doc](https://godoc.org/github.com/owncloud/ocis-proxy?status.svg)](http://godoc.org/github.com/owncloud/ocis-proxy) [![Go Report](http://goreportcard.com/badge/github.com/owncloud/ocis-proxy)](http://goreportcard.com/report/github.com/owncloud/ocis-proxy) From def8c7bdcbf06dbfb0b9168d6636a256fffe784c Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 7 Apr 2020 22:48:12 +0200 Subject: [PATCH 082/213] Add coverage badge --- Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index fff328a3b3..110a9bd5ef 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,8 @@ # ownCloud Infinite Scale: Proxy [![Build Status](https://cloud.drone.io/api/badges/owncloud/ocis-proxy/status.svg)](https://cloud.drone.io/owncloud/ocis-proxy) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d005a4722c1b463b9b95060479018e99)](https://www.codacy.com/gh/owncloud/ocis-proxy?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-proxy&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/636af6e2270e4c7ca0f3eb2efc814c21)](https://www.codacy.com/gh/owncloud/ocis-proxy?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-bridge&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/636af6e2270e4c7ca0f3eb2efc814c21)](https://www.codacy.com/gh/owncloud/ocis-proxy?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-bridge&utm_campaign=Badge_Coverage) [![Go Doc](https://godoc.org/github.com/owncloud/ocis-proxy?status.svg)](http://godoc.org/github.com/owncloud/ocis-proxy) [![Go Report](http://goreportcard.com/badge/github.com/owncloud/ocis-proxy)](http://goreportcard.com/report/github.com/owncloud/ocis-proxy) [![](https://images.microbadger.com/badges/image/owncloud/ocis-proxy.svg)](http://microbadger.com/images/owncloud/ocis-proxy "Get your own image badge on microbadger.com") From 638f05a9c2bf21c354fceb047b83c6014e062e3c Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 7 Apr 2020 20:52:34 +0000 Subject: [PATCH 083/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e0759e1d..0ea262f8a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -54,11 +54,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -89,22 +105,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From e31e00815af87c9a0a244fa1aca5cb00227e991b Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 20 Apr 2020 21:25:21 +0200 Subject: [PATCH 084/213] Add Flagset Extractor, align build flags --- Makefile | 7 ++- docs/configuration.md | 119 +++++++++++++++++++++++++++++++++++ docs/getting-started.md | 43 +++++-------- go.mod | 2 +- go.sum | 14 +++++ templates/CONFIGURATION.tmpl | 78 +++++++++++++++++++++++ tools.go | 1 + 7 files changed, 233 insertions(+), 31 deletions(-) create mode 100644 docs/configuration.md create mode 100644 templates/CONFIGURATION.tmpl diff --git a/Makefile b/Makefile index d4a5bf5646..9c699b8982 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ ifndef DATE endif LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" +DEBUG_LDFLAGS += -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" GCFLAGS += all=-N -l .PHONY: all @@ -143,12 +144,16 @@ docs-copy: git checkout origin/source -f; \ rsync --delete -ax ../docs/ content/extensions/$(NAME) +.PHONY: config-docs-generate +config-docs-generate: + go run github.com/owncloud/flaex >| docs/configuration.md + .PHONY: docs-build docs-build: cd $(HUGO); hugo .PHONY: docs -docs: docs-copy docs-build +docs: config-docs-generate docs-copy docs-build .PHONY: watch watch: diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000000..0240adb04c --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,119 @@ +--- +title: "Configuration" +date: "2020-04-20T21:24:14+0200" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: configuration.md +--- + +{{< toc >}} + +## Configuration + +oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files. + +Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands. + +### Configuration using config files + +Out of the box extensions will attempt to read configuration details from: + +```console +/etc/ocis +$HOME/.ocis +./config +``` + +For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*. + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. + +### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +### Commandline flags + +If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly. + +## Root Command + +proxy for Reva/oCIS + +Usage: `ocis-proxy [global options] command [command options] [arguments...]` + +--config-file | $PROXY_CONFIG_FILE +: Path to config file. + +--log-level | $PROXY_LOG_LEVEL +: Set logging level. Default: `info`. + +--log-pretty | $PROXY_LOG_PRETTY +: Enable pretty logging. Default: `true`. + +--log-color | $PROXY_LOG_COLOR +: Enable colored logging. Default: `true`. + +## Sub Commands + +### ocis-proxy server + +Start integrated server + +Usage: `ocis-proxy server [command options] [arguments...]` + +--tracing-enabled | $PROXY_TRACING_ENABLED +: Enable sending traces. + +--tracing-type | $PROXY_TRACING_TYPE +: Tracing backend type. Default: `jaeger`. + +--tracing-endpoint | $PROXY_TRACING_ENDPOINT +: Endpoint for the agent. + +--tracing-collector | $PROXY_TRACING_COLLECTOR +: Endpoint for the collector. + +--tracing-service | $PROXY_TRACING_SERVICE +: Service name for tracing. Default: `proxy`. + +--debug-addr | $PROXY_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9205`. + +--debug-token | $PROXY_DEBUG_TOKEN +: Token to grant metrics access. + +--debug-pprof | $PROXY_DEBUG_PPROF +: Enable pprof debugging. + +--debug-zpages | $PROXY_DEBUG_ZPAGES +: Enable zpages debugging. + +--http-addr | $PROXY_HTTP_ADDR +: Address to bind http server. Default: `0.0.0.0:9200`. + +--http-root | $PROXY_HTTP_ROOT +: Root path of http server. Default: `/`. + +--asset-path | $PROXY_ASSET_PATH +: Path to custom assets. + +--http-namespace | $PROXY_HTTP_NAMESPACE +: Set the base namespace for the http namespace. Default: `com.owncloud`. + +--transport-tls-cert | $PROXY_TRANSPORT_TLS_CERT +: Certificate file for transport encryption. + +--transport-tls-key | $PROXY_TRANSPORT_TLS_KEY +: Secret file for transport encryption. + +### ocis-proxy health + +Check health status + +Usage: `ocis-proxy health [command options] [arguments...]` + +--debug-addr | $PROXY_DEBUG_ADDR +: Address to debug endpoint. Default: `0.0.0.0:9109`. + diff --git a/docs/getting-started.md b/docs/getting-started.md index 618b7951be..95f8a185a8 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,7 +1,7 @@ --- title: "Getting Started" date: 2018-05-02T00:00:00+00:00 -weight: 20 +weight: 15 geekdocRepo: https://github.com/owncloud/ocis-proxy geekdocEditPath: edit/master/docs geekdocFilePath: getting-started.md @@ -15,38 +15,23 @@ So far we are offering two different variants for the installation. You can choo ### Docker -TBD +Docker images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-proxy. + +The `latest` tag always reflects the current master branch. + +```console +docker pull owncloud/ocis-proxy +``` ### Binaries -TBD +The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-proxy/ . Specific releases are organized in separate folders. They are in sync which every release tag on GitHub. The binaries from the current master branch can be found in https://download.owncloud.com/ocis/ocis-proxy/testing/ -## Configuration - -We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. - -### Envrionment variables - -If you prefer to configure the service with environment variables you can see the available variables below. - -#### Server - -OCIS_PROXY_NAME -: Name of the proxy service. It will be part of the namespace. - -OCIS_PROXY_NAMESPACE -: Namespace of the proxy service. - -OCIS_PROXY_ADDRESS -: Endpoint for the http service endpoint. - -### Commandline flags - -If you prefer to configure the service with commandline flags you can see the available variables below. - -### Configuration file - -So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis-proxy/tree/master/pkg/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/proxy.yml`, `${HOME}/.ocis/proxy.yml` or `$(pwd)/config/proxy.yml`. +```console +curl https://download.owncloud.com/ocis/ocis-proxy/1.0.0-beta1/ocis-proxy-1.0.0-beta1-darwin-amd64 --output ocis-proxy +chmod +x ocis-proxy +./ocis-proxy server +``` ## Usage diff --git a/go.mod b/go.mod index d24baffa26..efc67ca288 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 + github.com/owncloud/flaex v0.2.0 // indirect github.com/owncloud/ocis-accounts v0.1.0 github.com/owncloud/ocis-pkg/v2 v2.2.0 github.com/prometheus/client_golang v1.2.1 @@ -24,5 +25,4 @@ require ( golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect - gopkg.in/yaml.v2 v2.2.7 // indirect ) diff --git a/go.sum b/go.sum index 21ac62e59c..5bcc11018c 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,12 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -397,6 +401,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo= +github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= @@ -604,6 +610,8 @@ github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= +github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8= @@ -736,6 +744,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -826,6 +835,8 @@ golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8 golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty86cFeKoKWbwy2wQj0gIxbU= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -983,6 +994,7 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODatUqANFZ+5BPMnzsy4hulY= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1090,6 +1102,7 @@ gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1098,6 +1111,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= k8s.io/apimachinery v0.0.0-20191111054156-6eb29fdf75dc/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= diff --git a/templates/CONFIGURATION.tmpl b/templates/CONFIGURATION.tmpl new file mode 100644 index 0000000000..ea35b356b1 --- /dev/null +++ b/templates/CONFIGURATION.tmpl @@ -0,0 +1,78 @@ +--- +title: "Configuration" +date: "{{ date "2006-01-02T15:04:05-0700" now }}" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis-proxy +geekdocEditPath: edit/master/docs +geekdocFilePath: configuration.md +--- +{{- define "options"}} +{{ $fnName := (last . ).Flags -}} +{{ range $opt := first . }}{{ with list $fnName $opt -}} +{{ $o := last . -}} +{{ if eq $o.FnName $fnName -}} +--{{ $o.Name }} | ${{ index $o.Env 0 }} +: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} + +{{ end -}} +{{ end -}} +{{ end -}} +{{ end }} + +{{`{{< toc >}}`}} + +## Configuration + +oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files. + +Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands. + +### Configuration using config files + +Out of the box extensions will attempt to read configuration details from: + +```console +/etc/ocis +$HOME/.ocis +./config +``` + +For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*. + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. + +### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +### Commandline flags + +If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly. + +{{ $options := .Options -}} +{{ range $com := .Commands }}{{ with (list $options $com) -}} +{{ $c := last . -}} +{{ if eq $c.Name "ocis-proxy" -}} +## Root Command + +{{ $c.Usage }} + +Usage: `ocis-proxy [global options] command [command options] [arguments...]` +{{ template "options" . -}} +## Sub Commands + +{{ end -}} +{{ end -}} +{{ end -}} +{{- range $com := .Commands }}{{ with (list $options $com) -}} +{{- $c := last . }} +{{- if ne $c.Name "ocis-proxy" -}} +### ocis-proxy {{ $c.Name }} + +{{ $c.Usage }} + +Usage: `ocis-proxy {{ $c.Name }} [command options] [arguments...]` +{{ template "options" . }} +{{- end -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/tools.go b/tools.go index f1911ffdcb..fce36f2420 100644 --- a/tools.go +++ b/tools.go @@ -3,5 +3,6 @@ package main import ( + _ "github.com/owncloud/flaex" _ "github.com/restic/calens" ) From f2d1c0a1be6b5b3b9b4bb18988b3b70741798365 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 22 Apr 2020 15:28:49 +0000 Subject: [PATCH 085/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea262f8a2..b0e0759e1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -54,27 +54,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -105,6 +89,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From a0ed0b2e90f49da7aed81b9e737023e6d29de4e1 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 30 Apr 2020 13:39:17 +0200 Subject: [PATCH 086/213] refactor middleware code and provide an example flow to get UUID --- go.mod | 2 ++ go.sum | 11 ++++++++++ pkg/command/server.go | 12 +++++----- pkg/middleware/logger.go | 15 +++++++++++++ pkg/middleware/middleware.go | 6 +++++ pkg/middleware/openidconnect.go | 39 +++++++++++++++++++++++++++++++-- pkg/server/http/option.go | 5 +++-- pkg/server/http/server.go | 22 +++++++++---------- 8 files changed, 91 insertions(+), 21 deletions(-) create mode 100644 pkg/middleware/logger.go create mode 100644 pkg/middleware/middleware.go diff --git a/go.mod b/go.mod index efc67ca288..5c7dfe52c9 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,10 @@ require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.1.0+incompatible + github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 github.com/golang/protobuf v1.3.2 github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c + github.com/micro/go-micro v1.18.0 github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 diff --git a/go.sum b/go.sum index 5bcc11018c..0afef6b7e9 100644 --- a/go.sum +++ b/go.sum @@ -152,6 +152,7 @@ github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvo github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -193,10 +194,14 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnsimple/dnsimple-go v0.30.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 h1:oqgGT9O61YAYvI41EBsLePOr+LE6roB0xY4gpkZuFSE= github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -549,6 +554,7 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -597,7 +603,9 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -614,6 +622,7 @@ github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= +github.com/owncloud/ocis-accounts v0.1.1 h1:WYQ/KLbNZB7EmCZQJTvrySfWFuS0m9oM0gTkyKrjFOM= github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= @@ -1102,7 +1111,9 @@ gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/command/server.go b/pkg/command/server.go index fe02b26f60..64888a2f79 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,15 +2,15 @@ package command import ( "context" - "github.com/owncloud/ocis-pkg/v2/log" - "github.com/owncloud/ocis-pkg/v2/oidc" - "github.com/owncloud/ocis-proxy/pkg/middleware" - "net/http" "os" "os/signal" "strings" "time" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/middleware" + "contrib.go.opencensus.io/exporter/jaeger" "contrib.go.opencensus.io/exporter/ocagent" "contrib.go.opencensus.io/exporter/zipkin" @@ -234,8 +234,8 @@ func Server(cfg *config.Config) *cli.Command { } } -func loadMiddlewares(cfg *config.Config, l log.Logger) []func(handler http.Handler) http.Handler { - var configuredMiddlewares = make([]func(handler http.Handler) http.Handler, 0) +func loadMiddlewares(cfg *config.Config, l log.Logger) []middleware.M { + var configuredMiddlewares = make([]middleware.M, 0) configuredMiddlewares = append(configuredMiddlewares, middleware.RedirectToHTTPS) diff --git a/pkg/middleware/logger.go b/pkg/middleware/logger.go new file mode 100644 index 0000000000..9db319f223 --- /dev/null +++ b/pkg/middleware/logger.go @@ -0,0 +1,15 @@ +package middleware + +import ( + "net/http" +) + +// Logger undocummented +func Logger() M { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // do some logging logic here + next.ServeHTTP(w, r) + }) + } +} diff --git a/pkg/middleware/middleware.go b/pkg/middleware/middleware.go new file mode 100644 index 0000000000..a8c5917834 --- /dev/null +++ b/pkg/middleware/middleware.go @@ -0,0 +1,6 @@ +package middleware + +import "net/http" + +// M undocummented +type M func(next http.Handler) http.Handler diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 0e6d0dfbe9..3bcfecd9eb 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -9,6 +9,9 @@ import ( "time" oidc "github.com/coreos/go-oidc" + mclient "github.com/micro/go-micro/v2/client" + "github.com/micro/go-micro/v2/registry" + acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" "golang.org/x/oauth2" ) @@ -16,6 +19,8 @@ import ( var ( // ErrInvalidToken is returned when the request token is invalid. ErrInvalidToken = errors.New("invalid or missing token") + + accountSvc = "com.owncloud.accounts" ) // newOIDCOptions initializes the available default options. @@ -30,7 +35,7 @@ func newOIDCOptions(opts ...ocisoidc.Option) ocisoidc.Options { } // OpenIDConnect provides a middleware to check access secured by a static token. -func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler { +func OpenIDConnect(opts ...ocisoidc.Option) M { opt := newOIDCOptions(opts...) // set defaults @@ -96,7 +101,6 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler { return } - // parse claims if err := userInfo.Claims(&claims); err != nil { opt.Logger.Error().Err(err).Interface("userinfo", userInfo).Msg("failed to unmarshal userinfo claims") w.WriteHeader(http.StatusInternalServerError) @@ -112,3 +116,34 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler { }) } } + +// from the user claims we need to get the uuid from the accounts service +func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { + var node string + // get accounts node from micro registry + // TODO this assumes we use mdns as registry. This should be configurable for any ocis extension. + svc, err := registry.GetService(accountSvc) + if err != nil { + return "", err + } + + if len(svc) > 0 { + node = svc[0].Nodes[0].Address + } + + c := acc.NewSettingsService("accounts", mclient.DefaultClient) + _, err = c.Get(context.Background(), &acc.Query{ + // TODO accounts query message needs to be updated to query for multiple fields + // queries by key makes little sense as it is unknown. + Key: "73912d13-32f7-4fb6-aeb2-ea2088a3a264", + }) + if err != nil { + return "", err + } + + // by this point, rec.Payload contains the Account info. To include UUID, see: + // https://github.com/owncloud/ocis-accounts/pull/22/files#diff-b425175389864c4f9218ecd9cae80223R23 + + // return rec.GetPayload().Account.UUID, nil // depends on the aforementioned PR + return node, nil +} diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go index 46edc1aef0..fb5464e9d9 100644 --- a/pkg/server/http/option.go +++ b/pkg/server/http/option.go @@ -8,6 +8,7 @@ import ( "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/metrics" + "github.com/owncloud/ocis-proxy/pkg/middleware" ) // Option defines a single option function. @@ -22,7 +23,7 @@ type Options struct { Metrics *metrics.Metrics Flags []cli.Flag Namespace string - Middlewares []func(handler http.Handler) http.Handler + Middlewares []middleware.M } // newOptions initializes the available default options. @@ -86,7 +87,7 @@ func Handler(h http.Handler) Option { } // Middlewares provides a function to register middlewares -func Middlewares(val ...func(handler http.Handler) http.Handler) Option { +func Middlewares(val ...middleware.M) Option { return func(o *Options) { o.Middlewares = val } diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 3fd022e502..b8f03377be 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -2,11 +2,13 @@ package http import ( "crypto/tls" - svc "github.com/owncloud/ocis-pkg/v2/service/http" - "github.com/owncloud/ocis-proxy/pkg/crypto" - "github.com/owncloud/ocis-proxy/pkg/version" "net/http" "os" + + svc "github.com/owncloud/ocis-pkg/v2/service/http" + "github.com/owncloud/ocis-proxy/pkg/crypto" + "github.com/owncloud/ocis-proxy/pkg/middleware" + "github.com/owncloud/ocis-proxy/pkg/version" ) // Server initializes the http service and server. @@ -48,10 +50,8 @@ func Server(opts ...Option) (svc.Service, error) { svc.Address(options.Config.HTTP.Addr), svc.Context(options.Context), svc.Flags(options.Flags...), - svc.Handler(applyMiddlewares( - options.Handler, - options.Middlewares..., - ), + svc.Handler( + applyMiddlewares(options.Handler, options.Middlewares...) ), ) @@ -62,11 +62,11 @@ func Server(opts ...Option) (svc.Service, error) { return service, nil } -func applyMiddlewares(h http.Handler, mws ...func(handler http.Handler) http.Handler) http.Handler { - var han = h +func applyMiddlewares(next http.Handler, mws ...middleware.M) http.Handler { + var h = next for _, mw := range mws { - han = mw(han) + h = mw(h) } - return han + return h } From d703c87dd200ec3b3c142c783c6f1794539faa20 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 30 Apr 2020 13:56:11 +0200 Subject: [PATCH 087/213] cleanup dependencies --- go.mod | 4 +--- go.sum | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5c7dfe52c9..68091328d9 100644 --- a/go.mod +++ b/go.mod @@ -7,14 +7,12 @@ require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.1.0+incompatible - github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 github.com/golang/protobuf v1.3.2 github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c - github.com/micro/go-micro v1.18.0 github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 - github.com/owncloud/flaex v0.2.0 // indirect + github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.0 github.com/owncloud/ocis-pkg/v2 v2.2.0 github.com/prometheus/client_golang v1.2.1 diff --git a/go.sum b/go.sum index 0afef6b7e9..6238170c55 100644 --- a/go.sum +++ b/go.sum @@ -622,7 +622,6 @@ github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= -github.com/owncloud/ocis-accounts v0.1.1 h1:WYQ/KLbNZB7EmCZQJTvrySfWFuS0m9oM0gTkyKrjFOM= github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= @@ -753,6 +752,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -1109,8 +1109,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= @@ -1122,6 +1120,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= From ad6a306a6f3404685b311267efb47279c6f710b9 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 4 May 2020 09:24:07 +0200 Subject: [PATCH 088/213] add trailing comma --- pkg/server/http/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index b8f03377be..2a346edde6 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -51,7 +51,7 @@ func Server(opts ...Option) (svc.Service, error) { svc.Context(options.Context), svc.Flags(options.Flags...), svc.Handler( - applyMiddlewares(options.Handler, options.Middlewares...) + applyMiddlewares(options.Handler, options.Middlewares...), ), ) From 0dffde2e6d69da3ce574c88ae390a1144d62b780 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 4 May 2020 14:08:19 +0200 Subject: [PATCH 089/213] added a generic cache --- pkg/cache/cache.go | 95 +++++++++++++++++++++++++++++++++ pkg/cache/cache_test.go | 67 +++++++++++++++++++++++ pkg/cache/option.go | 36 +++++++++++++ pkg/middleware/logger.go | 15 ------ pkg/middleware/openidconnect.go | 79 +++++++++++++++++++-------- 5 files changed, 254 insertions(+), 38 deletions(-) create mode 100644 pkg/cache/cache.go create mode 100644 pkg/cache/cache_test.go create mode 100644 pkg/cache/option.go delete mode 100644 pkg/middleware/logger.go diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go new file mode 100644 index 0000000000..51ab60fe7b --- /dev/null +++ b/pkg/cache/cache.go @@ -0,0 +1,95 @@ +package cache + +import ( + "fmt" + "sync" + "time" +) + +// Entry represents an entry on the cache. You can type assert on V. +type Entry struct { + V interface{} + Valid bool +} + +// Cache is a barebones cache implementation. +type Cache struct { + entries map[string]map[string]Entry + size int + ttl time.Duration + m sync.Mutex +} + +// NewCache returns a new instance of Cache. +func NewCache(o ...Option) Cache { + opts := newOptions(o...) + + return Cache{ + size: opts.size, + entries: map[string]map[string]Entry{}, + } +} + +// Get gets an entry on a service `svcKey` by a give `key`. +func (c *Cache) Get(svcKey, key string) (*Entry, error) { + var value Entry + ok := true + + c.m.Lock() + defer c.m.Unlock() + + if value, ok = c.entries[svcKey][key]; !ok { + return nil, fmt.Errorf("invalid service key: `%v`", key) + } + + return &value, nil +} + +// Set sets a key / value. It lets a service add entries on a request basis. +func (c *Cache) Set(svcKey, key string, val interface{}) error { + c.m.Lock() + defer c.m.Unlock() + + if !c.fits() { + return fmt.Errorf("cache is full") + } + + if _, ok := c.entries[svcKey]; !ok { + c.entries[svcKey] = map[string]Entry{} + } + + if _, ok := c.entries[svcKey][key]; ok { + return fmt.Errorf("key `%v` already exists", key) + } + + c.entries[svcKey][key] = Entry{ + V: val, + Valid: true, + } + + return nil +} + +// Invalidate invalidates a cache Entry by key. +func (c *Cache) Invalidate(key string) error { + c.m.Lock() + defer c.m.Unlock() + + if _, ok := c.entries[key]; !ok { + return fmt.Errorf("invalid key: `%v`", key) + } + + return nil +} + +// Length returns the amount of entries. +func (c *Cache) Length(k string) int { + return len(c.entries[k]) +} + +func (c *Cache) fits() bool { + if c.size < len(c.entries) { + return false + } + return true +} diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go new file mode 100644 index 0000000000..1c6500ff54 --- /dev/null +++ b/pkg/cache/cache_test.go @@ -0,0 +1,67 @@ +package cache + +import ( + "testing" +) + +// Prevents from invalid import cycle. +type AccountsCacheEntry struct { + Email string + UUID string +} + +func TestSet(t *testing.T) { + c := NewCache( + Size(256), + ) + + err := c.Set("accounts", "hello@foo.bar", AccountsCacheEntry{ + Email: "hello@foo.bar", + UUID: "9c31b040-59e2-4a2b-926b-334d9e3fbd05", + }) + if err != nil { + t.Error(err) + } + + if c.Length("accounts") != 1 { + t.Errorf("expected length 1 got `%v`", len(c.entries)) + } + + item, err := c.Get("accounts", "hello@foo.bar") + if err != nil { + t.Error(err) + } + + if cachedEntry, ok := item.V.(AccountsCacheEntry); !ok { + t.Errorf("invalid cached value type") + } else { + if cachedEntry.Email != "hello@foo.bar" { + t.Errorf("invalid value. Expected `hello@foo.bar` got: `%v`", cachedEntry.Email) + } + } +} + +func TestGet(t *testing.T) { + svcCache := NewCache( + Size(256), + ) + + err := svcCache.Set("accounts", "node", "0.0.0.0:1234") + if err != nil { + t.Error(err) + } + + raw, err := svcCache.Get("accounts", "node") + if err != nil { + t.Error(err) + } + + v, ok := raw.V.(string) + if !ok { + t.Errorf("invalid type on service node key") + } + + if v != "0.0.0.0:1234" { + t.Errorf("expected `0.0.0.0:1234` got `%v`", v) + } +} diff --git a/pkg/cache/option.go b/pkg/cache/option.go new file mode 100644 index 0000000000..bfee5be52c --- /dev/null +++ b/pkg/cache/option.go @@ -0,0 +1,36 @@ +package cache + +import "time" + +// Options are all the possible options. +type Options struct { + size int + ttl time.Duration +} + +// Option mutates option +type Option func(*Options) + +// Size configures the size of the cache in items. +func Size(s int) Option { + return func(o *Options) { + o.size = s + } +} + +// TTL rebuilds the cache after the configured duration. +func TTL(ttl time.Duration) Option { + return func(o *Options) { + o.ttl = ttl + } +} + +func newOptions(opts ...Option) Options { + o := Options{} + + for _, v := range opts { + v(&o) + } + + return o +} diff --git a/pkg/middleware/logger.go b/pkg/middleware/logger.go deleted file mode 100644 index 9db319f223..0000000000 --- a/pkg/middleware/logger.go +++ /dev/null @@ -1,15 +0,0 @@ -package middleware - -import ( - "net/http" -) - -// Logger undocummented -func Logger() M { - return func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // do some logging logic here - next.ServeHTTP(w, r) - }) - } -} diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 3bcfecd9eb..f772340533 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -4,15 +4,16 @@ import ( "context" "crypto/tls" "errors" + "fmt" "net/http" "strings" "time" oidc "github.com/coreos/go-oidc" mclient "github.com/micro/go-micro/v2/client" - "github.com/micro/go-micro/v2/registry" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/cache" "golang.org/x/oauth2" ) @@ -20,6 +21,9 @@ var ( // ErrInvalidToken is returned when the request token is invalid. ErrInvalidToken = errors.New("invalid or missing token") + // svcCache caches requests for given services to prevent round trips to the service + svcCache = cache.NewCache() + accountSvc = "com.owncloud.accounts" ) @@ -53,6 +57,9 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { header := r.Header.Get("Authorization") path := r.URL.Path + // void call for testing purposes. + uuidFromClaims(ocisoidc.StandardClaims{}) + // Ignore request to "/konnect/v1/userinfo" as this will cause endless loop when getting userinfo // needs a better idea on how to not hardcode this if header == "" || !strings.HasPrefix(header, "Bearer ") || path == "/konnect/v1/userinfo" { @@ -107,6 +114,16 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { return } + // add UUID to the request context for the handler to deal with + // void call for correct staticchecks. + _, err = uuidFromClaims(claims) + + if err != nil { + opt.Logger.Error().Err(err).Interface("account uuid", userInfo).Msg("failed to unmarshal userinfo claims") + w.WriteHeader(http.StatusInternalServerError) + return + } + opt.Logger.Debug().Interface("claims", claims).Interface("userInfo", userInfo).Msg("unmarshalled userinfo") // store claims in context // uses the original context, not the one with probably reduced security @@ -117,33 +134,49 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { } } +// AccountsCacheEntry stores a request to the accounts service on the cache. +// this type declaration should be on each respective service. +type AccountsCacheEntry struct { + Email string + UUID string +} + +const ( + // AccountsKey declares the svcKey for the Accounts service. + AccountsKey = "accounts" + + // NodeKey declares the key that will be used to store the node address. + // It is shared between services. + NodeKey = "node" +) + // from the user claims we need to get the uuid from the accounts service func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { - var node string - // get accounts node from micro registry - // TODO this assumes we use mdns as registry. This should be configurable for any ocis extension. - svc, err := registry.GetService(accountSvc) + entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { - return "", err + c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + resp, err := c.Get(context.Background(), &acc.Query{ + Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // use hardcoded key... + // Email: claims.Email // depends on @jfd PR. + }) + if err != nil { + return "", err + } + + // TODO add logging info. Round trip has been made to the accounts service. + err = svcCache.Set(AccountsKey, claims.Email, resp.Payload.Account.Uuid) + if err != nil { + return "", err + } + + return resp.Key, nil } - if len(svc) > 0 { - node = svc[0].Nodes[0].Address + uuid, ok := entry.V.(string) + if !ok { + return "", fmt.Errorf("unexpected type on cache entry value. Expected string type") } - c := acc.NewSettingsService("accounts", mclient.DefaultClient) - _, err = c.Get(context.Background(), &acc.Query{ - // TODO accounts query message needs to be updated to query for multiple fields - // queries by key makes little sense as it is unknown. - Key: "73912d13-32f7-4fb6-aeb2-ea2088a3a264", - }) - if err != nil { - return "", err - } - - // by this point, rec.Payload contains the Account info. To include UUID, see: - // https://github.com/owncloud/ocis-accounts/pull/22/files#diff-b425175389864c4f9218ecd9cae80223R23 - - // return rec.GetPayload().Account.UUID, nil // depends on the aforementioned PR - return node, nil + // TODO add logging info. Read from cache. + return uuid, nil } From c97ef8a464cf5232768d51150ceb43bf9afa522f Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 4 May 2020 14:11:39 +0200 Subject: [PATCH 090/213] add todo comment --- pkg/middleware/openidconnect.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index f772340533..ca16508984 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -58,6 +58,7 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { path := r.URL.Path // void call for testing purposes. + // TODO: Add uuid to the request context for the next handler. uuidFromClaims(ocisoidc.StandardClaims{}) // Ignore request to "/konnect/v1/userinfo" as this will cause endless loop when getting userinfo From 1d735adac6b62bf0dedf5c062735a2a275e34661 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 5 May 2020 17:22:23 +0200 Subject: [PATCH 091/213] added eviction logiuc --- pkg/cache/cache.go | 27 +++++++++++++++++++-------- pkg/cache/cache_test.go | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 51ab60fe7b..382b8b8edd 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -16,7 +16,7 @@ type Entry struct { type Cache struct { entries map[string]map[string]Entry size int - ttl time.Duration + ttl time.Duration // duration of a single entry. m sync.Mutex } @@ -71,18 +71,29 @@ func (c *Cache) Set(svcKey, key string, val interface{}) error { } // Invalidate invalidates a cache Entry by key. -func (c *Cache) Invalidate(key string) error { - c.m.Lock() - defer c.m.Unlock() - - if _, ok := c.entries[key]; !ok { - return fmt.Errorf("invalid key: `%v`", key) +func (c *Cache) Invalidate(svcKey, key string) error { + r, err := c.Get(svcKey, key) + if err != nil { + return err } + r.Valid = false + c.entries[svcKey][key] = *r return nil } -// Length returns the amount of entries. +// Evict frees memory from the cache by removing invalid keys. It is a noop. +func (c *Cache) Evict() { + for _, v := range c.entries { + for k, svcEntry := range v { + if !svcEntry.Valid { + delete(v, k) + } + } + } +} + +// Length returns the amount of entries per service key. func (c *Cache) Length(k string) int { return len(c.entries[k]) } diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go index 1c6500ff54..7ac66a9b71 100644 --- a/pkg/cache/cache_test.go +++ b/pkg/cache/cache_test.go @@ -41,6 +41,38 @@ func TestSet(t *testing.T) { } } +func TestEvict(t *testing.T) { + c := NewCache( + Size(256), + ) + + if err := c.Set("accounts", "hello@foo.bar", AccountsCacheEntry{ + Email: "hello@foo.bar", + UUID: "9c31b040-59e2-4a2b-926b-334d9e3fbd05", + }); err != nil { + t.Error(err) + } + + if err := c.Invalidate("accounts", "hello@foo.bar"); err != nil { + t.Error(err) + } + + v, err := c.Get("accounts", "hello@foo.bar") + if err != nil { + t.Error(err) + } + + if v.Valid { + t.Errorf("cache key unexpected valid state") + } + + c.Evict() + + if c.Length("accounts") != 0 { + t.Errorf("expected length 0 got `%v`", len(c.entries)) + } +} + func TestGet(t *testing.T) { svcCache := NewCache( Size(256), From c6da8624a5cbacd48e93a94799398d76171806f8 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 5 May 2020 18:29:32 +0200 Subject: [PATCH 092/213] add uuid to context --- pkg/middleware/openidconnect.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index ca16508984..d53576ce67 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -25,6 +25,9 @@ var ( svcCache = cache.NewCache() accountSvc = "com.owncloud.accounts" + + // UUIDKey works as a context key + UUIDKey interface{} = "uuid" ) // newOIDCOptions initializes the available default options. @@ -57,9 +60,13 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { header := r.Header.Get("Authorization") path := r.URL.Path - // void call for testing purposes. - // TODO: Add uuid to the request context for the next handler. - uuidFromClaims(ocisoidc.StandardClaims{}) + uuid, err := uuidFromClaims(ocisoidc.StandardClaims{}) + if err != nil { + // stop the auth flow altogether? + } + + withUUID := context.WithValue(r.Context(), UUIDKey, uuid) + r = r.WithContext(withUUID) // Ignore request to "/konnect/v1/userinfo" as this will cause endless loop when getting userinfo // needs a better idea on how to not hardcode this @@ -158,7 +165,7 @@ func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. resp, err := c.Get(context.Background(), &acc.Query{ Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // use hardcoded key... - // Email: claims.Email // depends on @jfd PR. + // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 }) if err != nil { return "", err From 65b1926d70010dde348e9bd0b04f6737d9c46551 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 6 May 2020 09:29:46 +0200 Subject: [PATCH 093/213] add replace statements --- go.mod | 4 +++- go.sum | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 68091328d9..5fa451ba8c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.1.0+incompatible - github.com/golang/protobuf v1.3.2 + github.com/golang/protobuf v1.4.0 github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 @@ -26,3 +26,5 @@ require ( golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect ) + +replace github.com/owncloud/ocis-accounts => ../ocis-accounts diff --git a/go.sum b/go.sum index 6238170c55..5c251d9f33 100644 --- a/go.sum +++ b/go.sum @@ -243,6 +243,7 @@ github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfc github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= @@ -303,6 +304,11 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= @@ -314,6 +320,7 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= @@ -628,6 +635,7 @@ github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0Q github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/owncloud/ocis-pkg/v2 v2.2.0 h1:lsb1PSn8F4ppPHOECVc3fqziDM/VdGQ/zqxQnEk+qi8= github.com/owncloud/ocis-pkg/v2 v2.2.0/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= +github.com/owncloud/ocis-settings v0.0.0-20200407203258-bd5da39fe8c0/go.mod h1:/hN4p01cRNdayKfa3dk9QaZ3FqJ77L54Wycle3CRN84= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -737,6 +745,7 @@ github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzu github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= @@ -1009,6 +1018,7 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODat golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1059,6 +1069,11 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= From b74496bbf4453f16cde5a4131f1b5893e33a3f90 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 6 May 2020 14:30:41 +0200 Subject: [PATCH 094/213] add alice and maintain a set order on the middlewares. Write uuid as a temporary response header --- config/proxy-example.json | 6 ++++ go.sum | 3 ++ pkg/command/server.go | 14 ++++---- pkg/middleware/account_uuid.go | 57 +++++++++++++++++++++++++++++++++ pkg/middleware/openidconnect.go | 20 ++++++------ pkg/server/http/option.go | 6 ++-- pkg/server/http/server.go | 16 ++------- 7 files changed, 86 insertions(+), 36 deletions(-) create mode 100644 pkg/middleware/account_uuid.go diff --git a/config/proxy-example.json b/config/proxy-example.json index e8de52cd85..21e0a8c084 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -2,6 +2,12 @@ "HTTP": { "Namespace": "com.owncloud" }, + "oidc": { + "endpoint": "https://localhost:9200", + "realm": "", + "signing_algs": ["RS256", "PS256"], + "insecure": true + }, "policy_selector": { "static": {"policy" : "reva"} }, diff --git a/go.sum b/go.sum index 5c251d9f33..9e5ddac773 100644 --- a/go.sum +++ b/go.sum @@ -243,6 +243,7 @@ github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfc github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi v4.1.0+incompatible h1:ETj3cggsVIY2Xao5ExCu6YhEh5MD6JTfcBzS37R260w= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= @@ -308,6 +309,7 @@ github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -1073,6 +1075,7 @@ google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLY google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/pkg/command/server.go b/pkg/command/server.go index 64888a2f79..085c301900 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -7,6 +7,7 @@ import ( "strings" "time" + "github.com/justinas/alice" "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/middleware" @@ -154,7 +155,7 @@ func Server(cfg *config.Config) *cli.Command { proxyHTTP.Metrics(metrics), proxyHTTP.Flags(flagset.RootWithConfig(config.New())), proxyHTTP.Flags(flagset.ServerWithConfig(config.New())), - proxyHTTP.Middlewares(loadMiddlewares(cfg, logger)...), + proxyHTTP.Middlewares(loadMiddlewares(cfg, logger)), ) if err != nil { @@ -234,11 +235,7 @@ func Server(cfg *config.Config) *cli.Command { } } -func loadMiddlewares(cfg *config.Config, l log.Logger) []middleware.M { - var configuredMiddlewares = make([]middleware.M, 0) - - configuredMiddlewares = append(configuredMiddlewares, middleware.RedirectToHTTPS) - +func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { if cfg.OIDC != nil { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") @@ -250,8 +247,9 @@ func loadMiddlewares(cfg *config.Config, l log.Logger) []middleware.M { oidc.Logger(l), ) - configuredMiddlewares = append(configuredMiddlewares, oidcMW) + // configuredMiddlewares = append(configuredMiddlewares, oidcMW, middleware.AccountUUID) + return alice.New(middleware.RedirectToHTTPS, oidcMW, middleware.AccountUUID) } - return configuredMiddlewares + return alice.New(middleware.RedirectToHTTPS) } diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go new file mode 100644 index 0000000000..5343572323 --- /dev/null +++ b/pkg/middleware/account_uuid.go @@ -0,0 +1,57 @@ +package middleware + +import ( + "context" + "net/http" + + mclient "github.com/micro/go-micro/v2/client" + acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" + ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" +) + +// AccountUUID fetches the ocis account uuid from the oidc standard claims +func AccountUUID(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + claims := r.Context().Value(ClaimsKey) + if claims == nil { + next.ServeHTTP(w, r) + return + } + + entry, err := svcCache.Get(AccountsKey, claims.(ocisoidc.StandardClaims).Email) + if err != nil { + c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + resp, err := c.Get(context.Background(), &acc.Query{ + Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", + // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 + }) + if err != nil { + // placeholder. Add more meaningful response + w.WriteHeader(http.StatusInternalServerError) + return + } + + err = svcCache.Set(AccountsKey, claims.(ocisoidc.StandardClaims).Email, resp.Payload.Account.Uuid) + if err != nil { + // placeholder. Add more meaningful response + w.WriteHeader(http.StatusInternalServerError) + return + } + + // TODO: build JWT and set it, instead of the uuid on that header. + w.Header().Set("x-ocis-accounts-uuid", resp.Payload.Account.Uuid) + } + + uuid, ok := entry.V.(string) + if !ok { + // placeholder. Add more meaningful response + w.WriteHeader(http.StatusInternalServerError) + return + } + + // TODO: build JWT and set it, instead of the uuid on that header. + w.Header().Set("x-ocis-accounts-uuid", uuid) + + next.ServeHTTP(w, r) + }) +} diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index d53576ce67..890bd189fc 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -28,6 +28,9 @@ var ( // UUIDKey works as a context key UUIDKey interface{} = "uuid" + + // ClaimsKey works as a context key for user claims + ClaimsKey interface{} = "claims" ) // newOIDCOptions initializes the available default options. @@ -42,7 +45,7 @@ func newOIDCOptions(opts ...ocisoidc.Option) ocisoidc.Options { } // OpenIDConnect provides a middleware to check access secured by a static token. -func OpenIDConnect(opts ...ocisoidc.Option) M { +func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler { opt := newOIDCOptions(opts...) // set defaults @@ -60,14 +63,6 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { header := r.Header.Get("Authorization") path := r.URL.Path - uuid, err := uuidFromClaims(ocisoidc.StandardClaims{}) - if err != nil { - // stop the auth flow altogether? - } - - withUUID := context.WithValue(r.Context(), UUIDKey, uuid) - r = r.WithContext(withUUID) - // Ignore request to "/konnect/v1/userinfo" as this will cause endless loop when getting userinfo // needs a better idea on how to not hardcode this if header == "" || !strings.HasPrefix(header, "Bearer ") || path == "/konnect/v1/userinfo" { @@ -122,10 +117,13 @@ func OpenIDConnect(opts ...ocisoidc.Option) M { return } + // inject claims to the request context for the account_uuid middleware. + ctxWithClaims := context.WithValue(r.Context(), ClaimsKey, claims) + r = r.WithContext(ctxWithClaims) + // add UUID to the request context for the handler to deal with // void call for correct staticchecks. _, err = uuidFromClaims(claims) - if err != nil { opt.Logger.Error().Err(err).Interface("account uuid", userInfo).Msg("failed to unmarshal userinfo claims") w.WriteHeader(http.StatusInternalServerError) @@ -164,7 +162,7 @@ func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { if err != nil { c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. resp, err := c.Get(context.Background(), &acc.Query{ - Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // use hardcoded key... + Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 }) if err != nil { diff --git a/pkg/server/http/option.go b/pkg/server/http/option.go index fb5464e9d9..0a93bab2e9 100644 --- a/pkg/server/http/option.go +++ b/pkg/server/http/option.go @@ -4,11 +4,11 @@ import ( "context" "net/http" + "github.com/justinas/alice" "github.com/micro/cli/v2" "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/metrics" - "github.com/owncloud/ocis-proxy/pkg/middleware" ) // Option defines a single option function. @@ -23,7 +23,7 @@ type Options struct { Metrics *metrics.Metrics Flags []cli.Flag Namespace string - Middlewares []middleware.M + Middlewares alice.Chain } // newOptions initializes the available default options. @@ -87,7 +87,7 @@ func Handler(h http.Handler) Option { } // Middlewares provides a function to register middlewares -func Middlewares(val ...middleware.M) Option { +func Middlewares(val alice.Chain) Option { return func(o *Options) { o.Middlewares = val } diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 2a346edde6..8442bf09ca 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -2,12 +2,10 @@ package http import ( "crypto/tls" - "net/http" "os" svc "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-proxy/pkg/crypto" - "github.com/owncloud/ocis-proxy/pkg/middleware" "github.com/owncloud/ocis-proxy/pkg/version" ) @@ -40,6 +38,7 @@ func Server(opts ...Option) (svc.Service, error) { } tlsConfig := &tls.Config{Certificates: []tls.Certificate{cer}} + chain := options.Middlewares.Then(options.Handler) service := svc.NewService( svc.Name("web.proxy"), @@ -50,9 +49,7 @@ func Server(opts ...Option) (svc.Service, error) { svc.Address(options.Config.HTTP.Addr), svc.Context(options.Context), svc.Flags(options.Flags...), - svc.Handler( - applyMiddlewares(options.Handler, options.Middlewares...), - ), + svc.Handler(chain), ) if err := service.Init(); err != nil { @@ -61,12 +58,3 @@ func Server(opts ...Option) (svc.Service, error) { return service, nil } - -func applyMiddlewares(next http.Handler, mws ...middleware.M) http.Handler { - var h = next - for _, mw := range mws { - h = mw(h) - } - - return h -} From a8c01a4da8ff0bce62ad010129928fdcbd8afbf4 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 11 May 2020 12:52:21 +0200 Subject: [PATCH 095/213] use latest accounts, get rid of replace, fix api --- go.mod | 14 +- go.sum | 177 ++++++++----------------- pkg/middleware/account_uuid.go | 8 +- pkg/middleware/openidconnect.go | 7 +- pkg/proxy/policy/selector.go | 9 +- pkg/proxy/policy/selector_test.go | 209 +++++++++++++++--------------- 6 files changed, 178 insertions(+), 246 deletions(-) diff --git a/go.mod b/go.mod index 5fa451ba8c..ade901dc67 100644 --- a/go.mod +++ b/go.mod @@ -7,24 +7,22 @@ require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.1.0+incompatible - github.com/golang/protobuf v1.4.0 - github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c + github.com/justinas/alice v1.2.0 + github.com/micro/cli/v2 v2.1.2 github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 - github.com/owncloud/ocis-accounts v0.1.0 - github.com/owncloud/ocis-pkg/v2 v2.2.0 + github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 + github.com/owncloud/ocis-pkg/v2 v2.2.1 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 - github.com/spf13/viper v1.6.2 + github.com/spf13/viper v1.6.3 go.opencensus.io v0.22.2 - golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect - golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect ) -replace github.com/owncloud/ocis-accounts => ../ocis-accounts +replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 diff --git a/go.sum b/go.sum index 9e5ddac773..4ff8368cf3 100644 --- a/go.sum +++ b/go.sum @@ -51,15 +51,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= -github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -78,7 +73,6 @@ github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ github.com/abbot/go-http-auth v0.4.1-0.20181019201920-860ed7f246ff/go.mod h1:Cz6ARTIzApMJDzh5bRMSUou6UMSp0IEXg9km/ci7TJM= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= -github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75 h1:3ILjVyslFbc4jl1w5TWuvvslFD/nDfR2H8tVaMVLrEY= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -96,6 +90,7 @@ github.com/anacrolix/sync v0.2.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DC github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572/go.mod h1:MDwc+vsGEq7RMw6lr2GKOEqjWny5hO5OZXRVNaBJ2Dk= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -118,11 +113,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -142,17 +135,16 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= +github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -161,17 +153,15 @@ github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= @@ -179,12 +169,12 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= @@ -194,14 +184,10 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnsimple/dnsimple-go v0.30.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 h1:oqgGT9O61YAYvI41EBsLePOr+LE6roB0xY4gpkZuFSE= github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -233,7 +219,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA= github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -241,7 +226,6 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= -github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/chi v4.1.0+incompatible h1:ETj3cggsVIY2Xao5ExCu6YhEh5MD6JTfcBzS37R260w= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -254,7 +238,6 @@ github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-log/log v0.1.0 h1:wudGTNsiGzrD5ZjgIkVZ517ugi2XRe9Q/xRCzwEO4/U= github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -272,55 +255,50 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stomp/stomp v2.0.3+incompatible/go.mod h1:VqCtqNZv1226A1/79yh+rMiFUcfY3R109np+7ke4n0c= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= -github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 h1:28FVBuwkwowZMjbA7M0wXsI6t3PYulRTMio3SO+eKCM= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= @@ -345,30 +323,25 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.4 h1:5xLhQjsk4zqPf9EHCrja2qFZMx+yBqkO3XgJ14bNnU0= github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU= +github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw= @@ -408,20 +381,15 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo= github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= @@ -429,20 +397,17 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -458,14 +423,11 @@ github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= @@ -479,30 +441,28 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= -github.com/lucas-clemente/quic-go v0.13.1 h1:CxtJTXQIh2aboCPk0M6vf530XOov6DZjVBiSE3nSj8s= github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= -github.com/lucas-clemente/quic-go v0.14.1 h1:c1aKoBZKOPA+49q96B1wGkibyPP0AxYh45WuAoq+87E= github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/marten-seemann/chacha20 v0.2.0 h1:f40vqzzx+3GdOmzQoItkLX5WLvHgPgyYqFFIO5Gh4hQ= github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/marten-seemann/qtls v0.4.1 h1:YlT8QP3WCCvvok7MGEZkMldXbyqgr8oFg5/n8Gtbkks= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -511,16 +471,16 @@ github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaR github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA= github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk= -github.com/micro/cli/v2 v2.1.1 h1:uFw0SMIKmGuyHIm8lXns/NOn7V62bM5y7DnlxUM+BEQ= github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= -github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c h1:oohy8v2QQeXfDe9/BaM0b+5wETzoMiemOs3fhPhnFTg= github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= +github.com/micro/cli/v2 v2.1.2 h1:43J1lChg/rZCC1rvdqZNFSQDrGT7qfMrtp6/ztpIkEM= +github.com/micro/cli/v2 v2.1.2/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM= github.com/micro/go-micro v1.17.1/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E= github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= -github.com/micro/go-micro/v2 v2.0.0 h1:bMx549RwJ9Yuiui8cDVlfYhVNP8I8KBJTMyLthEXpRw= github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= +github.com/micro/go-micro/v2 v2.0.1-0.20200207205803-ef537270add3/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= @@ -528,17 +488,16 @@ github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcD github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= github.com/micro/micro v1.16.0/go.mod h1:TO5Ng0KidbfRYIxVM4Q3deZ0A+qwRyP9WeXp+k2fWNA= +github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348/go.mod h1:MQBt/cBC7vKP6JMebU5982Umd5GIrVdhPbOGieXowyY= github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.22 h1:Jm64b3bO9kP43ddLjL2EY3Io6bmy1qGb9Xxz6TqS6rc= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -554,7 +513,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -563,14 +521,12 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= -github.com/nats-io/jwt v0.3.0 h1:xdnzwFETV++jNc4W1mw//qFyJGb2ABOombmZJQS4+Qo= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= @@ -581,7 +537,6 @@ github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -589,6 +544,7 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= @@ -603,6 +559,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -612,32 +570,28 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin/zipkin-go v0.1.6 h1:yXiysv1CSK7Q5yjGy1710zZGnsbMUIjluWBxtLXHPBo= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= -github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= -github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M= -github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA= -github.com/owncloud/ocis-hello v0.0.0-20200114105804-61741477dcec/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8= +github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 h1:pMRaeSU/8nE4+PmYTzCQERJAhLvZb9OMkRcaU20mXVc= +github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409/go.mod h1:ltC+eLvLEuIVmcGc4dwkg+24Nl7PvyqlnZp/pH8Lg8k= +github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= -github.com/owncloud/ocis-pkg/v2 v2.2.0 h1:lsb1PSn8F4ppPHOECVc3fqziDM/VdGQ/zqxQnEk+qi8= -github.com/owncloud/ocis-pkg/v2 v2.2.0/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= -github.com/owncloud/ocis-settings v0.0.0-20200407203258-bd5da39fe8c0/go.mod h1:/hN4p01cRNdayKfa3dk9QaZ3FqJ77L54Wycle3CRN84= +github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV03z6zI= +github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= +github.com/owncloud/ocis-settings v0.0.0-20200511093940-0fddb624d0da/go.mod h1:1PyfbVIZMTX21JxsRT+maRIjRFD3H+yhfpr1jMz3PeA= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -652,13 +606,11 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= @@ -688,18 +640,16 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/restic/calens v0.1.0 h1:RHGokdZ72dICyIz1EjEsfZwUhvNZz/zy2SawxJktdWA= github.com/restic/calens v0.1.0/go.mod h1:u67f5msOjCTDYNzOf/NoAUSdmXP03YXPCwIQLYADy5M= -github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -721,21 +671,16 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -747,10 +692,9 @@ github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzu github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= +github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -761,9 +705,7 @@ github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRci github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -774,7 +716,6 @@ github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLp github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= @@ -785,6 +726,7 @@ github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMW github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= @@ -796,13 +738,12 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -824,7 +765,6 @@ go.uber.org/ratelimit v0.1.0/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -851,9 +791,7 @@ golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8sdVKV1m1WgU4/S5IRQAzc= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty86cFeKoKWbwy2wQj0gIxbU= golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -878,6 +816,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -905,22 +844,22 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191109021931-daa7c04131f5 h1:bHNaocaoJxYBo5cw41UyTMLjYlb8wPY7+WFrnklbHOM= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -928,7 +867,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -970,7 +908,6 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX/3HiPdhVEuyj5a59RM= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -982,9 +919,7 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1011,15 +946,17 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODatUqANFZ+5BPMnzsy4hulY= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200427214658-4697a2867c88 h1:Nj7oNnL9tSACMt2JvszZN6P4IXiy1t6E/YRMr7YtaSw= +golang.org/x/tools v0.0.0-20200427214658-4697a2867c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1050,12 +987,13 @@ google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1 h1:aQktFqmDE2yjveXJlVIfslDFmFnUXSqG0i6KRcJAeMc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba h1:pRj9OXZbwNtbtZtOB4dLwfK4u+EVRMvP+e9zKkg2grM= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1067,16 +1005,18 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= @@ -1084,10 +1024,8 @@ gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUy gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= @@ -1108,10 +1046,10 @@ gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLv gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= +gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.4.0 h1:0kXPskUMGAXXWJlP05ktEMOV0vmzFQUWw6d+aZJQU8A= gopkg.in/square/go-jose.v2 v2.4.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1119,25 +1057,23 @@ gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzE gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.0.20200427215036-cd1ad299aeab/go.mod h1:NELv708mC2Q9lQf29l+sO/v7NIOAQzEXu7jcugNzwvM= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= @@ -1154,5 +1090,4 @@ k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 5343572323..b2ccf19bb1 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -20,20 +20,18 @@ func AccountUUID(next http.Handler) http.Handler { entry, err := svcCache.Get(AccountsKey, claims.(ocisoidc.StandardClaims).Email) if err != nil { - c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - resp, err := c.Get(context.Background(), &acc.Query{ - Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", + c := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + resp, err := c.Get(context.Background(), &acc.GetRequest{ + Uuid: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 }) if err != nil { - // placeholder. Add more meaningful response w.WriteHeader(http.StatusInternalServerError) return } err = svcCache.Set(AccountsKey, claims.(ocisoidc.StandardClaims).Email, resp.Payload.Account.Uuid) if err != nil { - // placeholder. Add more meaningful response w.WriteHeader(http.StatusInternalServerError) return } diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 890bd189fc..6e8a0e2b58 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -122,7 +122,6 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler r = r.WithContext(ctxWithClaims) // add UUID to the request context for the handler to deal with - // void call for correct staticchecks. _, err = uuidFromClaims(claims) if err != nil { opt.Logger.Error().Err(err).Interface("account uuid", userInfo).Msg("failed to unmarshal userinfo claims") @@ -160,9 +159,9 @@ const ( func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { - c := acc.NewSettingsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - resp, err := c.Get(context.Background(), &acc.Query{ - Key: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", + c := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + resp, err := c.Get(context.Background(), &acc.GetRequest{ + Uuid: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 }) if err != nil { diff --git a/pkg/proxy/policy/selector.go b/pkg/proxy/policy/selector.go index 9f450f88a7..8bb0e4e1a2 100644 --- a/pkg/proxy/policy/selector.go +++ b/pkg/proxy/policy/selector.go @@ -3,11 +3,12 @@ package policy import ( "context" "fmt" + "net/http" + "github.com/micro/go-micro/v2/client/grpc" accounts "github.com/owncloud/ocis-accounts/pkg/proto/v0" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/config" - "net/http" ) var ( @@ -63,7 +64,7 @@ func LoadSelector(cfg *config.PolicySelector) (Selector, error) { if cfg.Migration != nil { return NewMigrationSelector( cfg.Migration, - accounts.NewSettingsService("com.owncloud.accounts", grpc.NewClient())), nil + accounts.NewAccountsService("com.owncloud.accounts", grpc.NewClient())), nil } return nil, ErrUnexpectedConfigError @@ -94,13 +95,13 @@ func NewStaticSelector(cfg *config.StaticSelectorConf) Selector { // // This selector can be used in migration-scenarios where some users have already migrated from ownCloud10 to OCIS and // thus have an entry in ocis-accounts. All users without accounts entry are routed to the legacy ownCloud10 instance. -func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.SettingsService) Selector { +func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.AccountsService) Selector { var acc = ss return func(ctx context.Context, r *http.Request) (s string, err error) { var userID string if claims := ocisoidc.FromContext(r.Context()); claims != nil { userID = claims.PreferredUsername - if _, err := acc.Get(ctx, &accounts.Query{Key: userID}); err != nil { + if _, err := acc.Get(ctx, &accounts.GetRequest{Uuid: userID}); err != nil { return cfg.AccNotFoundPolicy, nil } diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go index 32eb661657..c56b7e566f 100644 --- a/pkg/proxy/policy/selector_test.go +++ b/pkg/proxy/policy/selector_test.go @@ -1,127 +1,128 @@ package policy -import ( - "context" - "fmt" - "github.com/golang/protobuf/ptypes/empty" - "github.com/micro/go-micro/v2/client" - "github.com/owncloud/ocis-accounts/pkg/proto/v0" - "github.com/owncloud/ocis-pkg/v2/oidc" - "github.com/owncloud/ocis-proxy/pkg/config" - "net/http/httptest" - "testing" -) +// import ( +// "context" +// "fmt" +// "net/http/httptest" +// "testing" -func TestStaticSelector(t *testing.T) { - ctx := context.Background() - req := httptest.NewRequest("GET", "https://example.org/foo", nil) - sel := NewStaticSelector(&config.StaticSelectorConf{Policy: "reva"}) +// "github.com/golang/protobuf/ptypes/empty" +// "github.com/micro/go-micro/v2/client" +// "github.com/owncloud/ocis-accounts/pkg/proto/v0" +// "github.com/owncloud/ocis-pkg/v2/oidc" +// "github.com/owncloud/ocis-proxy/pkg/config" +// ) - want := "reva" - got, err := sel(ctx, req) - if got != want { - t.Errorf("Expected policy %v got %v", want, got) - } +// func TestStaticSelector(t *testing.T) { +// ctx := context.Background() +// req := httptest.NewRequest("GET", "https://example.org/foo", nil) +// sel := NewStaticSelector(&config.StaticSelectorConf{Policy: "reva"}) - if err != nil { - t.Errorf("Unexpected error %v", err) - } +// want := "reva" +// got, err := sel(ctx, req) +// if got != want { +// t.Errorf("Expected policy %v got %v", want, got) +// } - sel = NewStaticSelector(&config.StaticSelectorConf{Policy: "foo"}) +// if err != nil { +// t.Errorf("Unexpected error %v", err) +// } - want = "foo" - got, err = sel(ctx, req) - if got != want { - t.Errorf("Expected policy %v got %v", want, got) - } +// sel = NewStaticSelector(&config.StaticSelectorConf{Policy: "foo"}) - if err != nil { - t.Errorf("Unexpected error %v", err) - } -} +// want = "foo" +// got, err = sel(ctx, req) +// if got != want { +// t.Errorf("Expected policy %v got %v", want, got) +// } -type testCase struct { - AccSvcShouldReturnError bool - Claims *oidc.StandardClaims - Expected string -} +// if err != nil { +// t.Errorf("Unexpected error %v", err) +// } +// } -func TestMigrationSelector(t *testing.T) { - cfg := config.MigrationSelectorConf{ - AccFoundPolicy: "found", - AccNotFoundPolicy: "not_found", - UnauthenticatedPolicy: "unauth", - } - var tests = []testCase{ - {true, &oidc.StandardClaims{PreferredUsername: "Hans"}, "not_found"}, - {false, &oidc.StandardClaims{PreferredUsername: "Hans"}, "found"}, - {false, nil, "unauth"}, - } +// type testCase struct { +// AccSvcShouldReturnError bool +// Claims *oidc.StandardClaims +// Expected string +// } - for k, tc := range tests { - t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { - t.Parallel() - tc := tc - sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) - r := httptest.NewRequest("GET", "https://example.com", nil) - ctx := oidc.NewContext(r.Context(), tc.Claims) - nr := r.WithContext(ctx) +// func TestMigrationSelector(t *testing.T) { +// cfg := config.MigrationSelectorConf{ +// AccFoundPolicy: "found", +// AccNotFoundPolicy: "not_found", +// UnauthenticatedPolicy: "unauth", +// } +// var tests = []testCase{ +// {true, &oidc.StandardClaims{PreferredUsername: "Hans"}, "not_found"}, +// {false, &oidc.StandardClaims{PreferredUsername: "Hans"}, "found"}, +// {false, nil, "unauth"}, +// } - got, err := sut(ctx, nr) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } +// for k, tc := range tests { +// t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { +// t.Parallel() +// tc := tc +// sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) +// r := httptest.NewRequest("GET", "https://example.com", nil) +// ctx := oidc.NewContext(r.Context(), tc.Claims) +// nr := r.WithContext(ctx) - if got != tc.Expected { - t.Errorf("Expected Policy %v got %v", tc.Expected, got) - } - }) - } -} +// got, err := sut(ctx, nr) +// if err != nil { +// t.Errorf("Unexpected error: %v", err) +// } -func mockAccSvc(retErr bool) proto.SettingsService { - if retErr { - return &mockSettingsService{ - getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { - return nil, fmt.Errorf("error returned by mockSettingService GET") - }, - } - } +// if got != tc.Expected { +// t.Errorf("Expected Policy %v got %v", tc.Expected, got) +// } +// }) +// } +// } - return &mockSettingsService{ - getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { - return &proto.Record{}, nil - }, - } +// func mockAccSvc(retErr bool) proto.AccountsService { +// if retErr { +// return &mockSettingsService{ +// getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { +// return nil, fmt.Errorf("error returned by mockSettingService GET") +// }, +// } +// } -} +// return &mockSettingsService{ +// getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { +// return &proto.Record{}, nil +// }, +// } -type mockSettingsService struct { - setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) - getFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) - listFunc func(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) -} +// } -func (m mockSettingsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { - if m.setFunc != nil { - return m.setFunc(ctx, in, opts...) - } +// type mockSettingsService struct { +// setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) +// getFunc func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) +// searchFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) +// } - panic("setFunc was called in test but not mocked") -} +// func (m mockSettingsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { +// if m.setFunc != nil { +// return m.setFunc(ctx, in, opts...) +// } -func (m mockSettingsService) Get(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) { - if m.getFunc != nil { - return m.getFunc(ctx, in, opts...) - } +// panic("setFunc was called in test but not mocked") +// } - panic("getFunc was called in test but not mocked") -} +// func (m mockSettingsService) Get(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) { +// if m.getFunc != nil { +// return m.getFunc(ctx, in, opts...) +// } -func (m mockSettingsService) List(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) { - if m.listFunc != nil { - return m.listFunc(ctx, in, opts...) - } +// panic("getFunc was called in test but not mocked") +// } - panic("listFunc was called in test but not mocked") -} +// func (m mockSettingsService) List(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) { +// if m.listFunc != nil { +// return m.listFunc(ctx, in, opts...) +// } + +// panic("listFunc was called in test but not mocked") +// } From c47dc845b1b45bea144b9cd7da967dc41d534f9b Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Mon, 11 May 2020 13:59:18 +0200 Subject: [PATCH 096/213] Use email claim for account GetRequest --- pkg/command/server.go | 1 - pkg/middleware/account_uuid.go | 21 +++++++------- pkg/middleware/openidconnect.go | 49 +-------------------------------- 3 files changed, 11 insertions(+), 60 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index 085c301900..ea3c4b3f49 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -247,7 +247,6 @@ func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { oidc.Logger(l), ) - // configuredMiddlewares = append(configuredMiddlewares, oidcMW, middleware.AccountUUID) return alice.New(middleware.RedirectToHTTPS, oidcMW, middleware.AccountUUID) } diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index b2ccf19bb1..19496c470a 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -22,8 +22,7 @@ func AccountUUID(next http.Handler) http.Handler { if err != nil { c := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. resp, err := c.Get(context.Background(), &acc.GetRequest{ - Uuid: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", - // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 + Email: claims.(ocisoidc.StandardClaims).Email, }) if err != nil { w.WriteHeader(http.StatusInternalServerError) @@ -38,18 +37,18 @@ func AccountUUID(next http.Handler) http.Handler { // TODO: build JWT and set it, instead of the uuid on that header. w.Header().Set("x-ocis-accounts-uuid", resp.Payload.Account.Uuid) - } + } else { + uuid, ok := entry.V.(string) + if !ok { + // placeholder. Add more meaningful response + w.WriteHeader(http.StatusInternalServerError) + return + } - uuid, ok := entry.V.(string) - if !ok { - // placeholder. Add more meaningful response - w.WriteHeader(http.StatusInternalServerError) - return + // TODO: build JWT and set it, instead of the uuid on that header. + w.Header().Set("x-ocis-accounts-uuid", uuid) } - // TODO: build JWT and set it, instead of the uuid on that header. - w.Header().Set("x-ocis-accounts-uuid", uuid) - next.ServeHTTP(w, r) }) } diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 6e8a0e2b58..79f1c9efd7 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -4,14 +4,11 @@ import ( "context" "crypto/tls" "errors" - "fmt" "net/http" "strings" "time" - oidc "github.com/coreos/go-oidc" - mclient "github.com/micro/go-micro/v2/client" - acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/coreos/go-oidc" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/cache" "golang.org/x/oauth2" @@ -24,11 +21,6 @@ var ( // svcCache caches requests for given services to prevent round trips to the service svcCache = cache.NewCache() - accountSvc = "com.owncloud.accounts" - - // UUIDKey works as a context key - UUIDKey interface{} = "uuid" - // ClaimsKey works as a context key for user claims ClaimsKey interface{} = "claims" ) @@ -121,14 +113,6 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler ctxWithClaims := context.WithValue(r.Context(), ClaimsKey, claims) r = r.WithContext(ctxWithClaims) - // add UUID to the request context for the handler to deal with - _, err = uuidFromClaims(claims) - if err != nil { - opt.Logger.Error().Err(err).Interface("account uuid", userInfo).Msg("failed to unmarshal userinfo claims") - w.WriteHeader(http.StatusInternalServerError) - return - } - opt.Logger.Debug().Interface("claims", claims).Interface("userInfo", userInfo).Msg("unmarshalled userinfo") // store claims in context // uses the original context, not the one with probably reduced security @@ -154,34 +138,3 @@ const ( // It is shared between services. NodeKey = "node" ) - -// from the user claims we need to get the uuid from the accounts service -func uuidFromClaims(claims ocisoidc.StandardClaims) (string, error) { - entry, err := svcCache.Get(AccountsKey, claims.Email) - if err != nil { - c := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - resp, err := c.Get(context.Background(), &acc.GetRequest{ - Uuid: "200~a54bf154-e6a5-4e96-851b-a56c9f6c1fce", - // Email: claims.Email // depends on https://github.com/owncloud/ocis-accounts/pull/28 - }) - if err != nil { - return "", err - } - - // TODO add logging info. Round trip has been made to the accounts service. - err = svcCache.Set(AccountsKey, claims.Email, resp.Payload.Account.Uuid) - if err != nil { - return "", err - } - - return resp.Key, nil - } - - uuid, ok := entry.V.(string) - if !ok { - return "", fmt.Errorf("unexpected type on cache entry value. Expected string type") - } - - // TODO add logging info. Read from cache. - return uuid, nil -} From ee82f6939049837c242e1b1293ba4e93dbf43ed7 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 13 May 2020 13:42:07 +0200 Subject: [PATCH 097/213] Create JWT from claims --- go.mod | 6 +- go.sum | 115 +++++++++++++++++++++------ pkg/command/server.go | 4 +- pkg/middleware/account_uuid.go | 138 +++++++++++++++++++++++---------- 4 files changed, 194 insertions(+), 69 deletions(-) diff --git a/go.mod b/go.mod index ade901dc67..c253cb6f27 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,9 @@ require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 contrib.go.opencensus.io/exporter/ocagent v0.6.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 - github.com/coreos/go-oidc v2.1.0+incompatible + github.com/coreos/go-oidc v2.2.1+incompatible + github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 + github.com/cs3org/reva v0.1.0 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e @@ -19,7 +21,7 @@ require ( github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 github.com/spf13/viper v1.6.3 - go.opencensus.io v0.22.2 + go.opencensus.io v0.22.3 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 4ff8368cf3..4ade7ea48b 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= @@ -18,6 +17,7 @@ contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRq contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/ocagent v0.6.0 h1:Z1n6UAyr0QwM284yUuh5Zd8JlvxUGAhFZcgMJkMPrGM= contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= +contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc= @@ -51,10 +51,15 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -97,6 +102,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g= github.com/asim/go-awsxray v0.0.0-20161209120537-0d8a60b6e205/go.mod h1:frVmN4PtXUuL1EbZn0uL4PHSTKNKFnbMpBIhngqMuNQ= @@ -106,6 +113,7 @@ github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.31/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.29.26/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -136,9 +144,9 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= @@ -153,6 +161,7 @@ github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -161,7 +170,10 @@ github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNN github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= +github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= @@ -173,8 +185,13 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GEw3FtXPxc5wxGpaw2pxzREg1GBV9LIQ= +github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/reva v0.1.0 h1:PYzDejKm/+xG3OTS2WgzBxcksVogEGmPgjJVegwSR2c= +github.com/cs3org/reva v0.1.0/go.mod h1:8j6QyyAq9Kjj7RPfJb7M1aEmw5DmsuCJKUULXxYOyRo= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= @@ -198,10 +215,9 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -242,9 +258,11 @@ github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -252,15 +270,16 @@ github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEK github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-redsync/redsync v1.3.1/go.mod h1:qxZwM5JOimfq8y98Wk2+c8dKtxJgG5/yIl2ODz2E5Dk= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stomp/stomp v2.0.3+incompatible/go.mod h1:VqCtqNZv1226A1/79yh+rMiFUcfY3R109np+7ke4n0c= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8= github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -268,6 +287,7 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -284,6 +304,7 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -296,10 +317,12 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -323,18 +346,25 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -385,18 +415,22 @@ github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo= github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -408,6 +442,7 @@ github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGn github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -423,11 +458,14 @@ github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= @@ -443,7 +481,7 @@ github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVL github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -498,6 +536,7 @@ github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -513,6 +552,7 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -521,7 +561,9 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -558,6 +600,7 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= @@ -581,7 +624,10 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8= +github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 h1:pMRaeSU/8nE4+PmYTzCQERJAhLvZb9OMkRcaU20mXVc= github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409/go.mod h1:ltC+eLvLEuIVmcGc4dwkg+24Nl7PvyqlnZp/pH8Lg8k= @@ -594,6 +640,7 @@ github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gb github.com/owncloud/ocis-settings v0.0.0-20200511093940-0fddb624d0da/go.mod h1:1PyfbVIZMTX21JxsRT+maRIjRFD3H+yhfpr1jMz3PeA= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= +github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= @@ -610,13 +657,16 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/xattr v0.4.1/go.mod h1:W2cGD0TBEus7MkUgv0tNZ9JutLtVO3cXu+IBRuHqnFs= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -629,6 +679,7 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -636,6 +687,7 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -647,6 +699,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/restic/calens v0.1.0/go.mod h1:u67f5msOjCTDYNzOf/NoAUSdmXP03YXPCwIQLYADy5M= +github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -655,6 +708,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= +github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= +github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -671,13 +726,18 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -706,16 +766,19 @@ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= @@ -738,13 +801,16 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -752,6 +818,8 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= @@ -773,6 +841,7 @@ gocloud.dev/pubsub/rabbitpubsub v0.17.0/go.mod h1:7o1XYDiIC+b0mmcwJuofsDg08t0DtU golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -782,6 +851,7 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -802,7 +872,6 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -816,6 +885,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -823,6 +893,7 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -854,10 +925,12 @@ golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -873,10 +946,10 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181021155630-eda9bb28ed51/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -891,6 +964,7 @@ golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190415081028-16da32be82c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -920,13 +994,12 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -969,6 +1042,7 @@ google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= @@ -994,22 +1068,8 @@ google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1024,7 +1084,9 @@ gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUy gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -1043,6 +1105,7 @@ gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eR gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= @@ -1050,6 +1113,8 @@ gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUr gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.4.0 h1:0kXPskUMGAXXWJlP05ktEMOV0vmzFQUWw6d+aZJQU8A= gopkg.in/square/go-jose.v2 v2.4.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1067,7 +1132,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1090,4 +1154,5 @@ k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/command/server.go b/pkg/command/server.go index ea3c4b3f49..1f3fc9c3ce 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -247,7 +247,9 @@ func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { oidc.Logger(l), ) - return alice.New(middleware.RedirectToHTTPS, oidcMW, middleware.AccountUUID) + uuidMW := middleware.AccountUUID(middleware.Logger(l)) + + return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW) } return alice.New(middleware.RedirectToHTTPS) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 19496c470a..6c3af95ca2 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -4,51 +4,107 @@ import ( "context" "net/http" + revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" + "github.com/cs3org/reva/pkg/token/manager/jwt" mclient "github.com/micro/go-micro/v2/client" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/log" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" ) -// AccountUUID fetches the ocis account uuid from the oidc standard claims -func AccountUUID(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - claims := r.Context().Value(ClaimsKey) - if claims == nil { - next.ServeHTTP(w, r) - return - } +// AccountMiddlewareOption defines a single option function. +type AccountMiddlewareOption func(o *AccountMiddlewareOptions) - entry, err := svcCache.Get(AccountsKey, claims.(ocisoidc.StandardClaims).Email) - if err != nil { - c := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - resp, err := c.Get(context.Background(), &acc.GetRequest{ - Email: claims.(ocisoidc.StandardClaims).Email, - }) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return - } - - err = svcCache.Set(AccountsKey, claims.(ocisoidc.StandardClaims).Email, resp.Payload.Account.Uuid) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return - } - - // TODO: build JWT and set it, instead of the uuid on that header. - w.Header().Set("x-ocis-accounts-uuid", resp.Payload.Account.Uuid) - } else { - uuid, ok := entry.V.(string) - if !ok { - // placeholder. Add more meaningful response - w.WriteHeader(http.StatusInternalServerError) - return - } - - // TODO: build JWT and set it, instead of the uuid on that header. - w.Header().Set("x-ocis-accounts-uuid", uuid) - } - - next.ServeHTTP(w, r) - }) +// AccountMiddlewareOptions defines the available options for this package. +type AccountMiddlewareOptions struct { + // Logger to use for logging, must be set + Logger log.Logger +} + +// Logger provides a function to set the logger option. +func Logger(l log.Logger) AccountMiddlewareOption { + return func(o *AccountMiddlewareOptions) { + o.Logger = l + } +} + +// AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based +// on the oidc-claims +func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.Handler { + opt := AccountMiddlewareOptions{} + for _, o := range opts { + o(&opt) + } + + return func(next http.Handler) http.Handler { + // TODO: handle error + tokenManager, err := jwt.New(map[string]interface{}{ + "secret": "Pive-Fumkiu4", + "expires": int64(60), + }) + + if err != nil { + opt.Logger.Fatal().Err(err).Msgf("Could not initialize token-manager") + } + + // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + // https://github.com/owncloud/ocis-proxy/issues/38 + accounts := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + l := opt.Logger + claims, ok := r.Context().Value(ClaimsKey).(ocisoidc.StandardClaims) + if !ok { + next.ServeHTTP(w, r) + return + } + + var uuid string + entry, err := svcCache.Get(AccountsKey, claims.Email) + if err != nil { + l.Debug().Msgf("No cache entry for %v", claims.Email) + resp, err := accounts.Get(context.Background(), &acc.GetRequest{ + Email: claims.Email, + }) + + if err != nil { + l.Error().Err(err).Str("email", claims.Email).Msgf("Error fetching from accounts-service") + w.WriteHeader(http.StatusInternalServerError) + return + } + + err = svcCache.Set(AccountsKey, claims.Email, resp.Payload.Account.Uuid) + if err != nil { + l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") + w.WriteHeader(http.StatusInternalServerError) + return + } + + uuid = resp.Payload.Account.Uuid + } + + uuid, ok = entry.V.(string) + if !ok { + w.WriteHeader(http.StatusInternalServerError) + return + } + + l.Debug().Interface("claims", claims).Interface("uuid", uuid).Msgf("Associated claims with uuid") + token, err := tokenManager.MintToken(r.Context(), &revauser.User{ + Id: &revauser.UserId{ + OpaqueId: uuid, + }, + Username: claims.Email, + }) + + if err != nil { + l.Error().Err(err).Msgf("Could not mint token") + w.WriteHeader(http.StatusInternalServerError) + return + } + + w.Header().Set("x-access-token", token) + next.ServeHTTP(w, r) + }) + } } From 23c91ca4cefc65097dad0544a154a9db06fed36c Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 22 May 2020 12:30:37 +0200 Subject: [PATCH 098/213] update go-micro => 2.6, update ocis-accounts => master --- go.mod | 5 ++--- go.sum | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c253cb6f27..80bfa6eaf0 100644 --- a/go.mod +++ b/go.mod @@ -11,11 +11,11 @@ require ( github.com/cs3org/reva v0.1.0 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 - github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e + github.com/micro/go-micro/v2 v2.6.0 github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 - github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 + github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a github.com/owncloud/ocis-pkg/v2 v2.2.1 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect @@ -23,7 +23,6 @@ require ( github.com/spf13/viper v1.6.3 go.opencensus.io v0.22.3 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 - golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 4ade7ea48b..444a9854c5 100644 --- a/go.sum +++ b/go.sum @@ -185,6 +185,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GEw3FtXPxc5wxGpaw2pxzREg1GBV9LIQ= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v0.1.0 h1:PYzDejKm/+xG3OTS2WgzBxcksVogEGmPgjJVegwSR2c= @@ -213,6 +214,7 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/ef-ds/deque v1.0.4-0.20190904040645-54cb57c252a1/go.mod h1:HvODWzv6Y6kBf3Ah2WzN1bHjDUezGLaAhwuWVwfpEJs= github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -221,6 +223,7 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= @@ -248,6 +251,10 @@ github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxm github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= +github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= @@ -278,6 +285,9 @@ github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3a github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8= github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -370,6 +380,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= @@ -467,6 +478,7 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= @@ -507,6 +519,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= +github.com/mholt/certmagic v0.9.3/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw= github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA= github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk= github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= @@ -521,6 +534,7 @@ github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5 github.com/micro/go-micro/v2 v2.0.1-0.20200207205803-ef537270add3/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= +github.com/micro/go-micro/v2 v2.6.0/go.mod h1:60HMKlDN4ShZDJRrlgdcAmkCWNhQbYv+CDG3r7iLE34= github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= @@ -575,18 +589,22 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL github.com/nats-io/nats-server/v2 v2.1.0/go.mod h1:r5y0WgCag0dTj/qiHkHrXAcKQ/f5GMOZaEGdoxxnJ4I= github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.1.6/go.mod h1:BL1NOtaBQ5/y97djERRVWNouMW7GT3gxnmbE/eC8u8A= github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.9.2/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= @@ -631,6 +649,8 @@ github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 h1:pMRaeSU/8nE4+PmYTzCQERJAhLvZb9OMkRcaU20mXVc= github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409/go.mod h1:ltC+eLvLEuIVmcGc4dwkg+24Nl7PvyqlnZp/pH8Lg8k= +github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a h1:MxvILJwMeBzhtt2EGjBveMSbRgOt4rB32+Ijd/XQiZk= +github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a/go.mod h1:rENi9CsW2FgWk8FyHVKFrRvtR++/EZAR1ro9XgeEXAY= github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= @@ -638,6 +658,7 @@ github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35 github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV03z6zI= github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= github.com/owncloud/ocis-settings v0.0.0-20200511093940-0fddb624d0da/go.mod h1:1PyfbVIZMTX21JxsRT+maRIjRFD3H+yhfpr1jMz3PeA= +github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= @@ -722,6 +743,7 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -810,6 +832,7 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -863,8 +886,11 @@ golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty86cFeKoKWbwy2wQj0gIxbU= golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -929,6 +955,7 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -985,6 +1012,8 @@ golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1086,6 +1115,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= From 97bf53cb4a80456cd141cfcd2770995fb35391ba Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 22 May 2020 12:33:20 +0200 Subject: [PATCH 099/213] use golangci-lint as linter --- .drone.star | 4 ++-- .golangci.yaml | 34 ++++++++++++++++++++++++++++++++++ Makefile | 4 ---- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 .golangci.yaml diff --git a/.drone.star b/.drone.star index a204a15edb..35ab9d185c 100644 --- a/.drone.star +++ b/.drone.star @@ -62,10 +62,10 @@ def testing(ctx): }, { 'name': 'staticcheck', - 'image': 'webhippie/golang:1.13', + 'image': 'golangci/golangci-lint:latest', 'pull': 'always', 'commands': [ - 'make staticcheck', + 'golangci-lint run', ], 'volumes': [ { diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000000..222f708739 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,34 @@ +issues: + # exclude-rules: + # - path: pkg/proto/v0/settings.pb.go + # text: "SA1019:" + # linters: + # - staticcheck + # - path: pkg/store/filesystem/io.go + # text: "SA1019:" + # linters: + # - staticcheck +linters: + enable: + - bodyclose + - deadcode + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + - depguard + - golint + - goimports + - unconvert + - scopelint + - maligned + - misspell + # - gocritic + - prealloc + #- gosec + diff --git a/Makefile b/Makefile index 9c699b8982..322a135c52 100644 --- a/Makefile +++ b/Makefile @@ -69,10 +69,6 @@ fmt: vet: go vet $(PACKAGES) -.PHONY: staticcheck -staticcheck: - go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES) - .PHONY: lint lint: for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done; From 85c4232901b3671c7a0d4bec1f14dc61f8ab34a7 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 22 May 2020 12:55:42 +0200 Subject: [PATCH 100/213] fix linters --- .golangci.yaml | 27 +++++++++++++-------------- go.sum | 21 +++++++++++++++++++++ pkg/cache/cache.go | 7 +------ pkg/proxy/proxy_integration_test.go | 3 ++- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 222f708739..64b10facf7 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,21 +1,18 @@ issues: - # exclude-rules: - # - path: pkg/proto/v0/settings.pb.go - # text: "SA1019:" - # linters: - # - staticcheck - # - path: pkg/store/filesystem/io.go - # text: "SA1019:" - # linters: - # - staticcheck + exclude-rules: + - path: pkg/middleware/account_uuid.go + text: "SA4006:" + linters: + - staticcheck + - path: pkg/proxy/proxy_integration_test.go + linters: + - bodyclose linters: enable: - bodyclose - deadcode - - errcheck - gosimple - govet - - ineffassign - staticcheck - structcheck - typecheck @@ -23,12 +20,14 @@ linters: - varcheck - depguard - golint - - goimports - unconvert - - scopelint + # - scopelint - maligned - misspell - # - gocritic - prealloc #- gosec + disable: + - errcheck + - ineffassign + - scopelint diff --git a/go.sum b/go.sum index 444a9854c5..ad79d39f3a 100644 --- a/go.sum +++ b/go.sum @@ -121,6 +121,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= @@ -219,6 +220,7 @@ github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59v github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -238,6 +240,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA= github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -251,9 +254,12 @@ github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxm github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= +github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnpg= github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= @@ -423,6 +429,7 @@ github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvh github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -434,6 +441,7 @@ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwP github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= @@ -461,6 +469,7 @@ github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -534,6 +543,7 @@ github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5 github.com/micro/go-micro/v2 v2.0.1-0.20200207205803-ef537270add3/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= +github.com/micro/go-micro/v2 v2.6.0 h1:HH6uEqTu6pkBtAlwAqQW2sf33640iEa1s9puGIctpO0= github.com/micro/go-micro/v2 v2.6.0/go.mod h1:60HMKlDN4ShZDJRrlgdcAmkCWNhQbYv+CDG3r7iLE34= github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= @@ -553,6 +563,7 @@ github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceT github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -593,11 +604,13 @@ github.com/nats-io/nats-server/v2 v2.1.6/go.mod h1:BL1NOtaBQ5/y97djERRVWNouMW7GT github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.9.2 h1:oDeERm3NcZVrPpdR/JpGdWHMv3oJ8yY30YwxKq+DU2s= github.com/nats-io/nats.go v1.9.2/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.4 h1:aEsHIssIk6ETN5m2/MD8Y4B2X7FfXrBAUdkyRvbVYzA= github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= @@ -664,6 +677,7 @@ github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwU github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= @@ -743,6 +757,7 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -816,6 +831,7 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= @@ -955,6 +971,7 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1013,6 +1030,7 @@ golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1119,6 +1137,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= @@ -1153,7 +1172,9 @@ gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzE gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 382b8b8edd..cdc95d1c4e 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -3,7 +3,6 @@ package cache import ( "fmt" "sync" - "time" ) // Entry represents an entry on the cache. You can type assert on V. @@ -16,7 +15,6 @@ type Entry struct { type Cache struct { entries map[string]map[string]Entry size int - ttl time.Duration // duration of a single entry. m sync.Mutex } @@ -99,8 +97,5 @@ func (c *Cache) Length(k string) int { } func (c *Cache) fits() bool { - if c.size < len(c.entries) { - return false - } - return true + return c.size >= len(c.entries) } diff --git a/pkg/proxy/proxy_integration_test.go b/pkg/proxy/proxy_integration_test.go index 2e072fe287..cd4d85bee6 100644 --- a/pkg/proxy/proxy_integration_test.go +++ b/pkg/proxy/proxy_integration_test.go @@ -2,7 +2,6 @@ package proxy import ( "bytes" - "github.com/owncloud/ocis-proxy/pkg/config" "io" "io/ioutil" "log" @@ -10,6 +9,8 @@ import ( "net/http/httptest" "net/url" "testing" + + "github.com/owncloud/ocis-proxy/pkg/config" ) func TestProxyIntegration(t *testing.T) { From 87ff5f5d432b3928ef5573ff352725e899d50a39 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 26 May 2020 16:10:37 +0200 Subject: [PATCH 101/213] Set minted token on request header instead of response writer header. --- pkg/middleware/account_uuid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 6c3af95ca2..61238a7b0b 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -103,7 +103,7 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H return } - w.Header().Set("x-access-token", token) + r.Header.Set("x-access-token", token) next.ServeHTTP(w, r) }) } From 89a0f1395638f9cc4229284b8c93badcf9a0e4e6 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 26 May 2020 16:31:05 +0200 Subject: [PATCH 102/213] Make jwt secret for reva token manager configurable. --- pkg/command/server.go | 5 ++++- pkg/config/config.go | 6 ++++++ pkg/flagset/flagset.go | 9 ++++++++- pkg/middleware/account_uuid.go | 24 +++++++++++++++++++----- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index 1f3fc9c3ce..04f54e7591 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -247,7 +247,10 @@ func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { oidc.Logger(l), ) - uuidMW := middleware.AccountUUID(middleware.Logger(l)) + uuidMW := middleware.AccountUUID( + middleware.Logger(l), + middleware.TokenManagerConfig(cfg.TokenManager), + ) return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW) } diff --git a/pkg/config/config.go b/pkg/config/config.go index 2518793aef..2319f7c6cd 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -81,6 +81,7 @@ type Config struct { Asset Asset Policies []Policy OIDC *OIDC + TokenManager TokenManager PolicySelector *PolicySelector `mapstructure:"policy_selector"` } @@ -104,6 +105,11 @@ type StaticSelectorConf struct { Policy string } +// TokenManager is the config for using the reva token manager +type TokenManager struct { + JWTSecret string +} + // MigrationSelectorConf is the config for the migration-selector type MigrationSelectorConf struct { AccFoundPolicy string `mapstructure:"acc_found_policy"` diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index c7b9c01ad0..c6bc8333a8 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -99,7 +99,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "debug-token", Value: "", - Usage: "Token to grant metrics access", + Usage: "TokenManager to grant metrics access", EnvVars: []string{"PROXY_DEBUG_TOKEN"}, Destination: &cfg.Debug.Token, }, @@ -157,5 +157,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_TRANSPORT_TLS_KEY"}, Destination: &cfg.HTTP.TLSKey, }, + &cli.StringFlag{ + Name: "jwt-secret", + Value: "Pive-Fumkiu4", + Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret", + EnvVars: []string{"PROXY_JWT_SECRET"}, + Destination: &cfg.TokenManager.JWTSecret, + }, } } diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 61238a7b0b..50bb774259 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -2,6 +2,7 @@ package middleware import ( "context" + "github.com/owncloud/ocis-proxy/pkg/config" "net/http" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" @@ -19,6 +20,8 @@ type AccountMiddlewareOption func(o *AccountMiddlewareOptions) type AccountMiddlewareOptions struct { // Logger to use for logging, must be set Logger log.Logger + // TokenManagerConfig for communicating with the reva token manager + TokenManagerConfig config.TokenManager } // Logger provides a function to set the logger option. @@ -28,21 +31,32 @@ func Logger(l log.Logger) AccountMiddlewareOption { } } -// AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based -// on the oidc-claims -func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.Handler { +// TokenManagerConfig provides a function to set the token manger config option. +func TokenManagerConfig(cfg config.TokenManager) AccountMiddlewareOption { + return func(o *AccountMiddlewareOptions) { + o.TokenManagerConfig = cfg + } +} + +func newAccountUUIDOptions(opts ...AccountMiddlewareOption) AccountMiddlewareOptions { opt := AccountMiddlewareOptions{} for _, o := range opts { o(&opt) } + return opt +} + +// AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based +// on the oidc-claims +func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.Handler { + opt := newAccountUUIDOptions(opts...) return func(next http.Handler) http.Handler { // TODO: handle error tokenManager, err := jwt.New(map[string]interface{}{ - "secret": "Pive-Fumkiu4", + "secret": opt.TokenManagerConfig.JWTSecret, "expires": int64(60), }) - if err != nil { opt.Logger.Fatal().Err(err).Msgf("Could not initialize token-manager") } From d313f223c2d826e8a70cddc71add98dc932ff560 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 26 May 2020 16:35:54 +0200 Subject: [PATCH 103/213] Add changelog items --- changelog/unreleased/jwt-secret-config | 5 +++++ changelog/unreleased/token-header-fix | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 changelog/unreleased/jwt-secret-config create mode 100644 changelog/unreleased/token-header-fix diff --git a/changelog/unreleased/jwt-secret-config b/changelog/unreleased/jwt-secret-config new file mode 100644 index 0000000000..d3bdb8f6ed --- /dev/null +++ b/changelog/unreleased/jwt-secret-config @@ -0,0 +1,5 @@ +Enhancement: Make jwt secret configurable + +We added a config option for the reva token manager JWTSecret. It was hardcoded before and is now configurable. + +https://github.com/owncloud/ocis-proxy/pull/41 diff --git a/changelog/unreleased/token-header-fix b/changelog/unreleased/token-header-fix new file mode 100644 index 0000000000..5c3b351121 --- /dev/null +++ b/changelog/unreleased/token-header-fix @@ -0,0 +1,5 @@ +Bugfix: Fix x-access-token in header + +We fixed setting the x-access-token in the request header, which was broken before. + +https://github.com/owncloud/ocis-proxy/pull/41 From e1847b5c4ab2db0c007626f226e7efda5750c5d5 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 26 May 2020 17:41:30 +0200 Subject: [PATCH 104/213] Fix flag description --- pkg/flagset/flagset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index c6bc8333a8..069bd47221 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -99,7 +99,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "debug-token", Value: "", - Usage: "TokenManager to grant metrics access", + Usage: "Token to grant metrics access", EnvVars: []string{"PROXY_DEBUG_TOKEN"}, Destination: &cfg.Debug.Token, }, From ea254d6036592cf9469d757d1295e0c4309d1e63 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 26 May 2020 16:03:32 +0000 Subject: [PATCH 105/213] Automated changelog update [skip ci] --- CHANGELOG.md | 63 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e0759e1d..98f6a8b090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.3.1...master + +## Summary + +* Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) +* Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) + +## Details + +* Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) + + We fixed setting the x-access-token in the request header, which was broken before. + + https://github.com/owncloud/ocis-proxy/pull/41 + + +* Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) + + We added a config option for the reva token manager JWTSecret. It was hardcoded before and is now + configurable. + + https://github.com/owncloud/ocis-proxy/pull/41 + # Changelog for [0.3.1] (2020-03-31) The following sections list the changes for ocis-proxy 0.3.1. @@ -20,7 +47,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -54,11 +81,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -89,22 +132,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 6b76c2783e97f4438f3d89dcff653329c164cc7c Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Sat, 23 May 2020 06:28:30 +0200 Subject: [PATCH 106/213] Re-enable selector-test --- pkg/proxy/policy/selector_test.go | 207 +++++++++++++++--------------- 1 file changed, 103 insertions(+), 104 deletions(-) diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go index c56b7e566f..c4ab220be0 100644 --- a/pkg/proxy/policy/selector_test.go +++ b/pkg/proxy/policy/selector_test.go @@ -1,128 +1,127 @@ package policy -// import ( -// "context" -// "fmt" -// "net/http/httptest" -// "testing" +import ( + "context" + "fmt" + "net/http/httptest" + "testing" -// "github.com/golang/protobuf/ptypes/empty" -// "github.com/micro/go-micro/v2/client" -// "github.com/owncloud/ocis-accounts/pkg/proto/v0" -// "github.com/owncloud/ocis-pkg/v2/oidc" -// "github.com/owncloud/ocis-proxy/pkg/config" -// ) + "github.com/micro/go-micro/v2/client" + "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" +) -// func TestStaticSelector(t *testing.T) { -// ctx := context.Background() -// req := httptest.NewRequest("GET", "https://example.org/foo", nil) -// sel := NewStaticSelector(&config.StaticSelectorConf{Policy: "reva"}) +func TestStaticSelector(t *testing.T) { + ctx := context.Background() + req := httptest.NewRequest("GET", "https://example.org/foo", nil) + sel := NewStaticSelector(&config.StaticSelectorConf{Policy: "reva"}) -// want := "reva" -// got, err := sel(ctx, req) -// if got != want { -// t.Errorf("Expected policy %v got %v", want, got) -// } + want := "reva" + got, err := sel(ctx, req) + if got != want { + t.Errorf("Expected policy %v got %v", want, got) + } -// if err != nil { -// t.Errorf("Unexpected error %v", err) -// } + if err != nil { + t.Errorf("Unexpected error %v", err) + } -// sel = NewStaticSelector(&config.StaticSelectorConf{Policy: "foo"}) + sel = NewStaticSelector(&config.StaticSelectorConf{Policy: "foo"}) -// want = "foo" -// got, err = sel(ctx, req) -// if got != want { -// t.Errorf("Expected policy %v got %v", want, got) -// } + want = "foo" + got, err = sel(ctx, req) + if got != want { + t.Errorf("Expected policy %v got %v", want, got) + } -// if err != nil { -// t.Errorf("Unexpected error %v", err) -// } -// } + if err != nil { + t.Errorf("Unexpected error %v", err) + } +} -// type testCase struct { -// AccSvcShouldReturnError bool -// Claims *oidc.StandardClaims -// Expected string -// } +type testCase struct { + AccSvcShouldReturnError bool + Claims *oidc.StandardClaims + Expected string +} -// func TestMigrationSelector(t *testing.T) { -// cfg := config.MigrationSelectorConf{ -// AccFoundPolicy: "found", -// AccNotFoundPolicy: "not_found", -// UnauthenticatedPolicy: "unauth", -// } -// var tests = []testCase{ -// {true, &oidc.StandardClaims{PreferredUsername: "Hans"}, "not_found"}, -// {false, &oidc.StandardClaims{PreferredUsername: "Hans"}, "found"}, -// {false, nil, "unauth"}, -// } +func TestMigrationSelector(t *testing.T) { + cfg := config.MigrationSelectorConf{ + AccFoundPolicy: "found", + AccNotFoundPolicy: "not_found", + UnauthenticatedPolicy: "unauth", + } + var tests = []testCase{ + {true, &oidc.StandardClaims{PreferredUsername: "Hans"}, "not_found"}, + {false, &oidc.StandardClaims{PreferredUsername: "Hans"}, "found"}, + {false, nil, "unauth"}, + } -// for k, tc := range tests { -// t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { -// t.Parallel() -// tc := tc -// sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) -// r := httptest.NewRequest("GET", "https://example.com", nil) -// ctx := oidc.NewContext(r.Context(), tc.Claims) -// nr := r.WithContext(ctx) + for k, tc := range tests { + t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { + t.Parallel() + tc := tc + sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) + r := httptest.NewRequest("GET", "https://example.com", nil) + ctx := oidc.NewContext(r.Context(), tc.Claims) + nr := r.WithContext(ctx) -// got, err := sut(ctx, nr) -// if err != nil { -// t.Errorf("Unexpected error: %v", err) -// } + got, err := sut(ctx, nr) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } -// if got != tc.Expected { -// t.Errorf("Expected Policy %v got %v", tc.Expected, got) -// } -// }) -// } -// } + if got != tc.Expected { + t.Errorf("Expected Policy %v got %v", tc.Expected, got) + } + }) + } +} -// func mockAccSvc(retErr bool) proto.AccountsService { -// if retErr { -// return &mockSettingsService{ -// getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { -// return nil, fmt.Errorf("error returned by mockSettingService GET") -// }, -// } -// } +func mockAccSvc(retErr bool) proto.AccountsService { + if retErr { + return &mockAccountsService{ + getFunc: func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (record *proto.Record, err error) { + return nil, fmt.Errorf("error returned by mockAccountsService GET") + }, + } + } -// return &mockSettingsService{ -// getFunc: func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (record *proto.Record, err error) { -// return &proto.Record{}, nil -// }, -// } + return &mockAccountsService{ + getFunc: func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (record *proto.Record, err error) { + return &proto.Record{}, nil + }, + } -// } +} -// type mockSettingsService struct { -// setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) -// getFunc func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) -// searchFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) -// } +type mockAccountsService struct { + setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) + getFunc func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) + searchFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) +} -// func (m mockSettingsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { -// if m.setFunc != nil { -// return m.setFunc(ctx, in, opts...) -// } +func (m mockAccountsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { + if m.setFunc != nil { + return m.setFunc(ctx, in, opts...) + } -// panic("setFunc was called in test but not mocked") -// } + panic("setFunc was called in test but not mocked") +} -// func (m mockSettingsService) Get(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Record, error) { -// if m.getFunc != nil { -// return m.getFunc(ctx, in, opts...) -// } +func (m mockAccountsService) Get(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) { + if m.getFunc != nil { + return m.getFunc(ctx, in, opts...) + } -// panic("getFunc was called in test but not mocked") -// } + panic("getFunc was called in test but not mocked") +} -// func (m mockSettingsService) List(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*proto.Records, error) { -// if m.listFunc != nil { -// return m.listFunc(ctx, in, opts...) -// } +func (m mockAccountsService) Search(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) { + if m.searchFunc != nil { + return m.searchFunc(ctx, in, opts...) + } -// panic("listFunc was called in test but not mocked") -// } + panic("listFunc was called in test but not mocked") +} From f33b6781d6103b20d3b7faa971d881a482bec3b2 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Thu, 28 May 2020 14:10:08 +0000 Subject: [PATCH 107/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f6a8b090..4235b9b60e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -81,27 +81,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -132,6 +116,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From d7c0728e0008c6d6b73281b477f2242a041be940 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 29 May 2020 10:00:17 +0200 Subject: [PATCH 108/213] Disable OIDC Keep-Alive and instantiate client once This should reduce file-descriptor leaks. --- changelog/unreleased/disable-oidc-keep-alive | 7 +++++ pkg/middleware/openidconnect.go | 27 ++++++++++---------- 2 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 changelog/unreleased/disable-oidc-keep-alive diff --git a/changelog/unreleased/disable-oidc-keep-alive b/changelog/unreleased/disable-oidc-keep-alive new file mode 100644 index 0000000000..13098bd427 --- /dev/null +++ b/changelog/unreleased/disable-oidc-keep-alive @@ -0,0 +1,7 @@ +Enhancement: Disable keep-alive on server-side OIDC requests + +This should reduce file-descriptor counts + +https://github.com/owncloud/ocis/issues/268 +https://github.com/owncloud/ocis-proxy/pull/42 +https://github.com/cs3org/reva/pull/787 diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 79f1c9efd7..6b3b7a5c9e 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -48,6 +48,15 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler opt.SigningAlgs = []string{"RS256", "PS256"} } + var oidcHTTPClient = &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: opt.Insecure, + }, + DisableKeepAlives: true, + }, + Timeout: time.Second * 10, + } var oidcProvider *oidc.Provider return func(next http.Handler) http.Handler { @@ -62,17 +71,7 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler return } - token := header[7:] - customHTTPClient := &http.Client{ - Transport: &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: opt.Insecure, - }, - }, - Timeout: time.Second * 10, - } - - customCtx := context.WithValue(r.Context(), oauth2.HTTPClient, customHTTPClient) + customCtx := context.WithValue(r.Context(), oauth2.HTTPClient, oidcHTTPClient) // use cached provider if oidcProvider == nil { @@ -89,13 +88,15 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler oidcProvider = provider } - // The claims we want to have - var claims ocisoidc.StandardClaims + token := strings.TrimPrefix(header, "Bearer ") // TODO cache userinfo for access token if we can determine the expiry (which works in case it is a jwt based access token) oauth2Token := &oauth2.Token{ AccessToken: token, } + + // The claims we want to have + var claims ocisoidc.StandardClaims userInfo, err := oidcProvider.UserInfo(customCtx, oauth2.StaticTokenSource(oauth2Token)) if err != nil { opt.Logger.Error().Err(err).Str("token", token).Msg("Failed to get userinfo") From bfe4790ab8cdaaba52137b5ec780969f7302b60b Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 29 May 2020 09:20:45 +0000 Subject: [PATCH 109/213] Automated changelog update [skip ci] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4235b9b60e..b1bb5ef598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) +* Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) ## Details @@ -18,6 +19,15 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/41 +* Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) + + This should reduce file-descriptor counts + + https://github.com/owncloud/ocis/issues/268 + https://github.com/owncloud/ocis-proxy/pull/42 + https://github.com/cs3org/reva/pull/787 + + * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) We added a config option for the reva token manager JWTSecret. It was hardcoded before and is now From fc7b6c1a8174a312cdd507bdf5790465171b9017 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 3 Jun 2020 15:45:23 +0200 Subject: [PATCH 110/213] Fix that response is ignored The request to the accounts service is written to the cache, but the retrieved uuid was not used, because it was overwritten by the value from the (non-existant) cache entry. --- pkg/middleware/account_uuid.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 50bb774259..8f4bfbd6f2 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -95,13 +95,14 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H } uuid = resp.Payload.Account.Uuid + } else { + uuid, ok = entry.V.(string) + if !ok { + w.WriteHeader(http.StatusInternalServerError) + return + } } - uuid, ok = entry.V.(string) - if !ok { - w.WriteHeader(http.StatusInternalServerError) - return - } l.Debug().Interface("claims", claims).Interface("uuid", uuid).Msgf("Associated claims with uuid") token, err := tokenManager.MintToken(r.Context(), &revauser.User{ From 2e2e6c36126caadbe43568db30f7528dd18a335b Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 3 Jun 2020 15:51:28 +0200 Subject: [PATCH 111/213] Add changelog entry --- changelog/unreleased/cache-miss-fix | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/cache-miss-fix diff --git a/changelog/unreleased/cache-miss-fix b/changelog/unreleased/cache-miss-fix new file mode 100644 index 0000000000..a45b18e9b6 --- /dev/null +++ b/changelog/unreleased/cache-miss-fix @@ -0,0 +1,6 @@ +Bugfix: Accounts service response was ignored + +We fixed an error in the AccountUUID middleware that was responsible for ignoring an account uuid +provided by the accounts service. + +https://github.com/owncloud/ocis-proxy/pull/43 From 74ec961ecc4659b55edc63004029bf1356d33e3a Mon Sep 17 00:00:00 2001 From: Alex Unger Date: Mon, 8 Jun 2020 07:24:39 +0000 Subject: [PATCH 112/213] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1bb5ef598..52b21d547a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,21 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Bugfix - Accounts service response was ignored: [#43](https://github.com/owncloud/ocis-proxy/pull/43) * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) ## Details +* Bugfix - Accounts service response was ignored: [#43](https://github.com/owncloud/ocis-proxy/pull/43) + + We fixed an error in the AccountUUID middleware that was responsible for ignoring an account + uuid provided by the accounts service. + + https://github.com/owncloud/ocis-proxy/pull/43 + + * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) We fixed setting the x-access-token in the request header, which was broken before. From afb2291eb91812986f8faff2f71f61ad355f2720 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 12 Jun 2020 12:00:21 +0200 Subject: [PATCH 113/213] Fix user claims on x-access-token Reva header; initialize cache size --- pkg/middleware/account_uuid.go | 8 +++++--- pkg/middleware/openidconnect.go | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 8f4bfbd6f2..c2abd3512e 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -2,8 +2,10 @@ package middleware import ( "context" - "github.com/owncloud/ocis-proxy/pkg/config" "net/http" + "strings" + + "github.com/owncloud/ocis-proxy/pkg/config" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" @@ -103,13 +105,13 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H } } - l.Debug().Interface("claims", claims).Interface("uuid", uuid).Msgf("Associated claims with uuid") token, err := tokenManager.MintToken(r.Context(), &revauser.User{ Id: &revauser.UserId{ OpaqueId: uuid, }, - Username: claims.Email, + Username: strings.ToLower(claims.Name), + DisplayName: claims.Name, }) if err != nil { diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 6b3b7a5c9e..c62c757310 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -19,7 +19,9 @@ var ( ErrInvalidToken = errors.New("invalid or missing token") // svcCache caches requests for given services to prevent round trips to the service - svcCache = cache.NewCache() + svcCache = cache.NewCache( + cache.Size(256), + ) // ClaimsKey works as a context key for user claims ClaimsKey interface{} = "claims" From ac2694251b1d3651ed2ac4a1c87891fec7b7d4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 16 Jun 2020 18:17:32 +0200 Subject: [PATCH 114/213] update to new accounts api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 3 ++ go.sum | 47 ++++++++++++++++++++++++++++++ pkg/middleware/account_uuid.go | 37 ++++++++++++++++++------ pkg/proxy/policy/selector.go | 2 +- pkg/proxy/policy/selector_test.go | 48 ++++++++++++++++++++----------- 5 files changed, 111 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index 80bfa6eaf0..da390283dd 100644 --- a/go.mod +++ b/go.mod @@ -27,3 +27,6 @@ require ( ) replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 + +// remove after https://github.com/owncloud/ocis-accounts/pull/30 has been merged +replace github.com/owncloud/ocis-accounts => ../ocis-accounts \ No newline at end of file diff --git a/go.sum b/go.sum index ad79d39f3a..21eae9e019 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvd github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CiscoM31/godata v0.0.0-20191007193734-c2c4ebb1b415/go.mod h1:tjaihnMBH6p5DVnGBksDQQHpErbrLvb9ek6cEWuyc7E= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= @@ -71,6 +72,7 @@ github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:i github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= +github.com/RoaringBitmap/roaring v0.4.21/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -124,6 +126,16 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blevesearch/bleve v1.0.9/go.mod h1:tb04/rbU29clbtNgorgFd8XdJea4x3ybYaOjWKr+UBU= +github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040/go.mod h1:WH+MU2F4T0VmSdaPX+Wu5GYoZBrYWdOZWSjzvYcDmqQ= +github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= +github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= +github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= +github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= +github.com/blevesearch/zap/v11 v11.0.9/go.mod h1:47hzinvmY2EvvJruzsSCJpro7so8L1neseaGjrtXHOY= +github.com/blevesearch/zap/v12 v12.0.9/go.mod h1:paQuvxy7yXor+0Mx8p2KNmJgygQbQNN+W6HRfL5Hvwc= +github.com/blevesearch/zap/v13 v13.0.1/go.mod h1:XmyNLMvMf8Z5FjLANXwUeDW3e1+o77TTGUWrth7T9WI= +github.com/blevesearch/zap/v14 v14.0.0/go.mod h1:sUc/gPGJlFbSQ2ZUh/wGRYwkKx+Dg/5p+dd+eq6QMXk= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= @@ -169,6 +181,7 @@ github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= @@ -181,7 +194,11 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= +github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= +github.com/couchbase/vellum v1.0.1/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4= github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -191,6 +208,9 @@ github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GE github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v0.1.0 h1:PYzDejKm/+xG3OTS2WgzBxcksVogEGmPgjJVegwSR2c= github.com/cs3org/reva v0.1.0/go.mod h1:8j6QyyAq9Kjj7RPfJb7M1aEmw5DmsuCJKUULXxYOyRo= +github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/cznic/strutil v0.0.0-20181122101858-275e90344537/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -227,6 +247,9 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -245,7 +268,9 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -365,6 +390,7 @@ github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEo github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -441,6 +467,7 @@ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwP github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= @@ -448,6 +475,7 @@ github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4Fw github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -476,6 +504,7 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= @@ -590,6 +619,7 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwd github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= @@ -733,6 +763,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/restic/calens v0.1.0/go.mod h1:u67f5msOjCTDYNzOf/NoAUSdmXP03YXPCwIQLYADy5M= github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= @@ -745,6 +777,7 @@ github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -783,16 +816,19 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -809,6 +845,8 @@ github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKN github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= @@ -820,10 +858,14 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1 github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4o2HM0m3DZYQWsj6/MEowD57VzoH0v3d7igeFY= +github.com/tredoe/fileutil v1.0.0/go.mod h1:PBayWPFCURwkmW0u6E8E8C6Jtd9ZzWq/U1iMa6BLRPg= +github.com/tredoe/goutil v0.0.0-20200111155331-68cefb6d3cdc/go.mod h1:dp4VPOLeEFYbsf1ikgd+uytWDnpCdMiTHMg6mh7hHuQ= +github.com/tredoe/osutil v1.0.5/go.mod h1:DDO4G4Mwys6NJi5JmEVLnfFbQWIfVVri8L6HuXb/v98= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -831,6 +873,7 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= @@ -998,6 +1041,8 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1020,6 +1065,7 @@ golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1112,6 +1158,7 @@ google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBr google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb h1:nAFaltAMbNVA0rixtwvdnqgSVLX3HFUUvMkEklmzbYM= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index c2abd3512e..67cf291195 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -2,17 +2,17 @@ package middleware import ( "context" + "fmt" "net/http" "strings" - "github.com/owncloud/ocis-proxy/pkg/config" - revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" mclient "github.com/micro/go-micro/v2/client" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" ) // AccountMiddlewareOption defines a single option function. @@ -65,7 +65,7 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. // https://github.com/owncloud/ocis-proxy/issues/38 - accounts := acc.NewAccountsService("com.owncloud.accounts", mclient.DefaultClient) + accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { l := opt.Logger @@ -75,12 +75,16 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H return } + // TODO allow lookup by username? + // TODO allow lookup by custom claim, eg an id + var uuid string entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { l.Debug().Msgf("No cache entry for %v", claims.Email) - resp, err := accounts.Get(context.Background(), &acc.GetRequest{ - Email: claims.Email, + resp, err := accounts.ListAccounts(context.Background(), &acc.ListAccountsRequest{ + Query: fmt.Sprintf("mail eq '%s'", claims.Email), // TODO encode mail + PageSize: 2, }) if err != nil { @@ -89,14 +93,26 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H return } - err = svcCache.Set(AccountsKey, claims.Email, resp.Payload.Account.Uuid) + if len(resp.Accounts) <= 0 { + l.Error().Str("email", claims.Email).Msgf("Account not found") + w.WriteHeader(http.StatusNotFound) + return + } + + if len(resp.Accounts) > 1 { + l.Error().Str("email", claims.Email).Msgf("More than one account with this email found. Not logging user in.") + w.WriteHeader(http.StatusForbidden) + return + } + + err = svcCache.Set(AccountsKey, claims.Email, resp.Accounts[0].Id) if err != nil { l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") w.WriteHeader(http.StatusInternalServerError) return } - uuid = resp.Payload.Account.Uuid + uuid = resp.Accounts[0].Id } else { uuid, ok = entry.V.(string) if !ok { @@ -110,8 +126,11 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H Id: &revauser.UserId{ OpaqueId: uuid, }, - Username: strings.ToLower(claims.Name), - DisplayName: claims.Name, + Username: strings.ToLower(claims.Name), + DisplayName: claims.Name, + Mail: claims.Email, + MailVerified: claims.EmailVerified, + // TODO groups }) if err != nil { diff --git a/pkg/proxy/policy/selector.go b/pkg/proxy/policy/selector.go index 8bb0e4e1a2..b36b023a43 100644 --- a/pkg/proxy/policy/selector.go +++ b/pkg/proxy/policy/selector.go @@ -101,7 +101,7 @@ func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.Account var userID string if claims := ocisoidc.FromContext(r.Context()); claims != nil { userID = claims.PreferredUsername - if _, err := acc.Get(ctx, &accounts.GetRequest{Uuid: userID}); err != nil { + if _, err := acc.GetAccount(ctx, &accounts.GetAccountRequest{Id: userID}); err != nil { return cfg.AccNotFoundPolicy, nil } diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go index c4ab220be0..c1b595c9a6 100644 --- a/pkg/proxy/policy/selector_test.go +++ b/pkg/proxy/policy/selector_test.go @@ -6,6 +6,7 @@ import ( "net/http/httptest" "testing" + "github.com/golang/protobuf/ptypes/empty" "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/oidc" @@ -82,35 +83,36 @@ func TestMigrationSelector(t *testing.T) { func mockAccSvc(retErr bool) proto.AccountsService { if retErr { return &mockAccountsService{ - getFunc: func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (record *proto.Record, err error) { + getFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { return nil, fmt.Errorf("error returned by mockAccountsService GET") }, } } return &mockAccountsService{ - getFunc: func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (record *proto.Record, err error) { - return &proto.Record{}, nil + getFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { + return &proto.Account{}, nil }, } } type mockAccountsService struct { - setFunc func(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) - getFunc func(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) - searchFunc func(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) + listFunc func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) + getFunc func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) + createFunc func(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) + updateFunc func(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) + deleteFunc func(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) } -func (m mockAccountsService) Set(ctx context.Context, in *proto.Record, opts ...client.CallOption) (*proto.Record, error) { - if m.setFunc != nil { - return m.setFunc(ctx, in, opts...) +func (m mockAccountsService) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) { + if m.listFunc != nil { + return m.listFunc(ctx, in, opts...) } - panic("setFunc was called in test but not mocked") + panic("listFunc was called in test but not mocked") } - -func (m mockAccountsService) Get(ctx context.Context, in *proto.GetRequest, opts ...client.CallOption) (*proto.Record, error) { +func (m mockAccountsService) GetAccount(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) { if m.getFunc != nil { return m.getFunc(ctx, in, opts...) } @@ -118,10 +120,24 @@ func (m mockAccountsService) Get(ctx context.Context, in *proto.GetRequest, opts panic("getFunc was called in test but not mocked") } -func (m mockAccountsService) Search(ctx context.Context, in *proto.Query, opts ...client.CallOption) (*proto.Records, error) { - if m.searchFunc != nil { - return m.searchFunc(ctx, in, opts...) +func (m mockAccountsService) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { + if m.createFunc != nil { + return m.createFunc(ctx, in, opts...) } - panic("listFunc was called in test but not mocked") + panic("createFunc was called in test but not mocked") +} +func (m mockAccountsService) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { + if m.updateFunc != nil { + return m.updateFunc(ctx, in, opts...) + } + + panic("updateFunc was called in test but not mocked") +} +func (m mockAccountsService) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { + if m.deleteFunc != nil { + return m.deleteFunc(ctx, in, opts...) + } + + panic("deleteFunc was called in test but not mocked") } From 09ecfd08ee1958df252169edb90c44dd8877e271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 17 Jun 2020 15:33:42 +0200 Subject: [PATCH 115/213] cache account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/middleware/account_uuid.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 67cf291195..c3d68fcfbe 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "net/http" - "strings" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" @@ -78,7 +77,7 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H // TODO allow lookup by username? // TODO allow lookup by custom claim, eg an id - var uuid string + var account *acc.Account entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { l.Debug().Msgf("No cache entry for %v", claims.Email) @@ -105,31 +104,32 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H return } - err = svcCache.Set(AccountsKey, claims.Email, resp.Accounts[0].Id) + err = svcCache.Set(AccountsKey, claims.Email, *resp.Accounts[0]) if err != nil { l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") w.WriteHeader(http.StatusInternalServerError) return } - uuid = resp.Accounts[0].Id + account = resp.Accounts[0] } else { - uuid, ok = entry.V.(string) + a, ok := entry.V.(acc.Account) // TODO how can we directly point to the cached account? if !ok { w.WriteHeader(http.StatusInternalServerError) return } + account = &a } - l.Debug().Interface("claims", claims).Interface("uuid", uuid).Msgf("Associated claims with uuid") + l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") token, err := tokenManager.MintToken(r.Context(), &revauser.User{ Id: &revauser.UserId{ - OpaqueId: uuid, + OpaqueId: account.Id, }, - Username: strings.ToLower(claims.Name), - DisplayName: claims.Name, - Mail: claims.Email, - MailVerified: claims.EmailVerified, + Username: account.PreferredName, + DisplayName: account.DisplayName, + Mail: account.Mail, + MailVerified: account.ExternalUserState == "" || account.ExternalUserState == "Accepted", // TODO groups }) From 6246fbf6852d384f546a4257ab552aa8c615f999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 17 Jun 2020 17:27:14 +0200 Subject: [PATCH 116/213] update dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 7 +++---- go.sum | 38 +++++++++++++++----------------------- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index da390283dd..135dbf6dcc 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,14 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 github.com/cs3org/reva v0.1.0 + github.com/golang/protobuf v1.4.1 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 github.com/micro/go-micro/v2 v2.6.0 github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 - github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a + github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 github.com/owncloud/ocis-pkg/v2 v2.2.1 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect @@ -23,10 +24,8 @@ require ( github.com/spf13/viper v1.6.3 go.opencensus.io v0.22.3 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 + google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 // indirect gopkg.in/square/go-jose.v2 v2.4.0 // indirect ) replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 - -// remove after https://github.com/owncloud/ocis-accounts/pull/30 has been merged -replace github.com/owncloud/ocis-accounts => ../ocis-accounts \ No newline at end of file diff --git a/go.sum b/go.sum index 21eae9e019..21f6c9bd5e 100644 --- a/go.sum +++ b/go.sum @@ -81,6 +81,7 @@ github.com/abbot/go-http-auth v0.4.1-0.20181019201920-860ed7f246ff/go.mod h1:Cz6 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -96,6 +97,7 @@ github.com/anacrolix/missinggo/perf v1.0.0/go.mod h1:ljAFWkBuzkO12MQclXzZrosP5ur github.com/anacrolix/sync v0.2.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572/go.mod h1:MDwc+vsGEq7RMw6lr2GKOEqjWny5hO5OZXRVNaBJ2Dk= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -103,6 +105,7 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -137,6 +140,7 @@ github.com/blevesearch/zap/v12 v12.0.9/go.mod h1:paQuvxy7yXor+0Mx8p2KNmJgygQbQNN github.com/blevesearch/zap/v13 v13.0.1/go.mod h1:XmyNLMvMf8Z5FjLANXwUeDW3e1+o77TTGUWrth7T9WI= github.com/blevesearch/zap/v14 v14.0.0/go.mod h1:sUc/gPGJlFbSQ2ZUh/wGRYwkKx+Dg/5p+dd+eq6QMXk= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -162,7 +166,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= -github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -266,6 +269,7 @@ github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2H github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= +github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= @@ -283,6 +287,7 @@ github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.0.1 h1:q+IFMfLx200Q3scvt2hN79JsEzy4AmBTp/pqnefH+Bc= github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnpg= github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= @@ -516,6 +521,7 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= @@ -544,13 +550,10 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -561,7 +564,6 @@ github.com/mholt/certmagic v0.9.3/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXH github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA= github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk= github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= -github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= github.com/micro/cli/v2 v2.1.2 h1:43J1lChg/rZCC1rvdqZNFSQDrGT7qfMrtp6/ztpIkEM= github.com/micro/cli/v2 v2.1.2/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM= @@ -569,9 +571,6 @@ github.com/micro/go-micro v1.17.1/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95 github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E= github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA= github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= -github.com/micro/go-micro/v2 v2.0.1-0.20200207205803-ef537270add3/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= -github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e h1:EXYgiOLVc7zkUCIsAc++GQiOvPRh/gaGl++fqY1807g= -github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e/go.mod h1:CDPVByZzOp1RNrJfNxEGgNOJ11wEw8NoHfADo8M3+LM= github.com/micro/go-micro/v2 v2.6.0 h1:HH6uEqTu6pkBtAlwAqQW2sf33640iEa1s9puGIctpO0= github.com/micro/go-micro/v2 v2.6.0/go.mod h1:60HMKlDN4ShZDJRrlgdcAmkCWNhQbYv+CDG3r7iLE34= github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= @@ -579,7 +578,6 @@ github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcD github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= github.com/micro/micro v1.16.0/go.mod h1:TO5Ng0KidbfRYIxVM4Q3deZ0A+qwRyP9WeXp+k2fWNA= -github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348/go.mod h1:MQBt/cBC7vKP6JMebU5982Umd5GIrVdhPbOGieXowyY= github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -630,6 +628,7 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL github.com/nats-io/nats-server/v2 v2.1.0/go.mod h1:r5y0WgCag0dTj/qiHkHrXAcKQ/f5GMOZaEGdoxxnJ4I= github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.1.6 h1:qAaHZaS8pRRNQLFaiBA1rq5WynyEGp9DFgmMfoaiXGY= github.com/nats-io/nats-server/v2 v2.1.6/go.mod h1:BL1NOtaBQ5/y97djERRVWNouMW7GT3gxnmbE/eC8u8A= github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= @@ -646,7 +645,7 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= @@ -663,8 +662,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -690,17 +687,16 @@ github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8 github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= -github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409 h1:pMRaeSU/8nE4+PmYTzCQERJAhLvZb9OMkRcaU20mXVc= -github.com/owncloud/ocis-accounts v0.1.2-0.20200511104221-f537f420c409/go.mod h1:ltC+eLvLEuIVmcGc4dwkg+24Nl7PvyqlnZp/pH8Lg8k= -github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a h1:MxvILJwMeBzhtt2EGjBveMSbRgOt4rB32+Ijd/XQiZk= -github.com/owncloud/ocis-accounts v0.1.2-0.20200522102615-8c7da929195a/go.mod h1:rENi9CsW2FgWk8FyHVKFrRvtR++/EZAR1ro9XgeEXAY= +github.com/owncloud/ocis-accounts v0.1.2-0.20200617133119-d0bf39163038 h1:76YjytuLe+2YlTFxKXWVOpuq42fH67lzv5Df4DbcL7U= +github.com/owncloud/ocis-accounts v0.1.2-0.20200617133119-d0bf39163038/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= +github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 h1:UgNhC6sxbwd3T4stBbRNRB2mLV8Gs/rD51O0zbXdJNs= +github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV03z6zI= github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= -github.com/owncloud/ocis-settings v0.0.0-20200511093940-0fddb624d0da/go.mod h1:1PyfbVIZMTX21JxsRT+maRIjRFD3H+yhfpr1jMz3PeA= github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= @@ -868,7 +864,6 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= @@ -891,6 +886,7 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= @@ -1007,11 +1003,9 @@ golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= @@ -1073,8 +1067,6 @@ golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1181,6 +1173,7 @@ gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1206,7 +1199,6 @@ gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= -gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From 2cb38701044ce2505d0e582cfb6b30a1f888027b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 17:58:06 +0200 Subject: [PATCH 117/213] some refactoring and testing love MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.sum | 3 +- pkg/command/server.go | 7 ++ pkg/middleware/account_uuid.go | 109 ++++++++++++++++------------ pkg/middleware/account_uuid_test.go | 96 ++++++++++++++++++++++++ 4 files changed, 166 insertions(+), 49 deletions(-) create mode 100644 pkg/middleware/account_uuid_test.go diff --git a/go.sum b/go.sum index 21f6c9bd5e..02560a77c6 100644 --- a/go.sum +++ b/go.sum @@ -459,6 +459,7 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -687,8 +688,6 @@ github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8 github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= -github.com/owncloud/ocis-accounts v0.1.2-0.20200617133119-d0bf39163038 h1:76YjytuLe+2YlTFxKXWVOpuq42fH67lzv5Df4DbcL7U= -github.com/owncloud/ocis-accounts v0.1.2-0.20200617133119-d0bf39163038/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 h1:UgNhC6sxbwd3T4stBbRNRB2mLV8Gs/rD51O0zbXdJNs= github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= diff --git a/pkg/command/server.go b/pkg/command/server.go index 04f54e7591..40d05e4a15 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -16,9 +16,11 @@ import ( "contrib.go.opencensus.io/exporter/ocagent" "contrib.go.opencensus.io/exporter/zipkin" "github.com/micro/cli/v2" + mclient "github.com/micro/go-micro/v2/client" "github.com/oklog/run" openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" + acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-proxy/pkg/config" "github.com/owncloud/ocis-proxy/pkg/flagset" "github.com/owncloud/ocis-proxy/pkg/metrics" @@ -247,9 +249,14 @@ func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { oidc.Logger(l), ) + // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + // https://github.com/owncloud/ocis-proxy/issues/38 + accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) + uuidMW := middleware.AccountUUID( middleware.Logger(l), middleware.TokenManagerConfig(cfg.TokenManager), + middleware.AccountsClient(accounts), ) return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index c3d68fcfbe..88ebbbb9a1 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -4,10 +4,10 @@ import ( "context" "fmt" "net/http" + "strings" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" - mclient "github.com/micro/go-micro/v2/client" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" @@ -23,6 +23,8 @@ type AccountMiddlewareOptions struct { Logger log.Logger // TokenManagerConfig for communicating with the reva token manager TokenManagerConfig config.TokenManager + // AccountsClient for resolving accounts + AccountsClient acc.AccountsService } // Logger provides a function to set the logger option. @@ -39,6 +41,13 @@ func TokenManagerConfig(cfg config.TokenManager) AccountMiddlewareOption { } } +// AccountsClient provides a function to set the accounts client config option. +func AccountsClient(ac acc.AccountsService) AccountMiddlewareOption { + return func(o *AccountMiddlewareOptions) { + o.AccountsClient = ac + } +} + func newAccountUUIDOptions(opts ...AccountMiddlewareOption) AccountMiddlewareOptions { opt := AccountMiddlewareOptions{} for _, o := range opts { @@ -47,6 +56,54 @@ func newAccountUUIDOptions(opts ...AccountMiddlewareOption) AccountMiddlewareOpt return opt } +func getAccount(l log.Logger, claims ocisoidc.StandardClaims, ac acc.AccountsService) (account *acc.Account, status int) { + entry, err := svcCache.Get(AccountsKey, claims.Email) + if err != nil { + l.Debug().Msgf("No cache entry for %v", claims.Email) + resp, err := ac.ListAccounts(context.Background(), &acc.ListAccountsRequest{ + Query: fmt.Sprintf("mail eq '%s'", strings.ReplaceAll(claims.Email, "'", "''")), + PageSize: 2, + }) + + if err != nil { + l.Error().Err(err).Str("email", claims.Email).Msgf("Error fetching from accounts-service") + status = http.StatusInternalServerError + return + } + + if len(resp.Accounts) <= 0 { + l.Error().Str("email", claims.Email).Msgf("Account not found") + status = http.StatusNotFound + return + } + + // TODO provision account + + if len(resp.Accounts) > 1 { + l.Error().Str("email", claims.Email).Msgf("More than one account with this email found. Not logging user in.") + status = http.StatusForbidden + return + } + + err = svcCache.Set(AccountsKey, claims.Email, *resp.Accounts[0]) + if err != nil { + l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") + status = http.StatusInternalServerError + return + } + + account = resp.Accounts[0] + } else { + a, ok := entry.V.(acc.Account) // TODO how can we directly point to the cached account? + if !ok { + status = http.StatusInternalServerError + return + } + account = &a + } + return +} + // AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based // on the oidc-claims func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.Handler { @@ -62,10 +119,6 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H opt.Logger.Fatal().Err(err).Msgf("Could not initialize token-manager") } - // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - // https://github.com/owncloud/ocis-proxy/issues/38 - accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { l := opt.Logger claims, ok := r.Context().Value(ClaimsKey).(ocisoidc.StandardClaims) @@ -77,48 +130,10 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H // TODO allow lookup by username? // TODO allow lookup by custom claim, eg an id - var account *acc.Account - entry, err := svcCache.Get(AccountsKey, claims.Email) - if err != nil { - l.Debug().Msgf("No cache entry for %v", claims.Email) - resp, err := accounts.ListAccounts(context.Background(), &acc.ListAccountsRequest{ - Query: fmt.Sprintf("mail eq '%s'", claims.Email), // TODO encode mail - PageSize: 2, - }) - - if err != nil { - l.Error().Err(err).Str("email", claims.Email).Msgf("Error fetching from accounts-service") - w.WriteHeader(http.StatusInternalServerError) - return - } - - if len(resp.Accounts) <= 0 { - l.Error().Str("email", claims.Email).Msgf("Account not found") - w.WriteHeader(http.StatusNotFound) - return - } - - if len(resp.Accounts) > 1 { - l.Error().Str("email", claims.Email).Msgf("More than one account with this email found. Not logging user in.") - w.WriteHeader(http.StatusForbidden) - return - } - - err = svcCache.Set(AccountsKey, claims.Email, *resp.Accounts[0]) - if err != nil { - l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") - w.WriteHeader(http.StatusInternalServerError) - return - } - - account = resp.Accounts[0] - } else { - a, ok := entry.V.(acc.Account) // TODO how can we directly point to the cached account? - if !ok { - w.WriteHeader(http.StatusInternalServerError) - return - } - account = &a + account, status := getAccount(l, claims, opt.AccountsClient) + if status != 0 { + w.WriteHeader(status) + return } l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go new file mode 100644 index 0000000000..cfec76e81e --- /dev/null +++ b/pkg/middleware/account_uuid_test.go @@ -0,0 +1,96 @@ +package middleware + +import ( + "context" + "fmt" + "net/http" + "testing" + + "github.com/golang/protobuf/ptypes/empty" + "github.com/micro/go-micro/v2/client" + "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-pkg/v2/oidc" +) + +// TODO testing the getAccount method should inject a cache +func TestGetAccountSuccess(t *testing.T) { + svcCache.Invalidate(AccountsKey, "success") + if _, status := getAccount(log.NewLogger(), oidc.StandardClaims{Email: "success"}, mockAccSvc(false)); status != 0 { + t.Errorf("expected an account") + } +} +func TestGetAccountInternalError(t *testing.T) { + svcCache.Invalidate(AccountsKey, "failure") + if _, status := getAccount(log.NewLogger(), oidc.StandardClaims{Email: "failure"}, mockAccSvc(true)); status != http.StatusInternalServerError { + t.Errorf("expected an internal server error") + } +} + +func mockAccSvc(retErr bool) proto.AccountsService { + if retErr { + return &mockAccountsService{ + listFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return nil, fmt.Errorf("error returned by mockAccountsService LIST") + }, + } + } + + return &mockAccountsService{ + listFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return &proto.ListAccountsResponse{ + Accounts: []*proto.Account{ + { + Id: "yay", + }, + }, + }, nil + }, + } + +} + +type mockAccountsService struct { + listFunc func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) + getFunc func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) + createFunc func(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) + updateFunc func(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) + deleteFunc func(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) +} + +func (m mockAccountsService) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) { + if m.listFunc != nil { + return m.listFunc(ctx, in, opts...) + } + + panic("listFunc was called in test but not mocked") +} +func (m mockAccountsService) GetAccount(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) { + if m.getFunc != nil { + return m.getFunc(ctx, in, opts...) + } + + panic("getFunc was called in test but not mocked") +} + +func (m mockAccountsService) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { + if m.createFunc != nil { + return m.createFunc(ctx, in, opts...) + } + + panic("createFunc was called in test but not mocked") +} +func (m mockAccountsService) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { + if m.updateFunc != nil { + return m.updateFunc(ctx, in, opts...) + } + + panic("updateFunc was called in test but not mocked") +} +func (m mockAccountsService) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { + if m.deleteFunc != nil { + return m.deleteFunc(ctx, in, opts...) + } + + panic("deleteFunc was called in test but not mocked") +} From e7a3ed3fa31184a377e3b65c8edfc05e99e04a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 18:33:16 +0200 Subject: [PATCH 118/213] make tests use mock from ocis-accounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 6 ++-- go.sum | 19 ++++++++++ pkg/middleware/account_uuid_test.go | 54 +++-------------------------- pkg/proxy/policy/selector_test.go | 54 +++-------------------------- 4 files changed, 30 insertions(+), 103 deletions(-) diff --git a/go.mod b/go.mod index 135dbf6dcc..7384bdd04e 100644 --- a/go.mod +++ b/go.mod @@ -9,19 +9,19 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 github.com/cs3org/reva v0.1.0 - github.com/golang/protobuf v1.4.1 + github.com/golang/protobuf v1.4.2 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 github.com/micro/go-micro/v2 v2.6.0 github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 - github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 + github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e github.com/owncloud/ocis-pkg/v2 v2.2.1 github.com/prometheus/client_golang v1.2.1 github.com/prometheus/procfs v0.0.8 // indirect github.com/restic/calens v0.2.0 - github.com/spf13/viper v1.6.3 + github.com/spf13/viper v1.7.0 go.opencensus.io v0.22.3 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 // indirect diff --git a/go.sum b/go.sum index 02560a77c6..38fee43570 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,7 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= @@ -128,6 +129,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blevesearch/bleve v1.0.9/go.mod h1:tb04/rbU29clbtNgorgFd8XdJea4x3ybYaOjWKr+UBU= github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040/go.mod h1:WH+MU2F4T0VmSdaPX+Wu5GYoZBrYWdOZWSjzvYcDmqQ= @@ -291,6 +293,7 @@ github.com/go-git/go-git-fixtures/v4 v4.0.1 h1:q+IFMfLx200Q3scvt2hN79JsEzy4AmBTp github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnpg= github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= @@ -326,6 +329,7 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -358,6 +362,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= @@ -407,6 +413,7 @@ github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= @@ -422,7 +429,9 @@ github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8 github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -690,6 +699,8 @@ github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 h1:UgNhC6sxbwd3T4stBbRNRB2mLV8Gs/rD51O0zbXdJNs= github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= +github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e h1:FRD1/lH/6IaaWWzBXCeM4hUAoN86zQAz68nOnvCLqsY= +github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e/go.mod h1:ohb58AUSUgq+kPOFAjy1s1k5Bi33YtPg45qOOPsepeM= github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k= github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88= @@ -772,6 +783,8 @@ github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= +github.com/rs/zerolog v1.19.0 h1:hYz4ZVdUgjXTBUmrkrw55j1nHx68LfOKIQk5IYtyScg= +github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -822,6 +835,8 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -949,6 +964,7 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1104,6 +1120,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1162,6 +1179,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index cfec76e81e..118599922e 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -6,7 +6,6 @@ import ( "net/http" "testing" - "github.com/golang/protobuf/ptypes/empty" "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" @@ -29,15 +28,15 @@ func TestGetAccountInternalError(t *testing.T) { func mockAccSvc(retErr bool) proto.AccountsService { if retErr { - return &mockAccountsService{ - listFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { return nil, fmt.Errorf("error returned by mockAccountsService LIST") }, } } - return &mockAccountsService{ - listFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { return &proto.ListAccountsResponse{ Accounts: []*proto.Account{ { @@ -49,48 +48,3 @@ func mockAccSvc(retErr bool) proto.AccountsService { } } - -type mockAccountsService struct { - listFunc func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) - getFunc func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) - createFunc func(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) - updateFunc func(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) - deleteFunc func(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) -} - -func (m mockAccountsService) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) { - if m.listFunc != nil { - return m.listFunc(ctx, in, opts...) - } - - panic("listFunc was called in test but not mocked") -} -func (m mockAccountsService) GetAccount(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.getFunc != nil { - return m.getFunc(ctx, in, opts...) - } - - panic("getFunc was called in test but not mocked") -} - -func (m mockAccountsService) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.createFunc != nil { - return m.createFunc(ctx, in, opts...) - } - - panic("createFunc was called in test but not mocked") -} -func (m mockAccountsService) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.updateFunc != nil { - return m.updateFunc(ctx, in, opts...) - } - - panic("updateFunc was called in test but not mocked") -} -func (m mockAccountsService) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { - if m.deleteFunc != nil { - return m.deleteFunc(ctx, in, opts...) - } - - panic("deleteFunc was called in test but not mocked") -} diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go index c1b595c9a6..47ffe9e607 100644 --- a/pkg/proxy/policy/selector_test.go +++ b/pkg/proxy/policy/selector_test.go @@ -6,7 +6,6 @@ import ( "net/http/httptest" "testing" - "github.com/golang/protobuf/ptypes/empty" "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/oidc" @@ -82,62 +81,17 @@ func TestMigrationSelector(t *testing.T) { func mockAccSvc(retErr bool) proto.AccountsService { if retErr { - return &mockAccountsService{ - getFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { + return &proto.MockAccountsService{ + GetFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { return nil, fmt.Errorf("error returned by mockAccountsService GET") }, } } - return &mockAccountsService{ - getFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { + return &proto.MockAccountsService{ + GetFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { return &proto.Account{}, nil }, } } - -type mockAccountsService struct { - listFunc func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) - getFunc func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) - createFunc func(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) - updateFunc func(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) - deleteFunc func(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) -} - -func (m mockAccountsService) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (*proto.ListAccountsResponse, error) { - if m.listFunc != nil { - return m.listFunc(ctx, in, opts...) - } - - panic("listFunc was called in test but not mocked") -} -func (m mockAccountsService) GetAccount(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.getFunc != nil { - return m.getFunc(ctx, in, opts...) - } - - panic("getFunc was called in test but not mocked") -} - -func (m mockAccountsService) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.createFunc != nil { - return m.createFunc(ctx, in, opts...) - } - - panic("createFunc was called in test but not mocked") -} -func (m mockAccountsService) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, opts ...client.CallOption) (*proto.Account, error) { - if m.updateFunc != nil { - return m.updateFunc(ctx, in, opts...) - } - - panic("updateFunc was called in test but not mocked") -} -func (m mockAccountsService) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { - if m.deleteFunc != nil { - return m.deleteFunc(ctx, in, opts...) - } - - panic("deleteFunc was called in test but not mocked") -} From f69e0703a4cc31a1e1e5e12a6fa98dbb2422ba88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 18:46:31 +0200 Subject: [PATCH 119/213] make codacy ignore **_test.go files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .codacy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codacy.yml b/.codacy.yml index 855b4f298b..216131316a 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -4,5 +4,6 @@ exclude_paths: - changelog/** - docs/** - pkg/proto/** + - '**_test.go' ... From 399230d3de5d726016f74b0b70834077ad596acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 19:07:31 +0200 Subject: [PATCH 120/213] no confusing names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/proxy/policy/selector.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/proxy/policy/selector.go b/pkg/proxy/policy/selector.go index b36b023a43..872f8e3402 100644 --- a/pkg/proxy/policy/selector.go +++ b/pkg/proxy/policy/selector.go @@ -7,7 +7,7 @@ import ( "github.com/micro/go-micro/v2/client/grpc" accounts "github.com/owncloud/ocis-accounts/pkg/proto/v0" - ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/config" ) @@ -99,7 +99,7 @@ func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.Account var acc = ss return func(ctx context.Context, r *http.Request) (s string, err error) { var userID string - if claims := ocisoidc.FromContext(r.Context()); claims != nil { + if claims := oidc.FromContext(r.Context()); claims != nil { userID = claims.PreferredUsername if _, err := acc.GetAccount(ctx, &accounts.GetAccountRequest{Id: userID}); err != nil { return cfg.AccNotFoundPolicy, nil From 4a436a4171312403920413114fbed9b52eb2b6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 19:08:14 +0200 Subject: [PATCH 121/213] parrallel test execution seems to make the coverage miscount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/proxy/policy/selector_test.go | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/proxy/policy/selector_test.go b/pkg/proxy/policy/selector_test.go index 47ffe9e607..bcb76fa961 100644 --- a/pkg/proxy/policy/selector_test.go +++ b/pkg/proxy/policy/selector_test.go @@ -58,24 +58,24 @@ func TestMigrationSelector(t *testing.T) { {false, nil, "unauth"}, } - for k, tc := range tests { - t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { - t.Parallel() - tc := tc - sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) - r := httptest.NewRequest("GET", "https://example.com", nil) - ctx := oidc.NewContext(r.Context(), tc.Claims) - nr := r.WithContext(ctx) + for _, tc := range tests { + //t.Run(fmt.Sprintf("#%v", k), func(t *testing.T) { + // t.Parallel() + tc := tc + sut := NewMigrationSelector(&cfg, mockAccSvc(tc.AccSvcShouldReturnError)) + r := httptest.NewRequest("GET", "https://example.com", nil) + ctx := oidc.NewContext(r.Context(), tc.Claims) + nr := r.WithContext(ctx) - got, err := sut(ctx, nr) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } + got, err := sut(ctx, nr) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } - if got != tc.Expected { - t.Errorf("Expected Policy %v got %v", tc.Expected, got) - } - }) + if got != tc.Expected { + t.Errorf("Expected Policy %v got %v", tc.Expected, got) + } + //}) } } From 00afda3c04862ef390ee8a1da26d4e78dcb8d15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 18 Jun 2020 21:40:06 +0200 Subject: [PATCH 122/213] test middleware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/middleware/account_uuid.go | 8 ++++---- pkg/middleware/account_uuid_test.go | 26 ++++++++++++++++++++++++-- pkg/middleware/openidconnect.go | 5 +---- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 88ebbbb9a1..c4d53255f8 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -10,7 +10,7 @@ import ( "github.com/cs3org/reva/pkg/token/manager/jwt" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" - ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + oidc "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/config" ) @@ -56,7 +56,7 @@ func newAccountUUIDOptions(opts ...AccountMiddlewareOption) AccountMiddlewareOpt return opt } -func getAccount(l log.Logger, claims ocisoidc.StandardClaims, ac acc.AccountsService) (account *acc.Account, status int) { +func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsService) (account *acc.Account, status int) { entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { l.Debug().Msgf("No cache entry for %v", claims.Email) @@ -121,8 +121,8 @@ func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.H return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { l := opt.Logger - claims, ok := r.Context().Value(ClaimsKey).(ocisoidc.StandardClaims) - if !ok { + claims := oidc.FromContext(r.Context()) + if claims == nil { next.ServeHTTP(w, r) return } diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index 118599922e..e86d9abc64 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -4,28 +4,50 @@ import ( "context" "fmt" "net/http" + "net/http/httptest" "testing" "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" ) // TODO testing the getAccount method should inject a cache func TestGetAccountSuccess(t *testing.T) { svcCache.Invalidate(AccountsKey, "success") - if _, status := getAccount(log.NewLogger(), oidc.StandardClaims{Email: "success"}, mockAccSvc(false)); status != 0 { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccSvc(false)); status != 0 { t.Errorf("expected an account") } } func TestGetAccountInternalError(t *testing.T) { svcCache.Invalidate(AccountsKey, "failure") - if _, status := getAccount(log.NewLogger(), oidc.StandardClaims{Email: "failure"}, mockAccSvc(true)); status != http.StatusInternalServerError { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccSvc(true)); status != http.StatusInternalServerError { t.Errorf("expected an internal server error") } } +func TestAccountUUIDHandler(t *testing.T) { + svcCache.Invalidate(AccountsKey, "success") + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}) + m := AccountUUID( + Logger(log.NewLogger()), + TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), + AccountsClient(mockAccSvc(false)), + )(next) + + r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) + w := httptest.NewRecorder() + ctx := oidc.NewContext(r.Context(), &oidc.StandardClaims{Email: "success"}) + r = r.WithContext(ctx) + m.ServeHTTP(w, r) + + if r.Header.Get("x-access-token") == "" { + t.Errorf("expected a token") + } +} + func mockAccSvc(retErr bool) proto.AccountsService { if retErr { return &proto.MockAccountsService{ diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index c62c757310..5280f59a99 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -22,9 +22,6 @@ var ( svcCache = cache.NewCache( cache.Size(256), ) - - // ClaimsKey works as a context key for user claims - ClaimsKey interface{} = "claims" ) // newOIDCOptions initializes the available default options. @@ -113,7 +110,7 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler } // inject claims to the request context for the account_uuid middleware. - ctxWithClaims := context.WithValue(r.Context(), ClaimsKey, claims) + ctxWithClaims := ocisoidc.NewContext(r.Context(), &claims) r = r.WithContext(ctxWithClaims) opt.Logger.Debug().Interface("claims", claims).Interface("userInfo", userInfo).Msg("unmarshalled userinfo") From 823832ff8f6b4fc70da283d87031b9e3b3f7b5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 19 Jun 2020 11:19:09 +0200 Subject: [PATCH 123/213] add more tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .codacy.yml | 1 + pkg/command/server.go | 47 +++++++++-- pkg/middleware/account_uuid.go | 47 +---------- pkg/middleware/account_uuid_test.go | 10 +-- pkg/middleware/openidconnect.go | 54 ++++-------- pkg/middleware/openidconnect_test.go | 118 +++++++++++++++++++++++++++ pkg/middleware/options.go | 72 ++++++++++++++++ 7 files changed, 254 insertions(+), 95 deletions(-) create mode 100644 pkg/middleware/openidconnect_test.go create mode 100644 pkg/middleware/options.go diff --git a/.codacy.yml b/.codacy.yml index 216131316a..3e80750a9f 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -5,5 +5,6 @@ exclude_paths: - docs/** - pkg/proto/** - '**_test.go' + - .codacy.yml ... diff --git a/pkg/command/server.go b/pkg/command/server.go index 40d05e4a15..0a5796e73d 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -2,15 +2,18 @@ package command import ( "context" + "crypto/tls" + "net/http" "os" "os/signal" "strings" "time" + "github.com/coreos/go-oidc" "github.com/justinas/alice" "github.com/owncloud/ocis-pkg/v2/log" - "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/middleware" + "golang.org/x/oauth2" "contrib.go.opencensus.io/exporter/jaeger" "contrib.go.opencensus.io/exporter/ocagent" @@ -157,7 +160,7 @@ func Server(cfg *config.Config) *cli.Command { proxyHTTP.Metrics(metrics), proxyHTTP.Flags(flagset.RootWithConfig(config.New())), proxyHTTP.Flags(flagset.ServerWithConfig(config.New())), - proxyHTTP.Middlewares(loadMiddlewares(cfg, logger)), + proxyHTTP.Middlewares(loadMiddlewares(ctx, logger, cfg)), ) if err != nil { @@ -237,16 +240,44 @@ func Server(cfg *config.Config) *cli.Command { } } -func loadMiddlewares(cfg *config.Config, l log.Logger) alice.Chain { +func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alice.Chain { if cfg.OIDC != nil { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") + + // set defaults + /* + if opt.Realm == "" { + opt.Realm = opt.Endpoint + } + if len(opt.SigningAlgs) < 1 { + opt.SigningAlgs = []string{"RS256", "PS256"} + } + */ + + var oidcHTTPClient = &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: cfg.OIDC.Insecure, + }, + DisableKeepAlives: true, + }, + Timeout: time.Second * 10, + } + + customCtx := context.WithValue(ctx, oauth2.HTTPClient, oidcHTTPClient) + + // Initialize a provider by specifying the issuer URL. + // it will fetch the keys from the issuer using the .well-known + // endpoint + provider := func() (middleware.OIDCProvider, error) { + return oidc.NewProvider(customCtx, cfg.OIDC.Endpoint) + } + oidcMW := middleware.OpenIDConnect( - oidc.Endpoint(cfg.OIDC.Endpoint), - oidc.Insecure(cfg.OIDC.Insecure), - oidc.Realm(cfg.OIDC.Realm), - oidc.SigningAlgs(cfg.OIDC.SigningAlgs), - oidc.Logger(l), + middleware.Logger(l), + middleware.HTTPClient(oidcHTTPClient), + middleware.OIDCProviderFunc(provider), ) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index c4d53255f8..e42f28eb84 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -11,51 +11,8 @@ import ( acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" oidc "github.com/owncloud/ocis-pkg/v2/oidc" - "github.com/owncloud/ocis-proxy/pkg/config" ) -// AccountMiddlewareOption defines a single option function. -type AccountMiddlewareOption func(o *AccountMiddlewareOptions) - -// AccountMiddlewareOptions defines the available options for this package. -type AccountMiddlewareOptions struct { - // Logger to use for logging, must be set - Logger log.Logger - // TokenManagerConfig for communicating with the reva token manager - TokenManagerConfig config.TokenManager - // AccountsClient for resolving accounts - AccountsClient acc.AccountsService -} - -// Logger provides a function to set the logger option. -func Logger(l log.Logger) AccountMiddlewareOption { - return func(o *AccountMiddlewareOptions) { - o.Logger = l - } -} - -// TokenManagerConfig provides a function to set the token manger config option. -func TokenManagerConfig(cfg config.TokenManager) AccountMiddlewareOption { - return func(o *AccountMiddlewareOptions) { - o.TokenManagerConfig = cfg - } -} - -// AccountsClient provides a function to set the accounts client config option. -func AccountsClient(ac acc.AccountsService) AccountMiddlewareOption { - return func(o *AccountMiddlewareOptions) { - o.AccountsClient = ac - } -} - -func newAccountUUIDOptions(opts ...AccountMiddlewareOption) AccountMiddlewareOptions { - opt := AccountMiddlewareOptions{} - for _, o := range opts { - o(&opt) - } - return opt -} - func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsService) (account *acc.Account, status int) { entry, err := svcCache.Get(AccountsKey, claims.Email) if err != nil { @@ -106,8 +63,8 @@ func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsServic // AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based // on the oidc-claims -func AccountUUID(opts ...AccountMiddlewareOption) func(next http.Handler) http.Handler { - opt := newAccountUUIDOptions(opts...) +func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { + opt := newOptions(opts...) return func(next http.Handler) http.Handler { // TODO: handle error diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index e86d9abc64..a2b5dbc351 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -17,24 +17,24 @@ import ( // TODO testing the getAccount method should inject a cache func TestGetAccountSuccess(t *testing.T) { svcCache.Invalidate(AccountsKey, "success") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccSvc(false)); status != 0 { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccountUUIDMiddlewareAccSvc(false)); status != 0 { t.Errorf("expected an account") } } func TestGetAccountInternalError(t *testing.T) { svcCache.Invalidate(AccountsKey, "failure") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccSvc(true)); status != http.StatusInternalServerError { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccountUUIDMiddlewareAccSvc(true)); status != http.StatusInternalServerError { t.Errorf("expected an internal server error") } } -func TestAccountUUIDHandler(t *testing.T) { +func TestAccountUUIDMiddleware(t *testing.T) { svcCache.Invalidate(AccountsKey, "success") next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}) m := AccountUUID( Logger(log.NewLogger()), TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), - AccountsClient(mockAccSvc(false)), + AccountsClient(mockAccountUUIDMiddlewareAccSvc(false)), )(next) r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) @@ -48,7 +48,7 @@ func TestAccountUUIDHandler(t *testing.T) { } } -func mockAccSvc(retErr bool) proto.AccountsService { +func mockAccountUUIDMiddlewareAccSvc(retErr bool) proto.AccountsService { if retErr { return &proto.MockAccountsService{ ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 5280f59a99..102f2d3f5c 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -2,13 +2,10 @@ package middleware import ( "context" - "crypto/tls" "errors" "net/http" "strings" - "time" - "github.com/coreos/go-oidc" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/cache" "golang.org/x/oauth2" @@ -24,41 +21,23 @@ var ( ) ) -// newOIDCOptions initializes the available default options. -func newOIDCOptions(opts ...ocisoidc.Option) ocisoidc.Options { - opt := ocisoidc.Options{} +// OIDCProvider used to mock the oidc provider during tests +type OIDCProvider interface { + UserInfo(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) +} - for _, o := range opts { - o(&opt) - } - - return opt +// OIDCUserInfo used to mock the oidc user info during tests +type OIDCUserInfo interface { + Claims(v interface{}) error } // OpenIDConnect provides a middleware to check access secured by a static token. -func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler { - opt := newOIDCOptions(opts...) - - // set defaults - if opt.Realm == "" { - opt.Realm = opt.Endpoint - } - if len(opt.SigningAlgs) < 1 { - opt.SigningAlgs = []string{"RS256", "PS256"} - } - - var oidcHTTPClient = &http.Client{ - Transport: &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: opt.Insecure, - }, - DisableKeepAlives: true, - }, - Timeout: time.Second * 10, - } - var oidcProvider *oidc.Provider +func OpenIDConnect(opts ...Option) func(next http.Handler) http.Handler { + opt := newOptions(opts...) return func(next http.Handler) http.Handler { + + var oidcProvider OIDCProvider return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { header := r.Header.Get("Authorization") path := r.URL.Path @@ -70,21 +49,22 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(next http.Handler) http.Handler return } - customCtx := context.WithValue(r.Context(), oauth2.HTTPClient, oidcHTTPClient) + customCtx := context.WithValue(r.Context(), oauth2.HTTPClient, opt.HTTPClient) - // use cached provider + // check if oidc provider is initialized if oidcProvider == nil { - // Initialize a provider by specifying the issuer URL. + // Lazily initialize a provider + // provider needs to be cached as when it is created // it will fetch the keys from the issuer using the .well-known // endpoint - provider, err := oidc.NewProvider(customCtx, opt.Endpoint) + var err error + oidcProvider, err = opt.OIDCProviderFunc() if err != nil { opt.Logger.Error().Err(err).Msg("could not initialize oidc provider") w.WriteHeader(http.StatusInternalServerError) return } - oidcProvider = provider } token := strings.TrimPrefix(header, "Bearer ") diff --git a/pkg/middleware/openidconnect_test.go b/pkg/middleware/openidconnect_test.go new file mode 100644 index 0000000000..2d805ab5fc --- /dev/null +++ b/pkg/middleware/openidconnect_test.go @@ -0,0 +1,118 @@ +package middleware + +import ( + "context" + "fmt" + "net/http" + "net/http/httptest" + "testing" + + "github.com/micro/go-micro/v2/client" + "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/log" + "golang.org/x/oauth2" +) + +func TestOpenIDConnectMiddleware(t *testing.T) { + svcCache.Invalidate(AccountsKey, "success") + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}) + + m := OpenIDConnect( + Logger(log.NewLogger()), + OIDCProviderFunc(func() (OIDCProvider, error) { + return mockOP(false, mockUI(false)), nil + }), + )(next) + + r := httptest.NewRequest(http.MethodGet, "https://idp.example.com", nil) + r.Header.Set("Authorization", "Bearer sometoken") + w := httptest.NewRecorder() + m.ServeHTTP(w, r) + + if r.Header.Get("x-access-token") == "" { + t.Errorf("expected a token") + } +} + +type mockOIDCProvider struct { + UserInfoFunc func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) +} + +// UserInfo will panic if the function has been called, but not mocked +func (m mockOIDCProvider) UserInfo(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { + if m.UserInfoFunc != nil { + return m.UserInfoFunc(ctx, ts) + } + + panic("UserInfo was called in test but not mocked") +} + +func mockOP(retErr bool, ui OIDCUserInfo) OIDCProvider { + if retErr { + return &mockOIDCProvider{ + UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { + return nil, fmt.Errorf("error returned by mockOIDCProvider UserInfo") + }, + } + + } + return &mockOIDCProvider{ + UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { + return ui, nil + }, + } + +} + +type mockOIDCUserInfo struct { + ClaimsFunc func(v interface{}) error +} + +// UserInfo will panic if the function has been called, but not mocked +func (m mockOIDCUserInfo) Claims(v interface{}) error { + if m.ClaimsFunc != nil { + return m.ClaimsFunc(v) + } + + panic("ClaimsFunc was called in test but not mocked") +} +func mockUI(retErr bool) OIDCUserInfo { + if retErr { + return &mockOIDCUserInfo{ + ClaimsFunc: func(v interface{}) error { + return fmt.Errorf("error returned by mockOIDCProvider UserInfo") + }, + } + + } + return &mockOIDCUserInfo{ + ClaimsFunc: func(v interface{}) error { + // TODO fill in claims + return nil + }, + } + +} + +func mockOpenidConnectMiddlewareAccSvc(retErr bool) proto.AccountsService { + if retErr { + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return nil, fmt.Errorf("error returned by mockAccountsService LIST") + }, + } + } + + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return &proto.ListAccountsResponse{ + Accounts: []*proto.Account{ + { + Id: "yay", + }, + }, + }, nil + }, + } + +} diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go new file mode 100644 index 0000000000..0d727278ad --- /dev/null +++ b/pkg/middleware/options.go @@ -0,0 +1,72 @@ +package middleware + +import ( + "net/http" + + acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/config" +) + +// Option defines a single option function. +type Option func(o *Options) + +// Options defines the available options for this package. +type Options struct { + // Logger to use for logging, must be set + Logger log.Logger + // TokenManagerConfig for communicating with the reva token manager + TokenManagerConfig config.TokenManager + // HTTPClient to use for communication with the oidc provider + HTTPClient *http.Client + // AccountsClient for resolving accounts + AccountsClient acc.AccountsService + // OIDCProviderFunc to lazily initialize a provider, must be set for the oidcProvider middleware + OIDCProviderFunc func() (OIDCProvider, error) +} + +// newOIDCOptions initializes the available default options. +func newOptions(opts ...Option) Options { + opt := Options{} + + for _, o := range opts { + o(&opt) + } + + return opt +} + +// Logger provides a function to set the logger option. +func Logger(l log.Logger) Option { + return func(o *Options) { + o.Logger = l + } +} + +// TokenManagerConfig provides a function to set the token manger config option. +func TokenManagerConfig(cfg config.TokenManager) Option { + return func(o *Options) { + o.TokenManagerConfig = cfg + } +} + +// HTTPClient provides a function to set the http client config option. +func HTTPClient(c *http.Client) Option { + return func(o *Options) { + o.HTTPClient = c + } +} + +// AccountsClient provides a function to set the accounts client config option. +func AccountsClient(ac acc.AccountsService) Option { + return func(o *Options) { + o.AccountsClient = ac + } +} + +// OIDCProviderFunc provides a function to set the the oidc provider function option. +func OIDCProviderFunc(f func() (OIDCProvider, error)) Option { + return func(o *Options) { + o.OIDCProviderFunc = f + } +} From 39508bd7b64e20f09a068097e091e9359244b090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 19 Jun 2020 14:48:36 +0200 Subject: [PATCH 124/213] go where no man has gone before ... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/middleware/openidconnect.go | 8 ++--- pkg/middleware/openidconnect_test.go | 50 +++++++--------------------- 2 files changed, 14 insertions(+), 44 deletions(-) diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index 102f2d3f5c..be0ccacac8 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -6,6 +6,7 @@ import ( "net/http" "strings" + "github.com/coreos/go-oidc" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/cache" "golang.org/x/oauth2" @@ -23,12 +24,7 @@ var ( // OIDCProvider used to mock the oidc provider during tests type OIDCProvider interface { - UserInfo(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) -} - -// OIDCUserInfo used to mock the oidc user info during tests -type OIDCUserInfo interface { - Claims(v interface{}) error + UserInfo(ctx context.Context, ts oauth2.TokenSource) (*oidc.UserInfo, error) } // OpenIDConnect provides a middleware to check access secured by a static token. diff --git a/pkg/middleware/openidconnect_test.go b/pkg/middleware/openidconnect_test.go index 2d805ab5fc..ce38cefc0f 100644 --- a/pkg/middleware/openidconnect_test.go +++ b/pkg/middleware/openidconnect_test.go @@ -7,6 +7,7 @@ import ( "net/http/httptest" "testing" + "github.com/coreos/go-oidc" "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" @@ -20,7 +21,7 @@ func TestOpenIDConnectMiddleware(t *testing.T) { m := OpenIDConnect( Logger(log.NewLogger()), OIDCProviderFunc(func() (OIDCProvider, error) { - return mockOP(false, mockUI(false)), nil + return mockOP(false), nil }), )(next) @@ -29,17 +30,17 @@ func TestOpenIDConnectMiddleware(t *testing.T) { w := httptest.NewRecorder() m.ServeHTTP(w, r) - if r.Header.Get("x-access-token") == "" { - t.Errorf("expected a token") + if w.Code != http.StatusInternalServerError { + t.Errorf("expected an internal server error") } } type mockOIDCProvider struct { - UserInfoFunc func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) + UserInfoFunc func(ctx context.Context, ts oauth2.TokenSource) (*oidc.UserInfo, error) } // UserInfo will panic if the function has been called, but not mocked -func (m mockOIDCProvider) UserInfo(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { +func (m mockOIDCProvider) UserInfo(ctx context.Context, ts oauth2.TokenSource) (*oidc.UserInfo, error) { if m.UserInfoFunc != nil { return m.UserInfoFunc(ctx, ts) } @@ -47,53 +48,26 @@ func (m mockOIDCProvider) UserInfo(ctx context.Context, ts oauth2.TokenSource) ( panic("UserInfo was called in test but not mocked") } -func mockOP(retErr bool, ui OIDCUserInfo) OIDCProvider { +func mockOP(retErr bool) OIDCProvider { if retErr { return &mockOIDCProvider{ - UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { + UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (*oidc.UserInfo, error) { return nil, fmt.Errorf("error returned by mockOIDCProvider UserInfo") }, } } return &mockOIDCProvider{ - UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (OIDCUserInfo, error) { + UserInfoFunc: func(ctx context.Context, ts oauth2.TokenSource) (*oidc.UserInfo, error) { + ui := &oidc.UserInfo{ + // claims: private ... + } return ui, nil }, } } -type mockOIDCUserInfo struct { - ClaimsFunc func(v interface{}) error -} - -// UserInfo will panic if the function has been called, but not mocked -func (m mockOIDCUserInfo) Claims(v interface{}) error { - if m.ClaimsFunc != nil { - return m.ClaimsFunc(v) - } - - panic("ClaimsFunc was called in test but not mocked") -} -func mockUI(retErr bool) OIDCUserInfo { - if retErr { - return &mockOIDCUserInfo{ - ClaimsFunc: func(v interface{}) error { - return fmt.Errorf("error returned by mockOIDCProvider UserInfo") - }, - } - - } - return &mockOIDCUserInfo{ - ClaimsFunc: func(v interface{}) error { - // TODO fill in claims - return nil - }, - } - -} - func mockOpenidConnectMiddlewareAccSvc(retErr bool) proto.AccountsService { if retErr { return &proto.MockAccountsService{ From 8e4f814c3aa310e96abd555fda235ec936952927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 19 Jun 2020 14:53:25 +0200 Subject: [PATCH 125/213] remove unused mock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/middleware/openidconnect_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pkg/middleware/openidconnect_test.go b/pkg/middleware/openidconnect_test.go index ce38cefc0f..19420ed8f8 100644 --- a/pkg/middleware/openidconnect_test.go +++ b/pkg/middleware/openidconnect_test.go @@ -8,8 +8,6 @@ import ( "testing" "github.com/coreos/go-oidc" - "github.com/micro/go-micro/v2/client" - "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" "golang.org/x/oauth2" ) @@ -67,26 +65,3 @@ func mockOP(retErr bool) OIDCProvider { } } - -func mockOpenidConnectMiddlewareAccSvc(retErr bool) proto.AccountsService { - if retErr { - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return nil, fmt.Errorf("error returned by mockAccountsService LIST") - }, - } - } - - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return &proto.ListAccountsResponse{ - Accounts: []*proto.Account{ - { - Id: "yay", - }, - }, - }, nil - }, - } - -} From 0a6e2c7e166d03bfef8f306b5de38e57a4718e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 19 Jun 2020 13:17:22 +0000 Subject: [PATCH 126/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b21d547a..d1f213cc36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,7 +66,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -100,11 +100,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -135,22 +151,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From f0b9d2b80fe78450748ead29d3bda0dbd88e4658 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 24 Jun 2020 12:07:49 +0200 Subject: [PATCH 127/213] respect the account_enabled flag Signed-off-by: David Christofas --- .../respect_account_enabled_flag.md | 6 ++++ go.sum | 2 ++ pkg/middleware/account_uuid.go | 5 +++ pkg/middleware/account_uuid_test.go | 34 ++++++++++++++++--- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/respect_account_enabled_flag.md diff --git a/changelog/unreleased/respect_account_enabled_flag.md b/changelog/unreleased/respect_account_enabled_flag.md new file mode 100644 index 0000000000..80a635a269 --- /dev/null +++ b/changelog/unreleased/respect_account_enabled_flag.md @@ -0,0 +1,6 @@ +Enhancement: respect account_enabled flag + +If the account returned by the accounts service has the account_enabled flag +set to false, the proxy will return immediately with the status code unauthorized. + +https://github.com/owncloud/ocis-proxy/issues/53 diff --git a/go.sum b/go.sum index 38fee43570..ac3d08dd10 100644 --- a/go.sum +++ b/go.sum @@ -203,6 +203,7 @@ github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiG github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= github.com/couchbase/vellum v1.0.1/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4= github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= @@ -785,6 +786,7 @@ github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/rs/zerolog v1.19.0 h1:hYz4ZVdUgjXTBUmrkrw55j1nHx68LfOKIQk5IYtyScg= github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index e42f28eb84..071af181ac 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -92,6 +92,11 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { w.WriteHeader(status) return } + if !account.AccountEnabled { + l.Debug().Interface("account", account).Msg("account is disabled") + w.WriteHeader(http.StatusUnauthorized) + return + } l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") token, err := tokenManager.MintToken(r.Context(), &revauser.User{ diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index a2b5dbc351..abf2e8515d 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -17,13 +17,13 @@ import ( // TODO testing the getAccount method should inject a cache func TestGetAccountSuccess(t *testing.T) { svcCache.Invalidate(AccountsKey, "success") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccountUUIDMiddlewareAccSvc(false)); status != 0 { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccountUUIDMiddlewareAccSvc(false, true)); status != 0 { t.Errorf("expected an account") } } func TestGetAccountInternalError(t *testing.T) { svcCache.Invalidate(AccountsKey, "failure") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccountUUIDMiddlewareAccSvc(true)); status != http.StatusInternalServerError { + if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccountUUIDMiddlewareAccSvc(true, false)); status != http.StatusInternalServerError { t.Errorf("expected an internal server error") } } @@ -34,7 +34,7 @@ func TestAccountUUIDMiddleware(t *testing.T) { m := AccountUUID( Logger(log.NewLogger()), TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), - AccountsClient(mockAccountUUIDMiddlewareAccSvc(false)), + AccountsClient(mockAccountUUIDMiddlewareAccSvc(false, true)), )(next) r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) @@ -48,7 +48,30 @@ func TestAccountUUIDMiddleware(t *testing.T) { } } -func mockAccountUUIDMiddlewareAccSvc(retErr bool) proto.AccountsService { +func TestAccountUUIDMiddlewareWithDisabledAccount(t *testing.T) { + svcCache.Invalidate(AccountsKey, "failure") + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}) + m := AccountUUID( + Logger(log.NewLogger()), + TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), + AccountsClient(mockAccountUUIDMiddlewareAccSvc(false, false)), + )(next) + + r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) + w := httptest.NewRecorder() + ctx := oidc.NewContext(r.Context(), &oidc.StandardClaims{Email: "failure"}) + r = r.WithContext(ctx) + m.ServeHTTP(w, r) + + rsp := w.Result() + defer rsp.Body.Close() + + if rsp.StatusCode != http.StatusUnauthorized { + t.Errorf("expected a disabled account to be unauthorized, got: %d", rsp.StatusCode) + } +} + +func mockAccountUUIDMiddlewareAccSvc(retErr, accEnabled bool) proto.AccountsService { if retErr { return &proto.MockAccountsService{ ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { @@ -62,7 +85,8 @@ func mockAccountUUIDMiddlewareAccSvc(retErr bool) proto.AccountsService { return &proto.ListAccountsResponse{ Accounts: []*proto.Account{ { - Id: "yay", + Id: "yay", + AccountEnabled: accEnabled, }, }, }, nil From 13c88260572831a5a95c895d26f0c2ced8878767 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 24 Jun 2020 15:35:06 +0000 Subject: [PATCH 128/213] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f213cc36..01a8ed092d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The following sections list the changes for ocis-proxy unreleased. * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) +* Enhancement - Respect account_enabled flag: [#53](https://github.com/owncloud/ocis-proxy/issues/53) ## Details @@ -44,6 +45,14 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/41 + +* Enhancement - Respect account_enabled flag: [#53](https://github.com/owncloud/ocis-proxy/issues/53) + + If the account returned by the accounts service has the account_enabled flag set to false, the + proxy will return immediately with the status code unauthorized. + + https://github.com/owncloud/ocis-proxy/issues/53 + # Changelog for [0.3.1] (2020-03-31) The following sections list the changes for ocis-proxy 0.3.1. From 2491087264d4e698e0ddb3a975bd91b8c96516a3 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 24 Jun 2020 17:27:00 +0200 Subject: [PATCH 129/213] autoprovision new users on login Signed-off-by: David Christofas --- .../unreleased/auto_provision_accounts.md | 6 ++++ pkg/middleware/account_uuid.go | 31 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/auto_provision_accounts.md diff --git a/changelog/unreleased/auto_provision_accounts.md b/changelog/unreleased/auto_provision_accounts.md new file mode 100644 index 0000000000..d2c0b2f3d3 --- /dev/null +++ b/changelog/unreleased/auto_provision_accounts.md @@ -0,0 +1,6 @@ +Enhancement: create account if it doesn't exist in ocis-accounts + +The accounts_uuid middleware tries to get the account from ocis-accounts. +If it doens't exist there yet the proxy creates the account using the ocis-account api. + +https://github.com/owncloud/ocis-proxy/issues/55 diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 071af181ac..7eed9eaf0a 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -61,6 +61,25 @@ func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsServic return } +func createAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsService) (*acc.Account, int) { + // TODO check if fields are missing. + req := &acc.CreateAccountRequest{ + Account: &acc.Account{ + DisplayName: claims.DisplayName, + PreferredName: claims.PreferredUsername, + Mail: claims.Email, + CreationType: "LocalAccount", + }, + } + created, err := ac.CreateAccount(context.Background(), req) + if err != nil { + l.Error().Err(err).Interface("account", req.Account).Msg("could not create account") + return nil, http.StatusInternalServerError + } + + return created, 0 +} + // AccountUUID provides a middleware which mints a jwt and adds it to the proxied request based // on the oidc-claims func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { @@ -89,8 +108,16 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { account, status := getAccount(l, claims, opt.AccountsClient) if status != 0 { - w.WriteHeader(status) - return + if status == http.StatusNotFound { + account, status = createAccount(l, claims, opt.AccountsClient) + if status != 0 { + w.WriteHeader(status) + return + } + } else { + w.WriteHeader(status) + return + } } if !account.AccountEnabled { l.Debug().Interface("account", account).Msg("account is disabled") From 6fe8392aa499e1fe9c39bd2d496fbec6d07bd1f8 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 12 Jun 2020 09:19:41 +0200 Subject: [PATCH 130/213] Point /data to reva frontend --- config/proxy-example-migration.json | 9 +++++++++ config/proxy-example.json | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/config/proxy-example-migration.json b/config/proxy-example-migration.json index efeb71bad2..42885cc6f0 100644 --- a/config/proxy-example-migration.json +++ b/config/proxy-example-migration.json @@ -58,6 +58,10 @@ { "endpoint": "/index.php/", "backend": "http://localhost:9140" + }, + { + "endpoint": "/data", + "backend": "http://localhost:9140" } ] }, @@ -107,6 +111,11 @@ { "endpoint": "/index.php/", "backend": "https://demo.owncloud.com" + }, + { + "endpoint": "/data", + "backend": "https://demo.owncloud.com", + "apache-vhost": true } ] } diff --git a/config/proxy-example.json b/config/proxy-example.json index 21e0a8c084..6878e670b9 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -54,6 +54,10 @@ { "endpoint": "/index.php/", "backend": "http://localhost:9140" + }, + { + "endpoint": "/data", + "backend": "http://localhost:9140" } ] }, @@ -103,6 +107,11 @@ { "endpoint": "/index.php/", "backend": "https://demo.owncloud.com" + }, + { + "endpoint": "/data", + "backend": "https://demo.owncloud.com", + "apache-vhost": true } ] } From 9a9fd8cc7f37ae783294930cf60ed9cf7d3857b1 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 25 Jun 2020 09:51:31 +0200 Subject: [PATCH 131/213] Exclude proxy default configs from codacy --- .codacy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codacy.yml b/.codacy.yml index 3e80750a9f..3e470105c9 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -3,6 +3,7 @@ exclude_paths: - CHANGELOG.md - changelog/** - docs/** + - config/** - pkg/proto/** - '**_test.go' - .codacy.yml From 3873079c11f63dd229b4c642f8f2fcee7a098151 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 25 Jun 2020 09:58:45 +0200 Subject: [PATCH 132/213] Add `/data` endpoint to builtin default config --- pkg/proxy/proxy.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index ff5ab8be4f..5d1340bdf6 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -261,6 +261,10 @@ func defaultPolicies() []config.Policy { Endpoint: "/index.php/", Backend: "http://localhost:9140", }, + { + Endpoint: "/data", + Backend: "http://localhost:9140", + }, }, }, { @@ -312,6 +316,11 @@ func defaultPolicies() []config.Policy { Backend: "https://demo.owncloud.com", ApacheVHost: true, }, + { + Endpoint: "/data", + Backend: "https://demo.owncloud.com", + ApacheVHost: true, + }, }, }, } From 2816742f04e92b36b98d6a7ad9d1261e0ef683d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 25 Jun 2020 08:24:19 +0000 Subject: [PATCH 133/213] Automated changelog update [skip ci] --- CHANGELOG.md | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a8ed092d..209be46d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The following sections list the changes for ocis-proxy unreleased. * Bugfix - Accounts service response was ignored: [#43](https://github.com/owncloud/ocis-proxy/pull/43) * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) +* Enhancement - Create account if it doesn't exist in ocis-accounts: [#55](https://github.com/owncloud/ocis-proxy/issues/55) * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) * Enhancement - Respect account_enabled flag: [#53](https://github.com/owncloud/ocis-proxy/issues/53) @@ -29,6 +30,14 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/41 +* Enhancement - Create account if it doesn't exist in ocis-accounts: [#55](https://github.com/owncloud/ocis-proxy/issues/55) + + The accounts_uuid middleware tries to get the account from ocis-accounts. If it doens't exist + there yet the proxy creates the account using the ocis-account api. + + https://github.com/owncloud/ocis-proxy/issues/55 + + * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) This should reduce file-descriptor counts @@ -75,7 +84,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -109,27 +118,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -160,6 +153,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 94ebbc09333ad3ab90866cc355353ec1fb866f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 19 Jun 2020 16:24:42 +0200 Subject: [PATCH 134/213] send autocreate home request to reva gateway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 14 ++-- go.sum | 118 +++++++++++++++++++++++++++++++--- pkg/command/server.go | 26 ++++---- pkg/config/config.go | 12 ++-- pkg/cs3/client.go | 26 ++++++++ pkg/flagset/flagset.go | 7 ++ pkg/middleware/create_home.go | 40 ++++++++++++ pkg/middleware/options.go | 10 +++ 8 files changed, 222 insertions(+), 31 deletions(-) create mode 100644 pkg/cs3/client.go create mode 100644 pkg/middleware/create_home.go diff --git a/go.mod b/go.mod index 7384bdd04e..a3306f07f6 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,11 @@ go 1.13 require ( contrib.go.opencensus.io/exporter/jaeger v0.2.0 - contrib.go.opencensus.io/exporter/ocagent v0.6.0 + contrib.go.opencensus.io/exporter/ocagent v0.7.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.2.1+incompatible - github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 + github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543 github.com/cs3org/reva v0.1.0 - github.com/golang/protobuf v1.4.2 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 github.com/micro/go-micro/v2 v2.6.0 @@ -18,13 +17,12 @@ require ( github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e github.com/owncloud/ocis-pkg/v2 v2.2.1 - github.com/prometheus/client_golang v1.2.1 - github.com/prometheus/procfs v0.0.8 // indirect + github.com/prometheus/client_golang v1.7.0 github.com/restic/calens v0.2.0 github.com/spf13/viper v1.7.0 - go.opencensus.io v0.22.3 - golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 - google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 // indirect + go.opencensus.io v0.22.4 + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d + google.golang.org/grpc v1.29.1 gopkg.in/square/go-jose.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index ac3d08dd10..75aeda852a 100644 --- a/go.sum +++ b/go.sum @@ -6,11 +6,21 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk= contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= @@ -18,6 +28,8 @@ contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRq contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/ocagent v0.6.0 h1:Z1n6UAyr0QwM284yUuh5Zd8JlvxUGAhFZcgMJkMPrGM= contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= +contrib.go.opencensus.io/exporter/ocagent v0.7.0 h1:BEfdCTXfMV30tLZD8c9n64V/tIZX5+9sXiuFLnrr1k8= +contrib.go.opencensus.io/exporter/ocagent v0.7.0/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= @@ -101,6 +113,7 @@ github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572/go.mod h1:MDwc+vsGEq github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -162,9 +175,12 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= @@ -212,6 +228,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GEw3FtXPxc5wxGpaw2pxzREg1GBV9LIQ= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543 h1:ykZiNI0yHDdIJPI4L+VB6inTUBJh9t9AZLDeXq7/8+Q= +github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v0.1.0 h1:PYzDejKm/+xG3OTS2WgzBxcksVogEGmPgjJVegwSR2c= github.com/cs3org/reva v0.1.0/go.mod h1:8j6QyyAq9Kjj7RPfJb7M1aEmw5DmsuCJKUULXxYOyRo= github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= @@ -296,6 +314,7 @@ github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnp github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -344,11 +363,14 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -361,7 +383,6 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -387,6 +408,9 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -414,6 +438,7 @@ github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -428,6 +453,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hako/branca v0.0.0-20180808000428-10b799466ada/go.mod h1:tOPn4gvKEUWqIJNE+zpTeTALaRAXnrRqqSnPlO3VpEo= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= @@ -478,6 +505,7 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo= github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -503,7 +531,10 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -698,8 +729,6 @@ github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8 github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= -github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82 h1:UgNhC6sxbwd3T4stBbRNRB2mLV8Gs/rD51O0zbXdJNs= -github.com/owncloud/ocis-accounts v0.1.2-0.20200617152311-02e759f95e82/go.mod h1:VuO6j5kWjRtgPk7i/ooWJyzrl8jG5OUjvkbBPr7ihWo= github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e h1:FRD1/lH/6IaaWWzBXCeM4hUAoN86zQAz68nOnvCLqsY= github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e/go.mod h1:ohb58AUSUgq+kPOFAjy1s1k5Bi33YtPg45qOOPsepeM= github.com/owncloud/ocis-hello v0.1.0-alpha1/go.mod h1:tU2bOB7DjuXZ+ju+5A+7pUHmTfPIYUk3tMflqHTBTpE= @@ -745,11 +774,15 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= +github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -758,6 +791,8 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -765,8 +800,8 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -897,6 +932,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -914,6 +950,8 @@ go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= @@ -968,6 +1006,10 @@ golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxT golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -978,11 +1020,15 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1021,12 +1067,17 @@ golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 h1:eDrdRpKgkcCqKZQwyZRyeFZgfqt37SL7Kv3tok06cKE= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1034,6 +1085,8 @@ golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1041,6 +1094,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1082,12 +1137,26 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -1123,11 +1192,22 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200427214658-4697a2867c88 h1:Nj7oNnL9tSACMt2JvszZN6P4IXiy1t6E/YRMr7YtaSw= golang.org/x/tools v0.0.0-20200427214658-4697a2867c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1144,12 +1224,20 @@ google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.25.0 h1:LodzhlzZEUfhXzNUMIfVlf9Gr6Ua5MMtoFWh7+f47qA= +google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1166,12 +1254,21 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb h1:nAFaltAMbNVA0rixtwvdnqgSVLX3HFUUvMkEklmzbYM= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece h1:1YM0uhfumvoDu9sx8+RyWwTI63zoCQvI23IYFRlvte0= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1179,10 +1276,12 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= @@ -1240,6 +1339,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -1264,6 +1364,8 @@ k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/command/server.go b/pkg/command/server.go index 0a5796e73d..916efc7875 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -12,6 +12,7 @@ import ( "github.com/coreos/go-oidc" "github.com/justinas/alice" "github.com/owncloud/ocis-pkg/v2/log" + "github.com/owncloud/ocis-proxy/pkg/cs3" "github.com/owncloud/ocis-proxy/pkg/middleware" "golang.org/x/oauth2" @@ -245,16 +246,6 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") - // set defaults - /* - if opt.Realm == "" { - opt.Realm = opt.Endpoint - } - if len(opt.SigningAlgs) < 1 { - opt.SigningAlgs = []string{"RS256", "PS256"} - } - */ - var oidcHTTPClient = &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{ @@ -290,7 +281,20 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.AccountsClient(accounts), ) - return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW) + // the connection will be established in a non blocking fashion + sc, err := cs3.GetGatewayServiceClient(cfg.Reva.Address) + if err != nil { + l.Error().Err(err). + Str("gateway", cfg.Reva.Address). + Msg("Failed to create reva gateway service client") + } + + chMW := middleware.CreateHome( + middleware.Logger(l), + middleware.RevaGatewayClient(sc), + ) + + return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW, chMW) } return alice.New(middleware.RedirectToHTTPS) diff --git a/pkg/config/config.go b/pkg/config/config.go index 2319f7c6cd..bee18c6785 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -71,6 +71,11 @@ var ( RouteTypes []RouteType = []RouteType{QueryRoute, RegexRoute, PrefixRoute} ) +// Reva defines all available REVA configuration. +type Reva struct { + Address string +} + // Config combines all available configuration parts. type Config struct { File string @@ -83,15 +88,14 @@ type Config struct { OIDC *OIDC TokenManager TokenManager PolicySelector *PolicySelector `mapstructure:"policy_selector"` + Reva Reva } // OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request // with the configured oidc-provider type OIDC struct { - Endpoint string - Realm string - SigningAlgs []string - Insecure bool + Endpoint string + Insecure bool } // PolicySelector is the toplevel-configuration for different selectors diff --git a/pkg/cs3/client.go b/pkg/cs3/client.go new file mode 100644 index 0000000000..9eed1a3610 --- /dev/null +++ b/pkg/cs3/client.go @@ -0,0 +1,26 @@ +package cs3 + +import ( + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + + "google.golang.org/grpc" +) + +func newConn(endpoint string) (*grpc.ClientConn, error) { + conn, err := grpc.Dial(endpoint, grpc.WithInsecure()) + if err != nil { + return nil, err + } + + return conn, nil +} + +// GetGatewayServiceClient returns a new cs3 gateway client +func GetGatewayServiceClient(endpoint string) (gateway.GatewayAPIClient, error) { + conn, err := newConn(endpoint) + if err != nil { + return nil, err + } + + return gateway.NewGatewayAPIClient(conn), nil +} diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 069bd47221..bb72c29a3e 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -164,5 +164,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_JWT_SECRET"}, Destination: &cfg.TokenManager.JWTSecret, }, + &cli.StringFlag{ + Name: "reva-gateway-addr", + Value: "127.0.0.1:9142", + Usage: "REVA Gateway Endpoint", + EnvVars: []string{"PROXY_REVA_GATEWAY_ADDR"}, + Destination: &cfg.Reva.Address, + }, } } diff --git a/pkg/middleware/create_home.go b/pkg/middleware/create_home.go new file mode 100644 index 0000000000..8ed0909d1d --- /dev/null +++ b/pkg/middleware/create_home.go @@ -0,0 +1,40 @@ +package middleware + +import ( + "net/http" + + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" + provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + "github.com/cs3org/reva/pkg/rgrpc/status" + tokenpkg "github.com/cs3org/reva/pkg/token" + "google.golang.org/grpc/metadata" +) + +// CreateHome provides a middleware which sends a CreateHome request to the reva gateway +func CreateHome(opts ...Option) func(next http.Handler) http.Handler { + opt := newOptions(opts...) + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + token := r.Header.Get("x-access-token") + + // we need to pass the token to authenticate the CreateHome request. + //ctx := tokenpkg.ContextSetToken(r.Context(), token) + ctx := metadata.AppendToOutgoingContext(r.Context(), tokenpkg.TokenHeader, token) + + createHomeReq := &provider.CreateHomeRequest{} + createHomeRes, err := opt.RevaGatewayClient.CreateHome(ctx, createHomeReq) + + if err != nil { + opt.Logger.Err(err).Msg("error calling CreateHome") + } + + if createHomeRes.Status.Code != rpc.Code_CODE_OK { + err := status.NewErrorFromCode(createHomeRes.Status.Code, "gateway") + opt.Logger.Err(err).Msg("error calling Createhome") + } + + next.ServeHTTP(w, r) + }) + } +} diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index 0d727278ad..8a4dace009 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -3,6 +3,7 @@ package middleware import ( "net/http" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" @@ -23,6 +24,8 @@ type Options struct { AccountsClient acc.AccountsService // OIDCProviderFunc to lazily initialize a provider, must be set for the oidcProvider middleware OIDCProviderFunc func() (OIDCProvider, error) + // RevaGatewayClient to send requests to the reva gateway + RevaGatewayClient gateway.GatewayAPIClient } // newOIDCOptions initializes the available default options. @@ -70,3 +73,10 @@ func OIDCProviderFunc(f func() (OIDCProvider, error)) Option { o.OIDCProviderFunc = f } } + +// RevaGatewayClient provides a function to set the the reva gateway service client option. +func RevaGatewayClient(sc gateway.GatewayAPIClient) Option { + return func(o *Options) { + o.RevaGatewayClient = sc + } +} From 5f4fc9e00dc9b9ab3a2cfa7441698e0bb3c3f998 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 25 Jun 2020 14:19:09 +0200 Subject: [PATCH 135/213] Add changelog entry for #45 --- changelog/unreleased/point-data-to-reva-frontend | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/point-data-to-reva-frontend diff --git a/changelog/unreleased/point-data-to-reva-frontend b/changelog/unreleased/point-data-to-reva-frontend new file mode 100644 index 0000000000..053b8148d8 --- /dev/null +++ b/changelog/unreleased/point-data-to-reva-frontend @@ -0,0 +1,5 @@ +Change: Point /data endpoint to reva frontend + +Adjusted example config files to point /data to the reva frontend. + +https://github.com/owncloud/ocis-proxy/pull/45 From 1ef5f14562e289e49bb5ea7244faaa7a30d964a1 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 25 Jun 2020 14:28:44 +0200 Subject: [PATCH 136/213] Add missing changelog entries --- changelog/unreleased/account-uuid | 5 +++++ changelog/unreleased/auto_provision_accounts.md | 1 + changelog/unreleased/send-autocreate-home | 5 +++++ changelog/unreleased/token-header-fix | 1 + changelog/unreleased/update-to-new-accounts-api | 5 +++++ 5 files changed, 17 insertions(+) create mode 100644 changelog/unreleased/account-uuid create mode 100644 changelog/unreleased/send-autocreate-home create mode 100644 changelog/unreleased/update-to-new-accounts-api diff --git a/changelog/unreleased/account-uuid b/changelog/unreleased/account-uuid new file mode 100644 index 0000000000..db2955f2ac --- /dev/null +++ b/changelog/unreleased/account-uuid @@ -0,0 +1,5 @@ +Enhancement: Retrieve Account UUID From User Claims + +OIDC Middleware can make use of uuidFromClaims to trade claims.Email for an account's UUID. For this, a general purpose cache was added that caches on a per-request basis, meaning whenever the request parameters match a set of keys, the cached value is returned, saving a round trip to the accounts service that otherwise would happen in every single request. + +https://github.com/owncloud/ocis-proxy/pull/36 diff --git a/changelog/unreleased/auto_provision_accounts.md b/changelog/unreleased/auto_provision_accounts.md index d2c0b2f3d3..dc36a0573b 100644 --- a/changelog/unreleased/auto_provision_accounts.md +++ b/changelog/unreleased/auto_provision_accounts.md @@ -4,3 +4,4 @@ The accounts_uuid middleware tries to get the account from ocis-accounts. If it doens't exist there yet the proxy creates the account using the ocis-account api. https://github.com/owncloud/ocis-proxy/issues/55 +https://github.com/owncloud/ocis-proxy/issues/58 diff --git a/changelog/unreleased/send-autocreate-home b/changelog/unreleased/send-autocreate-home new file mode 100644 index 0000000000..4f6f18b12b --- /dev/null +++ b/changelog/unreleased/send-autocreate-home @@ -0,0 +1,5 @@ +Change: Send autocreate home request to reva gateway + +Send autocreate home request to reva gateway + +https://github.com/owncloud/ocis-proxy/pull/51 diff --git a/changelog/unreleased/token-header-fix b/changelog/unreleased/token-header-fix index 5c3b351121..36907fb395 100644 --- a/changelog/unreleased/token-header-fix +++ b/changelog/unreleased/token-header-fix @@ -3,3 +3,4 @@ Bugfix: Fix x-access-token in header We fixed setting the x-access-token in the request header, which was broken before. https://github.com/owncloud/ocis-proxy/pull/41 +https://github.com/owncloud/ocis-proxy/pull/46 diff --git a/changelog/unreleased/update-to-new-accounts-api b/changelog/unreleased/update-to-new-accounts-api new file mode 100644 index 0000000000..b364a02b4b --- /dev/null +++ b/changelog/unreleased/update-to-new-accounts-api @@ -0,0 +1,5 @@ +Change: Update to new accounts API + +Update to new accounts API + +https://github.com/owncloud/ocis-proxy/issues/39 From 6ee5a3a5d0d4c0e1069124590298b2b0d3bf0020 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 25 Jun 2020 14:29:09 +0200 Subject: [PATCH 137/213] Prepare for 0.4.0 release --- changelog/{unreleased => 0.4.0_2020-06-25}/account-uuid | 0 .../{unreleased => 0.4.0_2020-06-25}/auto_provision_accounts.md | 0 changelog/{unreleased => 0.4.0_2020-06-25}/cache-miss-fix | 0 .../{unreleased => 0.4.0_2020-06-25}/disable-oidc-keep-alive | 0 changelog/{unreleased => 0.4.0_2020-06-25}/jwt-secret-config | 0 .../{unreleased => 0.4.0_2020-06-25}/point-data-to-reva-frontend | 0 .../respect_account_enabled_flag.md | 0 changelog/{unreleased => 0.4.0_2020-06-25}/send-autocreate-home | 0 changelog/{unreleased => 0.4.0_2020-06-25}/token-header-fix | 0 .../{unreleased => 0.4.0_2020-06-25}/update-to-new-accounts-api | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.4.0_2020-06-25}/account-uuid (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/auto_provision_accounts.md (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/cache-miss-fix (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/disable-oidc-keep-alive (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/jwt-secret-config (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/point-data-to-reva-frontend (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/respect_account_enabled_flag.md (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/send-autocreate-home (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/token-header-fix (100%) rename changelog/{unreleased => 0.4.0_2020-06-25}/update-to-new-accounts-api (100%) diff --git a/changelog/unreleased/account-uuid b/changelog/0.4.0_2020-06-25/account-uuid similarity index 100% rename from changelog/unreleased/account-uuid rename to changelog/0.4.0_2020-06-25/account-uuid diff --git a/changelog/unreleased/auto_provision_accounts.md b/changelog/0.4.0_2020-06-25/auto_provision_accounts.md similarity index 100% rename from changelog/unreleased/auto_provision_accounts.md rename to changelog/0.4.0_2020-06-25/auto_provision_accounts.md diff --git a/changelog/unreleased/cache-miss-fix b/changelog/0.4.0_2020-06-25/cache-miss-fix similarity index 100% rename from changelog/unreleased/cache-miss-fix rename to changelog/0.4.0_2020-06-25/cache-miss-fix diff --git a/changelog/unreleased/disable-oidc-keep-alive b/changelog/0.4.0_2020-06-25/disable-oidc-keep-alive similarity index 100% rename from changelog/unreleased/disable-oidc-keep-alive rename to changelog/0.4.0_2020-06-25/disable-oidc-keep-alive diff --git a/changelog/unreleased/jwt-secret-config b/changelog/0.4.0_2020-06-25/jwt-secret-config similarity index 100% rename from changelog/unreleased/jwt-secret-config rename to changelog/0.4.0_2020-06-25/jwt-secret-config diff --git a/changelog/unreleased/point-data-to-reva-frontend b/changelog/0.4.0_2020-06-25/point-data-to-reva-frontend similarity index 100% rename from changelog/unreleased/point-data-to-reva-frontend rename to changelog/0.4.0_2020-06-25/point-data-to-reva-frontend diff --git a/changelog/unreleased/respect_account_enabled_flag.md b/changelog/0.4.0_2020-06-25/respect_account_enabled_flag.md similarity index 100% rename from changelog/unreleased/respect_account_enabled_flag.md rename to changelog/0.4.0_2020-06-25/respect_account_enabled_flag.md diff --git a/changelog/unreleased/send-autocreate-home b/changelog/0.4.0_2020-06-25/send-autocreate-home similarity index 100% rename from changelog/unreleased/send-autocreate-home rename to changelog/0.4.0_2020-06-25/send-autocreate-home diff --git a/changelog/unreleased/token-header-fix b/changelog/0.4.0_2020-06-25/token-header-fix similarity index 100% rename from changelog/unreleased/token-header-fix rename to changelog/0.4.0_2020-06-25/token-header-fix diff --git a/changelog/unreleased/update-to-new-accounts-api b/changelog/0.4.0_2020-06-25/update-to-new-accounts-api similarity index 100% rename from changelog/unreleased/update-to-new-accounts-api rename to changelog/0.4.0_2020-06-25/update-to-new-accounts-api From 503e7c576d96e5c0eb3ebe63c5ae54a65230a2c4 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 25 Jun 2020 12:53:19 +0000 Subject: [PATCH 138/213] Automated changelog update [skip ci] --- CHANGELOG.md | 79 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 209be46d2b..dc61fa146f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,17 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.4.0] (2020-06-25) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.4.0. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.3.1...master +[0.4.0]: https://github.com/owncloud/ocis-proxy/compare/v0.3.1...v0.4.0 ## Summary * Bugfix - Accounts service response was ignored: [#43](https://github.com/owncloud/ocis-proxy/pull/43) * Bugfix - Fix x-access-token in header: [#41](https://github.com/owncloud/ocis-proxy/pull/41) +* Change - Point /data endpoint to reva frontend: [#45](https://github.com/owncloud/ocis-proxy/pull/45) +* Change - Send autocreate home request to reva gateway: [#51](https://github.com/owncloud/ocis-proxy/pull/51) +* Change - Update to new accounts API: [#39](https://github.com/owncloud/ocis-proxy/issues/39) +* Enhancement - Retrieve Account UUID From User Claims: [#36](https://github.com/owncloud/ocis-proxy/pull/36) * Enhancement - Create account if it doesn't exist in ocis-accounts: [#55](https://github.com/owncloud/ocis-proxy/issues/55) * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) * Enhancement - Make jwt secret configurable: [#41](https://github.com/owncloud/ocis-proxy/pull/41) @@ -28,6 +32,38 @@ The following sections list the changes for ocis-proxy unreleased. We fixed setting the x-access-token in the request header, which was broken before. https://github.com/owncloud/ocis-proxy/pull/41 + https://github.com/owncloud/ocis-proxy/pull/46 + + +* Change - Point /data endpoint to reva frontend: [#45](https://github.com/owncloud/ocis-proxy/pull/45) + + Adjusted example config files to point /data to the reva frontend. + + https://github.com/owncloud/ocis-proxy/pull/45 + + +* Change - Send autocreate home request to reva gateway: [#51](https://github.com/owncloud/ocis-proxy/pull/51) + + Send autocreate home request to reva gateway + + https://github.com/owncloud/ocis-proxy/pull/51 + + +* Change - Update to new accounts API: [#39](https://github.com/owncloud/ocis-proxy/issues/39) + + Update to new accounts API + + https://github.com/owncloud/ocis-proxy/issues/39 + + +* Enhancement - Retrieve Account UUID From User Claims: [#36](https://github.com/owncloud/ocis-proxy/pull/36) + + OIDC Middleware can make use of uuidFromClaims to trade claims.Email for an account's UUID. + For this, a general purpose cache was added that caches on a per-request basis, meaning + whenever the request parameters match a set of keys, the cached value is returned, saving a + round trip to the accounts service that otherwise would happen in every single request. + + https://github.com/owncloud/ocis-proxy/pull/36 * Enhancement - Create account if it doesn't exist in ocis-accounts: [#55](https://github.com/owncloud/ocis-proxy/issues/55) @@ -36,6 +72,7 @@ The following sections list the changes for ocis-proxy unreleased. there yet the proxy creates the account using the ocis-account api. https://github.com/owncloud/ocis-proxy/issues/55 + https://github.com/owncloud/ocis-proxy/issues/58 * Enhancement - Disable keep-alive on server-side OIDC requests: [#268](https://github.com/owncloud/ocis/issues/268) @@ -84,7 +121,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -118,11 +155,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -153,22 +206,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 94adb97ac1660a9e680be216c2c1f7e8e42587f1 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 9 Jul 2020 14:15:20 +0200 Subject: [PATCH 139/213] create root span on ocis-proxy --- go.sum | 1 + pkg/command/server.go | 3 +++ pkg/flagset/flagset.go | 2 +- pkg/proxy/proxy.go | 21 +++++++++++++++++++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/go.sum b/go.sum index 75aeda852a..1abba4df56 100644 --- a/go.sum +++ b/go.sum @@ -175,6 +175,7 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= diff --git a/pkg/command/server.go b/pkg/command/server.go index 916efc7875..59f3424e19 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "os/signal" + "strconv" "strings" "time" @@ -42,6 +43,8 @@ func Server(cfg *config.Config) *cli.Command { Usage: "Start integrated server", Flags: flagset.ServerWithConfig(cfg), Before: func(ctx *cli.Context) error { + l := NewLogger(cfg) + l.Debug().Str("tracing", strconv.FormatBool(cfg.Tracing.Enabled)).Msg("init: before") if cfg.HTTP.Root != "/" { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index bb72c29a3e..ad9b714293 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -77,7 +77,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "tracing-collector", - Value: "", + Value: "http://localhost:14268/api/traces", Usage: "Endpoint for the collector", EnvVars: []string{"PROXY_TRACING_COLLECTOR"}, Destination: &cfg.Tracing.Collector, diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 5d1340bdf6..9b1fc83bd3 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -1,13 +1,17 @@ package proxy import ( - "github.com/owncloud/ocis-proxy/pkg/proxy/policy" + "context" "net/http" "net/http/httputil" "net/url" "regexp" "strings" + "github.com/owncloud/ocis-proxy/pkg/proxy/policy" + "go.opencensus.io/plugin/ochttp/propagation/tracecontext" + "go.opencensus.io/trace" + "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" ) @@ -18,6 +22,8 @@ type MultiHostReverseProxy struct { Directors map[string]map[config.RouteType]map[string]func(req *http.Request) PolicySelector policy.Selector logger log.Logger + propagator tracecontext.HTTPFormat + config *config.Config } // NewMultiHostReverseProxy undocummented @@ -27,6 +33,7 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { rp := &MultiHostReverseProxy{ Directors: make(map[string]map[config.RouteType]map[string]func(req *http.Request)), logger: options.Logger, + config: options.Config, } if options.Config.Policies == nil { @@ -140,6 +147,16 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request Msgf("policy %v is not configured", pol) } + var ctx context.Context + var span *trace.Span + + // Start root span. + if p.config.Tracing.Enabled { + ctx, span = trace.StartSpan(context.Background(), r.URL.String()) + defer span.End() + p.propagator.SpanContextToRequest(span.SpanContext(), r) + } + Loop: for _, rt := range config.RouteTypes { var handler func(string, url.URL) bool @@ -175,7 +192,7 @@ Loop: } // Call upstream ServeHTTP - p.ReverseProxy.ServeHTTP(w, r) + p.ReverseProxy.ServeHTTP(w, r.WithContext(ctx)) } func (p MultiHostReverseProxy) queryRouteMatcher(endpoint string, target url.URL) bool { From 9ddf0d555bda34b1eb7ab60fbc60d4966284958e Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 9 Jul 2020 14:29:42 +0200 Subject: [PATCH 140/213] avoid setting a nil context --- pkg/proxy/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 9b1fc83bd3..9835e6dbab 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -147,7 +147,7 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request Msgf("policy %v is not configured", pol) } - var ctx context.Context + ctx := context.Background() var span *trace.Span // Start root span. From ffd4e96bf0a19a98c0da3ee080972f5f4a4c5728 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 9 Jul 2020 14:38:50 +0200 Subject: [PATCH 141/213] add changelog --- changelog/unreleased/root-tracing.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/root-tracing.md diff --git a/changelog/unreleased/root-tracing.md b/changelog/unreleased/root-tracing.md new file mode 100644 index 0000000000..5b5a67cba6 --- /dev/null +++ b/changelog/unreleased/root-tracing.md @@ -0,0 +1,5 @@ +Enhancement: Create a root span on proxy that propagates down to consumers. + +In order to propagate and correctly associate a span with a request we need a root span that gets sent to other services. + +https://github.com/owncloud/ocis-proxy/pull/64 From b85bd3b54538d385e2369035835572df4435c491 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 9 Jul 2020 14:48:41 +0200 Subject: [PATCH 142/213] remove final punctuation --- changelog/unreleased/root-tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/root-tracing.md b/changelog/unreleased/root-tracing.md index 5b5a67cba6..56f556bb7d 100644 --- a/changelog/unreleased/root-tracing.md +++ b/changelog/unreleased/root-tracing.md @@ -1,4 +1,4 @@ -Enhancement: Create a root span on proxy that propagates down to consumers. +Enhancement: Create a root span on proxy that propagates down to consumers In order to propagate and correctly associate a span with a request we need a root span that gets sent to other services. From 18fd953861b951bf3569d664bd5033bcede21b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 9 Jul 2020 14:45:43 +0000 Subject: [PATCH 143/213] Automated changelog update [skip ci] --- CHANGELOG.md | 55 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc61fa146f..1fec28dd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.4.0...master + +## Summary + +* Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) + +## Details + +* Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) + + In order to propagate and correctly associate a span with a request we need a root span that gets + sent to other services. + + https://github.com/owncloud/ocis-proxy/pull/64 + # Changelog for [0.4.0] (2020-06-25) The following sections list the changes for ocis-proxy 0.4.0. @@ -121,7 +140,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -155,27 +174,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -206,6 +209,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From ed95005c6caf7bc51c41aa504fbfad5a9f5e2459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 9 Jul 2020 13:37:36 +0200 Subject: [PATCH 144/213] use on_premises_sam_account_name property of accounts and groups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .../unreleased/user-and-group-name-mapping | 6 ++++++ pkg/middleware/account_uuid.go | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 changelog/unreleased/user-and-group-name-mapping diff --git a/changelog/unreleased/user-and-group-name-mapping b/changelog/unreleased/user-and-group-name-mapping new file mode 100644 index 0000000000..95dedabd5d --- /dev/null +++ b/changelog/unreleased/user-and-group-name-mapping @@ -0,0 +1,6 @@ +Change: mint new username property in the reva token + +An accounts username is now taken from the on_premises_sam_account_name property instead of the preferred_name. +Furthermore the group name (also from on_premises_sam_account_name property) is now minted into the token as well. + +https://github.com/owncloud/ocis-proxy/pull/62 diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 7eed9eaf0a..529dfc67af 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -65,10 +65,11 @@ func createAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsSer // TODO check if fields are missing. req := &acc.CreateAccountRequest{ Account: &acc.Account{ - DisplayName: claims.DisplayName, - PreferredName: claims.PreferredUsername, - Mail: claims.Email, - CreationType: "LocalAccount", + DisplayName: claims.DisplayName, + PreferredName: claims.PreferredUsername, + OnPremisesSamAccountName: claims.PreferredUsername, + Mail: claims.Email, + CreationType: "LocalAccount", }, } created, err := ac.CreateAccount(context.Background(), req) @@ -125,16 +126,22 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { return } + groups := make([]string, len(account.MemberOf)) + for i := range account.MemberOf { + // reva needs the unix group name + groups[i] = account.MemberOf[i].OnPremisesSamAccountName + } + l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") token, err := tokenManager.MintToken(r.Context(), &revauser.User{ Id: &revauser.UserId{ OpaqueId: account.Id, }, - Username: account.PreferredName, + Username: account.OnPremisesSamAccountName, DisplayName: account.DisplayName, Mail: account.Mail, MailVerified: account.ExternalUserState == "" || account.ExternalUserState == "Accepted", - // TODO groups + Groups: groups, }) if err != nil { From 04053b8e6e37f6a4b9c6f84816123fec35e835e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 14:34:59 +0000 Subject: [PATCH 145/213] Automated changelog update [skip ci] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fec28dd27..61174e1e3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,20 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) ## Details +* Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) + + An accounts username is now taken from the on_premises_sam_account_name property instead of + the preferred_name. Furthermore the group name (also from on_premises_sam_account_name + property) is now minted into the token as well. + + https://github.com/owncloud/ocis-proxy/pull/62 + + * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) In order to propagate and correctly associate a span with a request we need a root span that gets From 78ba2950d3254d1d96c72590a640fd47e793b6f0 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 9 Jul 2020 14:24:03 +0200 Subject: [PATCH 146/213] only send createhome requests if the account has been migrated Signed-off-by: David Christofas --- .../unreleased/create-home-if-migrated.md | 6 ++++ pkg/command/server.go | 1 + pkg/middleware/create_home.go | 34 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 changelog/unreleased/create-home-if-migrated.md diff --git a/changelog/unreleased/create-home-if-migrated.md b/changelog/unreleased/create-home-if-migrated.md new file mode 100644 index 0000000000..82ee28ed96 --- /dev/null +++ b/changelog/unreleased/create-home-if-migrated.md @@ -0,0 +1,6 @@ +Enhancement: only send create home request if an account has been migrated + +This change adds a check if an account has been migrated by getting it from the +ocis-accounts service. If no account is returned it means it hasn't been migrated. + +https://github.com/owncloud/ocis-proxy/issues/52 diff --git a/pkg/command/server.go b/pkg/command/server.go index 59f3424e19..a3e69277a3 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -295,6 +295,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic chMW := middleware.CreateHome( middleware.Logger(l), middleware.RevaGatewayClient(sc), + middleware.AccountsClient(accounts), ) return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW, chMW) diff --git a/pkg/middleware/create_home.go b/pkg/middleware/create_home.go index 8ed0909d1d..facb5259e6 100644 --- a/pkg/middleware/create_home.go +++ b/pkg/middleware/create_home.go @@ -7,6 +7,9 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/pkg/rgrpc/status" tokenpkg "github.com/cs3org/reva/pkg/token" + "github.com/cs3org/reva/pkg/token/manager/jwt" + "github.com/micro/go-micro/v2/errors" + "github.com/owncloud/ocis-accounts/pkg/proto/v0" "google.golang.org/grpc/metadata" ) @@ -16,7 +19,38 @@ func CreateHome(opts ...Option) func(next http.Handler) http.Handler { return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + accounts := opt.AccountsClient + + tokenManager, err := jwt.New(map[string]interface{}{ + "secret": opt.TokenManagerConfig.JWTSecret, + }) + if err != nil { + opt.Logger.Err(err).Msg("error creating tokenManager") + w.WriteHeader(http.StatusInternalServerError) + return + } + token := r.Header.Get("x-access-token") + user, err := tokenManager.DismantleToken(r.Context(), token) + if err != nil { + opt.Logger.Err(err).Msg("error getting user from access token") + w.WriteHeader(http.StatusInternalServerError) + return + } + _, err = accounts.GetAccount(r.Context(), &proto.GetAccountRequest{ + Id: user.Id.OpaqueId, + }) + if err != nil { + e := errors.Parse(err.Error()) + if e.Code == http.StatusNotFound { + opt.Logger.Debug().Msgf("account with id %s not found", user.Id.OpaqueId) + next.ServeHTTP(w, r) + return + } + opt.Logger.Err(err).Msgf("error getting user with id %s from accounts service", user.Id.OpaqueId) + w.WriteHeader(http.StatusInternalServerError) + return + } // we need to pass the token to authenticate the CreateHome request. //ctx := tokenpkg.ContextSetToken(r.Context(), token) From 94ea9ede8981d0d6ebc34d095ffa69050c53ae9a Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 10 Jul 2020 16:17:52 +0200 Subject: [PATCH 147/213] Abort middleware execution if no token header is present --- pkg/middleware/create_home.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/middleware/create_home.go b/pkg/middleware/create_home.go index facb5259e6..480d626166 100644 --- a/pkg/middleware/create_home.go +++ b/pkg/middleware/create_home.go @@ -25,12 +25,16 @@ func CreateHome(opts ...Option) func(next http.Handler) http.Handler { "secret": opt.TokenManagerConfig.JWTSecret, }) if err != nil { - opt.Logger.Err(err).Msg("error creating tokenManager") w.WriteHeader(http.StatusInternalServerError) return } token := r.Header.Get("x-access-token") + if token == "" { + next.ServeHTTP(w, r) + return + } + user, err := tokenManager.DismantleToken(r.Context(), token) if err != nil { opt.Logger.Err(err).Msg("error getting user from access token") From 3014f0dfe5b731d070d8300fc9f49670e662fd54 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 10 Jul 2020 14:53:22 +0000 Subject: [PATCH 148/213] Automated changelog update [skip ci] --- CHANGELOG.md | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61174e1e3d..546166abf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) +* Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) ## Details @@ -20,6 +21,14 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/62 +* Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) + + This change adds a check if an account has been migrated by getting it from the ocis-accounts + service. If no account is returned it means it hasn't been migrated. + + https://github.com/owncloud/ocis-proxy/issues/52 + + * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) In order to propagate and correctly associate a span with a request we need a root span that gets @@ -150,7 +159,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -184,11 +193,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -219,22 +244,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From e41d993af9a01167569ac410b6df902efc541ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 15:16:13 +0200 Subject: [PATCH 149/213] Add Accounts UI routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/add-accounts-ui-routes.md | 9 +++++++++ pkg/proxy/proxy.go | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 changelog/unreleased/add-accounts-ui-routes.md diff --git a/changelog/unreleased/add-accounts-ui-routes.md b/changelog/unreleased/add-accounts-ui-routes.md new file mode 100644 index 0000000000..07ac9f9d59 --- /dev/null +++ b/changelog/unreleased/add-accounts-ui-routes.md @@ -0,0 +1,9 @@ +Enhancement: Add Accounts UI routes + +The accounts service has a ui that requires routing +- `/api/v0/accounts` and +- `/accounts.js` + +to http://localhost:9181 + +https://github.com/owncloud/ocis-proxy/pull/65 diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 9835e6dbab..3f46820dd0 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -282,6 +282,16 @@ func defaultPolicies() []config.Policy { Endpoint: "/data", Backend: "http://localhost:9140", }, + // if we were using the go micro api gateway we could look up the endpoint in the registry dynamically + { + Endpoint: "/api/v0/accounts", + Backend: "http://localhost:9181", + }, + // TODO the lookup needs a better mechanism + { + Endpoint: "/accounts.js", + Backend: "http://localhost:9181", + }, }, }, { From 453fc376de6e89cc79addee1a1f950898a8c859e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 15:35:20 +0200 Subject: [PATCH 150/213] also update example config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- config/proxy-example-migration.json | 10 +++++++++- config/proxy-example.json | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/config/proxy-example-migration.json b/config/proxy-example-migration.json index 42885cc6f0..4081786974 100644 --- a/config/proxy-example-migration.json +++ b/config/proxy-example-migration.json @@ -62,7 +62,15 @@ { "endpoint": "/data", "backend": "http://localhost:9140" - } + }, + { + "endpoint": "/api/v0/accounts", + "backend": "http://localhost:9181" + }, + { + "endpoint": "/accounts.js", + "backend": "http://localhost:9181" + } ] }, { diff --git a/config/proxy-example.json b/config/proxy-example.json index 6878e670b9..bac66bace4 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -58,7 +58,15 @@ { "endpoint": "/data", "backend": "http://localhost:9140" - } + }, + { + "endpoint": "/api/v0/accounts", + "backend": "http://localhost:9181" + }, + { + "endpoint": "/accounts.js", + "backend": "http://localhost:9181" + } ] }, { From 9cdff8c8b75f9c6c36ab4266990107efe4480454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 15:13:18 +0000 Subject: [PATCH 151/213] Automated changelog update [skip ci] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 546166abf3..d5703bc11b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) +* Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) @@ -21,6 +22,15 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/62 +* Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) + + The accounts service has a ui that requires routing - `/api/v0/accounts` and - `/accounts.js` + + To http://localhost:9181 + + https://github.com/owncloud/ocis-proxy/pull/65 + + * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) This change adds a check if an account has been migrated by getting it from the ocis-accounts From 83b2b3c48cd70402bbcdec93b98c0c082d473f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 15:23:14 +0200 Subject: [PATCH 152/213] Change: Add OIDC config flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/add-oidc-config-flags.md | 11 +++++++++++ pkg/command/server.go | 4 ++-- pkg/config/config.go | 4 ++-- pkg/flagset/flagset.go | 18 ++++++++++++++++++ pkg/proxy/proxy_integration_test.go | 2 +- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/add-oidc-config-flags.md diff --git a/changelog/unreleased/add-oidc-config-flags.md b/changelog/unreleased/add-oidc-config-flags.md new file mode 100644 index 0000000000..ba8d3eaca3 --- /dev/null +++ b/changelog/unreleased/add-oidc-config-flags.md @@ -0,0 +1,11 @@ +Change: Add OIDC config flags + +To authenticate requests with an oidc provider we added two environment variables: +- `PROXY_OIDC_ISSUER="https://localhost:9200"` and +- `PROXY_OIDC_INSECURE=true` + +This changes ocis-proxy to now load the oidc-middleware by default, requiring a bearer token and exchanging the email in the OIDC claims for an account id at the ocis-accounts service. + +Setting `PROXY_OIDC_ISSUER=""` will disable the OIDC middleware. + +https://github.com/owncloud/ocis-proxy/pull/66 diff --git a/pkg/command/server.go b/pkg/command/server.go index a3e69277a3..e545904490 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -245,7 +245,7 @@ func Server(cfg *config.Config) *cli.Command { } func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alice.Chain { - if cfg.OIDC != nil { + if cfg.OIDC.Issuer != "" { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") @@ -265,7 +265,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic // it will fetch the keys from the issuer using the .well-known // endpoint provider := func() (middleware.OIDCProvider, error) { - return oidc.NewProvider(customCtx, cfg.OIDC.Endpoint) + return oidc.NewProvider(customCtx, cfg.OIDC.Issuer) } oidcMW := middleware.OpenIDConnect( diff --git a/pkg/config/config.go b/pkg/config/config.go index bee18c6785..d77ade7333 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -85,7 +85,7 @@ type Config struct { Tracing Tracing Asset Asset Policies []Policy - OIDC *OIDC + OIDC OIDC TokenManager TokenManager PolicySelector *PolicySelector `mapstructure:"policy_selector"` Reva Reva @@ -94,7 +94,7 @@ type Config struct { // OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request // with the configured oidc-provider type OIDC struct { - Endpoint string + Issuer string Insecure bool } diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index ad9b714293..3d30814440 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -171,5 +171,23 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_REVA_GATEWAY_ADDR"}, Destination: &cfg.Reva.Address, }, + + // OIDC + + &cli.StringFlag{ + Name: "oidc-issuer", + Value: "https://localhost:9200", + Usage: "OIDC issuer", + EnvVars: []string{"PROXY_OIDC_ISSUER"}, + Destination: &cfg.OIDC.Issuer, + }, + &cli.BoolFlag{ + Name: "oidc-insecure", + Value: true, + Usage: "OIDC allow insecure communication", + EnvVars: []string{"PROXY_OIDC_INSECURE"}, + Destination: &cfg.OIDC.Insecure, + }, } + } diff --git a/pkg/proxy/proxy_integration_test.go b/pkg/proxy/proxy_integration_test.go index cd4d85bee6..3485c81cb0 100644 --- a/pkg/proxy/proxy_integration_test.go +++ b/pkg/proxy/proxy_integration_test.go @@ -216,7 +216,7 @@ func testConfig(policy []config.Policy) *config.Config { Tracing: config.Tracing{}, Asset: config.Asset{}, Policies: policy, - OIDC: nil, + OIDC: config.OIDC{}, PolicySelector: nil, } } From 68550e521d5f75f940b2fb66fb209e0b74908cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 21:28:32 +0000 Subject: [PATCH 153/213] Automated changelog update [skip ci] --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5703bc11b..90aab0117e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) @@ -13,6 +14,19 @@ The following sections list the changes for ocis-proxy unreleased. ## Details +* Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) + + To authenticate requests with an oidc provider we added two environment variables: - + `PROXY_OIDC_ISSUER="https://localhost:9200"` and - `PROXY_OIDC_INSECURE=true` + + This changes ocis-proxy to now load the oidc-middleware by default, requiring a bearer token + and exchanging the email in the OIDC claims for an account id at the ocis-accounts service. + + Setting `PROXY_OIDC_ISSUER=""` will disable the OIDC middleware. + + https://github.com/owncloud/ocis-proxy/pull/66 + + * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) An accounts username is now taken from the on_premises_sam_account_name property instead of @@ -169,7 +183,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -203,27 +217,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -254,6 +252,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 3d8bdca07aad2248a836d629e0b534b7f5ceedd9 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 13 Jul 2020 14:59:35 +0200 Subject: [PATCH 154/213] provide token configuration from config --- pkg/command/server.go | 1 + pkg/middleware/create_home.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/command/server.go b/pkg/command/server.go index e545904490..e9b30b9dd4 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -296,6 +296,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.Logger(l), middleware.RevaGatewayClient(sc), middleware.AccountsClient(accounts), + middleware.TokenManagerConfig(cfg.TokenManager), ) return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW, chMW) diff --git a/pkg/middleware/create_home.go b/pkg/middleware/create_home.go index 480d626166..e2825439fc 100644 --- a/pkg/middleware/create_home.go +++ b/pkg/middleware/create_home.go @@ -25,6 +25,7 @@ func CreateHome(opts ...Option) func(next http.Handler) http.Handler { "secret": opt.TokenManagerConfig.JWTSecret, }) if err != nil { + opt.Logger.Error().Err(err).Msg("error creating a token manager") w.WriteHeader(http.StatusInternalServerError) return } From 36bbe85d9c9bdc563bba5929ce33d7e5aaca03bf Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 13 Jul 2020 15:22:07 +0200 Subject: [PATCH 155/213] add changelog --- changelog/unreleased/fix-createhome-middleware.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/fix-createhome-middleware.md diff --git a/changelog/unreleased/fix-createhome-middleware.md b/changelog/unreleased/fix-createhome-middleware.md new file mode 100644 index 0000000000..dbf8569d3d --- /dev/null +++ b/changelog/unreleased/fix-createhome-middleware.md @@ -0,0 +1,5 @@ +Bugfix: Provide token configuration from config + +Fixed a bug that causes the createHome middleware to crash if no configuration for the OIDC provider is propagated. + +https://github.com/owncloud/ocis-proxy/pull/69 From 5662b8e50648eedd6cc05a8cd9f6b8f1a70992fd Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Mon, 13 Jul 2020 15:39:17 +0200 Subject: [PATCH 156/213] Update changelog/unreleased/fix-createhome-middleware.md --- changelog/unreleased/fix-createhome-middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/fix-createhome-middleware.md b/changelog/unreleased/fix-createhome-middleware.md index dbf8569d3d..5fd39993e1 100644 --- a/changelog/unreleased/fix-createhome-middleware.md +++ b/changelog/unreleased/fix-createhome-middleware.md @@ -1,5 +1,5 @@ Bugfix: Provide token configuration from config -Fixed a bug that causes the createHome middleware to crash if no configuration for the OIDC provider is propagated. +Fixed a bug that causes the createHome middleware to crash if no configuration for the TokenManager is propagated. https://github.com/owncloud/ocis-proxy/pull/69 From 193aab018706d3f41e2b5a6e9ad668fac0c8efaf Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Mon, 13 Jul 2020 16:02:05 +0200 Subject: [PATCH 157/213] update proxy-examples --- config/proxy-example-migration.json | 4 +--- config/proxy-example.json | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/config/proxy-example-migration.json b/config/proxy-example-migration.json index 4081786974..04760b75a7 100644 --- a/config/proxy-example-migration.json +++ b/config/proxy-example-migration.json @@ -3,9 +3,7 @@ "Namespace": "com.owncloud" }, "oidc": { - "endpoint": "https://localhost:9200", - "realm": "", - "signing_algs": ["RS256", "PS256"], + "issuer": "https://localhost:9200", "insecure": true }, "policy_selector": { diff --git a/config/proxy-example.json b/config/proxy-example.json index bac66bace4..b8e5063cb8 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -3,9 +3,7 @@ "Namespace": "com.owncloud" }, "oidc": { - "endpoint": "https://localhost:9200", - "realm": "", - "signing_algs": ["RS256", "PS256"], + "issuer": "https://localhost:9200", "insecure": true }, "policy_selector": { From 0dcc8373bc7b24554510f2697f8255a2a8af9ca2 Mon Sep 17 00:00:00 2001 From: Alex Unger Date: Mon, 13 Jul 2020 14:29:45 +0000 Subject: [PATCH 158/213] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90aab0117e..3134122831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Bugfix - Provide token configuration from config: [#69](https://github.com/owncloud/ocis-proxy/pull/69) * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) @@ -14,6 +15,14 @@ The following sections list the changes for ocis-proxy unreleased. ## Details +* Bugfix - Provide token configuration from config: [#69](https://github.com/owncloud/ocis-proxy/pull/69) + + Fixed a bug that causes the createHome middleware to crash if no configuration for the + TokenManager is propagated. + + https://github.com/owncloud/ocis-proxy/pull/69 + + * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) To authenticate requests with an oidc provider we added two environment variables: - From 06f4e2d2961e72703a38cbab397f310a3ef8d794 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Wed, 15 Jul 2020 16:29:59 +0200 Subject: [PATCH 159/213] Add option to disable TLS Can be used to disable TLS when the ocis-proxy is behind an TLS-Terminating reverse proxy. env PROXY_TLS=false or cli --tls=false --- changelog/unreleased/add-disable-tls.md | 8 +++++ pkg/config/config.go | 1 + pkg/flagset/flagset.go | 7 +++++ pkg/server/http/server.go | 39 +++++++++++++++---------- 4 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 changelog/unreleased/add-disable-tls.md diff --git a/changelog/unreleased/add-disable-tls.md b/changelog/unreleased/add-disable-tls.md new file mode 100644 index 0000000000..6f1ee9595c --- /dev/null +++ b/changelog/unreleased/add-disable-tls.md @@ -0,0 +1,8 @@ +Enhancement: Add option to disable TLS + +Can be used to disable TLS when the ocis-proxy is behind an +TLS-Terminating reverse proxy. + +env PROXY_TLS=false or --tls=false + +https://github.com/owncloud/ocis-proxy/issues/71 diff --git a/pkg/config/config.go b/pkg/config/config.go index d77ade7333..72423f7547 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -22,6 +22,7 @@ type HTTP struct { Root string TLSCert string TLSKey string + TLS bool } // Tracing defines the available tracing configuration. diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index 3d30814440..d7ad756d68 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -157,6 +157,13 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_TRANSPORT_TLS_KEY"}, Destination: &cfg.HTTP.TLSKey, }, + &cli.BoolFlag{ + Name: "tls", + Usage: "Use TLS (disable only if proxy is behind a TLS-terminating reverse-proxy).", + EnvVars: []string{"PROXY_TLS"}, + Value: true, + Destination: &cfg.HTTP.TLS, + }, &cli.StringFlag{ Name: "jwt-secret", Value: "Pive-Fumkiu4", diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index 8442bf09ca..292ac0e9da 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -18,26 +18,33 @@ func Server(opts ...Option) (svc.Service, error) { var cer tls.Certificate var certErr error - if httpCfg.TLSCert == "" || httpCfg.TLSKey == "" { - l.Warn().Msgf("No tls certificate provided, using a generated one") + var tlsConfig *tls.Config + if options.Config.HTTP.TLS { + if httpCfg.TLSCert == "" || httpCfg.TLSKey == "" { + l.Warn().Msgf("No tls certificate provided, using a generated one") + _, certErr := os.Stat("./server.crt") + _, keyErr := os.Stat("./server.key") - // GenCert has side effects as it writes 2 files to the binary running location - if err := crypto.GenCert(l); err != nil { - l.Fatal().Err(err).Msgf("Could not generate test-certificate") + if os.IsNotExist(certErr) || os.IsNotExist(keyErr) { + // GenCert has side effects as it writes 2 files to the binary running location + if err := crypto.GenCert(l); err != nil { + l.Fatal().Err(err).Msgf("Could not generate test-certificate") + os.Exit(1) + } + } + + httpCfg.TLSCert = "server.crt" + httpCfg.TLSKey = "server.key" } - httpCfg.TLSCert = "server.crt" - httpCfg.TLSKey = "server.key" + cer, certErr = tls.LoadX509KeyPair(httpCfg.TLSCert, httpCfg.TLSKey) + if certErr != nil { + options.Logger.Fatal().Err(certErr).Msg("Could not setup TLS") + os.Exit(1) + } + + tlsConfig = &tls.Config{Certificates: []tls.Certificate{cer}} } - - cer, certErr = tls.LoadX509KeyPair(httpCfg.TLSCert, httpCfg.TLSKey) - - if certErr != nil { - options.Logger.Fatal().Err(certErr).Msg("Could not setup TLS") - os.Exit(1) - } - - tlsConfig := &tls.Config{Certificates: []tls.Certificate{cer}} chain := options.Middlewares.Then(options.Handler) service := svc.NewService( From 79b890f6b06eb94e4add59bd860eb5390bc74617 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Mon, 20 Jul 2020 13:32:54 +0000 Subject: [PATCH 160/213] Automated changelog update [skip ci] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3134122831..d161ff76da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The following sections list the changes for ocis-proxy unreleased. * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) +* Enhancement - Add option to disable TLS: [#71](https://github.com/owncloud/ocis-proxy/issues/71) * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) @@ -54,6 +55,15 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/65 +* Enhancement - Add option to disable TLS: [#71](https://github.com/owncloud/ocis-proxy/issues/71) + + Can be used to disable TLS when the ocis-proxy is behind an TLS-Terminating reverse proxy. + + Env PROXY_TLS=false or --tls=false + + https://github.com/owncloud/ocis-proxy/issues/71 + + * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) This change adds a check if an account has been migrated by getting it from the ocis-accounts From cf448f0124fd7f45ba125507be49fd016157d153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 17 Jul 2020 23:11:29 +0200 Subject: [PATCH 161/213] initial signing-key middleware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 4 +- go.sum | 26 ++++++ pkg/command/server.go | 12 ++- pkg/middleware/options.go | 16 +++- pkg/middleware/presigned_url.go | 148 ++++++++++++++++++++++++++++++++ pkg/proxy/proxy.go | 5 ++ 6 files changed, 205 insertions(+), 6 deletions(-) create mode 100644 pkg/middleware/presigned_url.go diff --git a/go.mod b/go.mod index a3306f07f6..7791122bb6 100644 --- a/go.mod +++ b/go.mod @@ -16,11 +16,13 @@ require ( github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e - github.com/owncloud/ocis-pkg/v2 v2.2.1 + github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c + github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b github.com/prometheus/client_golang v1.7.0 github.com/restic/calens v0.2.0 github.com/spf13/viper v1.7.0 go.opencensus.io v0.22.4 + golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d google.golang.org/grpc v1.29.1 gopkg.in/square/go-jose.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 1abba4df56..0e414f236f 100644 --- a/go.sum +++ b/go.sum @@ -123,6 +123,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g= github.com/asim/go-awsxray v0.0.0-20161209120537-0d8a60b6e205/go.mod h1:frVmN4PtXUuL1EbZn0uL4PHSTKNKFnbMpBIhngqMuNQ= @@ -146,6 +147,7 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blevesearch/bleve v1.0.9/go.mod h1:tb04/rbU29clbtNgorgFd8XdJea4x3ybYaOjWKr+UBU= github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040/go.mod h1:WH+MU2F4T0VmSdaPX+Wu5GYoZBrYWdOZWSjzvYcDmqQ= +github.com/blevesearch/cld2 v0.0.0-20200327141045-8b5f551d37f5/go.mod h1:PN0QNTLs9+j1bKy3d/GB/59wsNBFC4sWLWG3k69lWbc= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= @@ -331,6 +333,7 @@ github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1 github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-ozzo/ozzo-validation/v4 v4.2.1/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= @@ -399,6 +402,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= @@ -481,6 +486,7 @@ github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjG github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -509,6 +515,7 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= +github.com/ikawaha/kagome.ipadic v1.1.2/go.mod h1:DPSBbU0czaJhAb/5uKQZHMc9MTVRpDugJfX+HddPHHg= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -641,6 +648,7 @@ github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaC github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -738,7 +746,12 @@ github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596/go.mod h1:Wo0Q github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk= github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV03z6zI= github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= +github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c h1:hYhKSfMkPO4kRLrKqRHPmePGTCpGDGji+s4yW30+tmM= +github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c/go.mod h1:s894msGwDsULmsROHkbsXFCP/eSqDcteDFUntZOiJdc= github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc= +github.com/owncloud/ocis-settings v0.0.0-20200629120229-69693c5f8f43/go.mod h1:AeXZVHKEU+9Xt4+/lkHE5rx+sJH2if9dIrUGLhe+JOY= +github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b h1:tjfH02oEawuMdMt3pJdCjFyuWgNRUjV7rdjoTF56Mrw= +github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b/go.mod h1:7WRMnx4ffwtckNl4qD2Gj/d5fvl84jyydOV2FbUUu3A= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= @@ -889,11 +902,14 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= +github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/tebeka/snowball v0.4.2/go.mod h1:4IfL14h1lvwZcp1sfXuuc7/7yCsvVffTWxWxCLfFpYg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1001,6 +1017,8 @@ golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty8 golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1032,6 +1050,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1211,6 +1231,8 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200427214658-4697a2867c88 h1:Nj7oNnL9tSACMt2JvszZN6P4IXiy1t6E/YRMr7YtaSw= golang.org/x/tools v0.0.0-20200427214658-4697a2867c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200526224456-8b020aee10d2 h1:21BqcH/onxtGHn1A2GDOJjZnbt4Nlez629S3eaR+eYs= +golang.org/x/tools v0.0.0-20200526224456-8b020aee10d2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -1283,6 +1305,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= @@ -1343,6 +1367,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/command/server.go b/pkg/command/server.go index e9b30b9dd4..10ce5ce4ec 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -22,6 +22,7 @@ import ( "contrib.go.opencensus.io/exporter/zipkin" "github.com/micro/cli/v2" mclient "github.com/micro/go-micro/v2/client" + "github.com/micro/go-micro/v2/client/grpc" "github.com/oklog/run" openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" @@ -32,6 +33,7 @@ import ( "github.com/owncloud/ocis-proxy/pkg/proxy" "github.com/owncloud/ocis-proxy/pkg/server/debug" proxyHTTP "github.com/owncloud/ocis-proxy/pkg/server/http" + storepb "github.com/owncloud/ocis-store/pkg/proto/v0" "go.opencensus.io/stats/view" "go.opencensus.io/trace" ) @@ -245,6 +247,12 @@ func Server(cfg *config.Config) *cli.Command { } func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alice.Chain { + + psMW := middleware.PresignedURL( + middleware.Logger(l), + middleware.Store(storepb.NewStoreService("com.owncloud.api.store", grpc.NewClient())), + ) + if cfg.OIDC.Issuer != "" { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") @@ -299,8 +307,8 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.TokenManagerConfig(cfg.TokenManager), ) - return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW, chMW) + return alice.New(middleware.RedirectToHTTPS, oidcMW, psMW, uuidMW, chMW) } - return alice.New(middleware.RedirectToHTTPS) + return alice.New(middleware.RedirectToHTTPS, psMW) } diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index 8a4dace009..e6ab964298 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -7,6 +7,7 @@ import ( acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" + storepb "github.com/owncloud/ocis-store/pkg/proto/v0" ) // Option defines a single option function. @@ -26,9 +27,11 @@ type Options struct { OIDCProviderFunc func() (OIDCProvider, error) // RevaGatewayClient to send requests to the reva gateway RevaGatewayClient gateway.GatewayAPIClient + // Store for persisting data + Store storepb.StoreService } -// newOIDCOptions initializes the available default options. +// newOptions initializes the available default options. func newOptions(opts ...Option) Options { opt := Options{} @@ -75,8 +78,15 @@ func OIDCProviderFunc(f func() (OIDCProvider, error)) Option { } // RevaGatewayClient provides a function to set the the reva gateway service client option. -func RevaGatewayClient(sc gateway.GatewayAPIClient) Option { +func RevaGatewayClient(gc gateway.GatewayAPIClient) Option { return func(o *Options) { - o.RevaGatewayClient = sc + o.RevaGatewayClient = gc + } +} + +// Store provides a function to set the store option. +func Store(sc storepb.StoreService) Option { + return func(o *Options) { + o.Store = sc } } diff --git a/pkg/middleware/presigned_url.go b/pkg/middleware/presigned_url.go new file mode 100644 index 0000000000..905b2c73ee --- /dev/null +++ b/pkg/middleware/presigned_url.go @@ -0,0 +1,148 @@ +package middleware + +import ( + "context" + "crypto/sha512" + "encoding/hex" + "net/http" + "strings" + "time" + + storepb "github.com/owncloud/ocis-store/pkg/proto/v0" + "golang.org/x/crypto/pbkdf2" +) + +// PresignedURL provides a middleware to check access secured by a presigned URL. +func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { + opt := newOptions(opts...) + + /*tokenManager, err := jwt.New(map[string]interface{}{ + "secret": opt.TokenManagerConfig.JWTSecret, + "expires": int64(60), + }) + if err != nil { + opt.Logger.Fatal().Err(err).Msgf("Could not initialize token-manager") + } + */ + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + /* commented, because moving the ocs specific unmarshaling and statuscode mangling here seems wrong + if isGetSigningKeyRequest(r) { + claims := oidc.FromContext(r.Context()) + if claims == nil { + http.Error(w, "No claims in context", http.StatusUnauthorized) + return + } + + signingKey, _ := getSigningKey(r.Context(), opt.Store, claims.Email) + if len(signingKey) == 0 { + http.Error(w, "No signing key", http.StatusInternalServerError) + return + } + // TODO render as json or xml? + return + } + */ + if isSignedRequest(r) { + if signedRequestIsValid(r, opt.Store) { + // TODO store user in context, let account middleware lookup the id? + next.ServeHTTP(w, r) + } else { + http.Error(w, "Invalid url signature", http.StatusUnauthorized) + return + } + } + next.ServeHTTP(w, r) + }) + } +} + +/* +func isGetSigningKeyRequest(r *http.Request) bool { + return r.URL.Path == "/ocs/v1.php/cloud/user/signing-key" || r.URL.Path == "/ocs/v2.php/cloud/user/signing-key" +} +*/ + +func isSignedRequest(r *http.Request) bool { + return r.URL.Query().Get("OC-Signature") != "" +} + +func signedRequestIsValid(r *http.Request, s storepb.StoreService) bool { + // cheap checks first + // TODO OC-Algorythm - defined the used algo (e.g. sha256 or sha512 - we should agree on one default algo and make this parameter optional) + // OC-Credential - defines the user scope (shall we use the owncloud user id here - this might leak internal data ....) REQUIRED + // OC-Date - defined the date the url was signed (ISO 8601 UTC) REQUIRED + // OC-Expires - defines the expiry interval in seconds (between 1 and 604800 = 7 days) REQUIRED + // TODO OC-Verb - defines for which http verb the request is valid - defaults to GET OPTIONAL + // OC-Signature - the computed signature - server will verify the request upon this REQUIRED + if r.URL.Query().Get("OC-Signature") == "" || r.URL.Query().Get("OC-Credential") == "" || r.URL.Query().Get("OC-Date") == "" || r.URL.Query().Get("OC-Expires") == "" || r.URL.Query().Get("OC-Verb") == "" { + return false + } + + if !strings.EqualFold(r.Method, r.URL.Query().Get("OC-Verb")) { + return false + } + + if t, err := time.Parse(time.RFC3339, r.URL.Query().Get("OC-Date")); err != nil { + return false + } else if expires, err := time.ParseDuration(r.URL.Query().Get("OC-Expires") + "s"); err != nil { + return false + } else { + t.Add(expires) + if t.After(time.Now()) { // TODO now client time and server time must be in sync + return false + } + } + + signingKey, _ := getSigningKey(r.Context(), s, r.URL.Query().Get("OC-Credential")) + if len(signingKey) == 0 { + return false + } + + signature := r.URL.Query().Get("OC-Signature") + r.URL.Query().Del("OC-Signature") + url := r.URL.String() + hash := pbkdf2.Key([]byte(url), signingKey, 10000, sha512.Size, sha512.New) + if hex.EncodeToString(hash) != signature { + return false + } + return true +} + +func getSigningKey(ctx context.Context, s storepb.StoreService, credential string) ([]byte, error) { + res, err := s.Read(ctx, &storepb.ReadRequest{ + Options: &storepb.ReadOptions{ + Database: "proxy", + Table: "signing-keys", + }, + Key: credential, + }) + if err != nil || len(res.Records) < 1 { + return []byte{}, err + /* no need to create the key if that is handlead by ocs / a dedicated url-signer service + key := make([]byte, 64) + _, err := rand.Read(key[:]) + if err != nil { + return []byte{}, err + } + _, err = s.Write(ctx, &storepb.WriteRequest{ + Options: &storepb.WriteOptions{ + Database: "proxy", + Table: "signing-keys", + }, + Record: &storepb.Record{ + Key: credential, // TODO username or id? + Value: key, + // TODO Expiry? + }, + }) + if err != nil { + return []byte{}, err + } + return key, nil + */ + } + + return res.Records[0].Value, nil +} diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 3f46820dd0..fa43b02415 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -253,6 +253,11 @@ func defaultPolicies() []config.Policy { Endpoint: "/ocs/", Backend: "http://localhost:9140", }, + { + Type: config.RegexRoute, + Endpoint: "/ocs/v[12].php/cloud/user/signing-key", + Backend: "http://localhost:9110", + }, { Type: config.QueryRoute, Endpoint: "/remote.php/?preview=1", From b9e05e9b4718f5c667822b73d18e5586d5367b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 22 Jul 2020 11:43:33 +0200 Subject: [PATCH 162/213] use same signing parameters as oc10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/command/server.go | 52 +++++++-------- pkg/middleware/account_uuid.go | 34 ++++++---- pkg/middleware/account_uuid_test.go | 4 +- pkg/middleware/presigned_url.go | 99 +++++++++++------------------ 4 files changed, 86 insertions(+), 103 deletions(-) diff --git a/pkg/command/server.go b/pkg/command/server.go index 10ce5ce4ec..fcec85dd4a 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -253,6 +253,31 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.Store(storepb.NewStoreService("com.owncloud.api.store", grpc.NewClient())), ) + // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. + // https://github.com/owncloud/ocis-proxy/issues/38 + accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) + + uuidMW := middleware.AccountUUID( + middleware.Logger(l), + middleware.TokenManagerConfig(cfg.TokenManager), + middleware.AccountsClient(accounts), + ) + + // the connection will be established in a non blocking fashion + sc, err := cs3.GetGatewayServiceClient(cfg.Reva.Address) + if err != nil { + l.Error().Err(err). + Str("gateway", cfg.Reva.Address). + Msg("Failed to create reva gateway service client") + } + + chMW := middleware.CreateHome( + middleware.Logger(l), + middleware.RevaGatewayClient(sc), + middleware.AccountsClient(accounts), + middleware.TokenManagerConfig(cfg.TokenManager), + ) + if cfg.OIDC.Issuer != "" { l.Info().Msg("Loading OIDC-Middleware") l.Debug().Interface("oidc_config", cfg.OIDC).Msg("OIDC-Config") @@ -282,33 +307,8 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.OIDCProviderFunc(provider), ) - // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. - // https://github.com/owncloud/ocis-proxy/issues/38 - accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) - - uuidMW := middleware.AccountUUID( - middleware.Logger(l), - middleware.TokenManagerConfig(cfg.TokenManager), - middleware.AccountsClient(accounts), - ) - - // the connection will be established in a non blocking fashion - sc, err := cs3.GetGatewayServiceClient(cfg.Reva.Address) - if err != nil { - l.Error().Err(err). - Str("gateway", cfg.Reva.Address). - Msg("Failed to create reva gateway service client") - } - - chMW := middleware.CreateHome( - middleware.Logger(l), - middleware.RevaGatewayClient(sc), - middleware.AccountsClient(accounts), - middleware.TokenManagerConfig(cfg.TokenManager), - ) - return alice.New(middleware.RedirectToHTTPS, oidcMW, psMW, uuidMW, chMW) } - return alice.New(middleware.RedirectToHTTPS, psMW) + return alice.New(middleware.RedirectToHTTPS, psMW, uuidMW, chMW) } diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 529dfc67af..d7969f9dda 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -13,23 +13,23 @@ import ( oidc "github.com/owncloud/ocis-pkg/v2/oidc" ) -func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsService) (account *acc.Account, status int) { - entry, err := svcCache.Get(AccountsKey, claims.Email) +func getAccount(l log.Logger, ac acc.AccountsService, query string) (account *acc.Account, status int) { + entry, err := svcCache.Get(AccountsKey, query) if err != nil { - l.Debug().Msgf("No cache entry for %v", claims.Email) + l.Debug().Msgf("No cache entry for %s", query) resp, err := ac.ListAccounts(context.Background(), &acc.ListAccountsRequest{ - Query: fmt.Sprintf("mail eq '%s'", strings.ReplaceAll(claims.Email, "'", "''")), + Query: query, PageSize: 2, }) if err != nil { - l.Error().Err(err).Str("email", claims.Email).Msgf("Error fetching from accounts-service") + l.Error().Err(err).Str("query", query).Msgf("Error fetching from accounts-service") status = http.StatusInternalServerError return } if len(resp.Accounts) <= 0 { - l.Error().Str("email", claims.Email).Msgf("Account not found") + l.Error().Str("query", query).Msgf("Account not found") status = http.StatusNotFound return } @@ -37,20 +37,21 @@ func getAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsServic // TODO provision account if len(resp.Accounts) > 1 { - l.Error().Str("email", claims.Email).Msgf("More than one account with this email found. Not logging user in.") + l.Error().Str("query", query).Msgf("More than one account found. Not logging user in.") status = http.StatusForbidden return } - err = svcCache.Set(AccountsKey, claims.Email, *resp.Accounts[0]) + err = svcCache.Set(AccountsKey, query, *resp.Accounts[0]) if err != nil { - l.Err(err).Str("email", claims.Email).Msgf("Could not cache user") + l.Err(err).Str("query", query).Msgf("Could not cache user") status = http.StatusInternalServerError return } account = resp.Accounts[0] } else { + l.Debug().Msgf("using cache entry for %s", query) a, ok := entry.V.(acc.Account) // TODO how can we directly point to the cached account? if !ok { status = http.StatusInternalServerError @@ -104,10 +105,17 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { return } - // TODO allow lookup by username? - // TODO allow lookup by custom claim, eg an id - - account, status := getAccount(l, claims, opt.AccountsClient) + var account *acc.Account + var status int + if claims.Email != "" { + account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("mail eq '%s'", strings.ReplaceAll(claims.Email, "'", "''"))) + } else if claims.PreferredUsername != "" { + account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("preferred_name eq '%s'", strings.ReplaceAll(claims.PreferredUsername, "'", "''"))) + } else { + // TODO allow lookup by custom claim, eg an id ... or sub + l.Error().Err(err).Msgf("Could not lookup account, no mail or preferred_username claim set") + w.WriteHeader(http.StatusInternalServerError) + } if status != 0 { if status == http.StatusNotFound { account, status = createAccount(l, claims, opt.AccountsClient) diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index abf2e8515d..7241fa901c 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -17,13 +17,13 @@ import ( // TODO testing the getAccount method should inject a cache func TestGetAccountSuccess(t *testing.T) { svcCache.Invalidate(AccountsKey, "success") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "success"}, mockAccountUUIDMiddlewareAccSvc(false, true)); status != 0 { + if _, status := getAccount(log.NewLogger(), mockAccountUUIDMiddlewareAccSvc(false, true), "mail eq 'success'"); status != 0 { t.Errorf("expected an account") } } func TestGetAccountInternalError(t *testing.T) { svcCache.Invalidate(AccountsKey, "failure") - if _, status := getAccount(log.NewLogger(), &oidc.StandardClaims{Email: "failure"}, mockAccountUUIDMiddlewareAccSvc(true, false)); status != http.StatusInternalServerError { + if _, status := getAccount(log.NewLogger(), mockAccountUUIDMiddlewareAccSvc(true, false), "mail eq 'failure'"); status != http.StatusInternalServerError { t.Errorf("expected an internal server error") } } diff --git a/pkg/middleware/presigned_url.go b/pkg/middleware/presigned_url.go index 905b2c73ee..7ac9e35050 100644 --- a/pkg/middleware/presigned_url.go +++ b/pkg/middleware/presigned_url.go @@ -8,6 +8,8 @@ import ( "strings" "time" + "github.com/owncloud/ocis-pkg/v2/log" + ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" storepb "github.com/owncloud/ocis-store/pkg/proto/v0" "golang.org/x/crypto/pbkdf2" ) @@ -15,38 +17,24 @@ import ( // PresignedURL provides a middleware to check access secured by a presigned URL. func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { opt := newOptions(opts...) - - /*tokenManager, err := jwt.New(map[string]interface{}{ - "secret": opt.TokenManagerConfig.JWTSecret, - "expires": int64(60), - }) - if err != nil { - opt.Logger.Fatal().Err(err).Msgf("Could not initialize token-manager") - } - */ + l := opt.Logger return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - /* commented, because moving the ocs specific unmarshaling and statuscode mangling here seems wrong - if isGetSigningKeyRequest(r) { - claims := oidc.FromContext(r.Context()) - if claims == nil { - http.Error(w, "No claims in context", http.StatusUnauthorized) - return - } - - signingKey, _ := getSigningKey(r.Context(), opt.Store, claims.Email) - if len(signingKey) == 0 { - http.Error(w, "No signing key", http.StatusInternalServerError) - return - } - // TODO render as json or xml? - return - } - */ if isSignedRequest(r) { - if signedRequestIsValid(r, opt.Store) { - // TODO store user in context, let account middleware lookup the id? + if signedRequestIsValid(l, r, opt.Store) { + + l.Debug().Str("credential", r.URL.Query().Get("OC-Credential")).Msgf("valid signed request") + + // use openid claims to let the account_uuid middleware do a lookup by username + claims := ocisoidc.StandardClaims{ + PreferredUsername: r.URL.Query().Get("OC-Credential"), + } + + // inject claims to the request context for the account_uuid middleware + ctxWithClaims := ocisoidc.NewContext(r.Context(), &claims) + r = r.WithContext(ctxWithClaims) + next.ServeHTTP(w, r) } else { http.Error(w, "Invalid url signature", http.StatusUnauthorized) @@ -58,19 +46,13 @@ func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { } } -/* -func isGetSigningKeyRequest(r *http.Request) bool { - return r.URL.Path == "/ocs/v1.php/cloud/user/signing-key" || r.URL.Path == "/ocs/v2.php/cloud/user/signing-key" -} -*/ - func isSignedRequest(r *http.Request) bool { return r.URL.Query().Get("OC-Signature") != "" } -func signedRequestIsValid(r *http.Request, s storepb.StoreService) bool { +func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService) bool { // cheap checks first - // TODO OC-Algorythm - defined the used algo (e.g. sha256 or sha512 - we should agree on one default algo and make this parameter optional) + // TODO OC-Algorithm - defined the used algo (e.g. sha256 or sha512 - we should agree on one default algo and make this parameter optional) // OC-Credential - defines the user scope (shall we use the owncloud user id here - this might leak internal data ....) REQUIRED // OC-Date - defined the date the url was signed (ISO 8601 UTC) REQUIRED // OC-Expires - defines the expiry interval in seconds (between 1 and 604800 = 7 days) REQUIRED @@ -91,19 +73,34 @@ func signedRequestIsValid(r *http.Request, s storepb.StoreService) bool { } else { t.Add(expires) if t.After(time.Now()) { // TODO now client time and server time must be in sync + l.Debug().Msgf("signed url expired") return false } } - signingKey, _ := getSigningKey(r.Context(), s, r.URL.Query().Get("OC-Credential")) + signingKey, err := getSigningKey(r.Context(), s, r.URL.Query().Get("OC-Credential")) if len(signingKey) == 0 { + l.Debug().Err(err).Msgf("signing key empty") return false } - signature := r.URL.Query().Get("OC-Signature") - r.URL.Query().Del("OC-Signature") + q := r.URL.Query() + signature := q.Get("OC-Signature") + q.Del("OC-Signature") + r.URL.RawQuery = q.Encode() url := r.URL.String() - hash := pbkdf2.Key([]byte(url), signingKey, 10000, sha512.Size, sha512.New) + if !r.URL.IsAbs() { + url = "https://" + r.Host + url // TODO where do we get the scheme from + } + // the oc10 signature check: $hash = \hash_pbkdf2("sha512", $url, $signingKey, 10000, 64, false); + // - sets the length of the output string to 64 + // - sets raw output to false -> if raw_output is FALSE length corresponds to twice the byte-length of the derived key (as every byte of the key is returned as two hexits). + // TODO change to length 128 in oc10? + // fo golangs pbkdf2.Key we need to use 32 because it will be encoded into 64 hexits later + hash := pbkdf2.Key([]byte(url), signingKey, 10000, 32, sha512.New) + + l.Debug().Interface("request", r).Str("url", url).Str("signature", signature).Bytes("signingkey", signingKey).Bytes("hash", hash).Str("hexencodedhash", hex.EncodeToString(hash)).Msgf("signature check") + if hex.EncodeToString(hash) != signature { return false } @@ -120,28 +117,6 @@ func getSigningKey(ctx context.Context, s storepb.StoreService, credential strin }) if err != nil || len(res.Records) < 1 { return []byte{}, err - /* no need to create the key if that is handlead by ocs / a dedicated url-signer service - key := make([]byte, 64) - _, err := rand.Read(key[:]) - if err != nil { - return []byte{}, err - } - _, err = s.Write(ctx, &storepb.WriteRequest{ - Options: &storepb.WriteOptions{ - Database: "proxy", - Table: "signing-keys", - }, - Record: &storepb.Record{ - Key: credential, // TODO username or id? - Value: key, - // TODO Expiry? - }, - }) - if err != nil { - return []byte{}, err - } - return key, nil - */ } return res.Records[0].Value, nil From 8994baad29830ab7d8d9c50d2d7c127cd89e40a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 22 Jul 2020 11:49:30 +0200 Subject: [PATCH 163/213] add changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/support-signed-urls.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/unreleased/support-signed-urls.md diff --git a/changelog/unreleased/support-signed-urls.md b/changelog/unreleased/support-signed-urls.md new file mode 100644 index 0000000000..c0d242e4af --- /dev/null +++ b/changelog/unreleased/support-signed-urls.md @@ -0,0 +1,7 @@ +Enhancement: Support signed URLs + +We added a middleware that verifies signed urls as generated by the owncloud-sdk. This allows directly downloading large files with browsers instead of using `blob://` urls, which eats memory ... + +https://github.com/owncloud/ocis-proxy/pull/75 +https://github.com/owncloud/ocis-ocs/pull/18 +https://github.com/owncloud/owncloud-sdk/pull/504 From c550a2e4d808c8e9cf60820ca69baad5a8d9575a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 22 Jul 2020 12:32:35 +0200 Subject: [PATCH 164/213] fix staticchek, remove a few debug logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/support-signed-urls.md | 1 + pkg/middleware/presigned_url.go | 19 +++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/changelog/unreleased/support-signed-urls.md b/changelog/unreleased/support-signed-urls.md index c0d242e4af..567a82c9e0 100644 --- a/changelog/unreleased/support-signed-urls.md +++ b/changelog/unreleased/support-signed-urls.md @@ -2,6 +2,7 @@ Enhancement: Support signed URLs We added a middleware that verifies signed urls as generated by the owncloud-sdk. This allows directly downloading large files with browsers instead of using `blob://` urls, which eats memory ... +https://github.com/owncloud/ocis-proxy/issues/73 https://github.com/owncloud/ocis-proxy/pull/75 https://github.com/owncloud/ocis-ocs/pull/18 https://github.com/owncloud/owncloud-sdk/pull/504 diff --git a/pkg/middleware/presigned_url.go b/pkg/middleware/presigned_url.go index 7ac9e35050..74b629650f 100644 --- a/pkg/middleware/presigned_url.go +++ b/pkg/middleware/presigned_url.go @@ -23,9 +23,6 @@ func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if isSignedRequest(r) { if signedRequestIsValid(l, r, opt.Store) { - - l.Debug().Str("credential", r.URL.Query().Get("OC-Credential")).Msgf("valid signed request") - // use openid claims to let the account_uuid middleware do a lookup by username claims := ocisoidc.StandardClaims{ PreferredUsername: r.URL.Query().Get("OC-Credential"), @@ -72,15 +69,18 @@ func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService) return false } else { t.Add(expires) - if t.After(time.Now()) { // TODO now client time and server time must be in sync - l.Debug().Msgf("signed url expired") + if t.After(time.Now()) { return false } } signingKey, err := getSigningKey(r.Context(), s, r.URL.Query().Get("OC-Credential")) + if err != nil { + l.Error().Err(err).Msg("could not retrieve signing key") + return false + } if len(signingKey) == 0 { - l.Debug().Err(err).Msgf("signing key empty") + l.Error().Err(err).Msg("signing key empty") return false } @@ -99,12 +99,7 @@ func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService) // fo golangs pbkdf2.Key we need to use 32 because it will be encoded into 64 hexits later hash := pbkdf2.Key([]byte(url), signingKey, 10000, 32, sha512.New) - l.Debug().Interface("request", r).Str("url", url).Str("signature", signature).Bytes("signingkey", signingKey).Bytes("hash", hash).Str("hexencodedhash", hex.EncodeToString(hash)).Msgf("signature check") - - if hex.EncodeToString(hash) != signature { - return false - } - return true + return hex.EncodeToString(hash) == signature } func getSigningKey(ctx context.Context, s storepb.StoreService, credential string) ([]byte, error) { From 02ec13f9a7a27d3ace4f2ff62f590e88136211d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 22 Jul 2020 12:46:42 +0200 Subject: [PATCH 165/213] prevent segfault in create home middleware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/fix-createhome-segfault.md | 5 +++++ pkg/middleware/create_home.go | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/fix-createhome-segfault.md diff --git a/changelog/unreleased/fix-createhome-segfault.md b/changelog/unreleased/fix-createhome-segfault.md new file mode 100644 index 0000000000..46623fe757 --- /dev/null +++ b/changelog/unreleased/fix-createhome-segfault.md @@ -0,0 +1,5 @@ +Bugfix: Provide token configuration from config + +Fixed a bug that causes the createHome middleware to crash if the createHome response has no Status set + +https://github.com/owncloud/ocis-proxy/pull/76 diff --git a/pkg/middleware/create_home.go b/pkg/middleware/create_home.go index e2825439fc..b67ca77ead 100644 --- a/pkg/middleware/create_home.go +++ b/pkg/middleware/create_home.go @@ -66,11 +66,9 @@ func CreateHome(opts ...Option) func(next http.Handler) http.Handler { if err != nil { opt.Logger.Err(err).Msg("error calling CreateHome") - } - - if createHomeRes.Status.Code != rpc.Code_CODE_OK { + } else if createHomeRes.Status.Code != rpc.Code_CODE_OK { err := status.NewErrorFromCode(createHomeRes.Status.Code, "gateway") - opt.Logger.Err(err).Msg("error calling Createhome") + opt.Logger.Err(err).Msg("error when calling Createhome") } next.ServeHTTP(w, r) From 7a5cc3a1256d8b66cb2eaa8b03f85abde6d1def3 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 23 Jul 2020 10:18:30 +0200 Subject: [PATCH 166/213] Use alpine:latest instead of alpine:edge in docker builds --- changelog/unreleased/use-alpine-latest.md | 5 +++++ docker/Dockerfile.linux.amd64 | 2 +- docker/Dockerfile.linux.arm | 2 +- docker/Dockerfile.linux.arm64 | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelog/unreleased/use-alpine-latest.md diff --git a/changelog/unreleased/use-alpine-latest.md b/changelog/unreleased/use-alpine-latest.md new file mode 100644 index 0000000000..7e53337586 --- /dev/null +++ b/changelog/unreleased/use-alpine-latest.md @@ -0,0 +1,5 @@ +Bugfix: build docker images with alpine:latest instead of alpine:edge + +ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. + +https://github.com/owncloud/ocis-proxy/pull/78 diff --git a/docker/Dockerfile.linux.amd64 b/docker/Dockerfile.linux.amd64 index 253b4e7519..4b76f0fa16 100644 --- a/docker/Dockerfile.linux.amd64 +++ b/docker/Dockerfile.linux.amd64 @@ -1,4 +1,4 @@ -FROM amd64/alpine:edge +FROM amd64/alpine:latest RUN apk update && \ apk upgrade && \ diff --git a/docker/Dockerfile.linux.arm b/docker/Dockerfile.linux.arm index e07e473007..9da1cd74b0 100644 --- a/docker/Dockerfile.linux.arm +++ b/docker/Dockerfile.linux.arm @@ -1,4 +1,4 @@ -FROM arm32v6/alpine:edge +FROM arm32v6/alpine:latest RUN apk update && \ apk upgrade && \ diff --git a/docker/Dockerfile.linux.arm64 b/docker/Dockerfile.linux.arm64 index a21fdcd160..a54529af5d 100644 --- a/docker/Dockerfile.linux.arm64 +++ b/docker/Dockerfile.linux.arm64 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:edge +FROM arm64v8/alpine:latest RUN apk update && \ apk upgrade && \ From 6042907de05e5ca359cab3877c181e8c582966e2 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 23 Jul 2020 08:39:17 +0000 Subject: [PATCH 167/213] Automated changelog update [skip ci] --- CHANGELOG.md | 66 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d161ff76da..42ad6c0435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,15 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Bugfix - Provide token configuration from config: [#69](https://github.com/owncloud/ocis-proxy/pull/69) +* Bugfix - Provide token configuration from config: [#76](https://github.com/owncloud/ocis-proxy/pull/76) +* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) * Enhancement - Add option to disable TLS: [#71](https://github.com/owncloud/ocis-proxy/issues/71) * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) +* Enhancement - Support signed URLs: [#73](https://github.com/owncloud/ocis-proxy/issues/73) ## Details @@ -24,6 +27,21 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/69 +* Bugfix - Provide token configuration from config: [#76](https://github.com/owncloud/ocis-proxy/pull/76) + + Fixed a bug that causes the createHome middleware to crash if the createHome response has no + Status set + + https://github.com/owncloud/ocis-proxy/pull/76 + + +* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) + + ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. + + https://github.com/owncloud/ocis-proxy/pull/78 + + * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) To authenticate requests with an oidc provider we added two environment variables: - @@ -79,6 +97,18 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/64 + +* Enhancement - Support signed URLs: [#73](https://github.com/owncloud/ocis-proxy/issues/73) + + We added a middleware that verifies signed urls as generated by the owncloud-sdk. This allows + directly downloading large files with browsers instead of using `blob://` urls, which eats + memory ... + + https://github.com/owncloud/ocis-proxy/issues/73 + https://github.com/owncloud/ocis-proxy/pull/75 + https://github.com/owncloud/ocis-ocs/pull/18 + https://github.com/owncloud/owncloud-sdk/pull/504 + # Changelog for [0.4.0] (2020-06-25) The following sections list the changes for ocis-proxy 0.4.0. @@ -202,7 +232,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -236,11 +266,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -271,22 +317,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 148bc66350625b3740eda0368ffc4c8fbad64436 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 23 Jul 2020 08:36:15 +0200 Subject: [PATCH 168/213] Prepare release 0.5.0 --- .../{unreleased => 0.5.0_2020-07-23}/add-accounts-ui-routes.md | 0 changelog/{unreleased => 0.5.0_2020-07-23}/add-disable-tls.md | 1 + .../{unreleased => 0.5.0_2020-07-23}/add-oidc-config-flags.md | 0 .../create-home-if-migrated.md | 3 ++- .../fix-createhome-middleware.md | 0 .../fix-createhome-segfault.md | 0 changelog/{unreleased => 0.5.0_2020-07-23}/root-tracing.md | 0 .../{unreleased => 0.5.0_2020-07-23}/support-signed-urls.md | 0 .../user-and-group-name-mapping.md} | 0 9 files changed, 3 insertions(+), 1 deletion(-) rename changelog/{unreleased => 0.5.0_2020-07-23}/add-accounts-ui-routes.md (100%) rename changelog/{unreleased => 0.5.0_2020-07-23}/add-disable-tls.md (82%) rename changelog/{unreleased => 0.5.0_2020-07-23}/add-oidc-config-flags.md (100%) rename changelog/{unreleased => 0.5.0_2020-07-23}/create-home-if-migrated.md (82%) rename changelog/{unreleased => 0.5.0_2020-07-23}/fix-createhome-middleware.md (100%) rename changelog/{unreleased => 0.5.0_2020-07-23}/fix-createhome-segfault.md (100%) rename changelog/{unreleased => 0.5.0_2020-07-23}/root-tracing.md (100%) rename changelog/{unreleased => 0.5.0_2020-07-23}/support-signed-urls.md (100%) rename changelog/{unreleased/user-and-group-name-mapping => 0.5.0_2020-07-23/user-and-group-name-mapping.md} (100%) diff --git a/changelog/unreleased/add-accounts-ui-routes.md b/changelog/0.5.0_2020-07-23/add-accounts-ui-routes.md similarity index 100% rename from changelog/unreleased/add-accounts-ui-routes.md rename to changelog/0.5.0_2020-07-23/add-accounts-ui-routes.md diff --git a/changelog/unreleased/add-disable-tls.md b/changelog/0.5.0_2020-07-23/add-disable-tls.md similarity index 82% rename from changelog/unreleased/add-disable-tls.md rename to changelog/0.5.0_2020-07-23/add-disable-tls.md index 6f1ee9595c..0767078275 100644 --- a/changelog/unreleased/add-disable-tls.md +++ b/changelog/0.5.0_2020-07-23/add-disable-tls.md @@ -6,3 +6,4 @@ TLS-Terminating reverse proxy. env PROXY_TLS=false or --tls=false https://github.com/owncloud/ocis-proxy/issues/71 +https://github.com/owncloud/ocis-proxy/pull/72 diff --git a/changelog/unreleased/add-oidc-config-flags.md b/changelog/0.5.0_2020-07-23/add-oidc-config-flags.md similarity index 100% rename from changelog/unreleased/add-oidc-config-flags.md rename to changelog/0.5.0_2020-07-23/add-oidc-config-flags.md diff --git a/changelog/unreleased/create-home-if-migrated.md b/changelog/0.5.0_2020-07-23/create-home-if-migrated.md similarity index 82% rename from changelog/unreleased/create-home-if-migrated.md rename to changelog/0.5.0_2020-07-23/create-home-if-migrated.md index 82ee28ed96..0d8f54842d 100644 --- a/changelog/unreleased/create-home-if-migrated.md +++ b/changelog/0.5.0_2020-07-23/create-home-if-migrated.md @@ -1,6 +1,7 @@ -Enhancement: only send create home request if an account has been migrated +Enhancement: only send create home request if an account has been migrated This change adds a check if an account has been migrated by getting it from the ocis-accounts service. If no account is returned it means it hasn't been migrated. https://github.com/owncloud/ocis-proxy/issues/52 +https://github.com/owncloud/ocis-proxy/pull/63 diff --git a/changelog/unreleased/fix-createhome-middleware.md b/changelog/0.5.0_2020-07-23/fix-createhome-middleware.md similarity index 100% rename from changelog/unreleased/fix-createhome-middleware.md rename to changelog/0.5.0_2020-07-23/fix-createhome-middleware.md diff --git a/changelog/unreleased/fix-createhome-segfault.md b/changelog/0.5.0_2020-07-23/fix-createhome-segfault.md similarity index 100% rename from changelog/unreleased/fix-createhome-segfault.md rename to changelog/0.5.0_2020-07-23/fix-createhome-segfault.md diff --git a/changelog/unreleased/root-tracing.md b/changelog/0.5.0_2020-07-23/root-tracing.md similarity index 100% rename from changelog/unreleased/root-tracing.md rename to changelog/0.5.0_2020-07-23/root-tracing.md diff --git a/changelog/unreleased/support-signed-urls.md b/changelog/0.5.0_2020-07-23/support-signed-urls.md similarity index 100% rename from changelog/unreleased/support-signed-urls.md rename to changelog/0.5.0_2020-07-23/support-signed-urls.md diff --git a/changelog/unreleased/user-and-group-name-mapping b/changelog/0.5.0_2020-07-23/user-and-group-name-mapping.md similarity index 100% rename from changelog/unreleased/user-and-group-name-mapping rename to changelog/0.5.0_2020-07-23/user-and-group-name-mapping.md From bc2dc15ff4ca9ef8bd34b2ca11f6ef3cd71cc5bc Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 23 Jul 2020 11:29:50 +0000 Subject: [PATCH 169/213] Automated changelog update [skip ci] --- CHANGELOG.md | 66 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42ad6c0435..efcaace047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,30 @@ The following sections list the changes for ocis-proxy unreleased. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.4.0...master +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.5.0...master + +## Summary + +* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) + +## Details + +* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) + + ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. + + https://github.com/owncloud/ocis-proxy/pull/78 + +# Changelog for [0.5.0] (2020-07-23) + +The following sections list the changes for ocis-proxy 0.5.0. + +[0.5.0]: https://github.com/owncloud/ocis-proxy/compare/v0.4.0...v0.5.0 ## Summary * Bugfix - Provide token configuration from config: [#69](https://github.com/owncloud/ocis-proxy/pull/69) * Bugfix - Provide token configuration from config: [#76](https://github.com/owncloud/ocis-proxy/pull/76) -* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) * Change - Mint new username property in the reva token: [#62](https://github.com/owncloud/ocis-proxy/pull/62) * Enhancement - Add Accounts UI routes: [#65](https://github.com/owncloud/ocis-proxy/pull/65) @@ -35,13 +52,6 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/76 -* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) - - ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. - - https://github.com/owncloud/ocis-proxy/pull/78 - - * Change - Add OIDC config flags: [#66](https://github.com/owncloud/ocis-proxy/pull/66) To authenticate requests with an oidc provider we added two environment variables: - @@ -80,6 +90,7 @@ The following sections list the changes for ocis-proxy unreleased. Env PROXY_TLS=false or --tls=false https://github.com/owncloud/ocis-proxy/issues/71 + https://github.com/owncloud/ocis-proxy/pull/72 * Enhancement - Only send create home request if an account has been migrated: [#52](https://github.com/owncloud/ocis-proxy/issues/52) @@ -88,6 +99,7 @@ The following sections list the changes for ocis-proxy unreleased. service. If no account is returned it means it hasn't been migrated. https://github.com/owncloud/ocis-proxy/issues/52 + https://github.com/owncloud/ocis-proxy/pull/63 * Enhancement - Create a root span on proxy that propagates down to consumers: [#64](https://github.com/owncloud/ocis-proxy/pull/64) @@ -232,7 +244,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -266,27 +278,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -317,6 +313,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 98927e20702a3f15a67715760f3652a01d8050f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 27 Jul 2020 21:04:48 +0200 Subject: [PATCH 170/213] enable new accounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/enable-new-accounts.md | 5 +++++ pkg/middleware/account_uuid.go | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 changelog/unreleased/enable-new-accounts.md diff --git a/changelog/unreleased/enable-new-accounts.md b/changelog/unreleased/enable-new-accounts.md new file mode 100644 index 0000000000..98e52fd631 --- /dev/null +++ b/changelog/unreleased/enable-new-accounts.md @@ -0,0 +1,5 @@ +Bugfix: enable new accounts by default + +When new accounts are created, they also need to be enabled to be useable. + +https://github.com/owncloud/ocis-proxy/pull/79 diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index d7969f9dda..cb405ac1cd 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -71,6 +71,8 @@ func createAccount(l log.Logger, claims *oidc.StandardClaims, ac acc.AccountsSer OnPremisesSamAccountName: claims.PreferredUsername, Mail: claims.Email, CreationType: "LocalAccount", + AccountEnabled: true, + // TODO assign uidnumber and gidnumber? better do that in ocis-accounts as it can keep track of the next numbers }, } created, err := ac.CreateAccount(context.Background(), req) From d0d85fe67a42bf4e037573416e0db80b8bb10a44 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Mon, 27 Jul 2020 20:13:41 +0000 Subject: [PATCH 171/213] Automated changelog update [skip ci] --- CHANGELOG.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efcaace047..d1575e41c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,18 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Bugfix - Enable new accounts by default: [#79](https://github.com/owncloud/ocis-proxy/pull/79) * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) ## Details +* Bugfix - Enable new accounts by default: [#79](https://github.com/owncloud/ocis-proxy/pull/79) + + When new accounts are created, they also need to be enabled to be useable. + + https://github.com/owncloud/ocis-proxy/pull/79 + + * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. @@ -244,7 +252,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -278,11 +286,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -313,22 +337,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 3a83f3bb4d64dcb79ffc8dcb57e2dfb23d5d9fe8 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 17:34:06 +0200 Subject: [PATCH 172/213] Route user provisioning api to ocis-ocs --- config/proxy-example.json | 21 ++++++++++++++------- pkg/proxy/proxy.go | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/config/proxy-example.json b/config/proxy-example.json index b8e5063cb8..28fd674deb 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -7,7 +7,9 @@ "insecure": true }, "policy_selector": { - "static": {"policy" : "reva"} + "static": { + "policy": "reva" + } }, "policies": [ { @@ -33,6 +35,11 @@ "endpoint": "/ocs/", "backend": "http://localhost:9140" }, + { + "type": "regex", + "endpoint": "/ocs/v[12].php/cloud/user", + "backend": "http://localhost:9110" + }, { "endpoint": "/remote.php/", "backend": "http://localhost:9140" @@ -58,13 +65,13 @@ "backend": "http://localhost:9140" }, { - "endpoint": "/api/v0/accounts", - "backend": "http://localhost:9181" - }, - { + "endpoint": "/api/v0/accounts", + "backend": "http://localhost:9181" + }, + { "endpoint": "/accounts.js", - "backend": "http://localhost:9181" - } + "backend": "http://localhost:9181" + } ] }, { diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index fa43b02415..b5641c7d00 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -255,7 +255,7 @@ func defaultPolicies() []config.Policy { }, { Type: config.RegexRoute, - Endpoint: "/ocs/v[12].php/cloud/user/signing-key", + Endpoint: "/ocs/v[12].php/cloud/user",// we have `user` and `users` in ocis-ocs Backend: "http://localhost:9110", }, { From b65846ff8ee8fe6c9e3b057fb925c638049054cb Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 17:36:19 +0200 Subject: [PATCH 173/213] Changelog --- changelog/unreleased/user-provisioning-api.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/user-provisioning-api.md diff --git a/changelog/unreleased/user-provisioning-api.md b/changelog/unreleased/user-provisioning-api.md new file mode 100644 index 0000000000..72f3262f60 --- /dev/null +++ b/changelog/unreleased/user-provisioning-api.md @@ -0,0 +1,5 @@ +Change: Add route for user provisioning API in ocis-ocs + +We added a route to send requests on the user provisioning API endpoints to ocis-ocs. + +https://github.com/owncloud/ocis-proxy/pull/80 From 38d4dcf09341d5758ef813abc4ae93522cd014b1 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 19:02:25 +0000 Subject: [PATCH 174/213] Automated changelog update [skip ci] --- CHANGELOG.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1575e41c6..a227bf8415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The following sections list the changes for ocis-proxy unreleased. * Bugfix - Enable new accounts by default: [#79](https://github.com/owncloud/ocis-proxy/pull/79) * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) +* Change - Add route for user provisioning API in ocis-ocs: [#80](https://github.com/owncloud/ocis-proxy/pull/80) ## Details @@ -24,6 +25,13 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/78 + +* Change - Add route for user provisioning API in ocis-ocs: [#80](https://github.com/owncloud/ocis-proxy/pull/80) + + We added a route to send requests on the user provisioning API endpoints to ocis-ocs. + + https://github.com/owncloud/ocis-proxy/pull/80 + # Changelog for [0.5.0] (2020-07-23) The following sections list the changes for ocis-proxy 0.5.0. @@ -252,7 +260,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -286,27 +294,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -337,6 +329,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 2e49febb6c6d7d4d6c9028a7938bf5aa5530280d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 29 Jul 2020 14:55:26 +0200 Subject: [PATCH 175/213] add settings and ocs group routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/settings-and-ocs | 5 +++++ pkg/proxy/proxy.go | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/settings-and-ocs diff --git a/changelog/unreleased/settings-and-ocs b/changelog/unreleased/settings-and-ocs new file mode 100644 index 0000000000..1fdb67e05f --- /dev/null +++ b/changelog/unreleased/settings-and-ocs @@ -0,0 +1,5 @@ +Change: add settings and ocs group routes + +Route settings requests and ocs group related requests to new services + +https://github.com/owncloud/ocis-proxy/pull/81 diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index b5641c7d00..a489bae027 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -250,13 +250,13 @@ func defaultPolicies() []config.Policy { Backend: "http://localhost:9130", }, { - Endpoint: "/ocs/", - Backend: "http://localhost:9140", + Type: config.RegexRoute, + Endpoint: "/ocs/v[12].php/cloud/user", // we have `user` and `users` in ocis-ocs + Backend: "http://localhost:9110", }, { - Type: config.RegexRoute, - Endpoint: "/ocs/v[12].php/cloud/user",// we have `user` and `users` in ocis-ocs - Backend: "http://localhost:9110", + Endpoint: "/ocs/", + Backend: "http://localhost:9140", }, { Type: config.QueryRoute, @@ -297,6 +297,14 @@ func defaultPolicies() []config.Policy { Endpoint: "/accounts.js", Backend: "http://localhost:9181", }, + { + Endpoint: "/api/v0/settings", + Backend: "http://localhost:9190", + }, + { + Endpoint: "/settings.js", + Backend: "http://localhost:9190", + }, }, }, { From c1be83037ac1b8cb41e3e7256be423349c51c793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 29 Jul 2020 13:34:25 +0000 Subject: [PATCH 176/213] Automated changelog update [skip ci] --- CHANGELOG.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a227bf8415..8680cbc58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The following sections list the changes for ocis-proxy unreleased. * Bugfix - Enable new accounts by default: [#79](https://github.com/owncloud/ocis-proxy/pull/79) * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) +* Change - Add settings and ocs group routes: [#81](https://github.com/owncloud/ocis-proxy/pull/81) * Change - Add route for user provisioning API in ocis-ocs: [#80](https://github.com/owncloud/ocis-proxy/pull/80) ## Details @@ -26,6 +27,13 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/78 +* Change - Add settings and ocs group routes: [#81](https://github.com/owncloud/ocis-proxy/pull/81) + + Route settings requests and ocs group related requests to new services + + https://github.com/owncloud/ocis-proxy/pull/81 + + * Change - Add route for user provisioning API in ocis-ocs: [#80](https://github.com/owncloud/ocis-proxy/pull/80) We added a route to send requests on the user provisioning API endpoints to ocis-ocs. @@ -260,7 +268,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -294,11 +302,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -329,22 +353,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 1deada443e622688106434fcaee6dad1c4600c4c Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 31 Jul 2020 22:57:19 +0200 Subject: [PATCH 177/213] Set iss/idp in reva-userid --- pkg/command/server.go | 1 + pkg/middleware/account_uuid.go | 1 + pkg/middleware/openidconnect.go | 3 +++ pkg/middleware/options.go | 9 +++++++++ 4 files changed, 14 insertions(+) diff --git a/pkg/command/server.go b/pkg/command/server.go index fcec85dd4a..3e948d8b68 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -305,6 +305,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic middleware.Logger(l), middleware.HTTPClient(oidcHTTPClient), middleware.OIDCProviderFunc(provider), + middleware.OIDCIss(cfg.OIDC.Issuer), ) return alice.New(middleware.RedirectToHTTPS, oidcMW, psMW, uuidMW, chMW) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index cb405ac1cd..5f711312b4 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -146,6 +146,7 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { token, err := tokenManager.MintToken(r.Context(), &revauser.User{ Id: &revauser.UserId{ OpaqueId: account.Id, + Idp: claims.Iss, }, Username: account.OnPremisesSamAccountName, DisplayName: account.DisplayName, diff --git a/pkg/middleware/openidconnect.go b/pkg/middleware/openidconnect.go index be0ccacac8..a4eb51471b 100644 --- a/pkg/middleware/openidconnect.go +++ b/pkg/middleware/openidconnect.go @@ -85,6 +85,9 @@ func OpenIDConnect(opts ...Option) func(next http.Handler) http.Handler { return } + //TODO: This should be read from the token instead of config + claims.Iss = opt.OIDCIss + // inject claims to the request context for the account_uuid middleware. ctxWithClaims := ocisoidc.NewContext(r.Context(), &claims) r = r.WithContext(ctxWithClaims) diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index e6ab964298..cf7f5d1178 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -25,6 +25,8 @@ type Options struct { AccountsClient acc.AccountsService // OIDCProviderFunc to lazily initialize a provider, must be set for the oidcProvider middleware OIDCProviderFunc func() (OIDCProvider, error) + // OIDCIss is the oidc-issuer + OIDCIss string // RevaGatewayClient to send requests to the reva gateway RevaGatewayClient gateway.GatewayAPIClient // Store for persisting data @@ -77,6 +79,13 @@ func OIDCProviderFunc(f func() (OIDCProvider, error)) Option { } } +// OIDCIss sets the oidc issuer url +func OIDCIss(iss string) Option { + return func(o *Options) { + o.OIDCIss = iss + } +} + // RevaGatewayClient provides a function to set the the reva gateway service client option. func RevaGatewayClient(gc gateway.GatewayAPIClient) Option { return func(o *Options) { From 999908881329143fb034ce55986aca6ba6a1e1a6 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 31 Jul 2020 22:58:26 +0200 Subject: [PATCH 178/213] Fix potential null-pointer --- pkg/middleware/account_uuid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 5f711312b4..6639ad7225 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -118,7 +118,7 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { l.Error().Err(err).Msgf("Could not lookup account, no mail or preferred_username claim set") w.WriteHeader(http.StatusInternalServerError) } - if status != 0 { + if status != 0 || account == nil { if status == http.StatusNotFound { account, status = createAccount(l, claims, opt.AccountsClient) if status != 0 { From 9470b36c61d7cb1b36ec1678d08a97fa089ddc14 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Fri, 31 Jul 2020 21:18:38 +0000 Subject: [PATCH 179/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8680cbc58b..d6b25314dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -268,7 +268,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -302,27 +302,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -353,6 +337,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From fba174641b152fde2b75efa2ea979a2544098820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 11 Aug 2020 10:23:46 +0200 Subject: [PATCH 180/213] lookup user by id as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/middleware/account_uuid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 6639ad7225..74d453e6b8 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -112,7 +112,8 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { if claims.Email != "" { account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("mail eq '%s'", strings.ReplaceAll(claims.Email, "'", "''"))) } else if claims.PreferredUsername != "" { - account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("preferred_name eq '%s'", strings.ReplaceAll(claims.PreferredUsername, "'", "''"))) + usernameOrID := strings.ReplaceAll(claims.PreferredUsername, "'", "''") + account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("preferred_name eq '%s' or id eq '%s'", usernameOrID, usernameOrID)) } else { // TODO allow lookup by custom claim, eg an id ... or sub l.Error().Err(err).Msgf("Could not lookup account, no mail or preferred_username claim set") From 3e29ee9fa252412764347652b784d1c7904f8b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 11 Aug 2020 13:31:47 +0200 Subject: [PATCH 181/213] properly distinguish userid from username MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 2 +- go.sum | 2 ++ pkg/middleware/account_uuid.go | 5 +++-- pkg/middleware/presigned_url.go | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 7791122bb6..c61cb27846 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e - github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c + github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204 github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b github.com/prometheus/client_golang v1.7.0 github.com/restic/calens v0.2.0 diff --git a/go.sum b/go.sum index 0e414f236f..a9edc2b27a 100644 --- a/go.sum +++ b/go.sum @@ -748,6 +748,8 @@ github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV0 github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c h1:hYhKSfMkPO4kRLrKqRHPmePGTCpGDGji+s4yW30+tmM= github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c/go.mod h1:s894msGwDsULmsROHkbsXFCP/eSqDcteDFUntZOiJdc= +github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204 h1:q0/LzJr+G/BX8nRUVsnUBbEE1vMybuOyQesz57QW3F4= +github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204/go.mod h1:s894msGwDsULmsROHkbsXFCP/eSqDcteDFUntZOiJdc= github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc= github.com/owncloud/ocis-settings v0.0.0-20200629120229-69693c5f8f43/go.mod h1:AeXZVHKEU+9Xt4+/lkHE5rx+sJH2if9dIrUGLhe+JOY= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b h1:tjfH02oEawuMdMt3pJdCjFyuWgNRUjV7rdjoTF56Mrw= diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 74d453e6b8..620731e71c 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -112,8 +112,9 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { if claims.Email != "" { account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("mail eq '%s'", strings.ReplaceAll(claims.Email, "'", "''"))) } else if claims.PreferredUsername != "" { - usernameOrID := strings.ReplaceAll(claims.PreferredUsername, "'", "''") - account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("preferred_name eq '%s' or id eq '%s'", usernameOrID, usernameOrID)) + account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("preferred_name eq '%s'", strings.ReplaceAll(claims.PreferredUsername, "'", "''"))) + } else if claims.OcisID != "" { + account, status = getAccount(l, opt.AccountsClient, fmt.Sprintf("id eq '%s'", strings.ReplaceAll(claims.OcisID, "'", "''"))) } else { // TODO allow lookup by custom claim, eg an id ... or sub l.Error().Err(err).Msgf("Could not lookup account, no mail or preferred_username claim set") diff --git a/pkg/middleware/presigned_url.go b/pkg/middleware/presigned_url.go index 74b629650f..a6d328ec54 100644 --- a/pkg/middleware/presigned_url.go +++ b/pkg/middleware/presigned_url.go @@ -25,7 +25,7 @@ func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { if signedRequestIsValid(l, r, opt.Store) { // use openid claims to let the account_uuid middleware do a lookup by username claims := ocisoidc.StandardClaims{ - PreferredUsername: r.URL.Query().Get("OC-Credential"), + OcisID: r.URL.Query().Get("OC-Credential"), } // inject claims to the request context for the account_uuid middleware From 6e590a051fb6f85d10b61fc2194b033b961aec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 11 Aug 2020 16:18:37 +0200 Subject: [PATCH 182/213] add changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/presigned-url-lookup-fix.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/unreleased/presigned-url-lookup-fix.md diff --git a/changelog/unreleased/presigned-url-lookup-fix.md b/changelog/unreleased/presigned-url-lookup-fix.md new file mode 100644 index 0000000000..01b24ed398 --- /dev/null +++ b/changelog/unreleased/presigned-url-lookup-fix.md @@ -0,0 +1,7 @@ +Bugfix: Lookup user by id for presigned URLs + +Phoenix will send the `userid`, not the `username` as the `OC-Credential` for presigned URLs. This PR uses the new `ocisid` claim in the OIDC userinfo to pass the userid to the account middleware. + +https://github.com/owncloud/ocis-proxy/pull/85 +https://github.com/owncloud/ocis-pkg/pull/50 +https://github.com/owncloud/ocis/issues/436 From d3aa0bc0587402396d61f8c8ce0b719da617b8b0 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 11 Aug 2020 15:28:01 +0000 Subject: [PATCH 183/213] Automated changelog update [skip ci] --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b25314dc..c4989478b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Bugfix - Enable new accounts by default: [#79](https://github.com/owncloud/ocis-proxy/pull/79) +* Bugfix - Lookup user by id for presigned URLs: [#85](https://github.com/owncloud/ocis-proxy/pull/85) * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) * Change - Add settings and ocs group routes: [#81](https://github.com/owncloud/ocis-proxy/pull/81) * Change - Add route for user provisioning API in ocis-ocs: [#80](https://github.com/owncloud/ocis-proxy/pull/80) @@ -20,6 +21,17 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/79 +* Bugfix - Lookup user by id for presigned URLs: [#85](https://github.com/owncloud/ocis-proxy/pull/85) + + Phoenix will send the `userid`, not the `username` as the `OC-Credential` for presigned URLs. + This PR uses the new `ocisid` claim in the OIDC userinfo to pass the userid to the account + middleware. + + https://github.com/owncloud/ocis/issues/436 + https://github.com/owncloud/ocis-proxy/pull/85 + https://github.com/owncloud/ocis-pkg/pull/50 + + * Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#78](https://github.com/owncloud/ocis-proxy/pull/78) ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead. @@ -268,7 +280,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -302,11 +314,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -337,22 +365,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 4abe20219150bf164d615a0a00543e72023aa689 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 17 Aug 2020 15:43:07 +0200 Subject: [PATCH 184/213] Prepare release 0.6.0 --- changelog/{unreleased => 0.6.0_2020-08-17}/enable-new-accounts.md | 0 .../{unreleased => 0.6.0_2020-08-17}/presigned-url-lookup-fix.md | 0 changelog/{unreleased => 0.6.0_2020-08-17}/settings-and-ocs | 0 changelog/{unreleased => 0.6.0_2020-08-17}/use-alpine-latest.md | 0 .../{unreleased => 0.6.0_2020-08-17}/user-provisioning-api.md | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.6.0_2020-08-17}/enable-new-accounts.md (100%) rename changelog/{unreleased => 0.6.0_2020-08-17}/presigned-url-lookup-fix.md (100%) rename changelog/{unreleased => 0.6.0_2020-08-17}/settings-and-ocs (100%) rename changelog/{unreleased => 0.6.0_2020-08-17}/use-alpine-latest.md (100%) rename changelog/{unreleased => 0.6.0_2020-08-17}/user-provisioning-api.md (100%) diff --git a/changelog/unreleased/enable-new-accounts.md b/changelog/0.6.0_2020-08-17/enable-new-accounts.md similarity index 100% rename from changelog/unreleased/enable-new-accounts.md rename to changelog/0.6.0_2020-08-17/enable-new-accounts.md diff --git a/changelog/unreleased/presigned-url-lookup-fix.md b/changelog/0.6.0_2020-08-17/presigned-url-lookup-fix.md similarity index 100% rename from changelog/unreleased/presigned-url-lookup-fix.md rename to changelog/0.6.0_2020-08-17/presigned-url-lookup-fix.md diff --git a/changelog/unreleased/settings-and-ocs b/changelog/0.6.0_2020-08-17/settings-and-ocs similarity index 100% rename from changelog/unreleased/settings-and-ocs rename to changelog/0.6.0_2020-08-17/settings-and-ocs diff --git a/changelog/unreleased/use-alpine-latest.md b/changelog/0.6.0_2020-08-17/use-alpine-latest.md similarity index 100% rename from changelog/unreleased/use-alpine-latest.md rename to changelog/0.6.0_2020-08-17/use-alpine-latest.md diff --git a/changelog/unreleased/user-provisioning-api.md b/changelog/0.6.0_2020-08-17/user-provisioning-api.md similarity index 100% rename from changelog/unreleased/user-provisioning-api.md rename to changelog/0.6.0_2020-08-17/user-provisioning-api.md From d3fd5d5d9055dee55f9d44d26ea8afc6d12b9824 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 17 Aug 2020 14:38:42 +0000 Subject: [PATCH 185/213] Automated changelog update [skip ci] --- CHANGELOG.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4989478b6..af2ed61760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.6.0] (2020-08-17) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.6.0. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.5.0...master +[0.6.0]: https://github.com/owncloud/ocis-proxy/compare/v0.5.0...v0.6.0 ## Summary @@ -280,7 +280,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -314,27 +314,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -365,6 +349,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From d72f50dd1583f138979c7a22a00d8e7fb9542ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 13 Aug 2020 12:49:27 +0200 Subject: [PATCH 186/213] Add numeric uid and gid to the access token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/mint-uid-and-gid.md | 5 +++++ pkg/middleware/account_uuid.go | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/mint-uid-and-gid.md diff --git a/changelog/unreleased/mint-uid-and-gid.md b/changelog/unreleased/mint-uid-and-gid.md new file mode 100644 index 0000000000..95c059b83f --- /dev/null +++ b/changelog/unreleased/mint-uid-and-gid.md @@ -0,0 +1,5 @@ +Enhancement: Add numeric uid and gid to the access token + +The eos storage driver is fetching the uid and gid of a user from the access token. This PR is using the response of the accounts service to mint them in the token. + +https://github.com/owncloud/ocis-proxy/pull/89 diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 620731e71c..24cb60d227 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -4,9 +4,11 @@ import ( "context" "fmt" "net/http" + "strconv" "strings" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" + types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" @@ -145,7 +147,7 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { } l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") - token, err := tokenManager.MintToken(r.Context(), &revauser.User{ + user := &revauser.User{ Id: &revauser.UserId{ OpaqueId: account.Id, Idp: claims.Iss, @@ -155,7 +157,21 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { Mail: account.Mail, MailVerified: account.ExternalUserState == "" || account.ExternalUserState == "Accepted", Groups: groups, - }) + Opaque: &types.Opaque{ + Map: map[string]*types.OpaqueEntry{}, + }, + } + + user.Opaque.Map["uid"] = &types.OpaqueEntry{ + Decoder: "plain", + Value: []byte(strconv.FormatInt(account.UidNumber, 10)), + } + user.Opaque.Map["gid"] = &types.OpaqueEntry{ + Decoder: "plain", + Value: []byte(strconv.FormatInt(account.GidNumber, 10)), + } + + token, err := tokenManager.MintToken(r.Context(), user) if err != nil { l.Error().Err(err).Msgf("Could not mint token") From a51b3c8ed42fc11dc89ff0b5f276c348c22fbca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 19 Aug 2020 10:57:09 +0000 Subject: [PATCH 187/213] Automated changelog update [skip ci] --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af2ed61760..18c6a1e551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.6.0...master + +## Summary + +* Enhancement - Add numeric uid and gid to the access token: [#89](https://github.com/owncloud/ocis-proxy/pull/89) + +## Details + +* Enhancement - Add numeric uid and gid to the access token: [#89](https://github.com/owncloud/ocis-proxy/pull/89) + + The eos storage driver is fetching the uid and gid of a user from the access token. This PR is using + the response of the accounts service to mint them in the token. + + https://github.com/owncloud/ocis-proxy/pull/89 + # Changelog for [0.6.0] (2020-08-17) The following sections list the changes for ocis-proxy 0.6.0. From c4dfbedc2c71ec1de9731c2be9d2dc37b5182308 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 20 Aug 2020 09:56:09 +0200 Subject: [PATCH 188/213] Add settings API endpoint and settings app endpoint to example --- config/proxy-example-migration.json | 10 +++++++++- config/proxy-example.json | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/config/proxy-example-migration.json b/config/proxy-example-migration.json index 04760b75a7..d2ee433284 100644 --- a/config/proxy-example-migration.json +++ b/config/proxy-example-migration.json @@ -68,7 +68,15 @@ { "endpoint": "/accounts.js", "backend": "http://localhost:9181" - } + }, + { + "endpoint": "/api/v0/settings", + "backend": "http://localhost:9190" + }, + { + "endpoint": "/settings.js", + "backend": "http://localhost:9190" + } ] }, { diff --git a/config/proxy-example.json b/config/proxy-example.json index 28fd674deb..68c2fe3083 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -71,6 +71,14 @@ { "endpoint": "/accounts.js", "backend": "http://localhost:9181" + }, + { + "endpoint": "/api/v0/settings", + "backend": "http://localhost:9190" + }, + { + "endpoint": "/settings.js", + "backend": "http://localhost:9190" } ] }, From ee155116328912e8290143a1b4b4a3245278b66a Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 20 Aug 2020 10:01:08 +0200 Subject: [PATCH 189/213] Add changelog item --- changelog/unreleased/settings-in-example-config.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/settings-in-example-config.md diff --git a/changelog/unreleased/settings-in-example-config.md b/changelog/unreleased/settings-in-example-config.md new file mode 100644 index 0000000000..1828e18e37 --- /dev/null +++ b/changelog/unreleased/settings-in-example-config.md @@ -0,0 +1,6 @@ +Bugfix: Add settings API and app endpoints to example config + +We had the ocis-settings API and app endpoints in the builtin config already, but they were missing in the example +config. Added them for consistency. + +https://github.com/owncloud/ocis-proxy/pull/93 From 1070c61c44bce3ce90dc8c7ba265d4e0505b30d5 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 20 Aug 2020 10:54:26 +0200 Subject: [PATCH 190/213] implement configuration options for the presigned url middleware Signed-off-by: David Christofas --- .../pre-signed-url-configuration.md | 7 + pkg/command/server.go | 2 + pkg/config/config.go | 6 + pkg/flagset/flagset.go | 6 + pkg/middleware/options.go | 9 ++ pkg/middleware/presigned_url.go | 75 ++++++++--- pkg/middleware/presigned_url_test.go | 121 ++++++++++++++++++ 7 files changed, 205 insertions(+), 21 deletions(-) create mode 100644 changelog/unreleased/pre-signed-url-configuration.md create mode 100644 pkg/middleware/presigned_url_test.go diff --git a/changelog/unreleased/pre-signed-url-configuration.md b/changelog/unreleased/pre-signed-url-configuration.md new file mode 100644 index 0000000000..c52fdb9756 --- /dev/null +++ b/changelog/unreleased/pre-signed-url-configuration.md @@ -0,0 +1,7 @@ +Enhancement: add configuration options for the pre-signed url middleware + +Added an option to define allowed http methods for pre-signed url requests. +This is useful since we only want clients to GET resources and don't upload anything with presigned requests. + +https://github.com/owncloud/ocis-proxy/issues/91 +https://github.com/owncloud/product/issues/150 diff --git a/pkg/command/server.go b/pkg/command/server.go index 3e948d8b68..a02019fa42 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -50,6 +50,7 @@ func Server(cfg *config.Config) *cli.Command { if cfg.HTTP.Root != "/" { cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") } + cfg.PreSignedURL.AllowedHTTPMethods = ctx.StringSlice("presignedurl-allow-method") // When running on single binary mode the before hook from the root command won't get called. We manually // call this before hook from ocis command, so the configuration can be loaded. @@ -251,6 +252,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic psMW := middleware.PresignedURL( middleware.Logger(l), middleware.Store(storepb.NewStoreService("com.owncloud.api.store", grpc.NewClient())), + middleware.PreSignedURLConfig(cfg.PreSignedURL), ) // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. diff --git a/pkg/config/config.go b/pkg/config/config.go index 72423f7547..8b1273b9a9 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -90,6 +90,7 @@ type Config struct { TokenManager TokenManager PolicySelector *PolicySelector `mapstructure:"policy_selector"` Reva Reva + PreSignedURL PreSignedURL } // OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request @@ -115,6 +116,11 @@ type TokenManager struct { JWTSecret string } +// PreSignedURL is the config for the presigned url middleware +type PreSignedURL struct { + AllowedHTTPMethods []string +} + // MigrationSelectorConf is the config for the migration-selector type MigrationSelectorConf struct { AccFoundPolicy string `mapstructure:"acc_found_policy"` diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index d7ad756d68..b4ba5f556c 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -195,6 +195,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"PROXY_OIDC_INSECURE"}, Destination: &cfg.OIDC.Insecure, }, + &cli.StringSliceFlag{ + Name: "presignedurl-allow-method", + Value: cli.NewStringSlice("GET"), + Usage: "--presignedurl-allow-method GET [--presignedurl-allow-method POST]", + EnvVars: []string{"PRESIGNEDURL_ALLOWED_METHODS"}, + }, } } diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index cf7f5d1178..21e7c8949d 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -31,6 +31,8 @@ type Options struct { RevaGatewayClient gateway.GatewayAPIClient // Store for persisting data Store storepb.StoreService + // PreSignedURLConfig to configure the middleware + PreSignedURLConfig config.PreSignedURL } // newOptions initializes the available default options. @@ -99,3 +101,10 @@ func Store(sc storepb.StoreService) Option { o.Store = sc } } + +// PreSignedURLConfig provides a function to set the PreSignedURL config +func PreSignedURLConfig(cfg config.PreSignedURL) Option { + return func(o *Options) { + o.PreSignedURLConfig = cfg + } +} diff --git a/pkg/middleware/presigned_url.go b/pkg/middleware/presigned_url.go index a6d328ec54..8993864e6f 100644 --- a/pkg/middleware/presigned_url.go +++ b/pkg/middleware/presigned_url.go @@ -10,19 +10,26 @@ import ( "github.com/owncloud/ocis-pkg/v2/log" ocisoidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-proxy/pkg/config" storepb "github.com/owncloud/ocis-store/pkg/proto/v0" "golang.org/x/crypto/pbkdf2" ) +const ( + iterations = 10000 + keyLen = 32 +) + // PresignedURL provides a middleware to check access secured by a presigned URL. func PresignedURL(opts ...Option) func(next http.Handler) http.Handler { opt := newOptions(opts...) l := opt.Logger + cfg := opt.PreSignedURLConfig return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if isSignedRequest(r) { - if signedRequestIsValid(l, r, opt.Store) { + if signedRequestIsValid(l, r, opt.Store, cfg) { // use openid claims to let the account_uuid middleware do a lookup by username claims := ocisoidc.StandardClaims{ OcisID: r.URL.Query().Get("OC-Credential"), @@ -47,33 +54,56 @@ func isSignedRequest(r *http.Request) bool { return r.URL.Query().Get("OC-Signature") != "" } -func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService) bool { - // cheap checks first +func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService, cfg config.PreSignedURL) bool { // TODO OC-Algorithm - defined the used algo (e.g. sha256 or sha512 - we should agree on one default algo and make this parameter optional) + // TODO OC-Verb - defines for which http verb the request is valid - defaults to GET OPTIONAL + + return allRequiredParametersArePresent(r) && + requestMethodMatches(r) && + requestMethodIsAllowed(r.Method, cfg.AllowedHTTPMethods) && + !urlIsExpired(r, time.Now) && + signatureIsValid(l, r, s) +} + +func allRequiredParametersArePresent(r *http.Request) bool { // OC-Credential - defines the user scope (shall we use the owncloud user id here - this might leak internal data ....) REQUIRED // OC-Date - defined the date the url was signed (ISO 8601 UTC) REQUIRED // OC-Expires - defines the expiry interval in seconds (between 1 and 604800 = 7 days) REQUIRED - // TODO OC-Verb - defines for which http verb the request is valid - defaults to GET OPTIONAL // OC-Signature - the computed signature - server will verify the request upon this REQUIRED - if r.URL.Query().Get("OC-Signature") == "" || r.URL.Query().Get("OC-Credential") == "" || r.URL.Query().Get("OC-Date") == "" || r.URL.Query().Get("OC-Expires") == "" || r.URL.Query().Get("OC-Verb") == "" { - return false - } + return r.URL.Query().Get("OC-Signature") != "" && + r.URL.Query().Get("OC-Credential") != "" && + r.URL.Query().Get("OC-Date") != "" && + r.URL.Query().Get("OC-Expires") != "" && + r.URL.Query().Get("OC-Verb") != "" +} - if !strings.EqualFold(r.Method, r.URL.Query().Get("OC-Verb")) { - return false - } +func requestMethodMatches(r *http.Request) bool { + return strings.EqualFold(r.Method, r.URL.Query().Get("OC-Verb")) +} - if t, err := time.Parse(time.RFC3339, r.URL.Query().Get("OC-Date")); err != nil { - return false - } else if expires, err := time.ParseDuration(r.URL.Query().Get("OC-Expires") + "s"); err != nil { - return false - } else { - t.Add(expires) - if t.After(time.Now()) { - return false +func requestMethodIsAllowed(m string, allowedMethods []string) bool { + for _, allowed := range allowedMethods { + if strings.EqualFold(m, allowed) { + return true } } + return false +} +func urlIsExpired(r *http.Request, now func() time.Time) bool { + t, err := time.Parse(time.RFC3339, r.URL.Query().Get("OC-Date")) + if err != nil { + return true + } + expires, err := time.ParseDuration(r.URL.Query().Get("OC-Expires") + "s") + if err != nil { + return true + } + t.Add(expires) + return t.After(now()) +} + +func signatureIsValid(l log.Logger, r *http.Request, s storepb.StoreService) bool { signingKey, err := getSigningKey(r.Context(), s, r.URL.Query().Get("OC-Credential")) if err != nil { l.Error().Err(err).Msg("could not retrieve signing key") @@ -92,14 +122,17 @@ func signedRequestIsValid(l log.Logger, r *http.Request, s storepb.StoreService) if !r.URL.IsAbs() { url = "https://" + r.Host + url // TODO where do we get the scheme from } + return createSignature(url, signingKey) == signature +} + +func createSignature(url string, signingKey []byte) string { // the oc10 signature check: $hash = \hash_pbkdf2("sha512", $url, $signingKey, 10000, 64, false); // - sets the length of the output string to 64 // - sets raw output to false -> if raw_output is FALSE length corresponds to twice the byte-length of the derived key (as every byte of the key is returned as two hexits). // TODO change to length 128 in oc10? // fo golangs pbkdf2.Key we need to use 32 because it will be encoded into 64 hexits later - hash := pbkdf2.Key([]byte(url), signingKey, 10000, 32, sha512.New) - - return hex.EncodeToString(hash) == signature + hash := pbkdf2.Key([]byte(url), signingKey, iterations, keyLen, sha512.New) + return hex.EncodeToString(hash) } func getSigningKey(ctx context.Context, s storepb.StoreService, credential string) ([]byte, error) { diff --git a/pkg/middleware/presigned_url_test.go b/pkg/middleware/presigned_url_test.go new file mode 100644 index 0000000000..0e41d78ddb --- /dev/null +++ b/pkg/middleware/presigned_url_test.go @@ -0,0 +1,121 @@ +package middleware + +import ( + "net/http/httptest" + "testing" + "time" +) + +func TestIsSignedRequest(t *testing.T) { + tests := []struct { + url string + expected bool + }{ + {"https://example.com/example.jpg", false}, + {"https://example.com/example.jpg?OC-Signature=something", true}, + } + + for _, tt := range tests { + r := httptest.NewRequest("", tt.url, nil) + result := isSignedRequest(r) + if result != tt.expected { + t.Errorf("with %s expected %t got %t", tt.url, tt.expected, result) + } + } +} + +func TestAllRequiredParametersPresent(t *testing.T) { + baseURL := "https://example.com/example.jpg?" + tests := []struct { + params string + expected bool + }{ + {"OC-Signature=something&OC-Credential=something&OC-Date=something&OC-Expires=something&OC-Verb=something", true}, + {"OC-Credential=something&OC-Date=something&OC-Expires=something&OC-Verb=something", false}, + {"OC-Signature=something&OC-Date=something&OC-Expires=something&OC-Verb=something", false}, + {"OC-Signature=something&OC-Credential=something&OC-Expires=something&OC-Verb=something", false}, + {"OC-Signature=something&OC-Credential=something&OC-Date=something&OC-Verb=something", false}, + {"OC-Signature=something&OC-Credential=something&OC-Date=something&OC-Expires=something", false}, + } + for _, tt := range tests { + r := httptest.NewRequest("", baseURL+tt.params, nil) + result := allRequiredParametersArePresent(r) + if result != tt.expected { + t.Errorf("with %s expected %t got %t", tt.params, tt.expected, result) + } + } +} + +func TestRequestMethodMatches(t *testing.T) { + tests := []struct { + method string + url string + expected bool + }{ + {"GET", "https://example.com/example.jpg?OC-Verb=GET", true}, + {"GET", "https://example.com/example.jpg?OC-Verb=get", true}, + {"POST", "https://example.com/example.jpg?OC-Verb=GET", false}, + } + + for _, tt := range tests { + r := httptest.NewRequest(tt.method, tt.url, nil) + result := requestMethodMatches(r) + if result != tt.expected { + t.Errorf("with method %s and url %s expected %t got %t", tt.method, tt.url, tt.expected, result) + } + } +} + +func TestRequestMethodIsAllowed(t *testing.T) { + tests := []struct { + method string + allowed []string + expected bool + }{ + {"GET", []string{}, false}, + {"GET", []string{"POST"}, false}, + {"GET", []string{"GET"}, true}, + {"GET", []string{"get"}, true}, + {"GET", []string{"POST", "GET"}, true}, + } + + for _, tt := range tests { + result := requestMethodIsAllowed(tt.method, tt.allowed) + if result != tt.expected { + t.Errorf("with method %s and allowed methods %s expected %t got %t", tt.method, tt.allowed, tt.expected, result) + } + } +} + +func TestUrlIsExpired(t *testing.T) { + nowFunc := func() time.Time { + t, _ := time.Parse(time.RFC3339, "2020-08-19T15:12:43.478Z") + return t + } + + tests := []struct { + url string + expected bool + }{ + {"http://example.com/example.jpg?OC-Date=2020-08-19T15:02:43.478Z&OC-Expires=1200", false}, + {"http://example.com/example.jpg?OC-Date=invalid&OC-Expires=1200", true}, + {"http://example.com/example.jpg?OC-Date=2020-08-19T15:02:43.478Z&OC-Expires=invalid", true}, + } + + for _, tt := range tests { + r := httptest.NewRequest("", tt.url, nil) + result := urlIsExpired(r, nowFunc) + if result != tt.expected { + t.Errorf("with %s expected %t got %t", tt.url, tt.expected, result) + } + } +} + +func TestCreateSignature(t *testing.T) { + expected := "27d2ebea381384af3179235114801dcd00f91e46f99fca72575301cf3948101d" + s := createSignature("something", []byte("somerandomkey")) + + if s != expected { + t.Fail() + } +} From 97f228b17faad20aca97dec9d0a42b276214e4d0 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 20 Aug 2020 10:08:59 +0000 Subject: [PATCH 191/213] Automated changelog update [skip ci] --- CHANGELOG.md | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c6a1e551..9ada5fa98e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Enhancement - Add numeric uid and gid to the access token: [#89](https://github.com/owncloud/ocis-proxy/pull/89) +* Enhancement - Add configuration options for the pre-signed url middleware: [#91](https://github.com/owncloud/ocis-proxy/issues/91) ## Details @@ -17,6 +18,15 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/89 + +* Enhancement - Add configuration options for the pre-signed url middleware: [#91](https://github.com/owncloud/ocis-proxy/issues/91) + + Added an option to define allowed http methods for pre-signed url requests. This is useful + since we only want clients to GET resources and don't upload anything with presigned requests. + + https://github.com/owncloud/ocis-proxy/issues/91 + https://github.com/owncloud/product/issues/150 + # Changelog for [0.6.0] (2020-08-17) The following sections list the changes for ocis-proxy 0.6.0. @@ -299,7 +309,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -333,11 +343,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -368,22 +394,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 3a4075cad2f4b53a9f801ef1c06eac09b6848649 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 21 Aug 2020 10:32:57 +0200 Subject: [PATCH 192/213] prepare release 0.7.0 Signed-off-by: David Christofas --- changelog/{unreleased => 0.7.0_2020-08-21}/mint-uid-and-gid.md | 0 .../pre-signed-url-configuration.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename changelog/{unreleased => 0.7.0_2020-08-21}/mint-uid-and-gid.md (100%) rename changelog/{unreleased => 0.7.0_2020-08-21}/pre-signed-url-configuration.md (100%) diff --git a/changelog/unreleased/mint-uid-and-gid.md b/changelog/0.7.0_2020-08-21/mint-uid-and-gid.md similarity index 100% rename from changelog/unreleased/mint-uid-and-gid.md rename to changelog/0.7.0_2020-08-21/mint-uid-and-gid.md diff --git a/changelog/unreleased/pre-signed-url-configuration.md b/changelog/0.7.0_2020-08-21/pre-signed-url-configuration.md similarity index 100% rename from changelog/unreleased/pre-signed-url-configuration.md rename to changelog/0.7.0_2020-08-21/pre-signed-url-configuration.md From 5f82d1e88a2ae9c8f46eee3ac7dc3c9503e62ad9 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 21 Aug 2020 09:07:16 +0000 Subject: [PATCH 193/213] Automated changelog update [skip ci] --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ada5fa98e..1890a67adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [0.7.0] (2020-08-21) -The following sections list the changes for ocis-proxy unreleased. +The following sections list the changes for ocis-proxy 0.7.0. -[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.6.0...master +[0.7.0]: https://github.com/owncloud/ocis-proxy/compare/v0.6.0...v0.7.0 ## Summary From f7c7fd161032ad256787f1516642158517d42c71 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 14:24:26 +0000 Subject: [PATCH 194/213] Automated changelog update [skip ci] --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1890a67adc..2a58ef6c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for ocis-proxy unreleased. + +[unreleased]: https://github.com/owncloud/ocis-proxy/compare/v0.7.0...master + +## Summary + +* Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) + +## Details + +* Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) + + We had the ocis-settings API and app endpoints in the builtin config already, but they were + missing in the example config. Added them for consistency. + + https://github.com/owncloud/ocis-proxy/pull/93 + # Changelog for [0.7.0] (2020-08-21) The following sections list the changes for ocis-proxy 0.7.0. From 1581b0f6b416f3812574597b5ee81acfaffc1537 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 15:22:46 +0200 Subject: [PATCH 195/213] Add ocis-hello endpoints to builtin and example config --- config/proxy-example.json | 8 ++++++++ pkg/proxy/proxy.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/config/proxy-example.json b/config/proxy-example.json index 68c2fe3083..ed7c1a68c6 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -79,6 +79,14 @@ { "endpoint": "/settings.js", "backend": "http://localhost:9190" + }, + { + "endpoint": "/api/v0/greet", + "backend": "http://localhost:9105" + }, + { + "endpoint": "/hello.js", + "backend": "http://localhost:9105" } ] }, diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index a489bae027..6c22cb73b1 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -305,6 +305,14 @@ func defaultPolicies() []config.Policy { Endpoint: "/settings.js", Backend: "http://localhost:9190", }, + { + Endpoint: "/api/v0/greet", + Backend: "http://localhost:9105", + }, + { + Endpoint: "/hello.js", + Backend: "http://localhost:9105", + }, }, }, { From 3cbba6dcba4af3f2295791c70ab5245e5cfc4d87 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 15:30:14 +0200 Subject: [PATCH 196/213] Add changelog --- changelog/unreleased/hello-in-example-config.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/hello-in-example-config.md diff --git a/changelog/unreleased/hello-in-example-config.md b/changelog/unreleased/hello-in-example-config.md new file mode 100644 index 0000000000..e57f7227e5 --- /dev/null +++ b/changelog/unreleased/hello-in-example-config.md @@ -0,0 +1,5 @@ +Enhancement: Add hello API and app endpoints to example config and builtin config + +We added the ocis-hello API and app endpoints to both the example config and the builtin config. + +https://github.com/owncloud/ocis-proxy/pull/96 From abaa1b441f41729800aa7b7374bff140ef928f02 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 15:45:44 +0200 Subject: [PATCH 197/213] Add assigned roles to access token --- go.mod | 18 +- go.sum | 488 ++++++++++++++++++++++++++++++++- pkg/command/server.go | 16 +- pkg/middleware/account_uuid.go | 24 ++ pkg/middleware/options.go | 9 + 5 files changed, 529 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index c61cb27846..dd58191b84 100644 --- a/go.mod +++ b/go.mod @@ -3,29 +3,29 @@ module github.com/owncloud/ocis-proxy go 1.13 require ( - contrib.go.opencensus.io/exporter/jaeger v0.2.0 + contrib.go.opencensus.io/exporter/jaeger v0.2.1 contrib.go.opencensus.io/exporter/ocagent v0.7.0 contrib.go.opencensus.io/exporter/zipkin v0.1.1 github.com/coreos/go-oidc v2.2.1+incompatible - github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543 - github.com/cs3org/reva v0.1.0 + github.com/cs3org/go-cs3apis v0.0.0-20200730121022-c4f3d4f7ddfd + github.com/cs3org/reva v1.1.0 github.com/justinas/alice v1.2.0 github.com/micro/cli/v2 v2.1.2 - github.com/micro/go-micro/v2 v2.6.0 + github.com/micro/go-micro/v2 v2.9.1 github.com/oklog/run v1.1.0 github.com/openzipkin/zipkin-go v0.2.2 github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e - github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204 + github.com/owncloud/ocis-pkg/v2 v2.4.0 + github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5 github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b - github.com/prometheus/client_golang v1.7.0 + github.com/prometheus/client_golang v1.7.1 github.com/restic/calens v0.2.0 github.com/spf13/viper v1.7.0 go.opencensus.io v0.22.4 - golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 + golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - google.golang.org/grpc v1.29.1 - gopkg.in/square/go-jose.v2 v2.4.0 // indirect + google.golang.org/grpc v1.31.0 ) replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 diff --git a/go.sum b/go.sum index a9edc2b27a..d7c0a1cdd9 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= +cloud.google.com/go v0.40.0/go.mod h1:Tk58MuI9rbLMKlAjeO/bDnteAx7tX2gJIXw4T5Jwlro= +cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -24,6 +26,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk= contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= +contrib.go.opencensus.io/exporter/jaeger v0.2.1 h1:yGBYzYMewVL0yO9qqJv3Z5+IRhPdU7e9o/2oKpX4YvI= +contrib.go.opencensus.io/exporter/jaeger v0.2.1/go.mod h1:Y8IsLgdxqh1QxYxPC5IgXVmBaeLUeQFfBeBi9PbeZd0= contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/ocagent v0.6.0 h1:Z1n6UAyr0QwM284yUuh5Zd8JlvxUGAhFZcgMJkMPrGM= @@ -31,6 +35,7 @@ contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeS contrib.go.opencensus.io/exporter/ocagent v0.7.0 h1:BEfdCTXfMV30tLZD8c9n64V/tIZX5+9sXiuFLnrr1k8= contrib.go.opencensus.io/exporter/ocagent v0.7.0/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= +contrib.go.opencensus.io/exporter/prometheus v0.2.0/go.mod h1:TYmVAyE8Tn1lyPcltF5IYYfWp2KHu7lQGIZnj8iZMys= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g= contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc= @@ -59,27 +64,36 @@ github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocm github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= +github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CiscoM31/godata v0.0.0-20191007193734-c2c4ebb1b415/go.mod h1:tjaihnMBH6p5DVnGBksDQQHpErbrLvb9ek6cEWuyc7E= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= +github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= +github.com/Masterminds/sprig/v3 v3.1.0 h1:j7GpgZ7PdFqNsmncycTHsLmVPf5/3wJtlgW9TNDYD9Y= +github.com/Masterminds/sprig/v3 v3.1.0/go.mod h1:ONGMf7UfYGAbMXCZmQLy8x3lCDIPrEZE/rU8pmrbihA= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -89,9 +103,11 @@ github.com/RoaringBitmap/roaring v0.4.21/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06 github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/UnnoTed/fileb0x v1.1.4 h1:IUgFzgBipF/ujNx9wZgkrKOF3oltUuXMSoaejrBws+A= github.com/UnnoTed/fileb0x v1.1.4/go.mod h1:X59xXT18tdNk/D6j+KZySratBsuKJauMtVuJ9cgOiZs= github.com/abbot/go-http-auth v0.4.1-0.20181019201920-860ed7f246ff/go.mod h1:Cz6ARTIzApMJDzh5bRMSUou6UMSp0IEXg9km/ci7TJM= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= @@ -123,6 +139,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU= github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g= @@ -131,9 +148,13 @@ github.com/asim/go-bson v0.0.0-20160318195205-84522947cabd/go.mod h1:L59ZX7HuzTb github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.20.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.23.19/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.31/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.29.26/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.33.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -156,9 +177,11 @@ github.com/blevesearch/zap/v11 v11.0.9/go.mod h1:47hzinvmY2EvvJruzsSCJpro7so8L1n github.com/blevesearch/zap/v12 v12.0.9/go.mod h1:paQuvxy7yXor+0Mx8p2KNmJgygQbQNN+W6HRfL5Hvwc= github.com/blevesearch/zap/v13 v13.0.1/go.mod h1:XmyNLMvMf8Z5FjLANXwUeDW3e1+o77TTGUWrth7T9WI= github.com/blevesearch/zap/v14 v14.0.0/go.mod h1:sUc/gPGJlFbSQ2ZUh/wGRYwkKx+Dg/5p+dd+eq6QMXk= +github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= @@ -167,8 +190,11 @@ github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2w github.com/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.1/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/caddyserver/certmagic v0.10.6/go.mod h1:Y8jcUBctgk/IhpAzlHKfimZNyXCkfGgRTC0orl8gROQ= +github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -184,9 +210,14 @@ github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -229,12 +260,15 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cs3org/cato v0.0.0-20200626150132-28a40e643719/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GEw3FtXPxc5wxGpaw2pxzREg1GBV9LIQ= github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543 h1:ykZiNI0yHDdIJPI4L+VB6inTUBJh9t9AZLDeXq7/8+Q= -github.com/cs3org/go-cs3apis v0.0.0-20200611124600-7a1be2026543/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/go-cs3apis v0.0.0-20200730121022-c4f3d4f7ddfd h1:uMaudkC7znaiIKT9rxIhoRYzrhTg1Nc78X7XEqhmjSk= +github.com/cs3org/go-cs3apis v0.0.0-20200730121022-c4f3d4f7ddfd/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v0.1.0 h1:PYzDejKm/+xG3OTS2WgzBxcksVogEGmPgjJVegwSR2c= github.com/cs3org/reva v0.1.0/go.mod h1:8j6QyyAq9Kjj7RPfJb7M1aEmw5DmsuCJKUULXxYOyRo= +github.com/cs3org/reva v1.1.0 h1:Gih6ECHvMMGSx523SFluFlDmNMuhYelXYShdWvjvW38= +github.com/cs3org/reva v1.1.0/go.mod h1:fBzTrNuAKdQ62ybjpdu8nyhBin90/3/3s6DGQDCdBp4= github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= github.com/cznic/strutil v0.0.0-20181122101858-275e90344537/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= @@ -254,10 +288,13 @@ github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -273,12 +310,15 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/eventials/go-tus v0.0.0-20200718001131-45c7ec8f5d59/go.mod h1:XYuK1S5+kS6FGhlIUFuZFPvWiSrOIoLk6+ro33Xce3Y= github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c/go.mod h1:pFdJbAhRf7rh6YYMUdIQGyzne6zYL1tCUW8QV2B3UfY= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -292,6 +332,7 @@ github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+ github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc= github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -301,9 +342,15 @@ github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1T github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= github.com/go-acme/lego/v3 v3.3.0/go.mod h1:iGSY2vQrvQs3WezicSB/oVbO2eCrD88dpWPwb1qLqu0= +github.com/go-acme/lego/v3 v3.4.0/go.mod h1:xYbLDuxq3Hy4bMUT1t9JIuz6GWIWb3m5X+TeTHYaT7M= +github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/chi v4.1.0+incompatible h1:ETj3cggsVIY2Xao5ExCu6YhEh5MD6JTfcBzS37R260w= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= +github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= @@ -315,6 +362,8 @@ github.com/go-git/go-git-fixtures/v4 v4.0.1 h1:q+IFMfLx200Q3scvt2hN79JsEzy4AmBTp github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnpg= github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= +github.com/go-git/go-git/v5 v5.1.0 h1:HxJn9g/E7eYvKW3Fm7Jt4ee8LXfPOm/H1cdDu8vEssk= +github.com/go-git/go-git/v5 v5.1.0/go.mod h1:ZKfuPUoY1ZqIG4QG9BDBh3G4gLM5zvPuSJAozQrZuyM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -323,22 +372,26 @@ github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-ldap/ldap/v3 v3.2.3/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-ozzo/ozzo-validation/v4 v4.2.1 h1:XALUNshPYumA7UShB7iM3ZVlqIBn0jfwjqAMIoyE1N0= github.com/go-ozzo/ozzo-validation/v4 v4.2.1/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-redsync/redsync v1.3.1/go.mod h1:qxZwM5JOimfq8y98Wk2+c8dKtxJgG5/yIl2ODz2E5Dk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -348,11 +401,180 @@ github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3a github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8= github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= +github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= +github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= +github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= +github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= +github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= +github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= +github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= +github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= +github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= +github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= +github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= +github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= +github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= +github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= +github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= +github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= +github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= +github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= +github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= +github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= +github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= +github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= +github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= +github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= +github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= +github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= +github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= +github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= +github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= +github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= +github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= +github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= +github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= +github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= +github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= +github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= +github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= +github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= +github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= +github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= +github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= +github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= +github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= +github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= +github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= +github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= +github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= +github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= +github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= +github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= +github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= +github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= +github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= +github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= +github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= +github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= +github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= +github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= +github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= +github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= +github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= +github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= +github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= +github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= +github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= +github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= +github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= +github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= +github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= +github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= +github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= +github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= +github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= +github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= +github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= +github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= +github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= +github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= +github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= +github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= +github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= +github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= +github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= +github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= +github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= +github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= +github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= +github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= +github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= +github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= +github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= +github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= +github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= +github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= +github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= +github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= +github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= +github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= +github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= +github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= +github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= +github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= +github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= +github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= +github.com/gobuffalo/packr v1.22.0/go.mod h1:Qr3Wtxr3+HuQEwWqlLnNW4t1oTvK+7Gc/Rnoi/lDFvA= +github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= +github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= +github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= +github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= +github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= +github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= +github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= +github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= +github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= +github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= +github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= +github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= +github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= +github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= +github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= +github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= +github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= +github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= +github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= +github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= +github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= +github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= +github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= +github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= +github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= +github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= +github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= +github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= +github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= +github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= +github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= +github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= +github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -361,12 +583,15 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/gddo v0.0.0-20180828051604-96d2a289f41e/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= +github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -376,6 +601,7 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -392,6 +618,7 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -420,6 +647,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= @@ -438,18 +666,26 @@ github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORR github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= +github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -487,6 +723,7 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -511,6 +748,8 @@ github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbc github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo= github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= @@ -519,7 +758,11 @@ github.com/ikawaha/kagome.ipadic v1.1.2/go.mod h1:DPSBbU0czaJhAb/5uKQZHMc9MTVRpD github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= +github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= @@ -527,7 +770,11 @@ github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4Fw github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -550,6 +797,9 @@ github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSg github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= +github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= +github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= +github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= @@ -559,8 +809,10 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw= github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -568,6 +820,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -575,10 +828,13 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/labstack/echo v3.2.1+incompatible h1:J2M7YArHx4gi8p/3fDw8tX19SXhBCoRpviyAZSN3I88= github.com/labstack/echo v3.2.1+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.2.7 h1:2qOPq/twXDrQ6ooBGrn3mrmVOC+biLlatwgIu8lbzRM= github.com/labstack/gommon v0.2.7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -587,24 +843,54 @@ github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVL github.com/lucas-clemente/quic-go v0.12.1/go.mod h1:UXJJPE4RfFef/xPO5wQm0tITK8gNfqwTxjbE7s3Vb8s= github.com/lucas-clemente/quic-go v0.13.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= +github.com/luna-duclos/instrumentedsql v1.1.2/go.mod h1:4LGbEqDnopzNAiyxPPDXhLspyunZxgPTMJBKtC6U0BQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= +github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= +github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= +github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= +github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= +github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= +github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= +github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= +github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= +github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= +github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= +github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/goveralls v0.0.5/go.mod h1:Xg2LHi51faXLyKXwsndxiW6uxEEQT9+3sjGzzwU4xy0= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ= @@ -623,12 +909,19 @@ github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95 github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE= github.com/micro/go-micro/v2 v2.6.0 h1:HH6uEqTu6pkBtAlwAqQW2sf33640iEa1s9puGIctpO0= github.com/micro/go-micro/v2 v2.6.0/go.mod h1:60HMKlDN4ShZDJRrlgdcAmkCWNhQbYv+CDG3r7iLE34= +github.com/micro/go-micro/v2 v2.9.1 h1:+S9koIrNWARjpP6k2TZ7kt0uC9zUJtNXzIdZTZRms7Q= +github.com/micro/go-micro/v2 v2.9.1/go.mod h1:x55ZM3Puy0FyvvkR3e0ha0xsE9DFwfPSUMWAIbFY0SY= +github.com/micro/go-plugins v1.5.1 h1:swcFD7ynCTUo98APqIEIbPu2XMd6yVGTnI8PqdnCwOQ= github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4= github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0= +github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.9.1 h1:IaZUsLp0Omb/ozDnRKEvVY56C0UocBdPxxg2S2Pk2j0= +github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.9.1/go.mod h1:26UmOLM/I487NqTg3n6zJiBrYmIb684M2Zp4WH98XzU= github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE= github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc= github.com/micro/micro v1.16.0/go.mod h1:TO5Ng0KidbfRYIxVM4Q3deZ0A+qwRyP9WeXp+k2fWNA= github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE= +github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -646,17 +939,26 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI= github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -665,6 +967,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= @@ -696,14 +999,17 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= github.com/nrdcg/dnspod-go v0.3.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= +github.com/nrdcg/dnspod-go v0.4.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito= github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g= @@ -718,6 +1024,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -728,13 +1036,24 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0= github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8= +github.com/ory/fosite v0.32.2/go.mod h1:UeBhRgW6nAjTcd8S7kAo0IFsY/rTPyOXPq/t8N20Q8I= +github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4= +github.com/ory/go-acc v0.2.1/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0= github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs= +github.com/ory/gojsonreference v0.0.0-20190720135523-6b606c2d8ee8/go.mod h1:wsH1C4nIeeQClDtD5AH7kF1uTS6zWyqfjVDTmB0Em7A= +github.com/ory/gojsonschema v1.1.1-0.20190919112458-f254ca73d5e9/go.mod h1:BNZpdJgB74KOLSsWFvzw6roXg1I6O51WO8roMmW+T7Y= +github.com/ory/herodot v0.6.2/go.mod h1:3BOneqcyBsVybCPAJoi92KN2BpJHcmDqAMcAAaJiJow= +github.com/ory/viper v1.5.6/go.mod h1:TYmpFpKLxjQwvT4f0QPpkOn4sDXU1kDgAwJpgLYiQ28= +github.com/ory/x v0.0.85/go.mod h1:s44V8t3xyjWZREcU+mWlp4h302rTuM4aLXcW+y5FbQ8= github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww= github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw= @@ -748,10 +1067,14 @@ github.com/owncloud/ocis-pkg/v2 v2.2.1 h1:LK7WxHYugEFQ9NHTOz0EP8DRjbt51wXhyqruV0 github.com/owncloud/ocis-pkg/v2 v2.2.1/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw= github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c h1:hYhKSfMkPO4kRLrKqRHPmePGTCpGDGji+s4yW30+tmM= github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200527082518-5641fa4a4c8c/go.mod h1:s894msGwDsULmsROHkbsXFCP/eSqDcteDFUntZOiJdc= -github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204 h1:q0/LzJr+G/BX8nRUVsnUBbEE1vMybuOyQesz57QW3F4= -github.com/owncloud/ocis-pkg/v2 v2.2.2-0.20200811112628-2151a60cc204/go.mod h1:s894msGwDsULmsROHkbsXFCP/eSqDcteDFUntZOiJdc= +github.com/owncloud/ocis-pkg/v2 v2.4.0 h1:/3ZOd4txtwjiNKJA9iLT9BjrJw5YgHSX13fQR4BYfGY= +github.com/owncloud/ocis-pkg/v2 v2.4.0/go.mod h1:FSzIvhx9HcZcq4jgNaDowNvM7PTX/XCyoMvyfzidUpE= github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc= github.com/owncloud/ocis-settings v0.0.0-20200629120229-69693c5f8f43/go.mod h1:AeXZVHKEU+9Xt4+/lkHE5rx+sJH2if9dIrUGLhe+JOY= +github.com/owncloud/ocis-settings v0.3.0 h1:w1wdqJiMtRNJ5B7sQemvtFQQod31G6dR468GxAV0Y2g= +github.com/owncloud/ocis-settings v0.3.0/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= +github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5 h1:nkgYnHBFmh7EJn1U21K0/t3gnnDlXcPnOj6Jw8jL1gE= +github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b h1:tjfH02oEawuMdMt3pJdCjFyuWgNRUjV7rdjoTF56Mrw= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b/go.mod h1:7WRMnx4ffwtckNl4qD2Gj/d5fvl84jyydOV2FbUUu3A= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= @@ -765,6 +1088,8 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -790,8 +1115,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= -github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -816,8 +1141,10 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/statsd_exporter v0.15.0/go.mod h1:Dv8HnkoLQkeEjkIE4/2ndAA7WL1zHKK7WMqFQqu72rw= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -828,7 +1155,11 @@ github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo= @@ -837,6 +1168,7 @@ github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/rs/zerolog v1.19.0 h1:hYz4ZVdUgjXTBUmrkrw55j1nHx68LfOKIQk5IYtyScg= github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/rubenv/sql-migrate v0.0.0-20190212093014-1007f53448d7/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -847,15 +1179,31 @@ github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIH github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= +github.com/santhosh-tekuri/jsonschema/v2 v2.1.0/go.mod h1:yzJzKUGV4RbWqWIBBP4wSOBqavX5saE02yirLS0OTyg= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/analytics-go v3.0.1+incompatible/go.mod h1:C7CYBtQWk4vRk2RyLu0qOcbHJ18E3F1HV2C/8JvKN48= +github.com/segmentio/backo-go v0.0.0-20160424052352-204274ad699c/go.mod h1:kJ9mm9YmoWSkk+oQ+5Cj8DEoRCX2JT6As4kEtIIOp1M= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= +github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= +github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= +github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -871,19 +1219,31 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= +github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= @@ -906,7 +1266,10 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8= +github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -914,7 +1277,10 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/tebeka/snowball v0.4.2/go.mod h1:4IfL14h1lvwZcp1sfXuuc7/7yCsvVffTWxWxCLfFpYg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= +github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= @@ -927,15 +1293,26 @@ github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4 github.com/tredoe/fileutil v1.0.0/go.mod h1:PBayWPFCURwkmW0u6E8E8C6Jtd9ZzWq/U1iMa6BLRPg= github.com/tredoe/goutil v0.0.0-20200111155331-68cefb6d3cdc/go.mod h1:dp4VPOLeEFYbsf1ikgd+uytWDnpCdMiTHMg6mh7hHuQ= github.com/tredoe/osutil v1.0.5/go.mod h1:DDO4G4Mwys6NJi5JmEVLnfFbQWIfVVri8L6HuXb/v98= +github.com/tus/tusd v1.1.0/go.mod h1:3DWPOdeCnjBwKtv98y5dSws3itPqfce5TVa0s59LRiA= +github.com/tus/tusd v1.1.1-0.20200416115059-9deabf9d80c2/go.mod h1:ygrT4B9ZSb27dx3uTnobX5nOFDnutBL6iWKLH4+KpA0= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= +github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= +github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 h1:gKMu1Bf6QINDnvyZuTaACm9ofY+PRh+5vFz4oxBZeF8= github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= +github.com/vimeo/go-util v1.2.0/go.mod h1:s13SMDTSO7AjH1nbgp707mfN5JFIWUFDU5MDDuRRtKs= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= @@ -951,9 +1328,12 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -965,6 +1345,7 @@ go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= @@ -990,12 +1371,23 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= gocloud.dev v0.17.0/go.mod h1:tIHTRdR1V5dlD8sTkzYdTGizBJ314BDykJ8KmadEXwo= gocloud.dev/pubsub/rabbitpubsub v0.17.0/go.mod h1:7o1XYDiIC+b0mmcwJuofsDg08t0DtU2ubfn7C/Uz7Y0= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180830192347-182538f80094/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1019,8 +1411,12 @@ golang.org/x/crypto v0.0.0-20200320181102-891825fb96df h1:lDWgvUvNnaTnNBc/dwOty8 golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1057,13 +1453,20 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1101,6 +1504,8 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 h1:eDrdRpKgkcCqKZQwyZRyeFZgfqt37SL7Kv3tok06cKE= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1119,19 +1524,36 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181021155630-eda9bb28ed51/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1162,7 +1584,9 @@ golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1192,8 +1616,30 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqG golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1205,7 +1651,9 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190711191110-9a621aea19f8/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1223,6 +1671,7 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200113040837-eac381796e91/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1235,10 +1684,14 @@ golang.org/x/tools v0.0.0-20200427214658-4697a2867c88 h1:Nj7oNnL9tSACMt2JvszZN6P golang.org/x/tools v0.0.0-20200427214658-4697a2867c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200526224456-8b020aee10d2 h1:21BqcH/onxtGHn1A2GDOJjZnbt4Nlez629S3eaR+eYs= golang.org/x/tools v0.0.0-20200526224456-8b020aee10d2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200811215021-48a8ffc5b207 h1:8Kg+JssU1jBZs8GIrL5pl4nVyaqyyhdmHAR4D1zGErg= +golang.org/x/tools v0.0.0-20200811215021-48a8ffc5b207/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1255,6 +1708,8 @@ google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.25.0 h1:LodzhlzZEUfhXzNUMIfVlf9Gr6Ua5MMtoFWh7+f47qA= google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1273,6 +1728,8 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -1309,7 +1766,9 @@ google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEG google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/Acconut/lockfile.v1 v1.1.0/go.mod h1:6UCz3wJ8tSFUsPR6uP/j8uegEtDuEEqFxlpi0JI4Umw= gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= @@ -1326,10 +1785,13 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= +gopkg.in/h2non/gock.v1 v1.0.14/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1343,6 +1805,7 @@ gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ= +gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU= @@ -1351,8 +1814,8 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.4.0 h1:0kXPskUMGAXXWJlP05ktEMOV0vmzFQUWw6d+aZJQU8A= -gopkg.in/square/go-jose.v2 v2.4.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.0 h1:OZ4sdq+Y+SHfYB7vfthi1Ei8b0vkP8ZPQgUfUwdUSqo= +gopkg.in/square/go-jose.v2 v2.5.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= @@ -1371,6 +1834,9 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1380,6 +1846,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.0.20200427215036-cd1ad299aeab/go.mod h1:NELv708mC2Q9lQf29l+sO/v7NIOAQzEXu7jcugNzwvM= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k= +honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE= k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= k8s.io/apimachinery v0.0.0-20191111054156-6eb29fdf75dc/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s= diff --git a/pkg/command/server.go b/pkg/command/server.go index a02019fa42..d782e294d0 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -10,16 +10,11 @@ import ( "strings" "time" - "github.com/coreos/go-oidc" - "github.com/justinas/alice" - "github.com/owncloud/ocis-pkg/v2/log" - "github.com/owncloud/ocis-proxy/pkg/cs3" - "github.com/owncloud/ocis-proxy/pkg/middleware" - "golang.org/x/oauth2" - "contrib.go.opencensus.io/exporter/jaeger" "contrib.go.opencensus.io/exporter/ocagent" "contrib.go.opencensus.io/exporter/zipkin" + "github.com/coreos/go-oidc" + "github.com/justinas/alice" "github.com/micro/cli/v2" mclient "github.com/micro/go-micro/v2/client" "github.com/micro/go-micro/v2/client/grpc" @@ -27,15 +22,20 @@ import ( openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" + "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-proxy/pkg/config" + "github.com/owncloud/ocis-proxy/pkg/cs3" "github.com/owncloud/ocis-proxy/pkg/flagset" "github.com/owncloud/ocis-proxy/pkg/metrics" + "github.com/owncloud/ocis-proxy/pkg/middleware" "github.com/owncloud/ocis-proxy/pkg/proxy" "github.com/owncloud/ocis-proxy/pkg/server/debug" proxyHTTP "github.com/owncloud/ocis-proxy/pkg/server/http" + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" storepb "github.com/owncloud/ocis-store/pkg/proto/v0" "go.opencensus.io/stats/view" "go.opencensus.io/trace" + "golang.org/x/oauth2" ) // Server is the entrypoint for the server command. @@ -258,11 +258,13 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic // TODO this won't work with a registry other than mdns. Look into Micro's client initialization. // https://github.com/owncloud/ocis-proxy/issues/38 accounts := acc.NewAccountsService("com.owncloud.api.accounts", mclient.DefaultClient) + roles := settings.NewRoleService("com.owncloud.api.settings", mclient.DefaultClient) uuidMW := middleware.AccountUUID( middleware.Logger(l), middleware.TokenManagerConfig(cfg.TokenManager), middleware.AccountsClient(accounts), + middleware.SettingsRoleService(roles), ) // the connection will be established in a non blocking fashion diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 24cb60d227..e813b48b74 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -2,7 +2,9 @@ package middleware import ( "context" + "encoding/json" "fmt" + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "net/http" "strconv" "strings" @@ -146,6 +148,17 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { groups[i] = account.MemberOf[i].OnPremisesSamAccountName } + // fetch active roles from ocis-settings + assignmentResponse, err := opt.SettingsRoleService.ListRoleAssignments(r.Context(), &settings.ListRoleAssignmentsRequest{AccountUuid: account.Id}) + roleIDs := make([]string, 0) + if err != nil { + l.Err(err).Str("accountID", account.Id).Msg("failed to fetch role assignments") + } else { + for _, assignment := range assignmentResponse.Assignments { + roleIDs = append(roleIDs, assignment.RoleId) + } + } + l.Debug().Interface("claims", claims).Interface("account", account).Msgf("Associated claims with uuid") user := &revauser.User{ Id: &revauser.UserId{ @@ -171,6 +184,17 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { Value: []byte(strconv.FormatInt(account.GidNumber, 10)), } + // encode roleIDs as json string + roleIDsJson, jsonErr := json.Marshal(roleIDs) + if jsonErr != nil { + l.Err(jsonErr).Str("accountID", account.Id).Msg("failed to marshal roleIDs into json") + } else { + user.Opaque.Map["roles"] = &types.OpaqueEntry{ + Decoder: "json", + Value: roleIDsJson, + } + } + token, err := tokenManager.MintToken(r.Context(), user) if err != nil { diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index 21e7c8949d..79058ef483 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -1,6 +1,7 @@ package middleware import ( + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "net/http" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" @@ -23,6 +24,8 @@ type Options struct { HTTPClient *http.Client // AccountsClient for resolving accounts AccountsClient acc.AccountsService + // SettingsRoleService for the roles API in settings + SettingsRoleService settings.RoleService // OIDCProviderFunc to lazily initialize a provider, must be set for the oidcProvider middleware OIDCProviderFunc func() (OIDCProvider, error) // OIDCIss is the oidc-issuer @@ -74,6 +77,12 @@ func AccountsClient(ac acc.AccountsService) Option { } } +func SettingsRoleService(rc settings.RoleService) Option { + return func(o *Options) { + o.SettingsRoleService = rc + } +} + // OIDCProviderFunc provides a function to set the the oidc provider function option. func OIDCProviderFunc(f func() (OIDCProvider, error)) Option { return func(o *Options) { From 311502bede7d017b470916a98f87c382dfd5a4a9 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 15:49:47 +0200 Subject: [PATCH 198/213] Add changelog --- changelog/unreleased/mint-roles.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/mint-roles.md diff --git a/changelog/unreleased/mint-roles.md b/changelog/unreleased/mint-roles.md new file mode 100644 index 0000000000..947663163f --- /dev/null +++ b/changelog/unreleased/mint-roles.md @@ -0,0 +1,5 @@ +Enhancement: Add roleIDs to the access token + +We are using the roleIDs of the authenticated user for permission checks against ocis-settings. We added the roleIDs to the access token to have them available quickly. + +https://github.com/owncloud/ocis-proxy/pull/95 From 4ee0c269f611c5ec1bb2c0afd0fb788efa463490 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 20:23:20 +0200 Subject: [PATCH 199/213] Make linter happy --- pkg/middleware/account_uuid.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index e813b48b74..881e30edfd 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -185,13 +185,13 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler { } // encode roleIDs as json string - roleIDsJson, jsonErr := json.Marshal(roleIDs) + roleIDsJSON, jsonErr := json.Marshal(roleIDs) if jsonErr != nil { l.Err(jsonErr).Str("accountID", account.Id).Msg("failed to marshal roleIDs into json") } else { user.Opaque.Map["roles"] = &types.OpaqueEntry{ Decoder: "json", - Value: roleIDsJson, + Value: roleIDsJSON, } } From 7fb35517683f2ea6f091bce6b6a75492f4454c6e Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 21:27:19 +0200 Subject: [PATCH 200/213] Update ocis-settings to current master --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index dd58191b84..2a6afcf6b6 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e github.com/owncloud/ocis-pkg/v2 v2.4.0 - github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5 + github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1 github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b github.com/prometheus/client_golang v1.7.1 github.com/restic/calens v0.2.0 diff --git a/go.sum b/go.sum index d7c0a1cdd9..b528ec55e3 100644 --- a/go.sum +++ b/go.sum @@ -1075,6 +1075,8 @@ github.com/owncloud/ocis-settings v0.3.0 h1:w1wdqJiMtRNJ5B7sQemvtFQQod31G6dR468G github.com/owncloud/ocis-settings v0.3.0/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5 h1:nkgYnHBFmh7EJn1U21K0/t3gnnDlXcPnOj6Jw8jL1gE= github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= +github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1 h1:mI8zZni05KYJqsdsbhVtswWt5q+kbLJ9gtlPoGE0jSY= +github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b h1:tjfH02oEawuMdMt3pJdCjFyuWgNRUjV7rdjoTF56Mrw= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b/go.mod h1:7WRMnx4ffwtckNl4qD2Gj/d5fvl84jyydOV2FbUUu3A= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= From 3cc1c874dfe10ee462a280c66f0b2f5034c181e9 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 27 Aug 2020 21:29:30 +0200 Subject: [PATCH 201/213] Add comment on exported function --- pkg/middleware/options.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/middleware/options.go b/pkg/middleware/options.go index 79058ef483..a67ba5e28a 100644 --- a/pkg/middleware/options.go +++ b/pkg/middleware/options.go @@ -77,6 +77,7 @@ func AccountsClient(ac acc.AccountsService) Option { } } +// SettingsRoleService provides a function to set the role service option. func SettingsRoleService(rc settings.RoleService) Option { return func(o *Options) { o.SettingsRoleService = rc From c900bf7d19c69590bdfcb713775b1fa46fcb962f Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 15:23:33 +0200 Subject: [PATCH 202/213] Mock role service in account uuid tests --- go.mod | 2 +- go.sum | 2 ++ pkg/middleware/account_uuid_test.go | 28 +++++++++++++++++++--------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 2a6afcf6b6..f1a8865a8b 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/owncloud/flaex v0.2.0 github.com/owncloud/ocis-accounts v0.1.2-0.20200618163128-aa8ae58dd95e github.com/owncloud/ocis-pkg/v2 v2.4.0 - github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1 + github.com/owncloud/ocis-settings v0.3.2-0.20200828130413-0cc0f5bf26fe github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b github.com/prometheus/client_golang v1.7.1 github.com/restic/calens v0.2.0 diff --git a/go.sum b/go.sum index b528ec55e3..b1aedda8d2 100644 --- a/go.sum +++ b/go.sum @@ -1077,6 +1077,8 @@ github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5 h1:nkgYnH github.com/owncloud/ocis-settings v0.3.2-0.20200827134219-0f9e141699e5/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1 h1:mI8zZni05KYJqsdsbhVtswWt5q+kbLJ9gtlPoGE0jSY= github.com/owncloud/ocis-settings v0.3.2-0.20200827192608-ad983f1e85c1/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= +github.com/owncloud/ocis-settings v0.3.2-0.20200828130413-0cc0f5bf26fe h1:kiU5lz12R0LNJE1/zI2vxesZPWm6BvSO7hvZC8yOoAc= +github.com/owncloud/ocis-settings v0.3.2-0.20200828130413-0cc0f5bf26fe/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b h1:tjfH02oEawuMdMt3pJdCjFyuWgNRUjV7rdjoTF56Mrw= github.com/owncloud/ocis-store v0.0.0-20200716140351-f9670592fb7b/go.mod h1:7WRMnx4ffwtckNl4qD2Gj/d5fvl84jyydOV2FbUUu3A= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index 7241fa901c..ea5893abce 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -3,6 +3,7 @@ package middleware import ( "context" "fmt" + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "net/http" "net/http/httptest" "testing" @@ -35,6 +36,7 @@ func TestAccountUUIDMiddleware(t *testing.T) { Logger(log.NewLogger()), TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), AccountsClient(mockAccountUUIDMiddlewareAccSvc(false, true)), + SettingsRoleService(mockAccountUUIDMiddlewareRolesSvc(false)), )(next) r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) @@ -55,6 +57,7 @@ func TestAccountUUIDMiddlewareWithDisabledAccount(t *testing.T) { Logger(log.NewLogger()), TokenManagerConfig(config.TokenManager{JWTSecret: "secret"}), AccountsClient(mockAccountUUIDMiddlewareAccSvc(false, false)), + SettingsRoleService(mockAccountUUIDMiddlewareRolesSvc(false)), )(next) r := httptest.NewRequest(http.MethodGet, "http://www.example.com", nil) @@ -72,16 +75,11 @@ func TestAccountUUIDMiddlewareWithDisabledAccount(t *testing.T) { } func mockAccountUUIDMiddlewareAccSvc(retErr, accEnabled bool) proto.AccountsService { - if retErr { - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return nil, fmt.Errorf("error returned by mockAccountsService LIST") - }, - } - } - return &proto.MockAccountsService{ ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + if retErr { + return nil, fmt.Errorf("error returned by mockAccountsService LIST") + } return &proto.ListAccountsResponse{ Accounts: []*proto.Account{ { @@ -92,5 +90,17 @@ func mockAccountUUIDMiddlewareAccSvc(retErr, accEnabled bool) proto.AccountsServ }, nil }, } - +} + +func mockAccountUUIDMiddlewareRolesSvc(returnError bool) settings.RoleService { + return &settings.MockRoleService{ + ListRoleAssignmentsFunc: func(ctx context.Context, req *settings.ListRoleAssignmentsRequest, opts ...client.CallOption) (res *settings.ListRoleAssignmentsResponse, err error) { + if returnError { + return nil, fmt.Errorf("error returned by mockRoleService.ListRoleAssignments") + } + return &settings.ListRoleAssignmentsResponse{ + Assignments: []*settings.UserRoleAssignment{}, + }, nil + }, + } } From bc4e1532e97fe4f74a9af39c6099bf48c0558b5e Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 17:03:08 +0200 Subject: [PATCH 203/213] Fix import sorting --- pkg/middleware/account_uuid_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/middleware/account_uuid_test.go b/pkg/middleware/account_uuid_test.go index ea5893abce..0debfb7d58 100644 --- a/pkg/middleware/account_uuid_test.go +++ b/pkg/middleware/account_uuid_test.go @@ -3,7 +3,6 @@ package middleware import ( "context" "fmt" - settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "net/http" "net/http/httptest" "testing" @@ -13,6 +12,7 @@ import ( "github.com/owncloud/ocis-pkg/v2/log" "github.com/owncloud/ocis-pkg/v2/oidc" "github.com/owncloud/ocis-proxy/pkg/config" + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" ) // TODO testing the getAccount method should inject a cache From 7d24bb391fb01b406d0bb08bb6ae9644ecab228c Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 15:14:39 +0000 Subject: [PATCH 204/213] Automated changelog update [skip ci] --- CHANGELOG.md | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a58ef6c18..dabdbf8266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) +* Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) ## Details @@ -17,6 +18,14 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/93 + +* Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) + + We are using the roleIDs of the authenticated user for permission checks against + ocis-settings. We added the roleIDs to the access token to have them available quickly. + + https://github.com/owncloud/ocis-proxy/pull/95 + # Changelog for [0.7.0] (2020-08-21) The following sections list the changes for ocis-proxy 0.7.0. @@ -328,7 +337,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 ## Summary @@ -362,27 +371,11 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 ## Summary @@ -413,6 +406,22 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From cdecdeb2abfa490b028848a78f31e099c325df29 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 15:21:59 +0000 Subject: [PATCH 205/213] Automated changelog update [skip ci] --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dabdbf8266..81caea89fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -337,7 +337,7 @@ The following sections list the changes for ocis-proxy 0.3.1. The following sections list the changes for ocis-proxy 0.3.0. -[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.3.0 +[0.3.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.3.0 ## Summary @@ -371,11 +371,27 @@ The following sections list the changes for ocis-proxy 0.3.0. https://github.com/owncloud/ocis-proxy/issues/4 +# Changelog for [0.2.1] (2020-03-25) + +The following sections list the changes for ocis-proxy 0.2.1. + +[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.2.0...v0.2.1 + +## Summary + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + +## Details + +* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) + + https://github.com/owncloud/ocis-proxy/pull/25 + # Changelog for [0.2.0] (2020-03-25) The following sections list the changes for ocis-proxy 0.2.0. -[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.2.1...v0.2.0 +[0.2.0]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.0 ## Summary @@ -406,22 +422,6 @@ The following sections list the changes for ocis-proxy 0.2.0. https://github.com/owncloud/ocis-proxy/pull/14 -# Changelog for [0.2.1] (2020-03-25) - -The following sections list the changes for ocis-proxy 0.2.1. - -[0.2.1]: https://github.com/owncloud/ocis-proxy/compare/v0.1.0...v0.2.1 - -## Summary - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - -## Details - -* Bugfix - Set TLS-Certificate correctly: [#25](https://github.com/owncloud/ocis-proxy/pull/25) - - https://github.com/owncloud/ocis-proxy/pull/25 - # Changelog for [0.1.0] (2020-03-18) The following sections list the changes for ocis-proxy 0.1.0. From 34c13b31bdae033547f26de5ca5fe68384ec1d91 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 28 Aug 2020 18:10:14 +0200 Subject: [PATCH 206/213] Fix readme filename --- Readme.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Readme.md => README.md (100%) diff --git a/Readme.md b/README.md similarity index 100% rename from Readme.md rename to README.md From db95804af53dce6f73803ffa477e7e5eaef1573a Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 2 Sep 2020 11:51:44 +0000 Subject: [PATCH 207/213] Automated changelog update [skip ci] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81caea89fa..d56ae8b25a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary * Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) +* Enhancement - Add hello API and app endpoints to example config and builtin config: [#96](https://github.com/owncloud/ocis-proxy/pull/96) * Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) ## Details @@ -19,6 +20,13 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/93 +* Enhancement - Add hello API and app endpoints to example config and builtin config: [#96](https://github.com/owncloud/ocis-proxy/pull/96) + + We added the ocis-hello API and app endpoints to both the example config and the builtin config. + + https://github.com/owncloud/ocis-proxy/pull/96 + + * Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) We are using the roleIDs of the authenticated user for permission checks against From 214dbc4a48c674eac0e96b89f0831af5d5111e70 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 4 Sep 2020 15:11:54 +0200 Subject: [PATCH 208/213] Fix director selection Instead of overwriting the director on each request, provide function for director selection. On concurrent requests the previous implementation could have caused situations where the request was performed on a wrong director. --- pkg/proxy/proxy.go | 102 +++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 6c22cb73b1..1c750a305b 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -35,6 +35,7 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { logger: options.Logger, config: options.Config, } + rp.Director = rp.directorSelectionDirector if options.Config.Policies == nil { rp.logger.Info().Str("source", "runtime").Msg("Policies") @@ -87,6 +88,61 @@ func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy { return rp } +func (p *MultiHostReverseProxy) directorSelectionDirector(r *http.Request) { + pol, err := p.PolicySelector(r.Context(), r) + if err != nil { + p.logger.Error().Msgf("Error while selecting pol %v", err) + return + } + + if _, ok := p.Directors[pol]; !ok { + p.logger. + Error(). + Msgf("policy %v is not configured", pol) + return + } + + // find matching director + for _, rt := range config.RouteTypes { + var handler func(string, url.URL) bool + switch rt { + case config.QueryRoute: + handler = p.queryRouteMatcher + case config.RegexRoute: + handler = p.regexRouteMatcher + case config.PrefixRoute: + fallthrough + default: + handler = p.prefixRouteMatcher + } + for endpoint := range p.Directors[pol][rt] { + if handler(endpoint, *r.URL) { + p.logger. + Debug(). + Str("policy", pol). + Str("prefix", endpoint). + Str("path", r.URL.Path). + Str("routeType", string(rt)). + Msg("director found") + p.Directors[pol][rt][endpoint](r) + return + } + } + } + + // override default director with root. If any + if p.Directors[pol][config.PrefixRoute]["/"] != nil { + p.Directors[pol][config.PrefixRoute]["/"](r) + return + } + + p.logger. + Warn(). + Str("policy", pol). + Str("path", r.URL.Path). + Msg("no director found") +} + func singleJoiningSlash(a, b string) string { aslash := strings.HasSuffix(a, "/") bslash := strings.HasPrefix(b, "/") @@ -135,18 +191,6 @@ func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt confi } func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { - var hit bool - pol, err := p.PolicySelector(r.Context(), r) - if err != nil { - p.logger.Error().Msgf("Error while selecting pol %v", err) - } - - if _, ok := p.Directors[pol]; !ok { - p.logger. - Error(). - Msgf("policy %v is not configured", pol) - } - ctx := context.Background() var span *trace.Span @@ -157,40 +201,6 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request p.propagator.SpanContextToRequest(span.SpanContext(), r) } -Loop: - for _, rt := range config.RouteTypes { - var handler func(string, url.URL) bool - switch rt { - case config.QueryRoute: - handler = p.queryRouteMatcher - case config.RegexRoute: - handler = p.regexRouteMatcher - case config.PrefixRoute: - fallthrough - default: - handler = p.prefixRouteMatcher - } - for endpoint := range p.Directors[pol][rt] { - if handler(endpoint, *r.URL) { - p.Director = p.Directors[pol][rt][endpoint] - hit = true - p.logger. - Debug(). - Str("policy", pol). - Str("prefix", endpoint). - Str("path", r.URL.Path). - Str("routeType", string(rt)). - Msg("director found") - break Loop - } - } - } - - // override default director with root. If any - if !hit && p.Directors[pol][config.PrefixRoute]["/"] != nil { - p.Director = p.Directors[pol][config.PrefixRoute]["/"] - } - // Call upstream ServeHTTP p.ReverseProxy.ServeHTTP(w, r.WithContext(ctx)) } From 678db5dcd9e5545225174bea048b5d06360c4741 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 4 Sep 2020 15:15:50 +0200 Subject: [PATCH 209/213] Changelog --- changelog/unreleased/fix-director-selection.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/fix-director-selection.md diff --git a/changelog/unreleased/fix-director-selection.md b/changelog/unreleased/fix-director-selection.md new file mode 100644 index 0000000000..7dc94742d9 --- /dev/null +++ b/changelog/unreleased/fix-director-selection.md @@ -0,0 +1,5 @@ +Bugfix: Fix director selection + +We fixed a bug where simultaneous requests could be executed on the wrong backend. + +https://github.com/owncloud/ocis-proxy/pull/99 From fcceec602fcbb4636969955e114439be6982234f Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 4 Sep 2020 13:28:06 +0000 Subject: [PATCH 210/213] Automated changelog update [skip ci] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d56ae8b25a..73ddb2de2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,20 @@ The following sections list the changes for ocis-proxy unreleased. ## Summary +* Bugfix - Fix director selection: [#99](https://github.com/owncloud/ocis-proxy/pull/99) * Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) * Enhancement - Add hello API and app endpoints to example config and builtin config: [#96](https://github.com/owncloud/ocis-proxy/pull/96) * Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) ## Details +* Bugfix - Fix director selection: [#99](https://github.com/owncloud/ocis-proxy/pull/99) + + We fixed a bug where simultaneous requests could be executed on the wrong backend. + + https://github.com/owncloud/ocis-proxy/pull/99 + + * Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) We had the ocis-settings API and app endpoints in the builtin config already, but they were From 2eacbf6b4226481f0bdf89ff645f391bcbcabc98 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Mon, 7 Sep 2020 11:45:36 +0200 Subject: [PATCH 211/213] Get rid of cache in account_uuid middleware Accounts can be changed. In that case the cache entries would need to be invalidated. Since we are keeping accounts in an in-memory index within ocis-accounts anyway, we can get rid of this kind of optimization for now. --- pkg/middleware/account_uuid.go | 69 ++++++++++++---------------------- 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/pkg/middleware/account_uuid.go b/pkg/middleware/account_uuid.go index 881e30edfd..1b98eed053 100644 --- a/pkg/middleware/account_uuid.go +++ b/pkg/middleware/account_uuid.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "net/http" "strconv" "strings" @@ -14,55 +13,35 @@ import ( "github.com/cs3org/reva/pkg/token/manager/jwt" acc "github.com/owncloud/ocis-accounts/pkg/proto/v0" "github.com/owncloud/ocis-pkg/v2/log" - oidc "github.com/owncloud/ocis-pkg/v2/oidc" + "github.com/owncloud/ocis-pkg/v2/oidc" + settings "github.com/owncloud/ocis-settings/pkg/proto/v0" ) func getAccount(l log.Logger, ac acc.AccountsService, query string) (account *acc.Account, status int) { - entry, err := svcCache.Get(AccountsKey, query) + resp, err := ac.ListAccounts(context.Background(), &acc.ListAccountsRequest{ + Query: query, + PageSize: 2, + }) + if err != nil { - l.Debug().Msgf("No cache entry for %s", query) - resp, err := ac.ListAccounts(context.Background(), &acc.ListAccountsRequest{ - Query: query, - PageSize: 2, - }) - - if err != nil { - l.Error().Err(err).Str("query", query).Msgf("Error fetching from accounts-service") - status = http.StatusInternalServerError - return - } - - if len(resp.Accounts) <= 0 { - l.Error().Str("query", query).Msgf("Account not found") - status = http.StatusNotFound - return - } - - // TODO provision account - - if len(resp.Accounts) > 1 { - l.Error().Str("query", query).Msgf("More than one account found. Not logging user in.") - status = http.StatusForbidden - return - } - - err = svcCache.Set(AccountsKey, query, *resp.Accounts[0]) - if err != nil { - l.Err(err).Str("query", query).Msgf("Could not cache user") - status = http.StatusInternalServerError - return - } - - account = resp.Accounts[0] - } else { - l.Debug().Msgf("using cache entry for %s", query) - a, ok := entry.V.(acc.Account) // TODO how can we directly point to the cached account? - if !ok { - status = http.StatusInternalServerError - return - } - account = &a + l.Error().Err(err).Str("query", query).Msgf("Error fetching from accounts-service") + status = http.StatusInternalServerError + return } + + if len(resp.Accounts) <= 0 { + l.Error().Str("query", query).Msgf("Account not found") + status = http.StatusNotFound + return + } + + if len(resp.Accounts) > 1 { + l.Error().Str("query", query).Msgf("More than one account found. Not logging user in.") + status = http.StatusForbidden + return + } + + account = resp.Accounts[0] return } From fb0ecd7e50dcac41275a6f77bd281b2fc9d1472c Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Mon, 7 Sep 2020 11:50:05 +0200 Subject: [PATCH 212/213] Changelog --- changelog/unreleased/remove-account-caching.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/remove-account-caching.md diff --git a/changelog/unreleased/remove-account-caching.md b/changelog/unreleased/remove-account-caching.md new file mode 100644 index 0000000000..378117d625 --- /dev/null +++ b/changelog/unreleased/remove-account-caching.md @@ -0,0 +1,5 @@ +Change: Remove accounts caching + +We removed the accounts cache in order to avoid problems with accounts that have been updated in the accounts service. + +https://github.com/owncloud/ocis-proxy/pull/100 From 201b9a652685cdfb72ba81c7e7b00ba1c60a0e35 Mon Sep 17 00:00:00 2001 From: Alex Unger Date: Mon, 7 Sep 2020 10:54:49 +0000 Subject: [PATCH 213/213] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73ddb2de2c..b70f3a7d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The following sections list the changes for ocis-proxy unreleased. * Bugfix - Fix director selection: [#99](https://github.com/owncloud/ocis-proxy/pull/99) * Bugfix - Add settings API and app endpoints to example config: [#93](https://github.com/owncloud/ocis-proxy/pull/93) +* Change - Remove accounts caching: [#100](https://github.com/owncloud/ocis-proxy/pull/100) * Enhancement - Add hello API and app endpoints to example config and builtin config: [#96](https://github.com/owncloud/ocis-proxy/pull/96) * Enhancement - Add roleIDs to the access token: [#95](https://github.com/owncloud/ocis-proxy/pull/95) @@ -28,6 +29,14 @@ The following sections list the changes for ocis-proxy unreleased. https://github.com/owncloud/ocis-proxy/pull/93 +* Change - Remove accounts caching: [#100](https://github.com/owncloud/ocis-proxy/pull/100) + + We removed the accounts cache in order to avoid problems with accounts that have been updated in + the accounts service. + + https://github.com/owncloud/ocis-proxy/pull/100 + + * Enhancement - Add hello API and app endpoints to example config and builtin config: [#96](https://github.com/owncloud/ocis-proxy/pull/96) We added the ocis-hello API and app endpoints to both the example config and the builtin config.