Compare commits
304
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d071a30714 | ||
|
|
a2681cb654 | ||
|
|
480d148446 | ||
|
|
f3f8977c74 | ||
|
|
e2d21edaa4 | ||
|
|
f6c02716ad | ||
|
|
25da2eb1b5 | ||
|
|
ef8726b5e9 | ||
|
|
a2d5de07b8 | ||
|
|
11a9899735 | ||
|
|
34b2971cb9 | ||
|
|
a713c90841 | ||
|
|
068078a47b | ||
|
|
c1d01303d2 | ||
|
|
54de444c29 | ||
|
|
68a6370821 | ||
|
|
0e1d9b990f | ||
|
|
b7d4f2b331 | ||
|
|
0571467cf6 | ||
|
|
ffe75747d3 | ||
|
|
8c43c647f0 | ||
|
|
c338d32222 | ||
|
|
9c33e4216b | ||
|
|
2f38e551eb | ||
|
|
4246ab1d11 | ||
|
|
b5c582aa2d | ||
|
|
70000ac6c1 | ||
|
|
34e755943a | ||
|
|
a5accb2ce9 | ||
|
|
9109f8843a | ||
|
|
60d3962ee4 | ||
|
|
8f14fdae1c | ||
|
|
ad62e230a6 | ||
|
|
e3e3d1ee57 | ||
|
|
81408a3568 | ||
|
|
122822a87e | ||
|
|
c37800eb72 | ||
|
|
19a51a4402 | ||
|
|
d961decd64 | ||
|
|
08641a8e45 | ||
|
|
3fd070061d | ||
|
|
c067da5496 | ||
|
|
771b870753 | ||
|
|
a73fd54b85 | ||
|
|
0d34ed55f0 | ||
|
|
51526e1983 | ||
|
|
1256671d28 | ||
|
|
d91d4933cf | ||
|
|
6a4c6c7c7b | ||
|
|
7be72efddd | ||
|
|
be1c190a56 | ||
|
|
2be06820de | ||
|
|
216a62cf2e | ||
|
|
ddf62111b0 | ||
|
|
e8e5a8a41e | ||
|
|
1cdd3b1699 | ||
|
|
5b3af35804 | ||
|
|
c35a0f7553 | ||
|
|
7a8c513cf7 | ||
|
|
581bcae709 | ||
|
|
d85def9b88 | ||
|
|
48accc6419 | ||
|
|
f5bbdbe1eb | ||
|
|
1eac1099ae | ||
|
|
f8b0f69dd0 | ||
|
|
a7dc0ce196 | ||
|
|
c907e249cb | ||
|
|
a33b0049fc | ||
|
|
20ab79deb4 | ||
|
|
09e821178b | ||
|
|
0837a36ad8 | ||
|
|
e6ca10cbc4 | ||
|
|
dc5901b25c | ||
|
|
263ba13ffa | ||
|
|
5692f8effa | ||
|
|
57ae1b99ea | ||
|
|
7ee9300549 | ||
|
|
905a1e50e4 | ||
|
|
cfeb02b851 | ||
|
|
79e36f08ca | ||
|
|
8dbf0f27f4 | ||
|
|
5dcdac6680 | ||
|
|
a81a85e797 | ||
|
|
38acfb1dbd | ||
|
|
54d450eddd | ||
|
|
d21ca0658f | ||
|
|
b7ec12735b | ||
|
|
026da000dc | ||
|
|
f253f7bc8e | ||
|
|
76390f3d4f | ||
|
|
fbdcdf255c | ||
|
|
9130cd29f3 | ||
|
|
61d65daa89 | ||
|
|
18f2fd8f66 | ||
|
|
a6e70ef5e3 | ||
|
|
2e0c072d4a | ||
|
|
6d8517db75 | ||
|
|
7fb85fdecf | ||
|
|
25c516ab67 | ||
|
|
5ad7939b78 | ||
|
|
09412992fe | ||
|
|
7fee45d7b5 | ||
|
|
90bdddb664 | ||
|
|
0fc2efadf2 | ||
|
|
38d670f1b3 | ||
|
|
bc57d13489 | ||
|
|
a601a2f261 | ||
|
|
0e13b0668f | ||
|
|
222683d3cd | ||
|
|
4e4c42bca9 | ||
|
|
60eccf1f88 | ||
|
|
f3e5b6fac4 | ||
|
|
9cada56222 | ||
|
|
62ff1f1659 | ||
|
|
e6df1e466d | ||
|
|
98f11f31d9 | ||
|
|
41e84b6378 | ||
|
|
3bbbe79683 | ||
|
|
fe30c89383 | ||
|
|
0d8ef24c0b | ||
|
|
36be70c714 | ||
|
|
02b5a9d223 | ||
|
|
d9df4907f0 | ||
|
|
f5c763cbec | ||
|
|
dd6249b691 | ||
|
|
e221dfd8cb | ||
|
|
a706e55154 | ||
|
|
02f162c717 | ||
|
|
1befac2a8f | ||
|
|
43af041a04 | ||
|
|
889f37f37c | ||
|
|
3bc413b21f | ||
|
|
552a79c23f | ||
|
|
ca55576169 | ||
|
|
016bab9372 | ||
|
|
cfa915c8c6 | ||
|
|
8797cf3b5a | ||
|
|
c700ccab1f | ||
|
|
2b6e5c254b | ||
|
|
45a559f707 | ||
|
|
9c3fb1cf4c | ||
|
|
1708149820 | ||
|
|
1570e40221 | ||
|
|
70da20a777 | ||
|
|
f64ca1f6ba | ||
|
|
2601efb9fe | ||
|
|
846df226de | ||
|
|
24347180fa | ||
|
|
c427e623ef | ||
|
|
c22d3fc24d | ||
|
|
fe61ad4154 | ||
|
|
3d80925a84 | ||
|
|
ad4fb0e0f9 | ||
|
|
872cd807e7 | ||
|
|
1d127c8ab2 | ||
|
|
592a91053b | ||
|
|
a34f5b6434 | ||
|
|
f53504158b | ||
|
|
ff611633f5 | ||
|
|
aa4112e2e2 | ||
|
|
c567eb6eea | ||
|
|
f87b5bd66c | ||
|
|
c7a43916e4 | ||
|
|
05825d8fe2 | ||
|
|
017eea8f2b | ||
|
|
9c7c2b6dc9 | ||
|
|
5fe1be8611 | ||
|
|
26db9afb8a | ||
|
|
7f652ae3b4 | ||
|
|
e139a09e49 | ||
|
|
d30e776deb | ||
|
|
7617ccaf41 | ||
|
|
f4085f6dac | ||
|
|
deba643a5b | ||
|
|
658bf9acce | ||
|
|
8c307ef2bf | ||
|
|
2aa9c2457e | ||
|
|
2ebc0b4a41 | ||
|
|
8c926f2b53 | ||
|
|
9a4df2f8ac | ||
|
|
0d7be0d6ad | ||
|
|
097c853894 | ||
|
|
d23ab5a01a | ||
|
|
cfbe37de61 | ||
|
|
fde5e35496 | ||
|
|
2b0f414b46 | ||
|
|
a22342ea28 | ||
|
|
242b3e9eb9 | ||
|
|
4db1697f89 | ||
|
|
b6066f361f | ||
|
|
732e04ca73 | ||
|
|
23836bbbbc | ||
|
|
9c2150422d | ||
|
|
4cecd9b5d2 | ||
|
|
5f19300aaa | ||
|
|
59f53390a8 | ||
|
|
582649b7d4 | ||
|
|
3580e16771 | ||
|
|
a29f10e764 | ||
|
|
202e63bcb6 | ||
|
|
34840d62e3 | ||
|
|
48eab0ccc7 | ||
|
|
e8559d17aa | ||
|
|
7eb2c25d65 | ||
|
|
c6191b7404 | ||
|
|
f118357a18 | ||
|
|
6391d94516 | ||
|
|
0d1c8accf2 | ||
|
|
cfc9738e51 | ||
|
|
9b8c3838e8 | ||
|
|
52d55390ab | ||
|
|
aa67106e04 | ||
|
|
04d8ec86ab | ||
|
|
b961817519 | ||
|
|
51bee0e531 | ||
|
|
713c0bb3d2 | ||
|
|
e4742fbb53 | ||
|
|
16bb92f89c | ||
|
|
ee03185b22 | ||
|
|
c335c4dc29 | ||
|
|
26aa37c2d7 | ||
|
|
7f557d3109 | ||
|
|
82a66b51d9 | ||
|
|
2c49ee6ab9 | ||
|
|
e7f9fb3bcb | ||
|
|
9d0809bd81 | ||
|
|
1d5488a3d5 | ||
|
|
e308992e85 | ||
|
|
c05c3db392 | ||
|
|
96033dc9b3 | ||
|
|
ef13618462 | ||
|
|
8f99fdc902 | ||
|
|
51dc1715ce | ||
|
|
261a800b6b | ||
|
|
6da95d3ddd | ||
|
|
3d90b21e3b | ||
|
|
bff4ec48b0 | ||
|
|
2dd9a7b14c | ||
|
|
8c2a681937 | ||
|
|
185cee04e9 | ||
|
|
b1de937c05 | ||
|
|
f76dfc9af1 | ||
|
|
23cfb909eb | ||
|
|
db9dc74555 | ||
|
|
e297142529 | ||
|
|
a515a97c8f | ||
|
|
22601de351 | ||
|
|
4c9e4713cf | ||
|
|
e8b9186ba3 | ||
|
|
d7828141f6 | ||
|
|
4999d4a04c | ||
|
|
0e9b6d8c52 | ||
|
|
74dae6dad9 | ||
|
|
835928b29b | ||
|
|
6f27c1a100 | ||
|
|
3206b98359 | ||
|
|
9466e01a3c | ||
|
|
a55a0395eb | ||
|
|
b94c0e683f | ||
|
|
8202f7b2ad | ||
|
|
99f28e601c | ||
|
|
ad72f7574c | ||
|
|
ca997e5bfc | ||
|
|
11855bcaab | ||
|
|
b44ebce526 | ||
|
|
17dbc3d5ee | ||
|
|
28b0b8fccd | ||
|
|
ff7022a256 | ||
|
|
be9eff8ba8 | ||
|
|
91c766210c | ||
|
|
ba1635165b | ||
|
|
da36ca8cde | ||
|
|
a76ad08d12 | ||
|
|
cfe1ac30af | ||
|
|
b61887aca1 | ||
|
|
e858fa0188 | ||
|
|
4194da4e88 | ||
|
|
3d46e27aae | ||
|
|
418cc97fb9 | ||
|
|
572e238dcd | ||
|
|
ebd34df703 | ||
|
|
7ac71b65f6 | ||
|
|
90844c5c84 | ||
|
|
ac373dd004 | ||
|
|
850fe65f4b | ||
|
|
09195ffc8c | ||
|
|
d54fc2f5b9 | ||
|
|
598944bb31 | ||
|
|
23d8c26b8a | ||
|
|
24b3363310 | ||
|
|
2a14bb362a | ||
|
|
2d7a394a30 | ||
|
|
ab1703c2e8 | ||
|
|
10731c3878 | ||
|
|
a767356bba | ||
|
|
7ca93450a2 | ||
|
|
20b6d0a635 | ||
|
|
7fa70d7d7e | ||
|
|
7df000d06f | ||
|
|
18b55367fa | ||
|
|
711acbb354 | ||
|
|
998df71ae3 | ||
|
|
94aeefb7fd | ||
|
|
34253fcae2 |
No files matched your search
@@ -12,8 +12,6 @@ exclude_paths:
|
||||
- 'idp/scripts/**'
|
||||
- 'settings/rollup.config.js'
|
||||
- 'accounts/rollup.config.js'
|
||||
- 'ocis/docker/eos-ocis/Dockerfile'
|
||||
- 'ocis/docker/eos-ocis-dev/Dockerfile'
|
||||
- 'deployments/**'
|
||||
- 'tests/acceptance/expected-failures-*.md'
|
||||
- 'tests/acceptance/features/bootstrap/**'
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
# The test runner source for API tests
|
||||
CORE_COMMITID=6a55f750d8a3f34c6c7772355f9281ffb8ffb4ca
|
||||
CORE_BRANCH=master
|
||||
CORE_COMMITID=4bbd91de68aefdf94c03d2920a3353702f856280
|
||||
CORE_BRANCH=acceptance-test-changes-waiting-2021-11
|
||||
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=82e69d203bfb44a2a652a4c052fe7ce795bb1100
|
||||
WEB_COMMITID=ed4a8b32240b59666a6c2b162d95b50ff7191eb8
|
||||
WEB_BRANCH=master
|
||||
+55
-83
@@ -1,4 +1,4 @@
|
||||
"""oCIS CI defintion
|
||||
"""oCIS CI definition
|
||||
"""
|
||||
|
||||
# images
|
||||
@@ -6,6 +6,7 @@ OC_CI_ALPINE = "owncloudci/alpine:latest"
|
||||
OC_CI_GOLANG = "owncloudci/golang:1.17"
|
||||
OC_CI_NODEJS = "owncloudci/nodejs:14"
|
||||
OC_CI_PHP = "owncloudci/php:7.4"
|
||||
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
|
||||
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
|
||||
|
||||
# configuration
|
||||
@@ -140,7 +141,6 @@ def main(ctx):
|
||||
|
||||
build_release_pipelines = \
|
||||
dockerReleases(ctx) + \
|
||||
[dockerEos(ctx)] + \
|
||||
binaryReleases(ctx) + \
|
||||
[releaseSubmodule(ctx)]
|
||||
|
||||
@@ -578,7 +578,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "webUITests",
|
||||
"image": OC_CI_NODEJS,
|
||||
@@ -595,6 +595,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
|
||||
"RUN_PART": runPart,
|
||||
"DIVIDE_INTO_NUM_PARTS": numberOfParts,
|
||||
"EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-webUI-on-%s-storage%s.md" % (storage.upper(), expectedFailuresFileFilterTags),
|
||||
"MIDDLEWARE_HOST": "http://middleware:3000",
|
||||
},
|
||||
"commands": [
|
||||
". /drone/src/.drone.env",
|
||||
@@ -616,7 +617,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
|
||||
}],
|
||||
},
|
||||
] + failEarly(ctx, early_fail),
|
||||
"services": selenium(),
|
||||
"services": selenium() + middlewareService(),
|
||||
"volumes": [pipelineVolumeOC10Tests] +
|
||||
[{
|
||||
"name": "uploads",
|
||||
@@ -644,7 +645,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "WebUIAcceptanceTests",
|
||||
"image": OC_CI_NODEJS,
|
||||
@@ -659,6 +660,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
|
||||
"WEB_PATH": "/srv/app/web",
|
||||
"FEATURE_PATH": "/drone/src/accounts/ui/tests/acceptance/features",
|
||||
"MIDDLEWARE_HOST": "http://middleware:3000",
|
||||
},
|
||||
"commands": [
|
||||
". /drone/src/.drone.env",
|
||||
@@ -679,7 +681,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
}],
|
||||
},
|
||||
] + failEarly(ctx, early_fail),
|
||||
"services": selenium(),
|
||||
"services": selenium() + middlewareService(),
|
||||
"volumes": [stepVolumeOC10Tests] +
|
||||
[{
|
||||
"name": "uploads",
|
||||
@@ -707,7 +709,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
|
||||
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||
{
|
||||
"name": "WebUIAcceptanceTests",
|
||||
"image": OC_CI_NODEJS,
|
||||
@@ -722,6 +724,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
|
||||
"WEB_PATH": "/srv/app/web",
|
||||
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
|
||||
"MIDDLEWARE_HOST": "http://middleware:3000",
|
||||
},
|
||||
"commands": [
|
||||
". /drone/src/.drone.env",
|
||||
@@ -747,7 +750,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
||||
"name": "redis",
|
||||
"image": "redis:6-alpine",
|
||||
},
|
||||
] + selenium(),
|
||||
] + selenium() + middlewareService(),
|
||||
"volumes": [stepVolumeOC10Tests] +
|
||||
[{
|
||||
"name": "uploads",
|
||||
@@ -783,7 +786,7 @@ def failEarly(ctx, early_fail):
|
||||
"image": "thegeeklab/drone-github-comment:1",
|
||||
"settings": {
|
||||
"message": ":boom: Acceptance test [<strong>${DRONE_STAGE_NAME}</strong>](${DRONE_BUILD_LINK}/${DRONE_STAGE_NUMBER}/1) failed. Further test are cancelled...",
|
||||
"key": "pr-${DRONE_PULL_REQUEST}", #TODO: we could delete the comment after a successfull CI run
|
||||
"key": "pr-${DRONE_PULL_REQUEST}", #TODO: we could delete the comment after a successful CI run
|
||||
"update": "true",
|
||||
"api_key": {
|
||||
"from_secret": "github_token",
|
||||
@@ -921,78 +924,6 @@ def dockerRelease(ctx, arch):
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
|
||||
def dockerEos(ctx):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "docker-eos-ocis",
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": skipIfUnchanged(ctx, "build-docker") +
|
||||
makeNodeGenerate("") +
|
||||
makeGoGenerate("") + [
|
||||
{
|
||||
"name": "build",
|
||||
"image": OC_CI_GOLANG,
|
||||
"commands": [
|
||||
"make -C ocis release-linux-docker-amd64",
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "dryrun-eos-ocis",
|
||||
"image": "plugins/docker:latest",
|
||||
"settings": {
|
||||
"dry_run": True,
|
||||
"context": "ocis",
|
||||
"tags": "linux-eos-ocis",
|
||||
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
||||
"repo": "owncloud/eos-ocis",
|
||||
},
|
||||
"when": {
|
||||
"ref": {
|
||||
"include": [
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "docker-eos-ocis",
|
||||
"image": "plugins/docker:latest",
|
||||
"settings": {
|
||||
"username": {
|
||||
"from_secret": "docker_username",
|
||||
},
|
||||
"password": {
|
||||
"from_secret": "docker_password",
|
||||
},
|
||||
"auto_tag": True,
|
||||
"context": "ocis",
|
||||
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
||||
"repo": "owncloud/eos-ocis",
|
||||
},
|
||||
"when": {
|
||||
"ref": {
|
||||
"exclude": [
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"depends_on": getPipelineNames(testOcisModules(ctx) + testPipelines(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/tags/v*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
|
||||
def binaryReleases(ctx):
|
||||
pipelines = []
|
||||
for os in config["binaryReleases"]["os"]:
|
||||
@@ -1490,6 +1421,38 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = []):
|
||||
},
|
||||
]
|
||||
|
||||
def middlewareService():
|
||||
return [{
|
||||
"name": "middleware",
|
||||
"image": "owncloud/owncloud-test-middleware",
|
||||
"pull": "always",
|
||||
"environment": {
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/storage/owncloud/",
|
||||
"RUN_ON_OCIS": "true",
|
||||
"HOST": "middleware",
|
||||
"REMOTE_UPLOAD_DIR": "/uploads",
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
|
||||
"MIDDLEWARE_HOST": "middleware",
|
||||
},
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"path": "/uploads",
|
||||
}, {
|
||||
"name": "gopath",
|
||||
"path": "/srv/app",
|
||||
}],
|
||||
}]
|
||||
|
||||
def waitForMiddlewareService():
|
||||
return [{
|
||||
"name": "wait-for-middleware-service",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it middleware:3000 -t 300",
|
||||
],
|
||||
}]
|
||||
|
||||
def cloneCoreRepos():
|
||||
return [
|
||||
{
|
||||
@@ -1532,6 +1495,15 @@ def selenium():
|
||||
},
|
||||
]
|
||||
|
||||
def waitForSeleniumService():
|
||||
return [{
|
||||
"name": "wait-for-selenium-service",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it selenium:4444 -t 300",
|
||||
],
|
||||
}]
|
||||
|
||||
def build():
|
||||
return [
|
||||
{
|
||||
@@ -1589,7 +1561,7 @@ def skipIfUnchanged(ctx, type):
|
||||
|
||||
def example_deploys(ctx):
|
||||
latest_configs = [
|
||||
"cs3_users_ocis/latest.yml",
|
||||
"ocis_ldap/latest.yml",
|
||||
"ocis_keycloak/latest.yml",
|
||||
"ocis_traefik/latest.yml",
|
||||
"ocis_wopi/latest.yml",
|
||||
@@ -1598,7 +1570,7 @@ def example_deploys(ctx):
|
||||
"oc10_ocis_parallel/latest.yml",
|
||||
]
|
||||
released_configs = [
|
||||
"cs3_users_ocis/released.yml",
|
||||
"ocis_ldap/released.yml",
|
||||
"ocis_keycloak/released.yml",
|
||||
"ocis_traefik/released.yml",
|
||||
"ocis_wopi/released.yml",
|
||||
|
||||
@@ -13,7 +13,6 @@ node_modules/
|
||||
ocis/ocis
|
||||
ocis/cmd/ocis/__debug_bin
|
||||
ocis/cmd/ocis/config/
|
||||
config/
|
||||
|
||||
.idea
|
||||
|
||||
|
||||
+6
-4
@@ -3,10 +3,12 @@ SKIP_CONFIG_DOCS_GENERATE ?= 0
|
||||
CONFIG_DOCS_BASE_PATH ?= ../docs/extensions
|
||||
|
||||
.PHONY: config-docs-generate
|
||||
config-docs-generate: $(FLAEX)
|
||||
@if [ $(SKIP_CONFIG_DOCS_GENERATE) -ne 1 ]; then \
|
||||
$(FLAEX) >| $(CONFIG_DOCS_BASE_PATH)/$(NAME)/configuration.md \
|
||||
; fi;
|
||||
config-docs-generate: #$(FLAEX)
|
||||
# since https://github.com/owncloud/ocis/pull/2708 flaex can no longer be used
|
||||
# TODO: how to document configuration
|
||||
# @if [ $(SKIP_CONFIG_DOCS_GENERATE) -ne 1 ]; then \
|
||||
# $(FLAEX) >| $(CONFIG_DOCS_BASE_PATH)/$(NAME)/configuration.md \
|
||||
# ; fi;
|
||||
|
||||
.PHONY: grpc-docs-generate
|
||||
grpc-docs-generate: buf-generate
|
||||
Vendored
+2
-2
@@ -20,6 +20,6 @@
|
||||
// set insecure options because we don't have valid certificates in dev environments
|
||||
"OCIS_INSECURE": "true",
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+127
@@ -1,3 +1,130 @@
|
||||
# Changelog for [unreleased] (UNRELEASED)
|
||||
|
||||
The following sections list the changes for unreleased.
|
||||
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v1.15.0...master
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Fix claim selector based routing for basic auth: [#2779](https://github.com/owncloud/ocis/pull/2779)
|
||||
* Bugfix - Disallow creation of a group with empty name via the OCS api: [#2825](https://github.com/owncloud/ocis/pull/2825)
|
||||
* Bugfix - Fix using s3ng as the metadata storage backend: [#2807](https://github.com/owncloud/ocis/pull/2807)
|
||||
* Bugfix - Use the CS3api up- and download workflow for the accounts service: [#2837](https://github.com/owncloud/ocis/pull/2837)
|
||||
* Change - Rename `APP_PROVIDER_BASIC_*` environment variables: [#2812](https://github.com/owncloud/ocis/pull/2812)
|
||||
* Change - Restructure Configuration Parsing: [#2708](https://github.com/owncloud/ocis/pull/2708)
|
||||
* Change - OIDC: fallback if IDP doesn't provide "preferred_username" claim: [#2644](https://github.com/owncloud/ocis/issues/2644)
|
||||
* Enhancement - Cleanup ocis-pkg config: [#2813](https://github.com/owncloud/ocis/pull/2813)
|
||||
* Enhancement - Correct shutdown of services under runtime: [#2843](https://github.com/owncloud/ocis/pull/2843)
|
||||
* Enhancement - Update REVA to v1.17.0: [#2849](https://github.com/owncloud/ocis/pull/2849)
|
||||
* Enhancement - Update ownCloud Web to v4.6.0: [#2846](https://github.com/owncloud/ocis/pull/2846)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Fix claim selector based routing for basic auth: [#2779](https://github.com/owncloud/ocis/pull/2779)
|
||||
|
||||
We've fixed the claim selector based routing for requests using basic auth. Previously
|
||||
requests using basic auth have always been routed to the DefaultPolicy when using the claim
|
||||
selector despite the set cookie because the basic auth middleware fakes some OIDC claims.
|
||||
|
||||
Now the cookie is checked before routing to the DefaultPolicy and therefore set cookie will
|
||||
also be respected for requests using basic auth.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2779
|
||||
|
||||
* Bugfix - Disallow creation of a group with empty name via the OCS api: [#2825](https://github.com/owncloud/ocis/pull/2825)
|
||||
|
||||
We've fixed the behavior for group creation on the OCS api, where it was possible to create a
|
||||
group with an empty name. This was is not possible on oC10 and is therefore also forbidden on oCIS
|
||||
to keep compatibility. This PR forbids the creation and also ensures the correct status code
|
||||
for both OCS v1 and OCS v2 apis.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2823
|
||||
https://github.com/owncloud/ocis/pull/2825
|
||||
|
||||
* Bugfix - Fix using s3ng as the metadata storage backend: [#2807](https://github.com/owncloud/ocis/pull/2807)
|
||||
|
||||
It is now possible to use s3ng as the metadata storage backend.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2668
|
||||
https://github.com/owncloud/ocis/pull/2807
|
||||
|
||||
* Bugfix - Use the CS3api up- and download workflow for the accounts service: [#2837](https://github.com/owncloud/ocis/pull/2837)
|
||||
|
||||
We've fixed the interaction of the accounts service with the metadata storage after bypassing
|
||||
the InitiateUpload and InitiateDownload have been removed from various storage drivers. The
|
||||
accounts service now uses the proper CS3apis workflow for up- and downloads.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2837
|
||||
https://github.com/cs3org/reva/pull/2309
|
||||
|
||||
* Change - Rename `APP_PROVIDER_BASIC_*` environment variables: [#2812](https://github.com/owncloud/ocis/pull/2812)
|
||||
|
||||
We've renamed the `APP_PROVIDER_BASIC_*` to `APP_PROVIDER_*` since the `_BASIC_` part is a
|
||||
copy and paste error. Now all app provider environment variables are consistently starting
|
||||
with `APP_PROVIDER_*`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2812
|
||||
https://github.com/owncloud/ocis/pull/2811
|
||||
|
||||
* Change - Restructure Configuration Parsing: [#2708](https://github.com/owncloud/ocis/pull/2708)
|
||||
|
||||
Tags: ocis
|
||||
|
||||
CLI flags are no longer needed for subcommands, as we rely solely on env variables and config
|
||||
files. This greatly simplifies configuration and deployment.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2708
|
||||
|
||||
* Change - OIDC: fallback if IDP doesn't provide "preferred_username" claim: [#2644](https://github.com/owncloud/ocis/issues/2644)
|
||||
|
||||
Some IDPs don't add the "preferred_username" claim. Fallback to the "email" claim in that case
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2644
|
||||
|
||||
* Enhancement - Cleanup ocis-pkg config: [#2813](https://github.com/owncloud/ocis/pull/2813)
|
||||
|
||||
Certain values were of no use when configuring the ocis runtime.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2813
|
||||
|
||||
* Enhancement - Correct shutdown of services under runtime: [#2843](https://github.com/owncloud/ocis/pull/2843)
|
||||
|
||||
Supervised goroutines now shut themselves down on context cancellation propagation.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2843
|
||||
|
||||
* Enhancement - Update REVA to v1.17.0: [#2849](https://github.com/owncloud/ocis/pull/2849)
|
||||
|
||||
Updated REVA to v1.17.0 This update includes:
|
||||
|
||||
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes `target` as absolute path
|
||||
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition header for public links files
|
||||
* Fix [cs3org/reva#2316](https://github.com/cs3org/reva/pull/2316): Fix the share types in propfinds
|
||||
* Fix [cs3org/reva#2803](https://github.com/cs3org/reva/pull/2803): Fix app provider for editor public links
|
||||
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298): Remove share refs from trashbin
|
||||
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Remove early finish for zero byte file uploads
|
||||
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): Fix TUS uploads with transfer token only
|
||||
* Chg [cs3org/reva#2210](https://github.com/cs3org/reva/pull/2210): Fix app provider new file creation and improved error codes
|
||||
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): OIDC auth driver for ESCAPE IAM
|
||||
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
|
||||
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315): Add new attributes to public link propfinds
|
||||
* Enh [cs3org/reva#2740](https://github.com/cs3org/reva/pull/2740): Implement space membership endpoints
|
||||
* Enh [cs3org/reva#2252](https://github.com/cs3org/reva/pull/2252): Add the xattr sys.acl to SysACL (eosgrpc)
|
||||
* Enh [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback if IDP doesn't provide "preferred_username" claim
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2849
|
||||
https://github.com/owncloud/ocis/pull/2835
|
||||
https://github.com/owncloud/ocis/pull/2837
|
||||
|
||||
* Enhancement - Update ownCloud Web to v4.6.0: [#2846](https://github.com/owncloud/ocis/pull/2846)
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v4.6.0. Please refer to the changelog (linked) for details on the web
|
||||
release.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2846
|
||||
https://github.com/owncloud/web/releases/tag/v4.6.0
|
||||
# Changelog for [1.15.0] (2021-11-19)
|
||||
|
||||
The following sections list the changes for 1.15.0.
|
||||
|
||||
@@ -4,5 +4,6 @@ import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
//go:generate make generate
|
||||
//go:embed assets/*
|
||||
var Assets embed.FS
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(config.New()); err != nil {
|
||||
if err := command.Execute(config.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,11 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
|
||||
"github.com/asim/go-micro/plugins/client/grpc/v4"
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -5,10 +5,11 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
|
||||
"github.com/asim/go-micro/plugins/client/grpc/v4"
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
|
||||
"github.com/asim/go-micro/plugins/client/grpc/v4"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -3,24 +3,16 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/thejerf/suture/v4"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultConfigPaths = []string{"/etc/ocis", "$HOME/.ocis", "./config"}
|
||||
defaultFilename = "accounts"
|
||||
)
|
||||
|
||||
// Execute is the entry point for the ocis-accounts command.
|
||||
func Execute(cfg *config.Config) error {
|
||||
app := &cli.App{
|
||||
@@ -28,16 +20,12 @@ func Execute(cfg *config.Config) error {
|
||||
Version: version.String,
|
||||
Usage: "Provide accounts and groups for oCIS",
|
||||
Compiled: version.Compiled(),
|
||||
|
||||
Authors: []*cli.Author{
|
||||
{
|
||||
Name: "ownCloud GmbH",
|
||||
Email: "support@owncloud.com",
|
||||
},
|
||||
},
|
||||
|
||||
Flags: flagset.RootWithConfig(cfg),
|
||||
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Server.Version = version.String
|
||||
return ParseConfig(c, cfg)
|
||||
@@ -68,60 +56,30 @@ func Execute(cfg *config.Config) 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("accounts"),
|
||||
log.Level(cfg.Log.Level),
|
||||
log.Pretty(cfg.Log.Pretty),
|
||||
log.Color(cfg.Log.Color),
|
||||
log.File(cfg.Log.File),
|
||||
)
|
||||
}
|
||||
|
||||
// ParseConfig loads accounts configuration from Viper known paths.
|
||||
// ParseConfig loads accounts configuration from known paths.
|
||||
func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
sync.ParsingViperConfig.Lock()
|
||||
defer sync.ParsingViperConfig.Unlock()
|
||||
logger := NewLogger(cfg)
|
||||
conf, err := ociscfg.BindSourcesToStructs("accounts", cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
viper.SetEnvPrefix("ACCOUNTS")
|
||||
viper.AutomaticEnv()
|
||||
|
||||
if c.IsSet("config-file") {
|
||||
viper.SetConfigFile(c.String("config-file"))
|
||||
} else {
|
||||
viper.SetConfigName(defaultFilename)
|
||||
|
||||
for _, v := range defaultConfigPaths {
|
||||
viper.AddConfigPath(v)
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &shared.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("Unsupported config type")
|
||||
default:
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("Failed to read config")
|
||||
}
|
||||
}
|
||||
// load all env variables relevant to the config in the current context.
|
||||
conf.LoadOSEnv(config.GetEnv(cfg), false)
|
||||
|
||||
if err := viper.Unmarshal(&cfg); err != nil {
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("Failed to parse config")
|
||||
}
|
||||
|
||||
return nil
|
||||
bindings := config.StructMappings(cfg)
|
||||
return ociscfg.BindEnv(conf, bindings)
|
||||
}
|
||||
|
||||
// SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree.
|
||||
@@ -131,10 +89,7 @@ type SutureService struct {
|
||||
|
||||
// NewSutureService creates a new accounts.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Accounts.Supervised = true
|
||||
}
|
||||
cfg.Accounts.Log.File = cfg.Log.File
|
||||
cfg.Accounts.Commons = cfg.Commons
|
||||
return SutureService{
|
||||
cfg: cfg.Accounts,
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
"github.com/owncloud/ocis/accounts/pkg/metrics"
|
||||
"github.com/owncloud/ocis/accounts/pkg/server/grpc"
|
||||
"github.com/owncloud/ocis/accounts/pkg/server/http"
|
||||
@@ -23,34 +22,21 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Name: "server",
|
||||
Usage: "Start ocis accounts service",
|
||||
Description: "uses an LDAP server as the storage backend",
|
||||
Flags: flagset.ServerWithConfig(cfg),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
|
||||
|
||||
// When running on single binary mode the before hook from the root command won't get called. We manually
|
||||
// call this before hook from ocis command, so the configuration can be loaded.
|
||||
if !cfg.Supervised {
|
||||
return ParseConfig(ctx, cfg)
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
if origins := ctx.StringSlice("cors-allowed-origins"); len(origins) != 0 {
|
||||
cfg.HTTP.CORS.AllowedOrigins = origins
|
||||
}
|
||||
if methods := ctx.StringSlice("cors-allowed-methods"); len(methods) != 0 {
|
||||
cfg.HTTP.CORS.AllowedMethods = methods
|
||||
}
|
||||
if headers := ctx.StringSlice("cors-allowed-headers"); len(headers) != 0 {
|
||||
cfg.HTTP.CORS.AllowedOrigins = headers
|
||||
}
|
||||
logger.Debug().Str("service", "accounts").Msg("ignoring config file parsing when running supervised")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
logger := log.LoggerFromConfig("accounts", *cfg.Log)
|
||||
err := tracing.Configure(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -97,10 +83,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
cancel()
|
||||
})
|
||||
|
||||
if !cfg.Supervised {
|
||||
sync.Trap(&gr, cancel)
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
|
||||
"github.com/asim/go-micro/plugins/client/grpc/v4"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/urfave/cli/v2"
|
||||
"google.golang.org/genproto/protobuf/field_mask"
|
||||
@@ -24,7 +25,6 @@ func UpdateAccount(cfg *config.Config) *cli.Command {
|
||||
Flags: flagset.UpdateAccountWithConfig(cfg, a),
|
||||
Before: func(c *cli.Context) error {
|
||||
if len(c.StringSlice("password_policies")) > 0 {
|
||||
// StringSliceFlag doesn't support Destination
|
||||
a.PasswordProfile.PasswordPolicies = c.StringSlice("password_policies")
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -17,7 +16,6 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListAccountsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name)
|
||||
|
||||
+147
-72
@@ -1,140 +1,141 @@
|
||||
// Package config should be moved to internal
|
||||
package config
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
)
|
||||
|
||||
// LDAP defines the available ldap configuration.
|
||||
type LDAP struct {
|
||||
Hostname string
|
||||
Port int
|
||||
BaseDN string
|
||||
UserFilter string
|
||||
GroupFilter string
|
||||
BindDN string
|
||||
BindPassword string
|
||||
IDP string
|
||||
Schema LDAPSchema
|
||||
Hostname string `ocisConfig:"hostname"`
|
||||
Port int `ocisConfig:"port"`
|
||||
BaseDN string `ocisConfig:"base_dn"`
|
||||
UserFilter string `ocisConfig:"user_filter"`
|
||||
GroupFilter string `ocisConfig:"group_filter"`
|
||||
BindDN string `ocisConfig:"bind_dn"`
|
||||
BindPassword string `ocisConfig:"bind_password"`
|
||||
IDP string `ocisConfig:"idp"`
|
||||
Schema LDAPSchema `ocisConfig:"schema"`
|
||||
}
|
||||
|
||||
// LDAPSchema defines the available ldap schema configuration.
|
||||
type LDAPSchema struct {
|
||||
AccountID string
|
||||
Identities string
|
||||
Username string
|
||||
DisplayName string
|
||||
Mail string
|
||||
Groups string
|
||||
AccountID string `ocisConfig:"account_id"`
|
||||
Identities string `ocisConfig:"identities"`
|
||||
Username string `ocisConfig:"username"`
|
||||
DisplayName string `ocisConfig:"display_name"`
|
||||
Mail string `ocisConfig:"mail"`
|
||||
Groups string `ocisConfig:"groups"`
|
||||
}
|
||||
|
||||
// CORS defines the available cors configuration.
|
||||
type CORS struct {
|
||||
AllowedOrigins []string
|
||||
AllowedMethods []string
|
||||
AllowedHeaders []string
|
||||
AllowCredentials bool
|
||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
||||
AllowCredentials bool `ocisConfig:"allowed_credentials"`
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string
|
||||
Namespace string
|
||||
Root string
|
||||
CacheTTL int
|
||||
CORS CORS
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
Root string `ocisConfig:"root"`
|
||||
CacheTTL int `ocisConfig:"cache_ttl"`
|
||||
CORS CORS `ocisConfig:"cors"`
|
||||
}
|
||||
|
||||
// GRPC defines the available grpc configuration.
|
||||
type GRPC struct {
|
||||
Addr string
|
||||
Namespace string
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
}
|
||||
|
||||
// Server configures a server.
|
||||
type Server struct {
|
||||
Version string
|
||||
Name string
|
||||
HashDifficulty int
|
||||
DemoUsersAndGroups bool
|
||||
Version string `ocisConfig:"version"`
|
||||
Name string `ocisConfig:"name"`
|
||||
HashDifficulty int `ocisConfig:"hash_difficulty"`
|
||||
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups"`
|
||||
}
|
||||
|
||||
// Asset defines the available asset configuration.
|
||||
type Asset struct {
|
||||
Path string
|
||||
Path string `ocisConfig:"path"`
|
||||
}
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string
|
||||
}
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
type Log struct {
|
||||
Level string
|
||||
Pretty bool
|
||||
Color bool
|
||||
File string
|
||||
JWTSecret string `ocisConfig:"jwt_secret"`
|
||||
}
|
||||
|
||||
// Repo defines which storage implementation is to be used.
|
||||
type Repo struct {
|
||||
Backend string
|
||||
Disk Disk
|
||||
CS3 CS3
|
||||
Backend string `ocisConfig:"backend"`
|
||||
Disk Disk `ocisConfig:"disk"`
|
||||
CS3 CS3 `ocisConfig:"cs3"`
|
||||
}
|
||||
|
||||
// Disk is the local disk implementation of the storage.
|
||||
type Disk struct {
|
||||
Path string
|
||||
Path string `ocisConfig:"path"`
|
||||
}
|
||||
|
||||
// CS3 is the cs3 implementation of the storage.
|
||||
type CS3 struct {
|
||||
ProviderAddr string
|
||||
DataURL string
|
||||
DataPrefix string
|
||||
JWTSecret string
|
||||
ProviderAddr string `ocisConfig:"provider_addr"`
|
||||
JWTSecret string `ocisConfig:"jwt_secret"`
|
||||
}
|
||||
|
||||
// ServiceUser defines the user required for EOS.
|
||||
type ServiceUser struct {
|
||||
UUID string
|
||||
Username string
|
||||
UID int64
|
||||
GID int64
|
||||
UUID string `ocisConfig:"uuid"`
|
||||
Username string `ocisConfig:"username"`
|
||||
UID int64 `ocisConfig:"uid"`
|
||||
GID int64 `ocisConfig:"gid"`
|
||||
}
|
||||
|
||||
// Index defines config for indexes.
|
||||
type Index struct {
|
||||
UID, GID Bound
|
||||
UID Bound `ocisConfig:"uid"`
|
||||
GID Bound `ocisConfig:"gid"`
|
||||
}
|
||||
|
||||
// Bound defines a lower and upper bound.
|
||||
type Bound struct {
|
||||
Lower, Upper int64
|
||||
Lower int64 `ocisConfig:"lower"`
|
||||
Upper int64 `ocisConfig:"upper"`
|
||||
}
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool
|
||||
Type string
|
||||
Endpoint string
|
||||
Collector string
|
||||
Service string
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Type string `ocisConfig:"type"`
|
||||
Endpoint string `ocisConfig:"endpoint"`
|
||||
Collector string `ocisConfig:"collector"`
|
||||
Service string `ocisConfig:"service"`
|
||||
}
|
||||
|
||||
// Config merges all Account config parameters.
|
||||
type Config struct {
|
||||
LDAP LDAP
|
||||
HTTP HTTP
|
||||
GRPC GRPC
|
||||
Server Server
|
||||
Asset Asset
|
||||
Log Log
|
||||
TokenManager TokenManager
|
||||
Repo Repo
|
||||
Index Index
|
||||
ServiceUser ServiceUser
|
||||
Tracing Tracing
|
||||
*shared.Commons
|
||||
|
||||
LDAP LDAP `ocisConfig:"ldap"`
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
Server Server `ocisConfig:"server"`
|
||||
Asset Asset `ocisConfig:"asset"`
|
||||
Log *shared.Log `ocisConfig:"log"`
|
||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
||||
Repo Repo `ocisConfig:"repo"`
|
||||
Index Index `ocisConfig:"index"`
|
||||
ServiceUser ServiceUser `ocisConfig:"service_user"`
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
|
||||
Context context.Context
|
||||
Supervised bool
|
||||
@@ -142,5 +143,79 @@ type Config struct {
|
||||
|
||||
// New returns a new config.
|
||||
func New() *Config {
|
||||
return &Config{}
|
||||
return &Config{
|
||||
Log: &shared.Log{},
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
LDAP: LDAP{},
|
||||
HTTP: HTTP{
|
||||
Addr: "127.0.0.1:9181",
|
||||
Namespace: "com.owncloud.web",
|
||||
Root: "/",
|
||||
CacheTTL: 604800, // 7 days
|
||||
CORS: CORS{
|
||||
AllowedOrigins: []string{"*"},
|
||||
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
|
||||
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
|
||||
AllowCredentials: true,
|
||||
},
|
||||
},
|
||||
GRPC: GRPC{
|
||||
Addr: "127.0.0.1:9180",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
Server: Server{
|
||||
Name: "accounts",
|
||||
HashDifficulty: 11,
|
||||
DemoUsersAndGroups: true,
|
||||
},
|
||||
Asset: Asset{},
|
||||
TokenManager: TokenManager{
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
Repo: Repo{
|
||||
Backend: "CS3",
|
||||
Disk: Disk{
|
||||
Path: path.Join(defaults.BaseDataPath(), "accounts"),
|
||||
},
|
||||
CS3: CS3{
|
||||
ProviderAddr: "localhost:9215",
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
},
|
||||
Index: Index{
|
||||
UID: Bound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
GID: Bound{
|
||||
Lower: 0,
|
||||
Upper: 1000,
|
||||
},
|
||||
},
|
||||
ServiceUser: ServiceUser{
|
||||
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
|
||||
Username: "",
|
||||
UID: 0,
|
||||
GID: 0,
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Type: "jaeger",
|
||||
Service: "accounts",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
|
||||
// with all the environment variables an extension supports.
|
||||
func GetEnv(cfg *Config) []string {
|
||||
var r = make([]string, len(structMappings(cfg)))
|
||||
for i := range structMappings(cfg) {
|
||||
r = append(r, structMappings(cfg)[i].EnvVars...)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package config
|
||||
|
||||
import "github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
|
||||
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
|
||||
// us propagate changes easier.
|
||||
func StructMappings(cfg *Config) []shared.EnvBinding {
|
||||
return structMappings(cfg)
|
||||
}
|
||||
|
||||
// structMappings binds a set of environment variables to a destination on cfg.
|
||||
func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
return []shared.EnvBinding{
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_FILE", "ACCOUNTS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_COLOR", "ACCOUNTS_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_PRETTY", "ACCOUNTS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENABLED", "ACCOUNTS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_TYPE", "ACCOUNTS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "ACCOUNTS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "ACCOUNTS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
|
||||
Destination: &cfg.HTTP.CacheTTL,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
|
||||
Destination: &cfg.GRPC.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_NAME"},
|
||||
Destination: &cfg.Server.Name,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
|
||||
Destination: &cfg.Server.HashDifficulty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_DEMO_USERS_AND_GROUPS"},
|
||||
Destination: &cfg.Server.DemoUsersAndGroups,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_ASSET_PATH"},
|
||||
Destination: &cfg.Asset.Path,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_JWT_SECRET", "ACCOUNTS_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_BACKEND"},
|
||||
Destination: &cfg.Repo.Backend,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_DISK_PATH"},
|
||||
Destination: &cfg.Repo.Disk.Path,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Repo.CS3.ProviderAddr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_JWT_SECRET", "ACCOUNTS_STORAGE_CS3_JWT_SECRET"},
|
||||
Destination: &cfg.Repo.CS3.JWTSecret,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UUID"},
|
||||
Destination: &cfg.ServiceUser.UUID,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_USERNAME"},
|
||||
Destination: &cfg.ServiceUser.Username,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UID"},
|
||||
Destination: &cfg.ServiceUser.UID,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_GID"},
|
||||
Destination: &cfg.ServiceUser.GID,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_UID_INDEX_LOWER_BOUND"},
|
||||
Destination: &cfg.Index.UID.Lower,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_GID_INDEX_LOWER_BOUND"},
|
||||
Destination: &cfg.Index.GID.Lower,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_UID_INDEX_UPPER_BOUND"},
|
||||
Destination: &cfg.Index.UID.Upper,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
|
||||
Destination: &cfg.Index.GID.Upper,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,292 +1,12 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// RootWithConfig applies cfg to the root flagset
|
||||
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-level",
|
||||
Usage: "Set logging level",
|
||||
EnvVars: []string{"ACCOUNTS_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-pretty",
|
||||
Usage: "Enable pretty logging",
|
||||
EnvVars: []string{"ACCOUNTS_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-color",
|
||||
Usage: "Enable colored logging",
|
||||
EnvVars: []string{"ACCOUNTS_LOG_COLOR", "OCIS_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ServerWithConfig applies cfg to the root flagset
|
||||
func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Enable log to file",
|
||||
EnvVars: []string{"ACCOUNTS_LOG_FILE", "OCIS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_TYPE", "OCIS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "accounts"),
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"ACCOUNTS_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
|
||||
Usage: "Set the base namespace for the http namespace",
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9181"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-root",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/"),
|
||||
Usage: "Root path of http server",
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "http-cache-ttl",
|
||||
Value: flags.OverrideDefaultInt(cfg.HTTP.CacheTTL, 604800),
|
||||
Usage: "Set the static assets caching duration in seconds",
|
||||
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
|
||||
Destination: &cfg.HTTP.CacheTTL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "cors-allowed-origins",
|
||||
Value: cli.NewStringSlice("*"),
|
||||
Usage: "Set the allowed CORS origins",
|
||||
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_ORIGINS", "OCIS_CORS_ALLOW_ORIGINS"},
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "cors-allowed-methods",
|
||||
Value: cli.NewStringSlice("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"),
|
||||
Usage: "Set the allowed CORS origins",
|
||||
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_METHODS", "OCIS_CORS_ALLOW_METHODS"},
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "cors-allowed-headers",
|
||||
Value: cli.NewStringSlice("Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"),
|
||||
Usage: "Set the allowed CORS origins",
|
||||
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_HEADERS", "OCIS_CORS_ALLOW_HEADERS"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "cors-allow-credentials",
|
||||
Value: flags.OverrideDefaultBool(cfg.HTTP.CORS.AllowCredentials, true),
|
||||
Usage: "Allow credentials for CORS",
|
||||
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_CREDENTIALS", "OCIS_CORS_ALLOW_CREDENTIALS"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
|
||||
Usage: "Set the base namespace for the grpc namespace",
|
||||
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
|
||||
Destination: &cfg.GRPC.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9180"),
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
|
||||
Usage: "service name",
|
||||
EnvVars: []string{"ACCOUNTS_NAME"},
|
||||
Destination: &cfg.Server.Name,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "accounts-hash-difficulty",
|
||||
Value: flags.OverrideDefaultInt(cfg.Server.HashDifficulty, 11),
|
||||
Usage: "accounts password hash difficulty",
|
||||
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
|
||||
Destination: &cfg.Server.HashDifficulty,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "demo-users-and-groups",
|
||||
Value: flags.OverrideDefaultBool(cfg.Server.DemoUsersAndGroups, true),
|
||||
Usage: "Enable demo users and groups",
|
||||
EnvVars: []string{"ACCOUNTS_DEMO_USERS_AND_GROUPS"},
|
||||
Destination: &cfg.Server.DemoUsersAndGroups,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "asset-path",
|
||||
Value: flags.OverrideDefaultString(cfg.Asset.Path, ""),
|
||||
Usage: "Path to custom assets",
|
||||
EnvVars: []string{"ACCOUNTS_ASSET_PATH"},
|
||||
Destination: &cfg.Asset.Path,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
|
||||
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
|
||||
EnvVars: []string{"ACCOUNTS_JWT_SECRET", "OCIS_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-backend",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.Backend, "CS3"),
|
||||
Usage: "Which backend to use to store accounts data (CS3 or disk)",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_BACKEND"},
|
||||
Destination: &cfg.Repo.Backend,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-disk-path",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.Disk.Path, path.Join(defaults.BaseDataPath(), "accounts")),
|
||||
Usage: "Path on the local disk to store accounts data when backend is set to disk",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_DISK_PATH"},
|
||||
Destination: &cfg.Repo.Disk.Path,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-provider-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.CS3.ProviderAddr, "localhost:9215"),
|
||||
Usage: "bind address for the metadata storage provider",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Repo.CS3.ProviderAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-data-url",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataURL, "http://localhost:9216"),
|
||||
Usage: "http endpoint of the metadata storage",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_URL"},
|
||||
Destination: &cfg.Repo.CS3.DataURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-data-prefix",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataPrefix, "data"),
|
||||
Usage: "path prefix for the http endpoint of the metadata storage, without leading slash",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_PREFIX"},
|
||||
Destination: &cfg.Repo.CS3.DataPrefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-jwt-secret",
|
||||
Value: flags.OverrideDefaultString(cfg.Repo.CS3.JWTSecret, "Pive-Fumkiu4"),
|
||||
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_JWT_SECRET", "OCIS_JWT_SECRET"},
|
||||
Destination: &cfg.Repo.CS3.JWTSecret,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "service-user-uuid",
|
||||
Value: flags.OverrideDefaultString(cfg.ServiceUser.UUID, "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad"),
|
||||
Usage: "uuid of the internal service user (required on EOS)",
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UUID"},
|
||||
Destination: &cfg.ServiceUser.UUID,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "service-user-username",
|
||||
Value: flags.OverrideDefaultString(cfg.ServiceUser.Username, ""),
|
||||
Usage: "username of the internal service user (required on EOS)",
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_USERNAME"},
|
||||
Destination: &cfg.ServiceUser.Username,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "service-user-uid",
|
||||
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.UID, 0),
|
||||
Usage: "uid of the internal service user (required on EOS)",
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UID"},
|
||||
Destination: &cfg.ServiceUser.UID,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "service-user-gid",
|
||||
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.GID, 0),
|
||||
Usage: "gid of the internal service user (required on EOS)",
|
||||
EnvVars: []string{"ACCOUNTS_SERVICE_USER_GID"},
|
||||
Destination: &cfg.ServiceUser.GID,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "uid-index-lower-bound",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Lower, 0),
|
||||
Usage: "define a starting point for the account UID",
|
||||
EnvVars: []string{"ACCOUNTS_UID_INDEX_LOWER_BOUND"},
|
||||
Destination: &cfg.Index.UID.Lower,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "gid-index-lower-bound",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Lower, 1000),
|
||||
Usage: "define a starting point for the account GID",
|
||||
EnvVars: []string{"ACCOUNTS_GID_INDEX_LOWER_BOUND"},
|
||||
Destination: &cfg.Index.GID.Lower,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "uid-index-upper-bound",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Upper, 0),
|
||||
Usage: "define an ending point for the account UID",
|
||||
EnvVars: []string{"ACCOUNTS_UID_INDEX_UPPER_BOUND"},
|
||||
Destination: &cfg.Index.UID.Upper,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "gid-index-upper-bound",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Upper, 1000),
|
||||
Usage: "define an ending point for the account GID",
|
||||
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
|
||||
Destination: &cfg.Index.GID.Upper,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateAccountWithConfig applies update command flags to cfg
|
||||
func UpdateAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag {
|
||||
if a.PasswordProfile == nil {
|
||||
|
||||
@@ -12,11 +12,10 @@ import (
|
||||
|
||||
mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v4"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/command"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
|
||||
oclog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
|
||||
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -86,7 +85,7 @@ func init() {
|
||||
var hdlr *svc.Service
|
||||
var err error
|
||||
|
||||
if hdlr, err = svc.New(svc.Logger(command.NewLogger(cfg)), svc.Config(cfg), svc.RoleService(buildRoleServiceMock())); err != nil {
|
||||
if hdlr, err = svc.New(svc.Logger(oclog.LoggerFromConfig("accounts", *cfg.Log)), svc.Config(cfg), svc.RoleService(buildRoleServiceMock())); err != nil {
|
||||
log.Fatalf("Could not create new service")
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
|
||||
@@ -109,6 +111,10 @@ func (s Service) buildIndex() (*indexer.Indexer, error) {
|
||||
func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) {
|
||||
c := idxcfg.New()
|
||||
|
||||
if cfg.Log == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
defer func(cfg *config.Config) {
|
||||
l := log.NewLogger(log.Color(cfg.Log.Color), log.Pretty(cfg.Log.Pretty), log.Level(cfg.Log.Level))
|
||||
if r := recover(); r != nil {
|
||||
@@ -132,8 +138,6 @@ func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) {
|
||||
Backend: cfg.Repo.Backend,
|
||||
CS3: idxcfg.CS3{
|
||||
ProviderAddr: cfg.Repo.CS3.ProviderAddr,
|
||||
DataURL: cfg.Repo.CS3.DataURL,
|
||||
DataPrefix: cfg.Repo.CS3.DataPrefix,
|
||||
JWTSecret: cfg.Repo.CS3.JWTSecret,
|
||||
},
|
||||
}
|
||||
|
||||
+56
-123
@@ -1,15 +1,10 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/cs3org/reva/pkg/auth/scope"
|
||||
|
||||
@@ -23,15 +18,20 @@ import (
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
olog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
const (
|
||||
storageMountPath = "/meta"
|
||||
)
|
||||
|
||||
// CS3Repo provides a cs3 implementation of the Repo interface
|
||||
type CS3Repo struct {
|
||||
cfg *config.Config
|
||||
tm token.Manager
|
||||
storageProvider provider.ProviderAPIClient
|
||||
dataProvider dataProviderClient // Used to create and download data via http, bypassing reva upload protocol
|
||||
metadataStorage metadatastorage.MetadataStorage
|
||||
}
|
||||
|
||||
// NewCS3Repo creates a new cs3 repo
|
||||
@@ -49,26 +49,26 @@ func NewCS3Repo(cfg *config.Config) (Repo, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ms, err := metadatastorage.NewMetadataStorage(cfg.Repo.CS3.ProviderAddr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return CS3Repo{
|
||||
cfg: cfg,
|
||||
tm: tokenManager,
|
||||
storageProvider: client,
|
||||
dataProvider: dataProviderClient{
|
||||
client: http.Client{
|
||||
Transport: http.DefaultTransport,
|
||||
},
|
||||
},
|
||||
metadataStorage: ms,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// WriteAccount writes an account via cs3 and modifies the provided account (e.g. with a generated id).
|
||||
func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
if err := r.makeRootDirIfNotExist(ctx, accountsFolder); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -78,37 +78,31 @@ func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error)
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := r.dataProvider.put(r.accountURL(a.Id), bytes.NewReader(by), t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = resp.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
err = r.metadataStorage.SimpleUpload(ctx, r.accountURL(a.Id), by)
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
// LoadAccount loads an account via cs3 by id and writes it to the provided account
|
||||
func (r CS3Repo) LoadAccount(ctx context.Context, id string, a *proto.Account) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.loadAccount(id, t, a)
|
||||
return r.loadAccount(ctx, id, a)
|
||||
}
|
||||
|
||||
// LoadAccounts loads all the accounts from the cs3 api
|
||||
func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", accountsFolder),
|
||||
Path: path.Join(storageMountPath, accountsFolder),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
@@ -118,7 +112,7 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
|
||||
log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level))
|
||||
for i := range res.Infos {
|
||||
acc := &proto.Account{}
|
||||
err := r.loadAccount(filepath.Base(res.Infos[i].Path), t, acc)
|
||||
err := r.loadAccount(ctx, filepath.Base(res.Infos[i].Path), acc)
|
||||
if err != nil {
|
||||
log.Err(err).Msg("could not load account")
|
||||
continue
|
||||
@@ -128,38 +122,27 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r CS3Repo) loadAccount(id string, t string, a *proto.Account) error {
|
||||
resp, err := r.dataProvider.get(r.accountURL(id), t)
|
||||
func (r CS3Repo) loadAccount(ctx context.Context, id string, a *proto.Account) error {
|
||||
account, err := r.metadataStorage.SimpleDownload(ctx, r.accountURL(id))
|
||||
if err != nil {
|
||||
if metadatastorage.IsNotFoundErr(err) {
|
||||
return ¬FoundErr{"account", id}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return ¬FoundErr{"account", id}
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = resp.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(b, &a)
|
||||
return json.Unmarshal(account, &a)
|
||||
}
|
||||
|
||||
// DeleteAccount deletes an account via cs3 by id
|
||||
func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
|
||||
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", accountsFolder, id),
|
||||
Path: path.Join(storageMountPath, accountsFolder, id),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -177,12 +160,11 @@ func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
|
||||
|
||||
// WriteGroup writes a group via cs3 and modifies the provided group (e.g. with a generated id).
|
||||
func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
if err := r.makeRootDirIfNotExist(ctx, groupsFolder); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -192,37 +174,30 @@ func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := r.dataProvider.put(r.groupURL(g.Id), bytes.NewReader(by), t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = resp.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
err = r.metadataStorage.SimpleUpload(ctx, r.groupURL(g.Id), by)
|
||||
return err
|
||||
}
|
||||
|
||||
// LoadGroup loads a group via cs3 by id and writes it to the provided group
|
||||
func (r CS3Repo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.loadGroup(id, t, g)
|
||||
return r.loadGroup(ctx, id, g)
|
||||
}
|
||||
|
||||
// LoadGroups loads all the groups from the cs3 api
|
||||
func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", groupsFolder),
|
||||
Path: path.Join(storageMountPath, groupsFolder),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
@@ -232,7 +207,7 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
|
||||
log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level))
|
||||
for i := range res.Infos {
|
||||
grp := &proto.Group{}
|
||||
err := r.loadGroup(filepath.Base(res.Infos[i].Path), t, grp)
|
||||
err := r.loadGroup(ctx, filepath.Base(res.Infos[i].Path), grp)
|
||||
if err != nil {
|
||||
log.Err(err).Msg("could not load account")
|
||||
continue
|
||||
@@ -242,38 +217,27 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r CS3Repo) loadGroup(id string, t string, g *proto.Group) error {
|
||||
resp, err := r.dataProvider.get(r.groupURL(id), t)
|
||||
func (r CS3Repo) loadGroup(ctx context.Context, id string, g *proto.Group) error {
|
||||
group, err := r.metadataStorage.SimpleDownload(ctx, r.groupURL(id))
|
||||
if err != nil {
|
||||
if metadatastorage.IsNotFoundErr(err) {
|
||||
return ¬FoundErr{"group", id}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.StatusCode == http.StatusNotFound {
|
||||
return ¬FoundErr{"group", id}
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = resp.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(b, &g)
|
||||
return json.Unmarshal(group, &g)
|
||||
}
|
||||
|
||||
// DeleteGroup deletes a group via cs3 by id
|
||||
func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
|
||||
t, err := r.authenticate(ctx)
|
||||
ctx, err = r.getAuthenticatedContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
|
||||
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", groupsFolder, id),
|
||||
Path: path.Join(storageMountPath, groupsFolder, id),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -289,8 +253,13 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (r CS3Repo) authenticate(ctx context.Context) (token string, err error) {
|
||||
return AuthenticateCS3(ctx, r.cfg.ServiceUser, r.tm)
|
||||
func (r CS3Repo) getAuthenticatedContext(ctx context.Context) (context.Context, error) {
|
||||
t, err := AuthenticateCS3(ctx, r.cfg.ServiceUser, r.tm)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
// AuthenticateCS3 mints an auth token for communicating with cs3 storage based on a service user from config
|
||||
@@ -298,6 +267,7 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
|
||||
u := &user.User{
|
||||
Id: &user.UserId{
|
||||
OpaqueId: su.UUID,
|
||||
Type: user.UserType_USER_TYPE_APPLICATION,
|
||||
},
|
||||
Groups: []string{},
|
||||
UidNumber: su.UID,
|
||||
@@ -311,11 +281,11 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
|
||||
}
|
||||
|
||||
func (r CS3Repo) accountURL(id string) string {
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, accountsFolder, id))
|
||||
return path.Join(accountsFolder, id)
|
||||
}
|
||||
|
||||
func (r CS3Repo) groupURL(id string) string {
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, groupsFolder, id))
|
||||
return path.Join(groupsFolder, id)
|
||||
}
|
||||
|
||||
func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error {
|
||||
@@ -325,7 +295,7 @@ func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error
|
||||
// MakeDirIfNotExist will create a root node in the metadata storage. Requires an authenticated context.
|
||||
func MakeDirIfNotExist(ctx context.Context, sp provider.ProviderAPIClient, folder string) error {
|
||||
var rootPathRef = &provider.Reference{
|
||||
Path: path.Join("/meta", folder),
|
||||
Path: path.Join(storageMountPath, folder),
|
||||
}
|
||||
|
||||
resp, err := sp.Stat(ctx, &provider.StatRequest{
|
||||
@@ -348,40 +318,3 @@ func MakeDirIfNotExist(ctx context.Context, sp provider.ProviderAPIClient, folde
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: this is copied from proxy. Find a better solution or move it to ocis-pkg
|
||||
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
|
||||
}
|
||||
|
||||
type dataProviderClient struct {
|
||||
client http.Client
|
||||
}
|
||||
|
||||
func (d dataProviderClient) put(url string, body io.Reader, token string) (*http.Response, error) {
|
||||
req, err := http.NewRequest(http.MethodPut, url, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Add(revactx.TokenHeader, token)
|
||||
return d.client.Do(req)
|
||||
}
|
||||
|
||||
func (d dataProviderClient) get(url string, token string) (*http.Response, error) {
|
||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Add(revactx.TokenHeader, token)
|
||||
return d.client.Do(req)
|
||||
}
|
||||
@@ -17,8 +17,6 @@ package storage
|
||||
// Repo: config.Repo{
|
||||
// CS3: config.CS3{
|
||||
// ProviderAddr: "0.0.0.0:9215",
|
||||
// DataURL: "http://localhost:9216",
|
||||
// DataPrefix: "data",
|
||||
// },
|
||||
// },
|
||||
//}
|
||||
|
||||
@@ -8,7 +8,7 @@ type notFoundErr struct {
|
||||
typ, id string
|
||||
}
|
||||
|
||||
func (e *notFoundErr) Error() string {
|
||||
func (e notFoundErr) Error() string {
|
||||
return fmt.Sprintf("%s with id %s not found", e.typ, e.id)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Change: Rename `APP_PROVIDER_BASIC_*` environment variables
|
||||
|
||||
We've renamed the `APP_PROVIDER_BASIC_*` to `APP_PROVIDER_*` since
|
||||
the `_BASIC_` part is a copy and paste error. Now all app provider
|
||||
environment variables are consistently starting with `APP_PROVIDER_*`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2812
|
||||
https://github.com/owncloud/ocis/pull/2811
|
||||
@@ -0,0 +1,8 @@
|
||||
Bugfix: Fix claim selector based routing for basic auth
|
||||
|
||||
We've fixed the claim selector based routing for requests using basic auth.
|
||||
Previously requests using basic auth have always been routed to the DefaultPolicy when using the claim selector despite the set cookie because the basic auth middleware fakes some OIDC claims.
|
||||
|
||||
Now the cookie is checked before routing to the DefaultPolicy and therefore set cookie will also be respected for requests using basic auth.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2779
|
||||
@@ -0,0 +1,10 @@
|
||||
Bugfix: Disallow creation of a group with empty name via the OCS api
|
||||
|
||||
We've fixed the behavior for group creation on the OCS api, where it was
|
||||
possible to create a group with an empty name. This was is not possible
|
||||
on oC10 and is therefore also forbidden on oCIS to keep compatibility.
|
||||
This PR forbids the creation and also ensures the correct status code
|
||||
for both OCS v1 and OCS v2 apis.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2825
|
||||
https://github.com/owncloud/ocis/issues/2823
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix using s3ng as the metadata storage backend
|
||||
|
||||
It is now possible to use s3ng as the metadata storage backend.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2807
|
||||
https://github.com/owncloud/ocis/issues/2668
|
||||
@@ -0,0 +1,9 @@
|
||||
Bugfix: Use the CS3api up- and download workflow for the accounts service
|
||||
|
||||
We've fixed the interaction of the accounts service with the metadata storage
|
||||
after bypassing the InitiateUpload and InitiateDownload have been removed
|
||||
from various storage drivers. The accounts service now uses the proper
|
||||
CS3apis workflow for up- and downloads.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2837
|
||||
https://github.com/cs3org/reva/pull/2309
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Cleanup ocis-pkg config
|
||||
|
||||
Certain values were of no use when configuring the ocis runtime.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2813
|
||||
@@ -0,0 +1,7 @@
|
||||
Change: Restructure Configuration Parsing
|
||||
|
||||
Tags: ocis
|
||||
|
||||
CLI flags are no longer needed for subcommands, as we rely solely on env variables and config files. This greatly simplifies configuration and deployment.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2708
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Correct shutdown of services under runtime
|
||||
|
||||
Supervised goroutines now shut themselves down on context cancellation propagation.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2843
|
||||
@@ -0,0 +1,24 @@
|
||||
Enhancement: Update REVA to v1.17.0
|
||||
|
||||
Updated REVA to v1.17.0
|
||||
This update includes:
|
||||
|
||||
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes `target` as absolute path
|
||||
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition header for public links files
|
||||
* Fix [cs3org/reva#2316](https://github.com/cs3org/reva/pull/2316): Fix the share types in propfinds
|
||||
* Fix [cs3org/reva#2803](https://github.com/cs3org/reva/pull/2803): Fix app provider for editor public links
|
||||
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298): Remove share refs from trashbin
|
||||
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Remove early finish for zero byte file uploads
|
||||
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): Fix TUS uploads with transfer token only
|
||||
* Chg [cs3org/reva#2210](https://github.com/cs3org/reva/pull/2210): Fix app provider new file creation and improved error codes
|
||||
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): OIDC auth driver for ESCAPE IAM
|
||||
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
|
||||
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315): Add new attributes to public link propfinds
|
||||
* Enh [cs3org/reva#2740](https://github.com/cs3org/reva/pull/2740): Implement space membership endpoints
|
||||
* Enh [cs3org/reva#2252](https://github.com/cs3org/reva/pull/2252): Add the xattr sys.acl to SysACL (eosgrpc)
|
||||
* Enh [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback if IDP doesn't provide "preferred_username" claim
|
||||
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2849
|
||||
https://github.com/owncloud/ocis/pull/2835
|
||||
https://github.com/owncloud/ocis/pull/2837
|
||||
@@ -0,0 +1,8 @@
|
||||
Enhancement: Update ownCloud Web to v4.6.0
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v4.6.0. Please refer to the changelog (linked) for details on the web release.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2846
|
||||
https://github.com/owncloud/web/releases/tag/v4.6.0
|
||||
@@ -0,0 +1,6 @@
|
||||
Change: OIDC: fallback if IDP doesn't provide "preferred_username" claim
|
||||
|
||||
Some IDPs don't add the "preferred_username" claim. Fallback to the "email"
|
||||
claim in that case
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2644
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: continuous-deployment-ocis-cs3-users-latest
|
||||
- name: continuous-deployment-ocis-ldap-latest
|
||||
server:
|
||||
server_type: cx21
|
||||
image: ubuntu-20.04
|
||||
@@ -14,7 +14,7 @@
|
||||
- /var/lib/docker/volumes/ocis_certs
|
||||
|
||||
domains:
|
||||
- "*.ocis-cs3-users.latest.owncloud.works"
|
||||
- "*.ocis-ldap.latest.owncloud.works"
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
@@ -31,21 +31,21 @@
|
||||
- name: ocis
|
||||
git_url: https://github.com/owncloud/ocis.git
|
||||
ref: master
|
||||
docker_compose_path: deployments/examples/cs3_users_ocis
|
||||
docker_compose_path: deployments/examples/ocis_ldap
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
|
||||
OCIS_DOCKER_TAG: latest
|
||||
OCIS_DOMAIN: ocis.ocis-cs3-users.latest.owncloud.works
|
||||
LDAP_MANAGER_DOMAIN: ldap.ocis-cs3-users.latest.owncloud.works
|
||||
OCIS_DOMAIN: ocis.ocis-ldap.latest.owncloud.works
|
||||
LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.latest.owncloud.works
|
||||
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
|
||||
- name: monitoring
|
||||
git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git
|
||||
ref: master
|
||||
env:
|
||||
NETWORK_NAME: ocis-net
|
||||
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-cs3-users.latest.owncloud.works
|
||||
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-ldap.latest.owncloud.works
|
||||
JAEGER_COLLECTOR: jaeger-collector.infra.owncloud.works:443
|
||||
TELEGRAF_SPECIFIC_CONFIG: ocis_single_container
|
||||
OCIS_URL: ocis.ocis-cs3-users.latest.owncloud.works
|
||||
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-cs3-users-latest
|
||||
OCIS_URL: ocis.ocis-ldap.latest.owncloud.works
|
||||
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-ldap-latest
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: continuous-deployment-ocis-cs3-users-released
|
||||
- name: continuous-deployment-ocis-ldap-released
|
||||
server:
|
||||
server_type: cx21
|
||||
image: ubuntu-20.04
|
||||
@@ -14,7 +14,7 @@
|
||||
- /var/lib/docker/volumes/ocis_certs
|
||||
|
||||
domains:
|
||||
- "*.ocis-cs3-users.released.owncloud.works"
|
||||
- "*.ocis-ldap.released.owncloud.works"
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
@@ -31,21 +31,21 @@
|
||||
- name: ocis
|
||||
git_url: https://github.com/owncloud/ocis.git
|
||||
ref: master
|
||||
docker_compose_path: deployments/examples/cs3_users_ocis
|
||||
docker_compose_path: deployments/examples/ocis_ldap
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
|
||||
OCIS_DOCKER_TAG: 1
|
||||
OCIS_DOMAIN: ocis.ocis-cs3-users.released.owncloud.works
|
||||
LDAP_MANAGER_DOMAIN: ldap.ocis-cs3-users.released.owncloud.works
|
||||
OCIS_DOMAIN: ocis.ocis-ldap.released.owncloud.works
|
||||
LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.released.owncloud.works
|
||||
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
|
||||
- name: monitoring
|
||||
git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git
|
||||
ref: master
|
||||
env:
|
||||
NETWORK_NAME: ocis-net
|
||||
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-cs3-users.released.owncloud.works
|
||||
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-ldap.released.owncloud.works
|
||||
JAEGER_COLLECTOR: jaeger-collector.infra.owncloud.works:443
|
||||
TELEGRAF_SPECIFIC_CONFIG: ocis_single_container
|
||||
OCIS_URL: ocis.ocis-cs3-users.released.owncloud.works
|
||||
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-cs3-users-released
|
||||
OCIS_URL: ocis.ocis-ldap.released.owncloud.works
|
||||
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-ldap-released
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
external: true
|
||||
@@ -24,7 +24,6 @@ ownCloudUUID:: NGM1MTBhZGEtYzg2Yi00ODE1LTg4MjAtNDJjZGY4MmMzZDUx
|
||||
userPassword:: e1NTSEF9TXJEcXpFNGdKbXZxbVRVTGhvWEZ1VzJBbkV3NWFLK3J3WTIvbHc9PQ==
|
||||
ownCloudSelector: ocis
|
||||
|
||||
|
||||
dn: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
@@ -66,3 +65,45 @@ homeDirectory: /home/richard
|
||||
ownCloudUUID:: OTMyYjQ1NDAtOGQxNi00ODFlLThlZjQtNTg4ZTRiNmIxNTFj
|
||||
userPassword:: e1NTSEF9Z05LZTRreHdmOGRUREY5eHlhSmpySTZ3MGxSVUM1d1RGcWROTVE9PQ==
|
||||
ownCloudSelector: ocis
|
||||
|
||||
dn: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloud
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: moss
|
||||
givenName: Maurice
|
||||
sn: Moss
|
||||
cn: moss
|
||||
displayName: Maurice Moss
|
||||
description: A worker in the IT Department of Reynholm Industries. Of all the working staff in the IT Department, he is the most hard-working, the most experienced, and the most capable of doing his job well. He puts a lot of effort into his work, however he does not get the credit he deserves.
|
||||
mail: moss@example.org
|
||||
uidNumber: 20003
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/moss
|
||||
ownCloudUUID:: MDU4YmZmOTUtNjcwOC00ZmU1LTkxZTQtOWVhM2QzNzc1ODhi
|
||||
userPassword:: e1NTSEF9N0hEdTRoMkFDVExFWWt4U0RtSDZVQjhmUlpKRExDZDc=
|
||||
ownCloudSelector: ocis
|
||||
|
||||
dn: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloud
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: admin
|
||||
givenName: Admin
|
||||
sn: Admin
|
||||
cn: admin
|
||||
displayName: Admin
|
||||
description: An admin for this oCIS instance.
|
||||
mail: admin@example.org
|
||||
uidNumber: 20004
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/admin
|
||||
ownCloudUUID:: ZGRjMjAwNGMtMDk3Ny0xMWViLTlkM2YtYTc5Mzg4OGNkMGY4
|
||||
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
|
||||
ownCloudSelector: oc10
|
||||
@@ -14,6 +14,8 @@ ownCloudUUID:: NTA5YTlkY2QtYmIzNy00ZjRmLWEwMWEtMTlkY2EyN2Q5Y2Zh
|
||||
uniqueMember: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=sailing-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfUniqueNames
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /var/tmp/ocis/.config/
|
||||
cp /config/proxy-config.dist.json /var/tmp/ocis/.config/proxy-config.json
|
||||
# TODO: remove replace logic when log level configuration is fixed
|
||||
sed -i 's/PROXY_LOG_LEVEL/${PROXY_LOG_LEVEL}/g' /var/tmp/ocis/.config/proxy-config.json
|
||||
|
||||
ocis server &
|
||||
sleep 10
|
||||
|
||||
@@ -14,9 +8,4 @@ ocis kill idp
|
||||
ocis kill glauth
|
||||
ocis kill accounts
|
||||
|
||||
# workaround for loading proxy configuration
|
||||
ocis kill proxy
|
||||
sleep 10
|
||||
ocis proxy server &
|
||||
|
||||
wait
|
||||
+1
-1
@@ -106,4 +106,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,6 @@ services:
|
||||
OCIS_STORAGE_READ_ONLY: "false" # TODO: conflict with OWNCLOUDSQL -> https://github.com/owncloud/ocis/issues/2303
|
||||
# General oCIS config
|
||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
||||
PROXY_LOG_LEVEL: ${PROXY_LOG_LEVEL:-error}
|
||||
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
|
||||
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
|
||||
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
|
||||
@@ -120,7 +119,7 @@ services:
|
||||
OCIS_INSECURE: "${INSECURE:-false}"
|
||||
volumes:
|
||||
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
|
||||
- ./config/ocis/proxy-config.dist.json:/config/proxy-config.dist.json
|
||||
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
|
||||
- ocis-data:/var/lib/ocis
|
||||
# shared volume with oC10
|
||||
- oc10-data:/mnt/data
|
||||
|
||||
+26
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
set -e
|
||||
|
||||
mkdir -p /var/tmp/ocis/.config/
|
||||
cp /config/proxy-config.json /var/tmp/ocis/.config/proxy-config.json
|
||||
cp /config/web-config.dist.json /var/tmp/ocis/.config/web-config.json
|
||||
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN:-ocis.owncloud.test}'/g' /var/tmp/ocis/.config/web-config.json
|
||||
|
||||
@@ -26,8 +25,4 @@ ocis accounts update --password $STORAGE_LDAP_BIND_PASSWORD $REVA_USER_UUID
|
||||
echo "default secrets changed"
|
||||
echo "##################################################"
|
||||
|
||||
ocis kill proxy
|
||||
sleep 10
|
||||
ocis proxy server # workaround for loading proxy configuration
|
||||
|
||||
wait # wait for oCIS to exit
|
||||
File renamed without changes.
@@ -62,8 +62,6 @@ services:
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
# web ui
|
||||
WEB_UI_CONFIG: "/var/tmp/ocis/.config/web-config.json"
|
||||
# proxy
|
||||
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
|
||||
# make settings service available to oCIS Hello
|
||||
SETTINGS_GRPC_ADDR: 0.0.0.0:9191
|
||||
# INSECURE: needed if oCIS / Traefik is using self generated certificates
|
||||
@@ -71,7 +69,7 @@ services:
|
||||
volumes:
|
||||
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
|
||||
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
|
||||
- ./config/ocis/proxy-config.json:/config/proxy-config.json
|
||||
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
|
||||
- ocis-data:/var/lib/ocis
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
||||
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
File renamed without changes.
+2
-2
@@ -1,6 +1,6 @@
|
||||
---
|
||||
document this deployment example in docs/ocis/deployment/cs3_users_ocis.md
|
||||
document this deployment example in docs/ocis/deployment/ocis_ldap.md
|
||||
---
|
||||
|
||||
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/cs3_users_ocis/)
|
||||
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/ocis_ldap/)
|
||||
for instructions on how to deploy this scenario.
|
||||
File renamed without changes.
+40
@@ -62,3 +62,43 @@ gidNumber: 30000
|
||||
homeDirectory: /home/richard
|
||||
ownCloudUUID:: OTMyYjQ1NDAtOGQxNi00ODFlLThlZjQtNTg4ZTRiNmIxNTFj
|
||||
userPassword:: e1NTSEF9Z05LZTRreHdmOGRUREY5eHlhSmpySTZ3MGxSVUM1d1RGcWROTVE9PQ==
|
||||
|
||||
dn: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloud
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: moss
|
||||
givenName: Maurice
|
||||
sn: Moss
|
||||
cn: moss
|
||||
displayName: Maurice Moss
|
||||
description: A worker in the IT Department of Reynholm Industries. Of all the working staff in the IT Department, he is the most hard-working, the most experienced, and the most capable of doing his job well. He puts a lot of effort into his work, however he does not get the credit he deserves.
|
||||
mail: moss@example.org
|
||||
uidNumber: 20003
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/moss
|
||||
ownCloudUUID:: MDU4YmZmOTUtNjcwOC00ZmU1LTkxZTQtOWVhM2QzNzc1ODhi
|
||||
userPassword:: e1NTSEF9N0hEdTRoMkFDVExFWWt4U0RtSDZVQjhmUlpKRExDZDc=
|
||||
|
||||
dn: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloud
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: admin
|
||||
givenName: Admin
|
||||
sn: Admin
|
||||
cn: admin
|
||||
displayName: Admin
|
||||
description: An admin for this oCIS instance.
|
||||
mail: admin@example.org
|
||||
uidNumber: 20004
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/admin
|
||||
ownCloudUUID:: ZGRjMjAwNGMtMDk3Ny0xMWViLTlkM2YtYTc5Mzg4OGNkMGY4
|
||||
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
|
||||
+2
@@ -14,6 +14,8 @@ ownCloudUUID:: NTA5YTlkY2QtYmIzNy00ZjRmLWEwMWEtMTlkY2EyN2Q5Y2Zh
|
||||
uniqueMember: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
uniqueMember: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=sailing-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfUniqueNames
|
||||
-5
@@ -3,7 +3,6 @@
|
||||
set -e
|
||||
|
||||
mkdir -p /var/tmp/ocis/.config/
|
||||
cp /config/proxy-config.json /var/tmp/ocis/.config/proxy-config.json
|
||||
cp /config/web-config.dist.json /var/tmp/ocis/.config/web-config.json
|
||||
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN:-ocis.owncloud.test}'/g' /var/tmp/ocis/.config/web-config.json
|
||||
|
||||
@@ -15,8 +14,4 @@ ocis kill accounts
|
||||
# stop builtin LDAP server since we use external LDAP only
|
||||
ocis kill glauth
|
||||
|
||||
ocis kill proxy
|
||||
sleep 10
|
||||
ocis proxy server # workaround for loading proxy configuration
|
||||
|
||||
wait # wait for oCIS to exit
|
||||
File renamed without changes.
File renamed without changes.
+1
-3
@@ -75,8 +75,6 @@ services:
|
||||
STORAGE_LDAP_GROUPFILTER: '(&(objectclass=groupOfUniqueNames)(objectclass=owncloud)(ownclouduuid={{.OpaqueId}}*))'
|
||||
# web ui
|
||||
WEB_UI_CONFIG: "/var/tmp/ocis/.config/web-config.json"
|
||||
# proxy
|
||||
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
|
||||
# General oCIS config
|
||||
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
@@ -91,7 +89,7 @@ services:
|
||||
volumes:
|
||||
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
|
||||
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
|
||||
- ./config/ocis/proxy-config.json:/config/proxy-config.json
|
||||
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
|
||||
- ocis-data:/var/lib/ocis
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
external: true
|
||||
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -92,8 +92,8 @@ services:
|
||||
command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164
|
||||
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-collabora:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
APP_PROVIDER_DRIVER: wopi
|
||||
@@ -118,8 +118,8 @@ services:
|
||||
#command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164
|
||||
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
APP_PROVIDER_DRIVER: wopi
|
||||
@@ -146,8 +146,8 @@ services:
|
||||
#command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-codimd:9164
|
||||
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-codimd:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
APP_PROVIDER_DRIVER: wopi
|
||||
|
||||
@@ -4,8 +4,34 @@ version: "3.7"
|
||||
services:
|
||||
ocis:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
|
||||
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
|
||||
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
IDP_DEBUG_ADDR: 0.0.0.0:9134
|
||||
OCS_DEBUG_ADDR: 0.0.0.0:9114
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
|
||||
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
|
||||
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
|
||||
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
|
||||
STORE_DEBUG_ADDR: 0.0.0.0:9464
|
||||
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
|
||||
WEB_DEBUG_ADDR: 0.0.0.0:9104
|
||||
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
|
||||
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
+167
-16
@@ -101,6 +101,8 @@ curl 'https://ocis.test/app/list'
|
||||
|
||||
**Response example**:
|
||||
|
||||
HTTP status code: 200
|
||||
|
||||
```json
|
||||
{
|
||||
"mime-types": [
|
||||
@@ -132,7 +134,8 @@ curl 'https://ocis.test/app/list'
|
||||
"name": "OpenDocument",
|
||||
"icon": "https://some-website.test/opendocument-text-icon.png",
|
||||
"description": "OpenDocument text document",
|
||||
"allow_creation": true
|
||||
"allow_creation": true,
|
||||
"default_application": "Collabora"
|
||||
},
|
||||
{
|
||||
"mime_type": "text/markdown",
|
||||
@@ -145,7 +148,8 @@ curl 'https://ocis.test/app/list'
|
||||
],
|
||||
"name": "Markdown file",
|
||||
"description": "Markdown file",
|
||||
"allow_creation": true
|
||||
"allow_creation": true,
|
||||
"default_application": "CodiMD"
|
||||
},
|
||||
{
|
||||
"mime_type": "application/vnd.ms-word.document.macroenabled.12",
|
||||
@@ -216,6 +220,8 @@ All apps are expected to be opened in an iframe and the response will give some
|
||||
|
||||
There are apps, which need to be opened in the iframe with a form post. The form post must include all form parameters included in the response. For these apps the response will look like this:
|
||||
|
||||
HTTP status code: 200
|
||||
|
||||
```json
|
||||
{
|
||||
"app_url": "https://.....",
|
||||
@@ -230,6 +236,8 @@ There are apps, which need to be opened in the iframe with a form post. The form
|
||||
|
||||
There are apps, which need to be opened in the iframe with a GET request. The GET request must have set all headers included in the response. For these apps the response will look like this:
|
||||
|
||||
HTTP status code: 200
|
||||
|
||||
```json
|
||||
{
|
||||
"app_url": "https://...",
|
||||
@@ -244,33 +252,175 @@ There are apps, which need to be opened in the iframe with a GET request. The GE
|
||||
|
||||
**Example responses (error case)**:
|
||||
|
||||
- wrong `view_mode`
|
||||
- missing `file_id`
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "SERVER_ERROR",
|
||||
"message": "Missing or invalid viewmode argument"
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "missing file ID"
|
||||
}
|
||||
```
|
||||
|
||||
- wrong `view_mode`
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "invalid view mode"
|
||||
}
|
||||
```
|
||||
|
||||
- unknown `app_name`
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "SERVER_ERROR",
|
||||
"message": "error searching for app provider"
|
||||
}
|
||||
```
|
||||
|
||||
- wrong / invalid file id / unauthorized to open the file
|
||||
HTTP status code: 404
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "SERVER_ERROR",
|
||||
"message": "error statting file"
|
||||
"code": "RESOURCE_NOT_FOUND",
|
||||
"message": "error: not found: app 'Collabor' not found"
|
||||
}
|
||||
```
|
||||
|
||||
- wrong / invalid file id
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "invalid file ID"
|
||||
}
|
||||
```
|
||||
|
||||
- file id does not point to a file
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "the given file id does not point to a file"
|
||||
}
|
||||
```
|
||||
|
||||
- file does not exist / unauthorized to open the file
|
||||
|
||||
HTTP status code: 404
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "RESOURCE_NOT_FOUND",
|
||||
"message": "file does not exist"
|
||||
}
|
||||
```
|
||||
|
||||
### Creating a file with the app provider
|
||||
|
||||
**Endpoint**: specified in the capabilities in `new_file_url`, currently `/app/new`
|
||||
|
||||
**Method**: HTTP POST
|
||||
|
||||
**Authentication** (one of them):
|
||||
|
||||
- `Authorization` header with OIDC Bearer token for authenticated users or basic auth credentials (if enabled in oCIS)
|
||||
- `Public-Token` header with public link token for public links
|
||||
- `X-Access-Token` header with a REVA token for authenticated users
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
- `parent_container_id` (mandatory): ID of the folder in which the file will be created
|
||||
- `filename` (mandatory): name of the new file
|
||||
- `template` (optional): not yet implemented
|
||||
|
||||
**Request examples**:
|
||||
|
||||
```bash
|
||||
curl -X POST 'https://ocis.test/app/new?parent_container_id=c2lkOmNpZAo=&filename=test.odt'
|
||||
```
|
||||
|
||||
**Response example**:
|
||||
|
||||
You will receive a file id of the freshly created file, which you can use to open the file in an editor.
|
||||
|
||||
```json
|
||||
{
|
||||
"file_id": "ZmlsZTppZAo="
|
||||
}
|
||||
```
|
||||
|
||||
**Example responses (error case)**:
|
||||
|
||||
- missing `parent_container_id`
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "missing parent container ID"
|
||||
}
|
||||
```
|
||||
|
||||
- missing `filename`
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "missing filename"
|
||||
}
|
||||
```
|
||||
|
||||
- parent container not found
|
||||
|
||||
HTTP status code: 404
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "RESOURCE_NOT_FOUND",
|
||||
"message": "the parent container is not accessible or does not exist"
|
||||
}
|
||||
```
|
||||
|
||||
- `parent_container_id` does not point to a container
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "the parent container id does not point to a container"
|
||||
}
|
||||
```
|
||||
|
||||
- `filename` is invalid (eg. includes a path segment)
|
||||
|
||||
HTTP status code: 400
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "INVALID_PARAMETER",
|
||||
"message": "the filename must not contain a path segment"
|
||||
}
|
||||
```
|
||||
|
||||
- file already exists
|
||||
|
||||
HTTP status code: 403
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "RESOURCE_ALREADY_EXISTS",
|
||||
"message": "the file already exists"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## App drivers
|
||||
|
||||
App drivers represent apps, if the app is not able to register itself. Currently there is only the CS3org WOPI server app driver.
|
||||
@@ -295,7 +445,8 @@ services:
|
||||
command: storage-app-provider server # start only the app driver
|
||||
environment:
|
||||
STORAGE_GATEWAY_ENDPOINT: ocis:9142 # oCIS gateway endpoint
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164 # how oCIS can reach this app driver
|
||||
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-collabora:9164 # how oCIS can reach this app driver
|
||||
OCIS_JWT_SECRET: ocis-jwt-secret
|
||||
APP_PROVIDER_DRIVER: wopi
|
||||
APP_PROVIDER_WOPI_DRIVER_APP_NAME: Collabora # will be used as name for this app
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
date: "2021-11-09T00:03:16+0100"
|
||||
weight: 2
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/ocis/templates
|
||||
geekdocFilePath: config.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Configuration Framework
|
||||
|
||||
In order to simplify deployments and development the configuration model from oCIS aims to be simple yet flexible.
|
||||
|
||||
## Overview of the approach
|
||||
|
||||
{{< svg src="ocis/static/ocis-config-redesign.drawio.svg" >}}
|
||||
|
||||
## In-depth configuration
|
||||
|
||||
Since we include a set of predefined extensions within the single binary, configuring an extension can be done in a variety of ways. Since we work with complex types, having as many cli per config value scales poorly, so we limited the options to config files and environment variables, leaving cli flags for common values, such as logging (`--log-level`, `--log-pretty`, `--log-file` or `--log-color`).
|
||||
|
||||
The hierarchy is clear enough, leaving us with:
|
||||
|
||||
_(each element above overwrites its precedent)_
|
||||
|
||||
1. env variables
|
||||
2. extension config
|
||||
3. ocis config
|
||||
|
||||
This is manifested in the previous diagram. We can then speak about "configuration file arithmetics", where resulting config transformations happen through a series of steps. An administrator must be aware of these sources, since mis-managing them can be a source of confusion, having undesired transformations on config files believed not to be applied.
|
||||
|
||||
## Flows
|
||||
|
||||
Let's explore the various flows with examples and workflows.
|
||||
|
||||
### Examples
|
||||
|
||||
Let's explore with examples this approach.
|
||||
|
||||
#### Expected loading locations:
|
||||
|
||||
- `$HOME/.ocis/config/`
|
||||
- `/etc/ocis/`
|
||||
- `.config/`
|
||||
|
||||
followed by the extension name. When configuring the proxy, a valid full path that will get loaded is `$HOME/.ocis/config/proxy.yaml`.
|
||||
|
||||
#### Only config files
|
||||
|
||||
The following config files are present in the default loading locations:
|
||||
|
||||
_ocis.yaml_
|
||||
```yaml
|
||||
proxy:
|
||||
http:
|
||||
addr: localhost:1111
|
||||
log:
|
||||
pretty: false
|
||||
color: false
|
||||
level: info
|
||||
accounts:
|
||||
http:
|
||||
addr: localhost:2222
|
||||
log:
|
||||
level: debug
|
||||
color: false
|
||||
pretty: false
|
||||
log:
|
||||
pretty: true
|
||||
color: true
|
||||
level: info
|
||||
```
|
||||
|
||||
_proxy.yaml_
|
||||
```yaml
|
||||
http:
|
||||
addr: localhost:3333
|
||||
```
|
||||
|
||||
_accounts.yaml_
|
||||
```yaml
|
||||
http:
|
||||
addr: localhost:4444
|
||||
```
|
||||
|
||||
Note that the extension files will overwrite values from the main `ocis.yaml`, causing `ocis server` to run with the following configuration:
|
||||
|
||||
```yaml
|
||||
proxy:
|
||||
http:
|
||||
addr: localhost:3333
|
||||
accounts:
|
||||
http:
|
||||
addr: localhost:4444
|
||||
log:
|
||||
pretty: true
|
||||
color: true
|
||||
level: info
|
||||
```
|
||||
|
||||
#### Using ENV variables
|
||||
|
||||
The logging configuration if defined in the main ocis.yaml is inherited by all extensions. It can be, however, overwritten by a single extension file if desired. The same example can be used to demonstrate environment values overwrites. With the same set of config files now we have the following command `PROXY_HTTP_ADDR=localhost:5555 ocis server`, now the resulting config looks like:
|
||||
|
||||
```yaml
|
||||
proxy:
|
||||
http:
|
||||
addr: localhost:5555
|
||||
accounts:
|
||||
http:
|
||||
addr: localhost:4444
|
||||
log:
|
||||
pretty: true
|
||||
color: true
|
||||
level: info
|
||||
```
|
||||
|
||||
### Workflows
|
||||
|
||||
Since one can run an extension using the runtime (supervised) or not (unsupervised), we ensure correct behavior in both modes, expecting the same outputs.
|
||||
|
||||
#### Supervised
|
||||
|
||||
You are using the supervised mode whenever you issue the `ocis server` command. We start the runtime on port `9250` (by default) that listens for commands regarding the lifecycle of the supervised extensions. When an extension runs supervised and is killed, the only way to provide / overwrite configuration values will be through an extension config file. This is due to the parent process has already started, and it already has its own environment.
|
||||
|
||||
#### Unsupervised
|
||||
|
||||
All the points from the priority section hold true. An unsupervised extension can be started with the format: `ocis [extension]` i.e: `ocis proxy`. First, `ocis.yaml` is parsed, then `proxy.yaml` followed by environment variables.
|
||||
|
||||
## Shared Values
|
||||
|
||||
When running in supervised mode (`ocis server`) it is beneficial to have common values for logging, so that the log output is correctly formatted, or everything is piped to the same file without duplicating config keys and values all over the place. This is possible using the global `log` config key:
|
||||
|
||||
_ocis.yaml_
|
||||
```yaml
|
||||
log:
|
||||
level: error
|
||||
color: true
|
||||
pretty: true
|
||||
file: /var/tmp/ocis_output.log
|
||||
```
|
||||
|
||||
There is, however, the option for extensions to overwrite this global values by declaring their own logging directives:
|
||||
|
||||
_ocis.yaml_
|
||||
```yaml
|
||||
log:
|
||||
level: info
|
||||
color: false
|
||||
pretty: false
|
||||
```
|
||||
|
||||
One can go as far as to make the case of an extension overwriting its shared logging config that received from the main `ocis.yaml` file. Because things can get out of hands pretty fast we recommend not mixing logging configuration values and either use the same global logging values for all extensions.
|
||||
|
||||
{{< hint warning >}}
|
||||
When overwriting a globally shared logging values, one *MUST* specify all values.
|
||||
{{< /hint >}}
|
||||
|
||||
### Log config keys
|
||||
|
||||
```yaml
|
||||
log:
|
||||
level: [ error | warning | info | debug ]
|
||||
color: [ true | false ]
|
||||
pretty: [ true | false ]
|
||||
file: [ path/to/log/file ] # MUST not be used with pretty = true
|
||||
```
|
||||
|
||||
## Default config values (in yaml)
|
||||
|
||||
TBD. Needs to be generated and merged with the env mappings.
|
||||
@@ -53,7 +53,7 @@ PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \
|
||||
|
||||
If you generated these certificates on your own, you might need to set `OCIS_INSECURE` to `true`.
|
||||
|
||||
For more configuration options check the configuration section in [oCIS]({{< ref "../configuration" >}}) and the oCIS extensions.
|
||||
For more configuration options check the configuration section in [oCIS]({{< ref "../config" >}}) and the oCIS extensions.
|
||||
|
||||
## Start the oCIS fullstack server with Docker Compose
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ Credentials:
|
||||
- oCIS: [ocis.ocis-s3.latest.owncloud.works](https://ocis.ocis-s3.latest.owncloud.works)
|
||||
- MinIO: [minio.ocis-s3.latest.owncloud.works](https://minio.ocis-s3.latest.owncloud.works)
|
||||
|
||||
# oCIS with CS3 users
|
||||
# oCIS with LDAP for users and groups
|
||||
|
||||
Credentials:
|
||||
|
||||
@@ -126,10 +126,10 @@ Credentials:
|
||||
|
||||
## Latest
|
||||
|
||||
- oCIS: [ocis.ocis-cs3-users.latest.owncloud.works](https://ocis.ocis-cs3-users.latest.owncloud.works)
|
||||
- LDAP admin: [ldap.ocis-cs3-users.latest.owncloud.works](https://ldap.ocis-cs3-users.latest.owncloud.works)
|
||||
- oCIS: [ocis.ocis-ldap.latest.owncloud.works](https://ocis.ocis-ldap.latest.owncloud.works)
|
||||
- LDAP admin: [ldap.ocis-ldap.latest.owncloud.works](https://ldap.ocis-ldap.latest.owncloud.works)
|
||||
|
||||
## Released
|
||||
|
||||
- oCIS: [ocis.ocis-cs3-users.released.owncloud.works](https://ocis.ocis-cs3-users.released.owncloud.works)
|
||||
- LDAP admin: [ldap.ocis-cs3-users.released.owncloud.works](https://ldap.ocis-cs3-users.released.owncloud.works)
|
||||
- oCIS: [ocis.ocis-ldap.released.owncloud.works](https://ocis.ocis-ldap.released.owncloud.works)
|
||||
- LDAP admin: [ldap.ocis-ldap.released.owncloud.works](https://ldap.ocis-ldap.released.owncloud.works)
|
||||
@@ -0,0 +1,129 @@
|
||||
---
|
||||
title: "oCIS with LDAP"
|
||||
date: 2020-10-12T14:04:00+01:00
|
||||
weight: 24
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
geekdocFilePath: ocis_ldap.md
|
||||
---
|
||||
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Overview
|
||||
|
||||
- Traefik generating self signed certificates for local setup or obtaining valid SSL certificates for a server setup
|
||||
- OpenLDAP server with demo users
|
||||
- LDAP admin interface to edit users
|
||||
- oCIS running behind Traefik as reverse proxy
|
||||
- oCIS is using the LDAP server as user backend
|
||||
|
||||
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_ldap)
|
||||
|
||||
## Server Deployment
|
||||
|
||||
### Requirements
|
||||
|
||||
- Linux server with docker and docker-compose installed
|
||||
- four domains set up and pointing to your server
|
||||
- ocis.\* for serving oCIS
|
||||
- ldap .\* for serving the LDAP managment UI
|
||||
- traefik.\* for serving the Traefik dashboard
|
||||
|
||||
See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
### Install this example
|
||||
|
||||
- Clone oCIS repository
|
||||
|
||||
`git clone https://github.com/owncloud/ocis.git`
|
||||
|
||||
- Go to the deployment example
|
||||
|
||||
`cd ocis/deployment/examples/ocis_ldap`
|
||||
|
||||
- Open the `.env` file in a text editor
|
||||
The file by default looks like this:
|
||||
|
||||
```bash
|
||||
# If you're on a internet facing server please comment out following line.
|
||||
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
|
||||
INSECURE=true
|
||||
|
||||
### Traefik settings ###
|
||||
# Serve Treafik dashboard. Defaults to "false".
|
||||
TRAEFIK_DASHBOARD=
|
||||
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
|
||||
TRAEFIK_DOMAIN=
|
||||
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
|
||||
TRAEFIK_BASIC_AUTH_USERS=
|
||||
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
|
||||
TRAEFIK_ACME_MAIL=
|
||||
|
||||
### oCIS settings ###
|
||||
# oCIS version. Defaults to "latest"
|
||||
OCIS_DOCKER_TAG=
|
||||
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
|
||||
OCIS_DOMAIN=
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
# Machine auth api key secret. Must be changed in order to have a secure oCIS. Defaults to "change-me-please"
|
||||
OCIS_MACHINE_AUTH_API_KEY=
|
||||
|
||||
### LDAP server settings ###
|
||||
# Password of LDAP user "cn=admin,dc=owncloud,dc=com". Defaults to "admin"
|
||||
LDAP_ADMIN_PASSWORD=
|
||||
|
||||
### LDAP manager settings ###
|
||||
# Domain of LDAP manager. Defaults to "ldap.owncloud.test"
|
||||
LDAP_MANAGER_DOMAIN=
|
||||
```
|
||||
|
||||
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
|
||||
|
||||
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` eg. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
|
||||
|
||||
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (eg. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
|
||||
|
||||
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
|
||||
|
||||
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
|
||||
|
||||
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, eg. `OCIS_DOMAIN=cloud.owncloud.test`.
|
||||
|
||||
You also must override the default secrets in `STORAGE_TRANSFER_SECRET` and `OCIS_JWT_SECRET` in order to secure your oCIS instance. Choose some random strings eg. from the output of `openssl rand -base64 32`. For more information see [secure an oCIS instance]({{< ref "./#secure-an-ocis-instance" >}}).
|
||||
|
||||
The OpenLDAP server in this example deployment has an admin users, which is also used as bind user in order to keep theses examples simple. You can change the default password "admin" to a different one by setting it to `LDAP_ADMIN_PASSWORD=...`.
|
||||
|
||||
Set your domain for the LDAP manager UI in `LDAP_MANAGER_DOMAIN=`, eg. `ldap.owncloud.test`.
|
||||
|
||||
Now you have configured everything and can save the file.
|
||||
|
||||
- Start the docker stack
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
- You now can visit oCIS and Traefik dashboard on your configured domains. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
|
||||
|
||||
## Local setup
|
||||
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
|
||||
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
|
||||
|
||||
On Linux and macOS you can add them to your `/etc/hosts` files like this:
|
||||
|
||||
```
|
||||
127.0.0.1 cloud.owncloud.test
|
||||
127.0.0.1 keycloak.owncloud.test
|
||||
127.0.0.1 ldap.owncloud.test
|
||||
127.0.0.1 traefik.owncloud.test
|
||||
```
|
||||
|
||||
After that you're ready to start the application stack:
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}}). You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
|
||||
@@ -71,7 +71,7 @@ Open [https://localhost:9200](https://localhost:9200) and [login using one of th
|
||||
|
||||
### Basic Management Commands
|
||||
|
||||
The oCIS single binary contains multiple extensions and the `ocis` command helps you to manage them. You already used `ocis server` to run all available extensions in the [Run oCIS]({{< ref "#run-ocis" >}}) section. We now will show you some more management commands, which you may also explore by typing `ocis --help` or going to the [docs]({{< ref "../configuration" >}}).
|
||||
The oCIS single binary contains multiple extensions and the `ocis` command helps you to manage them. You already used `ocis server` to run all available extensions in the [Run oCIS]({{< ref "#run-ocis" >}}) section. We now will show you some more management commands, which you may also explore by typing `ocis --help` or going to the [docs]({{< ref "../config" >}}).
|
||||
|
||||
To start oCIS server:
|
||||
|
||||
|
||||
@@ -7,6 +7,32 @@ geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocFilePath: release_notes.md
|
||||
---
|
||||
|
||||
## ownCloud Infinite Scale 1.15.0 Technology Preview
|
||||
|
||||
Version 1.15.0 brings improvements for the app provider (external application integrations) and more progress on the 'Spaces' feature. Public links now support multi-file and folder downloads as well as all other external application integrations. ownCloud Web 4.5.0 furthermore comes with improvements for use with the ownCloud Classic backend.
|
||||
|
||||
The most prominent changes in ownCloud Infinite Scale 1.15.0 and ownCloud Web 4.5.0 comprise:
|
||||
|
||||
- Multi-file and folder downloads as well as other external application (Collabora Online, ONLYOFFICE, CodiMD, etc.) integrations now work in public links. [web#5924](https://github.com/owncloud/web/pull/5924)
|
||||
- New files (created/uploaded and file versions) will now be highlighted in ownCloud Web. [web#6020](https://github.com/owncloud/web/pull/6020)
|
||||
- When using ownCloud Web with the ownCloud Classic backend, Web will now automatically display app entries in the app switcher based on the entries in the app switcher of the Classic UI (e.g., Activity, Market) so that users can easily find and use the apps. [web#5996](https://github.com/owncloud/web/pull/5996)
|
||||
- The width of the right sidebar in the Files app of ownCloud Web has been reduced to make it better usable on medium-sized screens. [web#5983](https://github.com/owncloud/web/pull/5983)
|
||||
- ownCloud Web has received performance and other improvements for external application integrations. [web#5952](https://github.com/owncloud/web/pull/5952)
|
||||
- Spaces: A new API endpoint has been introduced that allows listing all Spaces in an installation. [ocis#2692](https://github.com/owncloud/ocis/pull/2692)
|
||||
- Spaces: A permission has been added to control which users can list all Spaces. [cs3org/reva#2207](https://github.com/cs3org/reva/pull/2207)
|
||||
- The app provider (for external application integrations) has received improvements for announcing and prioritizing applications as well as for error handling. [cs3org/reva#2230](https://github.com/cs3org/reva/pull/2230) [cs3org/reva#2263](https://github.com/cs3org/reva/pull/2263) [cs3org/reva#2258](https://github.com/cs3org/reva/pull/2258)
|
||||
- The configuration defaults have been revisited and improved towards better security. [ocis#2700](https://github.com/owncloud/ocis/issues/2700)
|
||||
- IPv6 support for Infinite Scale has been added. [ocis#2698](https://github.com/owncloud/ocis/pull/2698)
|
||||
- A capability for the 'Resharing' feature will now be correctly announced. [ocis#2690](https://github.com/owncloud/ocis/pull/2690)
|
||||
- Restoring a file version now works properly. [cs3org/reva#2270](https://github.com/cs3org/reva/pull/2270)
|
||||
|
||||
You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.15.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v4.5.0) for further details on what has changed.
|
||||
|
||||
### Breaking changes
|
||||
{{< hint warning >}}
|
||||
We are currently in a Tech Preview state and breaking changes may occur at any time. For more information see our [release roadmap]({{< ref "./release_roadmap" >}})
|
||||
{{< /hint >}}
|
||||
|
||||
## ownCloud Infinite Scale 1.14.0 Technology Preview
|
||||
|
||||
Version 1.14.0 brings more progress on the backend for the 'Spaces' and 'Quota' features. ownCloud Web 4.4.0 has received performance and usability improvements.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Do not edit this file with editors other than diagrams.net -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="532px" height="1142px" viewBox="-0.5 -0.5 532 1142" content="<mxfile host="app.diagrams.net" modified="2021-11-08T23:06:05.492Z" agent="5.0 (Macintosh)" etag="ybBQ4usLvvc1Wv6kXIq4" version="15.7.0" type="google"><diagram id="ERaARL9lu1Ro2sCK4Dvv" name="Page-1">7Vtbk6o4EP41Pq4FoqM+jjNzzlbtbtWpnandPY8RIuRsSNgQvJxfvx0SboIKU+hYoy9KOkkn6a87/RFg4DyF268CRcEf3MN0MLK87cB5HoxG09kMfpVgpwXj2VwLfEE8LbILwSv5iY3QMtKEeDiuNJScU0miqtDljGFXVmRICL6pNltxWh01Qj6uCV5dROvSv4knAy2dTaxC/ismfpCNbFumJkRZYyOIA+TxTUnkvAycJ8G51Ffh9glTZbvMLrrflwO1+cQEZrJNhzja8dWb+/iayLdvs8Uopn/+9os90mrWiCZmxYPRAwqjgbPwQe0C6rhLYjV/LNZYmLXIXWYgibeqXSBDCgIbLgWOyU+0TBtYUEaJ5LEGVlUjSnwG1y7MG/Q5C9AqCVj80VSExPNU50XECZMpfpPFYPIMkhWh9IlTDt2eGWeqUSwF/xfvCQVPmIc9MwGzRBgGbw8az84hAVfGPMRS7KCJ6eDMDYrGjTNQNyWfMKKg5A5ZM2S80M8VF0DBhcGqC25OA257yPhghejg2k3AGJwKN+1gk/GkYpPc9UtGsedNVpmfyyzTS1jlCCB1Wx32l2bTTM/mMU2BTlXoemStBjTRB9L/ErUnLSheyaIEV2ZD0L2WYl8C00pVZdI9w28CIvFrhFxV3kCyqO4asD1Gqibc+iqRDJcoJu7Q424SKsu3CeHDLlHH5eOAeOgNCEflR8qXSI1Jue8T5msfXhG/PU7vGRxGGziPjWPo5MGWcaTTRySwlLu0tSUFrLlNJ1fv5536ULwG7pH2IWzF+1xuJPh213bBgZRRy7anyhbyPGMGyiFFBjwGRY/zkdpq25ikNUwnZ1KGcYVo3AqTk1pLOPen9IAjFDqR6wJBUNSiHaI9mrE0Nw8vk+Yw3e/Uk+Ga9LSD9X07/rupYRqE10IMu2SVTEuVLE7quX/clHIezpb768lfkfrhDgEyn5XQd6JpJWyml+Tx88/Pyo7fRIys6k3EpPVNxPmYstUfKJfnBjbcl925wfu5wY1nu47RajdEa1Nuy88G+o/WcS1aU7b+uZNbN5jGszpMF01z9uTW81wOwRXluf5OIj4gz00eprMuu/d9P2/jlW338/PdqtSPcLO79Vve0cfT6ckdvXH3OBtOsxpOYPeESn0GqQ/MirNI3S6+UfRGdjUfz5rC7LIJuX7jWYYvPyC7I5jFXwsELxqA2aOtj3wCuH/QlT8WP2UVe3Y2s9zqcy4Nf/cHXWeE4n6Ocj9H+VAmfmUpplPc5i9VtCPk9vkSTdOrJu8JY8YBA6zmzTfwCw7E1NirQfGKURJFlCiS0d+j2w0Bu9UfjycCScJhAmAUSwa4RHD6G3sleJirByfGLE7HtDh4ykZAnshrCQuwEnh9jq9XNIQeb0FqYBextHsMAWstccr0AgJIwLBWEhvyx/qcA2ZrIjjTyQ1sLIiK2+HNbwbdmJVtNdzwjZo2gvOl8/pB68UJ5/55xTUQzhs42jziD1dFOD/ngeaFCGfb96y68M3edN7pZl9080DUXg/dbHqHtxTEGrSURWnmxOFPqOkh5qWzFEq6UT8xLghWiX71R25KrM0MU/BM5aciNCzTqlBBjdKwz5m8pYpjFGqCTb04D79sbMR2mV0VJfzL0F1T3d9USq8WWSgFw0VCkNRIHt+kyHFtC6KAg+iKgBaQNe5zFjne8Z1rniBVk/33+Ju4ZtPnDWfL5I5TwwJ7Pn41RS5kwH3OEH0ppHuGKdr8znlk8Pmh0p35yEhBVwUXb4n8R3UfTkzpe6nmeWs0p4VdqfAN9gBYtwJcyxjYoKRIFb+X6wpVaWlXLu0r04ZQqz8OLxiLJ8LFR6yafT+FhI+P5Yh5s7sITFEapeVB+4d+fIf+46DXD6r6xx6KxZduaV3pc0Hn5X8=</diagram></mxfile>"><defs/><g><rect x="185" y="0" width="80" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 225px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgba(0, 0, 0, 1); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">> ocis server</div></div></div></foreignObject><text x="225" y="14" fill="rgba(0, 0, 0, 1)" font-family="Helvetica" font-size="12px" text-anchor="middle">> ocis server</text></switch></g><path d="M 328.08 138.57 L 328.08 370 L 140 370 L 140 100 L 301.21 100 Z" fill="rgba(255, 255, 255, 1)" stroke="rgba(0, 0, 0, 1)" stroke-miterlimit="10" pointer-events="none"/><path d="M 301.21 100 C 303.4 109.02 299.8 118.32 291.62 124.8 L 330 140.5 Z" fill="rgba(255, 255, 255, 1)" stroke="rgba(0, 0, 0, 1)" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 188px; height: 1px; padding-top: 235px; margin-left: 141px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgba(0, 0, 0, 1); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><div align="left"><br /></div></div></div></div></foreignObject><text x="235" y="239" fill="rgba(0, 0, 0, 1)" font-family="Helvetica" font-size="12px" text-anchor="middle">
</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width:Line truncated
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -25,7 +25,6 @@ include ../.make/generate.mk
|
||||
|
||||
.PHONY: ci-go-generate
|
||||
ci-go-generate: # CI runs ci-node-generate automatically before this target
|
||||
@go generate ./...
|
||||
|
||||
.PHONY: ci-node-generate
|
||||
ci-node-generate:
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"debug": {
|
||||
"addr": "0.0.0.0:9124",
|
||||
"addr": "0.0.0.0:9129",
|
||||
"token": "",
|
||||
"pprof": false,
|
||||
"zpages": false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
debug:
|
||||
addr: 0.0.0.0:9124
|
||||
addr: 0.0.0.0:9129
|
||||
token:
|
||||
pprof: false
|
||||
zpages: false
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/glauth/pkg/config"
|
||||
"github.com/owncloud/ocis/glauth/pkg/flagset"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "health",
|
||||
Usage: "Check health status",
|
||||
Flags: flagset.HealthWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
|
||||
+21
-57
@@ -3,15 +3,13 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/glauth/pkg/config"
|
||||
"github.com/owncloud/ocis/glauth/pkg/flagset"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
oclog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/thejerf/suture/v4"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -23,21 +21,16 @@ func Execute(cfg *config.Config) error {
|
||||
Version: version.String,
|
||||
Usage: "Serve GLAuth API for oCIS",
|
||||
Compiled: version.Compiled(),
|
||||
|
||||
Authors: []*cli.Author{
|
||||
{
|
||||
Name: "ownCloud GmbH",
|
||||
Email: "support@owncloud.com",
|
||||
},
|
||||
},
|
||||
|
||||
Flags: flagset.RootWithConfig(cfg),
|
||||
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Version = version.String
|
||||
return nil
|
||||
},
|
||||
|
||||
Commands: []*cli.Command{
|
||||
Server(cfg),
|
||||
Health(cfg),
|
||||
@@ -59,58 +52,32 @@ func Execute(cfg *config.Config) error {
|
||||
|
||||
// NewLogger initializes a service-specific logger instance.
|
||||
func NewLogger(cfg *config.Config) log.Logger {
|
||||
return log.NewLogger(
|
||||
log.Name("glauth"),
|
||||
log.Level(cfg.Log.Level),
|
||||
log.Pretty(cfg.Log.Pretty),
|
||||
log.Color(cfg.Log.Color),
|
||||
log.File(cfg.Log.File),
|
||||
)
|
||||
return oclog.LoggerFromConfig("glauth", *cfg.Log)
|
||||
}
|
||||
|
||||
// ParseConfig loads glauth configuration from Viper known paths.
|
||||
// ParseConfig loads glauth configuration from known paths.
|
||||
func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
sync.ParsingViperConfig.Lock()
|
||||
defer sync.ParsingViperConfig.Unlock()
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
viper.SetEnvPrefix("GLAUTH")
|
||||
viper.AutomaticEnv()
|
||||
|
||||
if c.IsSet("config-file") {
|
||||
viper.SetConfigFile(c.String("config-file"))
|
||||
} else {
|
||||
viper.SetConfigName("glauth")
|
||||
|
||||
viper.AddConfigPath("/etc/ocis")
|
||||
viper.AddConfigPath("$HOME/.ocis")
|
||||
viper.AddConfigPath("./config")
|
||||
conf, err := ociscfg.BindSourcesToStructs("glauth", cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("unsupported config type")
|
||||
default:
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("failed to read config")
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &shared.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
if err := viper.Unmarshal(&cfg); err != nil {
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("failed to parse config")
|
||||
}
|
||||
|
||||
return nil
|
||||
// load all env variables relevant to the config in the current context.
|
||||
conf.LoadOSEnv(config.GetEnv(cfg), false)
|
||||
bindings := config.StructMappings(cfg)
|
||||
return ociscfg.BindEnv(conf, bindings)
|
||||
}
|
||||
|
||||
// SutureService allows for the glauth command to be embedded and supervised by a suture supervisor tree.
|
||||
@@ -120,10 +87,7 @@ type SutureService struct {
|
||||
|
||||
// NewSutureService creates a new glauth.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.GLAuth.Supervised = true
|
||||
}
|
||||
cfg.GLAuth.Log.File = cfg.Log.File
|
||||
cfg.GLAuth.Commons = cfg.Commons
|
||||
return SutureService{
|
||||
cfg: cfg.GLAuth,
|
||||
}
|
||||
|
||||
@@ -8,14 +8,12 @@ import (
|
||||
"github.com/oklog/run"
|
||||
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/owncloud/ocis/glauth/pkg/config"
|
||||
"github.com/owncloud/ocis/glauth/pkg/flagset"
|
||||
"github.com/owncloud/ocis/glauth/pkg/metrics"
|
||||
"github.com/owncloud/ocis/glauth/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/glauth/pkg/server/glauth"
|
||||
"github.com/owncloud/ocis/glauth/pkg/tracing"
|
||||
pkgcrypto "github.com/owncloud/ocis/ocis-pkg/crypto"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -24,24 +22,15 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: "Start integrated server",
|
||||
Flags: flagset.ServerWithConfig(cfg),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
// StringSliceFlag doesn't support Destination
|
||||
// UPDATE Destination on string flags supported. Wait for https://github.com/urfave/cli/pull/1078 to get to micro/cli
|
||||
if len(ctx.StringSlice("backend-server")) > 0 {
|
||||
cfg.Backend.Servers = ctx.StringSlice("backend-server")
|
||||
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(ctx.StringSlice("fallback-server")) > 0 {
|
||||
cfg.Fallback.Servers = ctx.StringSlice("fallback-server")
|
||||
}
|
||||
if !cfg.Supervised {
|
||||
return ParseConfig(ctx, cfg)
|
||||
}
|
||||
logger.Debug().Strs("backend-server", ctx.StringSlice("backend-server")).Str("service", "glauth").Msg("ignoring config file parsing when running supervised")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
@@ -188,10 +177,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
})
|
||||
}
|
||||
|
||||
if !cfg.Supervised {
|
||||
sync.Trap(&gr, cancel)
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
|
||||
+90
-45
@@ -1,78 +1,79 @@
|
||||
package config
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
"path"
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
type Log struct {
|
||||
Level string
|
||||
Pretty bool
|
||||
Color bool
|
||||
File string
|
||||
}
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
)
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string
|
||||
Token string
|
||||
Pprof bool
|
||||
Zpages bool
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Token string `ocisConfig:"token"`
|
||||
Pprof bool `ocisConfig:"pprof"`
|
||||
Zpages bool `ocisConfig:"zpages"`
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string
|
||||
Namespace string
|
||||
Root string
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
Root string `ocisConfig:"root"`
|
||||
}
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool
|
||||
Type string
|
||||
Endpoint string
|
||||
Collector string
|
||||
Service string
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Type string `ocisConfig:"type"`
|
||||
Endpoint string `ocisConfig:"endpoint"`
|
||||
Collector string `ocisConfig:"collector"`
|
||||
Service string `ocisConfig:"service"`
|
||||
}
|
||||
|
||||
// Ldap defined the available LDAP configuration.
|
||||
type Ldap struct {
|
||||
Addr string
|
||||
Enabled bool
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Addr string `ocisConfig:"addr"`
|
||||
}
|
||||
|
||||
// Ldaps defined the available LDAPS configuration.
|
||||
type Ldaps struct {
|
||||
Addr string
|
||||
Enabled bool
|
||||
Cert string
|
||||
Key string
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Cert string `ocisConfig:"cert"`
|
||||
Key string `ocisConfig:"key"`
|
||||
}
|
||||
|
||||
// Backend defined the available backend configuration.
|
||||
type Backend struct {
|
||||
Datastore string
|
||||
BaseDN string
|
||||
Insecure bool
|
||||
NameFormat string
|
||||
GroupFormat string
|
||||
Servers []string
|
||||
SSHKeyAttr string
|
||||
UseGraphAPI bool
|
||||
Datastore string `ocisConfig:"datastore"`
|
||||
BaseDN string `ocisConfig:"base_dn"`
|
||||
Insecure bool `ocisConfig:"insecure"`
|
||||
NameFormat string `ocisConfig:"name_format"`
|
||||
GroupFormat string `ocisConfig:"group_format"`
|
||||
Servers []string `ocisConfig:"servers"`
|
||||
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
|
||||
UseGraphAPI bool `ocisConfig:"use_graph_api"`
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
File string
|
||||
Log Log
|
||||
Debug Debug
|
||||
HTTP HTTP
|
||||
Tracing Tracing
|
||||
Ldap Ldap
|
||||
Ldaps Ldaps
|
||||
Backend Backend
|
||||
Fallback Backend
|
||||
Version string
|
||||
RoleBundleUUID string
|
||||
*shared.Commons
|
||||
|
||||
File string `ocisConfig:"file"`
|
||||
Log *shared.Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Ldap Ldap `ocisConfig:"ldap"`
|
||||
Ldaps Ldaps `ocisConfig:"ldaps"`
|
||||
Backend Backend `ocisConfig:"backend"`
|
||||
Fallback Backend `ocisConfig:"fallback"`
|
||||
Version string `ocisConfig:"version"`
|
||||
RoleBundleUUID string `ocisConfig:"role_bundle_uuid"`
|
||||
|
||||
Context context.Context
|
||||
Supervised bool
|
||||
@@ -82,3 +83,47 @@ type Config struct {
|
||||
func New() *Config {
|
||||
return &Config{}
|
||||
}
|
||||
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9129",
|
||||
},
|
||||
HTTP: HTTP{},
|
||||
Tracing: Tracing{
|
||||
Type: "jaeger",
|
||||
Service: "glauth",
|
||||
},
|
||||
Ldap: Ldap{
|
||||
Enabled: true,
|
||||
Addr: "127.0.0.1:9125",
|
||||
},
|
||||
Ldaps: Ldaps{
|
||||
Addr: "127.0.0.1:9126",
|
||||
Enabled: true,
|
||||
Cert: path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt"),
|
||||
Key: path.Join(defaults.BaseDataPath(), "ldap", "ldap.key"),
|
||||
},
|
||||
Backend: Backend{
|
||||
Datastore: "accounts",
|
||||
BaseDN: "dc=ocis,dc=test",
|
||||
Insecure: false,
|
||||
NameFormat: "cn",
|
||||
GroupFormat: "ou",
|
||||
Servers: nil,
|
||||
SSHKeyAttr: "sshPublicKey",
|
||||
UseGraphAPI: true,
|
||||
},
|
||||
Fallback: Backend{
|
||||
Datastore: "",
|
||||
BaseDN: "dc=ocis,dc=test",
|
||||
Insecure: false,
|
||||
NameFormat: "cn",
|
||||
GroupFormat: "ou",
|
||||
Servers: nil,
|
||||
SSHKeyAttr: "sshPublicKey",
|
||||
UseGraphAPI: true,
|
||||
},
|
||||
RoleBundleUUID: "71881883-1768-46bd-a24d-a356a2afdf7f", // BundleUUIDRoleAdmin
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package config
|
||||
|
||||
import "github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
|
||||
// with all the environment variables an extension supports.
|
||||
func GetEnv(cfg *Config) []string {
|
||||
var r = make([]string, len(structMappings(cfg)))
|
||||
for i := range structMappings(cfg) {
|
||||
r = append(r, structMappings(cfg)[i].EnvVars...)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
|
||||
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
|
||||
// us propagate changes easier.
|
||||
func StructMappings(cfg *Config) []shared.EnvBinding {
|
||||
return structMappings(cfg)
|
||||
}
|
||||
|
||||
// structMappings binds a set of environment variables to a destination on cfg.
|
||||
func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
return []shared.EnvBinding{
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_LEVEL", "GLAUTH_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_PRETTY", "GLAUTH_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_COLOR", "GLAUTH_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_FILE", "GLAUTH_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_CONFIG_FILE"},
|
||||
Destination: &cfg.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENABLED", "GLAUTH_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_TYPE", "GLAUTH_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GLAUTH_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GLAUTH_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_ROLE_BUNDLE_ID"},
|
||||
Destination: &cfg.RoleBundleUUID,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAP_ADDR"},
|
||||
Destination: &cfg.Ldap.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAP_ENABLED"},
|
||||
Destination: &cfg.Ldap.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAPS_ADDR"},
|
||||
Destination: &cfg.Ldaps.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAPS_ENABLED"},
|
||||
Destination: &cfg.Ldaps.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAPS_CERT"},
|
||||
Destination: &cfg.Ldaps.Cert,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_LDAPS_KEY"},
|
||||
Destination: &cfg.Ldaps.Key,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_BASEDN"},
|
||||
Destination: &cfg.Backend.BaseDN,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_NAME_FORMAT"},
|
||||
Destination: &cfg.Backend.NameFormat,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_GROUP_FORMAT"},
|
||||
Destination: &cfg.Backend.GroupFormat,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_SSH_KEY_ATTR"},
|
||||
Destination: &cfg.Backend.SSHKeyAttr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_DATASTORE"},
|
||||
Destination: &cfg.Backend.Datastore,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_INSECURE"},
|
||||
Destination: &cfg.Backend.Insecure,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_BACKEND_USE_GRAPHAPI"},
|
||||
Destination: &cfg.Backend.UseGraphAPI,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_BASEDN"},
|
||||
Destination: &cfg.Fallback.BaseDN,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_NAME_FORMAT"},
|
||||
Destination: &cfg.Fallback.NameFormat,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_GROUP_FORMAT"},
|
||||
Destination: &cfg.Fallback.GroupFormat,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_SSH_KEY_ATTR"},
|
||||
Destination: &cfg.Fallback.SSHKeyAttr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_DATASTORE"},
|
||||
Destination: &cfg.Fallback.Datastore,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_INSECURE"},
|
||||
Destination: &cfg.Fallback.Insecure,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_USE_GRAPHAPI"},
|
||||
Destination: &cfg.Fallback.UseGraphAPI,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,299 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/glauth/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// RootWithConfig applies cfg to the root flagset
|
||||
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-level",
|
||||
Usage: "Set logging level",
|
||||
EnvVars: []string{"GLAUTH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-pretty",
|
||||
Usage: "Enable pretty logging",
|
||||
EnvVars: []string{"GLAUTH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-color",
|
||||
Usage: "Enable colored logging",
|
||||
EnvVars: []string{"GLAUTH_LOG_COLOR", "OCIS_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: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ServerWithConfig applies cfg to the root flagset
|
||||
func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Enable log to file",
|
||||
EnvVars: []string{"GLAUTH_LOG_FILE", "OCIS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Value: flags.OverrideDefaultString(cfg.File, ""),
|
||||
Usage: "Path to config file",
|
||||
EnvVars: []string{"GLAUTH_CONFIG_FILE"},
|
||||
Destination: &cfg.File,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"GLAUTH_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"GLAUTH_TRACING_TYPE", "OCIS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"GLAUTH_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"GLAUTH_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "glauth"),
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"GLAUTH_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-pprof",
|
||||
Usage: "Enable pprof debugging",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-zpages",
|
||||
Usage: "Enable zpages debugging",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "role-bundle-id",
|
||||
Value: flags.OverrideDefaultString(cfg.RoleBundleUUID, "71881883-1768-46bd-a24d-a356a2afdf7f"), // BundleUUIDRoleAdmin
|
||||
Usage: "roleid used to make internal grpc requests",
|
||||
EnvVars: []string{"GLAUTH_ROLE_BUNDLE_ID"},
|
||||
Destination: &cfg.RoleBundleUUID,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "127.0.0.1:9125"),
|
||||
Usage: "Address to bind ldap server",
|
||||
EnvVars: []string{"GLAUTH_LDAP_ADDR"},
|
||||
Destination: &cfg.Ldap.Addr,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "ldap-enabled",
|
||||
Value: flags.OverrideDefaultBool(cfg.Ldap.Enabled, true),
|
||||
Usage: "Enable ldap server",
|
||||
EnvVars: []string{"GLAUTH_LDAP_ENABLED"},
|
||||
Destination: &cfg.Ldap.Enabled,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "ldaps-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "127.0.0.1:9126"),
|
||||
Usage: "Address to bind ldaps server",
|
||||
EnvVars: []string{"GLAUTH_LDAPS_ADDR"},
|
||||
Destination: &cfg.Ldaps.Addr,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "ldaps-enabled",
|
||||
Value: flags.OverrideDefaultBool(cfg.Ldaps.Enabled, true),
|
||||
Usage: "Enable ldaps server",
|
||||
EnvVars: []string{"GLAUTH_LDAPS_ENABLED"},
|
||||
Destination: &cfg.Ldaps.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldaps-cert",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldaps.Cert, path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt")),
|
||||
Usage: "path to ldaps certificate in PEM format",
|
||||
EnvVars: []string{"GLAUTH_LDAPS_CERT"},
|
||||
Destination: &cfg.Ldaps.Cert,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldaps-key",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldaps.Key, path.Join(defaults.BaseDataPath(), "ldap", "ldap.key")),
|
||||
Usage: "path to ldaps key in PEM format",
|
||||
EnvVars: []string{"GLAUTH_LDAPS_KEY"},
|
||||
Destination: &cfg.Ldaps.Key,
|
||||
},
|
||||
|
||||
// backend config
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "backend-basedn",
|
||||
Value: flags.OverrideDefaultString(cfg.Backend.BaseDN, "dc=ocis,dc=test"),
|
||||
Usage: "base distinguished name to expose",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_BASEDN"},
|
||||
Destination: &cfg.Backend.BaseDN,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "backend-name-format",
|
||||
Value: flags.OverrideDefaultString(cfg.Backend.NameFormat, "cn"),
|
||||
Usage: "name attribute for entries to expose. typically cn or uid",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_NAME_FORMAT"},
|
||||
Destination: &cfg.Backend.NameFormat,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "backend-group-format",
|
||||
Value: flags.OverrideDefaultString(cfg.Backend.GroupFormat, "ou"),
|
||||
Usage: "name attribute for entries to expose. typically ou, cn or dc",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_GROUP_FORMAT"},
|
||||
Destination: &cfg.Backend.GroupFormat,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "backend-ssh-key-attr",
|
||||
Value: flags.OverrideDefaultString(cfg.Backend.SSHKeyAttr, "sshPublicKey"),
|
||||
Usage: "ssh key attribute for entries to expose",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_SSH_KEY_ATTR"},
|
||||
Destination: &cfg.Backend.SSHKeyAttr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "backend-datastore",
|
||||
Value: flags.OverrideDefaultString(cfg.Backend.Datastore, "accounts"),
|
||||
// TODO bring back config / flat file support
|
||||
Usage: "datastore to use as the backend. one of accounts, ldap or owncloud",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_DATASTORE"},
|
||||
Destination: &cfg.Backend.Datastore,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "backend-insecure",
|
||||
Value: flags.OverrideDefaultBool(cfg.Backend.Insecure, false),
|
||||
Usage: "Allow insecure requests to the datastore",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_INSECURE"},
|
||||
Destination: &cfg.Backend.Insecure,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "backend-server",
|
||||
Value: cli.NewStringSlice(),
|
||||
Usage: `--backend-server https://demo.owncloud.com/apps/graphapi/v1.0 [--backend-server "https://demo2.owncloud.com/apps/graphapi/v1.0"]`,
|
||||
EnvVars: []string{"GLAUTH_BACKEND_SERVERS"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "backend-use-graphapi",
|
||||
Value: flags.OverrideDefaultBool(cfg.Backend.UseGraphAPI, true),
|
||||
Usage: "use Graph API, only for owncloud datastore",
|
||||
EnvVars: []string{"GLAUTH_BACKEND_USE_GRAPHAPI"},
|
||||
Destination: &cfg.Backend.UseGraphAPI,
|
||||
},
|
||||
|
||||
// fallback config
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "fallback-basedn",
|
||||
Value: flags.OverrideDefaultString(cfg.Fallback.BaseDN, "dc=ocis,dc=test"),
|
||||
Usage: "base distinguished name to expose",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_BASEDN"},
|
||||
Destination: &cfg.Fallback.BaseDN,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "fallback-name-format",
|
||||
Value: flags.OverrideDefaultString(cfg.Fallback.NameFormat, "cn"),
|
||||
Usage: "name attribute for entries to expose. typically cn or uid",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_NAME_FORMAT"},
|
||||
Destination: &cfg.Fallback.NameFormat,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "fallback-group-format",
|
||||
Value: flags.OverrideDefaultString(cfg.Fallback.GroupFormat, "ou"),
|
||||
Usage: "name attribute for entries to expose. typically ou, cn or dc",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_GROUP_FORMAT"},
|
||||
Destination: &cfg.Fallback.GroupFormat,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "fallback-ssh-key-attr",
|
||||
Value: flags.OverrideDefaultString(cfg.Fallback.SSHKeyAttr, "sshPublicKey"),
|
||||
Usage: "ssh key attribute for entries to expose",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_SSH_KEY_ATTR"},
|
||||
Destination: &cfg.Fallback.SSHKeyAttr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "fallback-datastore",
|
||||
Value: flags.OverrideDefaultString(cfg.Fallback.Datastore, ""),
|
||||
// TODO bring back config / flat file support
|
||||
Usage: "datastore to use as the fallback. one of accounts, ldap or owncloud",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_DATASTORE"},
|
||||
Destination: &cfg.Fallback.Datastore,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "fallback-insecure",
|
||||
Value: flags.OverrideDefaultBool(cfg.Fallback.Insecure, false),
|
||||
Usage: "Allow insecure requests to the datastore",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_INSECURE"},
|
||||
Destination: &cfg.Fallback.Insecure,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "fallback-server",
|
||||
Value: cli.NewStringSlice("https://demo.owncloud.com/apps/graphapi/v1.0"),
|
||||
Usage: `--fallback-server http://internal1.example.com [--fallback-server http://internal2.example.com]`,
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_SERVERS"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "fallback-use-graphapi",
|
||||
Value: flags.OverrideDefaultBool(cfg.Fallback.UseGraphAPI, true),
|
||||
Usage: "use Graph API, only for owncloud datastore",
|
||||
EnvVars: []string{"GLAUTH_FALLBACK_USE_GRAPHAPI"},
|
||||
Destination: &cfg.Fallback.UseGraphAPI,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -19,25 +19,26 @@ require (
|
||||
github.com/blevesearch/bleve/v2 v2.2.2
|
||||
github.com/coreos/go-oidc/v3 v3.1.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304
|
||||
github.com/cs3org/reva v1.16.0
|
||||
github.com/cs3org/reva v1.17.0
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
github.com/go-chi/cors v1.2.0
|
||||
github.com/go-chi/render v1.0.1
|
||||
github.com/go-ldap/ldap/v3 v3.4.1
|
||||
github.com/go-logr/logr v0.4.0
|
||||
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
|
||||
github.com/gofrs/uuid v4.1.0+incompatible
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
github.com/gofrs/uuid v4.2.0+incompatible
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/gookit/config/v2 v2.0.27
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1
|
||||
github.com/iancoleman/strcase v0.2.0
|
||||
github.com/justinas/alice v1.2.0
|
||||
github.com/libregraph/lico v0.52.0
|
||||
github.com/libregraph/lico v0.53.0
|
||||
github.com/mennanov/fieldmask-utils v0.5.0
|
||||
github.com/mitchellh/mapstructure v1.4.2
|
||||
github.com/mitchellh/mapstructure v1.4.3
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
|
||||
github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484
|
||||
github.com/nmcclain/ldap v0.0.0-20210720162743-7f8d1e44eeba
|
||||
@@ -51,7 +52,6 @@ require (
|
||||
github.com/rs/zerolog v1.26.0
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/spf13/viper v1.9.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/thejerf/suture/v4 v4.0.1
|
||||
github.com/urfave/cli/v2 v2.3.0
|
||||
@@ -65,15 +65,17 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.2.0
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa
|
||||
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
|
||||
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
|
||||
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12
|
||||
google.golang.org/grpc v1.42.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gotest.tools/v3 v3.0.3
|
||||
stash.kopano.io/kgol/rndm v1.1.1
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.93.3 // indirect
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect
|
||||
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
@@ -85,7 +87,7 @@ require (
|
||||
github.com/RoaringBitmap/roaring v0.9.4 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
|
||||
github.com/aws/aws-sdk-go v1.42.5 // indirect
|
||||
github.com/aws/aws-sdk-go v1.42.19 // indirect
|
||||
github.com/beevik/etree v1.1.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bitly/go-simplejson v0.5.0 // indirect
|
||||
@@ -130,23 +132,23 @@ require (
|
||||
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.4.2 // indirect
|
||||
github.com/go-kit/log v0.2.0 // indirect
|
||||
github.com/go-ldap/ldap/v3 v3.4.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gomodule/redigo v1.8.5 // indirect
|
||||
github.com/gomodule/redigo v1.8.6 // indirect
|
||||
github.com/google/go-cmp v0.5.6 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/gookit/goutil v0.3.15 // indirect
|
||||
github.com/gorilla/schema v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.0.0 // indirect
|
||||
github.com/hashicorp/go-plugin v1.4.3 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
|
||||
github.com/huandu/xstrings v1.3.2 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
@@ -160,7 +162,6 @@ require (
|
||||
github.com/klauspost/compress v1.13.6 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
|
||||
github.com/longsleep/go-metrics v1.0.0 // indirect
|
||||
github.com/magiconair/properties v1.8.5 // indirect
|
||||
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.11 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
@@ -171,7 +172,7 @@ require (
|
||||
github.com/miekg/dns v1.1.43 // indirect
|
||||
github.com/mileusna/useragent v1.0.2 // indirect
|
||||
github.com/minio/md5-simd v1.1.2 // indirect
|
||||
github.com/minio/minio-go/v7 v7.0.15 // indirect
|
||||
github.com/minio/minio-go/v7 v7.0.16 // indirect
|
||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
@@ -189,7 +190,6 @@ require (
|
||||
github.com/orcaman/concurrent-map v0.0.0-20210501183033-44dafcb38ecc // indirect
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||
github.com/pkg/xattr v0.4.4 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/pquerna/cachecontrol v0.1.0 // indirect
|
||||
@@ -213,13 +213,9 @@ require (
|
||||
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
|
||||
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
|
||||
github.com/sony/gobreaker v0.4.1 // indirect
|
||||
github.com/spf13/afero v1.6.0 // indirect
|
||||
github.com/spf13/cast v1.4.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/steveyen/gtreap v0.1.0 // indirect
|
||||
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tus/tusd v1.6.0 // indirect
|
||||
github.com/wk8/go-ordered-map v0.2.0 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.1 // indirect
|
||||
@@ -241,7 +237,6 @@ require (
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
stash.kopano.io/kgol/kcc-go/v5 v5.0.1 // indirect
|
||||
stash.kopano.io/kgol/oidc-go v0.3.2 // indirect
|
||||
|
||||
@@ -37,7 +37,6 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7
|
||||
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/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU=
|
||||
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=
|
||||
@@ -106,6 +105,7 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
|
||||
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
|
||||
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
|
||||
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
|
||||
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
|
||||
github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.0/go.mod h1:kX6YddBkXqqywAe8c9LyvgTCyFuZCTMF4cRPQhc3Fy8=
|
||||
@@ -121,12 +121,14 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
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/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
|
||||
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||
github.com/arl/statsviz v0.4.0/go.mod h1:+5inUy/dxy11x/KSmicG3ZrEEy0Yr81AFm3dn4QC04M=
|
||||
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-radix v1.0.0/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=
|
||||
@@ -167,8 +169,8 @@ github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/
|
||||
github.com/aws/aws-sdk-go v1.37.27/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
|
||||
github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
|
||||
github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
|
||||
github.com/aws/aws-sdk-go v1.42.5 h1:0xNoQrGh9InmUsT+9qzZ8QLfBEUsnev5BMeED6t6cKI=
|
||||
github.com/aws/aws-sdk-go v1.42.5/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
|
||||
github.com/aws/aws-sdk-go v1.42.19 h1:L/aM1QwsqVia9qIqexTHwYN+lgLYuOtf11VDgz0YIyw=
|
||||
github.com/aws/aws-sdk-go v1.42.19/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
|
||||
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
|
||||
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
@@ -235,6 +237,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73/go.mod h1:507vXsotcZop7NZfBWdhPmVeOse4ko2R7AagJYrpoEg=
|
||||
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
|
||||
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=
|
||||
@@ -296,8 +299,8 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S
|
||||
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304 h1:e/nIPR518vyvrulo9goAZTtYD6gFfu/2/9MDe6mTGcw=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva v1.16.0 h1:aDMlMiCF0klEENBNDkZm+GbmnGkw/CIZGZCmv1DOgQM=
|
||||
github.com/cs3org/reva v1.16.0/go.mod h1:9jmSVOnYv69pYbXfjcboTQaZPwHZ6NSD+2jjE9xx12U=
|
||||
github.com/cs3org/reva v1.17.0 h1:UVdiiK6gUF2pb7qN9TKhMuf55sUKVnCcVjiVSzodluw=
|
||||
github.com/cs3org/reva v1.17.0/go.mod h1:gtsVzMfDrUiUjH6qlHx+QqiRKsSYjVO6wEcCzANiqUg=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
@@ -378,7 +381,6 @@ github.com/go-asn1-ber/asn1-ber v1.5.3 h1:u7utq56RUFiynqUzgVMFDymapcOtQ/MZkh3H4Q
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.3/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-chi/chi/v5 v5.0.5/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
|
||||
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE=
|
||||
@@ -509,6 +511,7 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVruqWQJBtW6+bTBDTniY8yZum5rF3b5jw=
|
||||
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
|
||||
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
|
||||
@@ -541,8 +544,8 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v4.1.0+incompatible h1:sIa2eCvUTwgjbqXrPLfNwUf9S3i3mpH1O1atV+iL/Wk=
|
||||
github.com/gofrs/uuid v4.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
|
||||
github.com/gofrs/uuid v4.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/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
@@ -552,9 +555,9 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
|
||||
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
|
||||
@@ -575,6 +578,7 @@ github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3K
|
||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
github.com/golang/protobuf v0.0.0-20170622202551-6a1fa9404c0a/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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
@@ -599,8 +603,8 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y=
|
||||
github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc=
|
||||
github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
|
||||
github.com/gomodule/redigo v1.8.6 h1:h7kHSqUl2kxeaQtVslsfUCPJ1oz2pxcyzLy4zezIzPw=
|
||||
github.com/gomodule/redigo v1.8.6/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
@@ -649,7 +653,15 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/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/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
||||
github.com/gookit/color v1.4.2 h1:tXy44JFSFkKnELV6WaMo/lLfu/meqITX3iAV52do7lk=
|
||||
github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
|
||||
github.com/gookit/config/v2 v2.0.27 h1:jCQSAe3qN8gFABz6h4qA9MNhTk0D4ipn6+1jeAD7g9E=
|
||||
github.com/gookit/config/v2 v2.0.27/go.mod h1:q7I5c+hWOlzGh8jLff6CuNV6H2RDZ1QanaBEimGGtwE=
|
||||
github.com/gookit/goutil v0.3.14/go.mod h1:YdGV0ObqRUlRq4/RzAQBHcd1Wzl/jKw7cppDBtD3q+U=
|
||||
github.com/gookit/goutil v0.3.15 h1:nfMiE1nlBES16zOsLzNeR/vo6a7KlV58womgG6dB+JM=
|
||||
github.com/gookit/goutil v0.3.15/go.mod h1:2w7h+/CB6n2m4qzECHj6+TOmMR8q7ierD9+LyybGy3I=
|
||||
github.com/gookit/ini/v2 v2.0.11 h1:Wl651xN2AaJbFrb8daBwWo8kS+sQHL3TddFi0/PRNXs=
|
||||
github.com/gookit/ini/v2 v2.0.11/go.mod h1:rIY8Uup5WDdPsrEE7VrF7fcMdGCCcPGA22Bk5R7roJQ=
|
||||
github.com/gophercloud/gophercloud v0.15.1-0.20210202035223-633d73521055/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
|
||||
github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
|
||||
github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae/go.mod h1:wx8HMD8oQD0Ryhz6+6ykq75PJ79iPyEqYHfwZ4l7OsA=
|
||||
@@ -673,30 +685,24 @@ 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.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0 h1:rgxjzoDmDXw5q8HONgyHhBas4to0/XWRo/gPpJhsUNQ=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0/go.mod h1:qrJPVzv9YlhsrxJc3P/Q85nr0w1lIRikTl4JlhdDH5w=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1 h1:p5m7GOEGXyoq6QWl4/RRMsQ6tWbTpbQmAnkxXgWSprY=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1/go.mod h1:8ZeZajTed/blCOHBbj8Fss8bPHiFKcmJJzuIbUtFCAo=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
|
||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo=
|
||||
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
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 v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
|
||||
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
|
||||
github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-rootcerts v1.0.2/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=
|
||||
@@ -706,16 +712,13 @@ github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
|
||||
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/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/hcl/v2 v2.10.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg=
|
||||
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/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
|
||||
github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE=
|
||||
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||
@@ -810,6 +813,7 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
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/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
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=
|
||||
@@ -817,8 +821,8 @@ github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvf
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
|
||||
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/libregraph/lico v0.52.0 h1:247mrD9R4Brmd+nJlY4jwWPcUxXbpqiqrPQd6ja/sv4=
|
||||
github.com/libregraph/lico v0.52.0/go.mod h1:DsTdIsBygkCkSmGSCN14qKdAM+KvizKaozFb+173Kgo=
|
||||
github.com/libregraph/lico v0.53.0 h1:5xsbZle5jeh8F12Hi0OHZ8eV301wiToqeMS0TdH7dN0=
|
||||
github.com/libregraph/lico v0.53.0/go.mod h1:EXf6Y9s9TygW6unSXosBpVXWUURoN2sPX0053o4zVfQ=
|
||||
github.com/linode/linodego v0.25.3/go.mod h1:GSBKPpjoQfxEfryoCRcgkuUOCuVtGHWhzI8OMdycNTE=
|
||||
github.com/liquidweb/go-lwApi v0.0.0-20190605172801-52a4864d2738/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs=
|
||||
github.com/liquidweb/go-lwApi v0.0.5/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs=
|
||||
@@ -831,7 +835,6 @@ github.com/m3o/m3o-go/client v0.0.0-20210421144725-8bfd7992ada3/go.mod h1:vmeaYr
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
@@ -850,7 +853,6 @@ github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxq
|
||||
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-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
@@ -862,6 +864,7 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
@@ -891,13 +894,12 @@ github.com/mileusna/useragent v1.0.2/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4
|
||||
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
|
||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||
github.com/minio/minio-go/v7 v7.0.15 h1:r9/NhjJ+nXYrIYvbObhvc1wPj3YH1iDpJzz61uRKLyY=
|
||||
github.com/minio/minio-go/v7 v7.0.15/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g=
|
||||
github.com/minio/minio-go/v7 v7.0.16 h1:GspaSBS8lOuEUCAqMe0W3UxSoyOA4b4F8PTspRVI+k4=
|
||||
github.com/minio/minio-go/v7 v7.0.16/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g=
|
||||
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
||||
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
@@ -908,6 +910,7 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
|
||||
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
|
||||
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.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=
|
||||
@@ -920,8 +923,8 @@ github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
|
||||
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
|
||||
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
|
||||
@@ -1020,8 +1023,6 @@ github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUr
|
||||
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
|
||||
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
|
||||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@@ -1035,7 +1036,6 @@ github.com/pkg/xattr v0.4.4/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVW
|
||||
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/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
||||
github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc=
|
||||
github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI=
|
||||
@@ -1128,7 +1128,6 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
||||
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/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg=
|
||||
github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
|
||||
@@ -1169,12 +1168,9 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
|
||||
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.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
|
||||
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
@@ -1183,10 +1179,10 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ
|
||||
github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
|
||||
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
|
||||
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 v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/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=
|
||||
@@ -1194,8 +1190,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
|
||||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
|
||||
github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk=
|
||||
github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4=
|
||||
github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM=
|
||||
github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -1212,7 +1206,6 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df h1:C+J/LwTqP8gRPt1MdSzBNZP0OYuDm5wsmDKgwpLjYzo=
|
||||
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df/go.mod h1:gCcfDlA1Y7GqOaeEKw5l9dOGx1VLdc/HuQSlQAaZ30s=
|
||||
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/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||
github.com/thanhpk/randstr v1.0.4 h1:IN78qu/bR+My+gHCvMEXhR/i5oriVHcTB/BJJIRTsNo=
|
||||
@@ -1243,6 +1236,9 @@ github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU
|
||||
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
|
||||
github.com/vimeo/go-util v1.2.0/go.mod h1:s13SMDTSO7AjH1nbgp707mfN5JFIWUFDU5MDDuRRtKs=
|
||||
github.com/vinyldns/go-vinyldns v0.0.0-20200917153823-148a5f6b8f14/go.mod h1:RWc47jtnVuQv6+lY3c768WtXCas/Xi+U5UFc5xULmYg=
|
||||
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
|
||||
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
|
||||
github.com/vultr/govultr/v2 v2.0.0/go.mod h1:2PsEeg+gs3p/Fo5Pw8F9mv+DUBEOlrNZ8GmCTGmhOhs=
|
||||
github.com/wk8/go-ordered-map v0.2.0 h1:KlvGyHstD1kkGZkPtHCyCfRYS0cz84uk6rrW/Dnhdtk=
|
||||
github.com/wk8/go-ordered-map v0.2.0/go.mod h1:9ZIbRunKbuvfPKyBP1SIKLcXNlv74YCOZ3t3VTS6gRk=
|
||||
@@ -1259,11 +1255,14 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/yaegashi/msgraph.go v0.1.1-0.20200221123608-2d438cf2a7cc/go.mod h1:tso14hwzqX4VbnWTNsxiL0DvMb2OwbGISFA7jDibdWc=
|
||||
github.com/yaegashi/msgraph.go v0.1.4 h1:leDXSczAbwBpYFSmmZrdByTiPoUw8dbTfNMetAjJvbw=
|
||||
github.com/yaegashi/msgraph.go v0.1.4/go.mod h1:vgeYhHa5skJt/3lTyjGXThTZhwbhRnGo6uUxzoJIGME=
|
||||
github.com/yaegashi/wtz.go v0.0.2/go.mod h1:nOLA5QXsmdkRxBkP5tljhua13ADHCKirLBrzPf4PEJc=
|
||||
github.com/yosuke-furukawa/json5 v0.1.1/go.mod h1:sw49aWDqNdRJ6DYUtIQiaA3xyj2IL9tjeNYmX2ixwcU=
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
@@ -1271,6 +1270,9 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
|
||||
github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
|
||||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
|
||||
github.com/zenazn/goji v0.9.1-0.20160507202103-64eb34159fe5/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go-micro.dev/v4 v4.1.0/go.mod h1:XTEJj5ILOBW+2ndGDG56r8fBXZ8hmsVaIaS1K5zwj+s=
|
||||
go-micro.dev/v4 v4.2.1/go.mod h1:XTEJj5ILOBW+2ndGDG56r8fBXZ8hmsVaIaS1K5zwj+s=
|
||||
@@ -1310,17 +1312,14 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1/go.mod h1:4wsfAAW5N9wUHM0QTmZS8z7fvYZ1rv3m+sVeSpf8NhU=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.27.0 h1:TON1iU3Y5oIytGQHIejDYLam5uoSMsmA0UV9Yupb5gQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.27.0/go.mod h1:T/zQwBldOpoAEpE3HMbLnI8ydESZVz4ggw6Is4FF9LI=
|
||||
go.opentelemetry.io/otel v1.1.0/go.mod h1:7cww0OW51jQ8IaZChIEdqLwgh+44+7uiTdWsAL0wQpA=
|
||||
go.opentelemetry.io/otel v1.2.0 h1:YOQDvxO1FayUcT9MIhJhgMyNO1WqoduiyvQHzGN0kUQ=
|
||||
go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.2.0 h1:C/5Egj3MJBXRJi22cSl07suqPqtZLnLFmH//OxETUEc=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.2.0/go.mod h1:KJLFbEMKTNPIfOxcg/WikIozEoKcPgJRz3Ce1vLlM8E=
|
||||
go.opentelemetry.io/otel/sdk v1.2.0 h1:wKN260u4DesJYhyjxDa7LRFkuhH7ncEVKU37LWcyNIo=
|
||||
go.opentelemetry.io/otel/sdk v1.2.0/go.mod h1:jNN8QtpvbsKhgaC6V5lHiejMoKD+V8uadoSafgHPx1U=
|
||||
go.opentelemetry.io/otel/trace v1.1.0/go.mod h1:i47XtdcBQiktu5IsrPqOHe8w+sBmnLwwHt8wiUsWGTI=
|
||||
go.opentelemetry.io/otel/trace v1.2.0 h1:Ys3iqbqZhcf28hHzrm5WAquMkDHNZTUkw7KHbuNjej0=
|
||||
go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
@@ -1351,6 +1350,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/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-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -1375,7 +1375,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
@@ -1423,6 +1422,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/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-20180811021610-c39426892332/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-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -1503,8 +1503,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
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=
|
||||
@@ -1539,6 +1539,7 @@ golang.org/x/sys v0.0.0-20190415081028-16da32be82c5/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/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-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -1565,7 +1566,6 @@ golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/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=
|
||||
@@ -1615,7 +1615,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210921065528-437939a70204/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 h1:WecRHqgE09JBkh/584XIE6PMz5KKE/vER4izNUi30AQ=
|
||||
@@ -1758,7 +1757,6 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk
|
||||
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
|
||||
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
|
||||
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
|
||||
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
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=
|
||||
@@ -1823,11 +1821,9 @@ google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm
|
||||
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
|
||||
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a h1:8maMHMQp9NroHXhc3HelFX9Ay2lWlXLcdH5mw5Biz0s=
|
||||
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk=
|
||||
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/grpc v1.8.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=
|
||||
@@ -1945,6 +1941,7 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
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/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
stash.kopano.io/kgol/kcc-go/v5 v5.0.1 h1:urR9hOR6TnTKjGkzZKac/a9cA8ws1WecWLTgiYubLQw=
|
||||
stash.kopano.io/kgol/kcc-go/v5 v5.0.1/go.mod h1:0ZmjWapy3zp+TAjZI6iCrcfh+BthZbB2WM1VfhDgNB4=
|
||||
stash.kopano.io/kgol/ksurveyclient-go v0.6.1/go.mod h1:LJMDQBROS2oXxBN04eSI6j1KhgWlqMFd8xKjXV4Irtw=
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(config.New()); err != nil {
|
||||
if err := command.Execute(config.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"debug": {
|
||||
"addr": "0.0.0.0:9104",
|
||||
"addr": "0.0.0.0:9136",
|
||||
"token": "",
|
||||
"pprof": false,
|
||||
"zpages": false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
debug:
|
||||
addr: 0.0.0.0:9104
|
||||
addr: 0.0.0.0:9136
|
||||
token:
|
||||
pprof: false
|
||||
zpages: false
|
||||
|
||||
@@ -4,5 +4,6 @@ import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
//go:generate make generate
|
||||
//go:embed assets/*
|
||||
var Assets embed.FS
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "health",
|
||||
Usage: "Check health status",
|
||||
Flags: flagset.HealthWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
|
||||
@@ -3,15 +3,11 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/thejerf/suture/v4"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -23,32 +19,25 @@ func Execute(cfg *config.Config) error {
|
||||
Version: version.String,
|
||||
Usage: "Serve Graph-Explorer for oCIS",
|
||||
Compiled: version.Compiled(),
|
||||
|
||||
Authors: []*cli.Author{
|
||||
{
|
||||
Name: "ownCloud GmbH",
|
||||
Email: "support@owncloud.com",
|
||||
},
|
||||
},
|
||||
|
||||
Flags: flagset.RootWithConfig(cfg),
|
||||
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Server.Version = version.String
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
|
||||
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",
|
||||
@@ -68,49 +57,16 @@ func NewLogger(cfg *config.Config) log.Logger {
|
||||
)
|
||||
}
|
||||
|
||||
// ParseConfig loads accounts configuration from Viper known paths.
|
||||
// ParseConfig loads graph configuration from known paths.
|
||||
func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
sync.ParsingViperConfig.Lock()
|
||||
defer sync.ParsingViperConfig.Unlock()
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
viper.SetEnvPrefix("GRAPH_EXPLORER")
|
||||
viper.AutomaticEnv()
|
||||
|
||||
if c.IsSet("config-file") {
|
||||
viper.SetConfigFile(c.String("config-file"))
|
||||
} else {
|
||||
viper.SetConfigName("graph-explorer")
|
||||
|
||||
viper.AddConfigPath("/etc/ocis")
|
||||
viper.AddConfigPath("$HOME/.ocis")
|
||||
viper.AddConfigPath("./config")
|
||||
conf, err := ociscfg.BindSourcesToStructs("graph-explorer", cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
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
|
||||
conf.LoadOSEnv(config.GetEnv(), false)
|
||||
bindings := config.StructMappings(cfg)
|
||||
return ociscfg.BindEnv(conf, bindings)
|
||||
}
|
||||
|
||||
// SutureService allows for the graph-explorer command to be embedded and supervised by a suture supervisor tree.
|
||||
@@ -120,10 +76,7 @@ type SutureService struct {
|
||||
|
||||
// NewSutureService creates a new graph-explorer.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.GraphExplorer.Supervised = true
|
||||
}
|
||||
cfg.GraphExplorer.Log.File = cfg.Log.File
|
||||
cfg.GraphExplorer.Log = cfg.Log
|
||||
return SutureService{
|
||||
cfg: cfg.GraphExplorer,
|
||||
}
|
||||
|
||||
@@ -6,12 +6,10 @@ import (
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/metrics"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/server/http"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/tracing"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -20,24 +18,15 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: "Start integrated server",
|
||||
Flags: flagset.ServerWithConfig(cfg),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
// When running on single binary mode the before hook from the root command won't get called. We manually
|
||||
// call this before hook from ocis command, so the configuration can be loaded.
|
||||
if !cfg.Supervised {
|
||||
return ParseConfig(ctx, cfg)
|
||||
}
|
||||
logger.Debug().Str("service", "graph-explorer").Msg("ignoring config file parsing when running supervised")
|
||||
return nil
|
||||
return ParseConfig(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
tracing.Configure(cfg)
|
||||
|
||||
var (
|
||||
@@ -105,10 +94,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
})
|
||||
}
|
||||
|
||||
if !cfg.Supervised {
|
||||
sync.Trap(&gr, cancel)
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,62 +1,58 @@
|
||||
package config
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
type Log struct {
|
||||
Level string
|
||||
Pretty bool
|
||||
Color bool
|
||||
File string
|
||||
}
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string
|
||||
Token string
|
||||
Pprof bool
|
||||
Zpages bool
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Token string `ocisConfig:"token"`
|
||||
Pprof bool `ocisConfig:"pprof"`
|
||||
Zpages bool `ocisConfig:"zpages"`
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string
|
||||
Root string
|
||||
Namespace string
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Root string `ocisConfig:"root"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
}
|
||||
|
||||
// Server configures a server.
|
||||
type Server struct {
|
||||
Version string
|
||||
Name string
|
||||
Version string `ocisConfig:"version"`
|
||||
Name string `ocisConfig:"name"`
|
||||
}
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool
|
||||
Type string
|
||||
Endpoint string
|
||||
Collector string
|
||||
Service string
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Type string `ocisConfig:"type"`
|
||||
Endpoint string `ocisConfig:"endpoint"`
|
||||
Collector string `ocisConfig:"collector"`
|
||||
Service string `ocisConfig:"service"`
|
||||
}
|
||||
|
||||
// GraphExplorer defines the available graph-explorer configuration.
|
||||
type GraphExplorer struct {
|
||||
ClientID string
|
||||
Issuer string
|
||||
GraphURLBase string
|
||||
GraphURLPath string
|
||||
ClientID string `ocisConfig:"client_id"`
|
||||
Issuer string `ocisConfig:"issuer"`
|
||||
GraphURLBase string `ocisConfig:"graph_url_base"`
|
||||
GraphURLPath string `ocisConfig:"graph_url_path"`
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
File string
|
||||
Log Log
|
||||
Debug Debug
|
||||
HTTP HTTP
|
||||
Server Server
|
||||
Tracing Tracing
|
||||
GraphExplorer GraphExplorer
|
||||
File string `ocisConfig:"file"`
|
||||
Log shared.Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
Server Server `ocisConfig:"server"`
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
GraphExplorer GraphExplorer `ocisConfig:"graph_explorer"`
|
||||
|
||||
Context context.Context
|
||||
Supervised bool
|
||||
@@ -66,3 +62,45 @@ type Config struct {
|
||||
func New() *Config {
|
||||
return &Config{}
|
||||
}
|
||||
|
||||
// DefaultConfig provides with a working version of a config.
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Log: shared.Log{},
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9136",
|
||||
Token: "",
|
||||
Pprof: false,
|
||||
Zpages: false,
|
||||
},
|
||||
HTTP: HTTP{
|
||||
Addr: "127.0.0.1:9135",
|
||||
Root: "/graph-explorer",
|
||||
Namespace: "com.owncloud.web",
|
||||
},
|
||||
Server: Server{},
|
||||
Tracing: Tracing{
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
Service: "graph-explorer",
|
||||
},
|
||||
GraphExplorer: GraphExplorer{
|
||||
ClientID: "ocis-explorer.js",
|
||||
Issuer: "https://localhost:9200",
|
||||
GraphURLBase: "https://localhost:9200",
|
||||
GraphURLPath: "/graph",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
|
||||
// with all the environment variables an extension supports.
|
||||
func GetEnv() []string {
|
||||
var r = make([]string, len(structMappings(&Config{})))
|
||||
for i := range structMappings(&Config{}) {
|
||||
r = append(r, structMappings(&Config{})[i].EnvVars...)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package config
|
||||
|
||||
import "github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
|
||||
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
|
||||
// us propagate changes easier.
|
||||
func StructMappings(cfg *Config) []shared.EnvBinding {
|
||||
return structMappings(cfg)
|
||||
}
|
||||
|
||||
// structMappings binds a set of environment variables to a destination on cfg.
|
||||
func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
return []shared.EnvBinding{
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_LEVEL", "GRAPH_EXPLORER_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_PRETTY", "GRAPH_EXPLORER_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_COLOR", "GRAPH_EXPLORER_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_FILE", "GRAPH_EXPLORER_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENABLED", "GRAPH_EXPLORER_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_TYPE", "GRAPH_EXPLORER_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GRAPH_EXPLORER_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GRAPH_EXPLORER_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_URL", "GRAPH_EXPLORER_ISSUER"},
|
||||
Destination: &cfg.GraphExplorer.Issuer,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_CLIENT_ID"},
|
||||
Destination: &cfg.GraphExplorer.ClientID,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_URL", "GRAPH_EXPLORER_GRAPH_URL_BASE"},
|
||||
Destination: &cfg.GraphExplorer.GraphURLBase,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_PATH"},
|
||||
Destination: &cfg.GraphExplorer.GraphURLPath,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// RootWithConfig applies cfg to the root flagset
|
||||
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-level",
|
||||
Usage: "Set logging level",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-pretty",
|
||||
Usage: "Enable pretty logging",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-color",
|
||||
Usage: "Enable colored logging",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_COLOR", "OCIS_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: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ServerWithConfig applies cfg to the root flagset
|
||||
func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Enable log to file",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_LOG_FILE", "OCIS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_TYPE", "OCIS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "graph-explorer"),
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-pprof",
|
||||
Usage: "Enable pprof debugging",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-zpages",
|
||||
Usage: "Enable zpages debugging",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9135"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-root",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/graph-explorer"),
|
||||
Usage: "Root path of http server",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
|
||||
Usage: "Set the base namespace for the http namespace",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "issuer",
|
||||
Value: flags.OverrideDefaultString(cfg.GraphExplorer.Issuer, "https://localhost:9200"),
|
||||
Usage: "Set the OpenID Connect Provider",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_ISSUER", "OCIS_URL"},
|
||||
Destination: &cfg.GraphExplorer.Issuer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "client-id",
|
||||
Value: flags.OverrideDefaultString(cfg.GraphExplorer.ClientID, "ocis-explorer.js"),
|
||||
Usage: "Set the OpenID Client ID to send to the issuer",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_CLIENT_ID"},
|
||||
Destination: &cfg.GraphExplorer.ClientID,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "graph-url-base",
|
||||
Value: flags.OverrideDefaultString(cfg.GraphExplorer.GraphURLBase, "https://localhost:9200"),
|
||||
Usage: "Set the base url to the graph api service",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_BASE", "OCIS_URL"},
|
||||
Destination: &cfg.GraphExplorer.GraphURLBase,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "graph-url-path",
|
||||
Value: flags.OverrideDefaultString(cfg.GraphExplorer.GraphURLPath, "/graph"),
|
||||
Usage: "Set the url path to the graph api service",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_PATH"},
|
||||
Destination: &cfg.GraphExplorer.GraphURLPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ include ../.make/generate.mk
|
||||
|
||||
.PHONY: ci-go-generate
|
||||
ci-go-generate: # CI runs ci-node-generate automatically before this target
|
||||
@go generate ./...
|
||||
|
||||
.PHONY: ci-node-generate
|
||||
ci-node-generate:
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/graph/pkg/flagset"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "health",
|
||||
Usage: "Check health status",
|
||||
Flags: flagset.HealthWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
|
||||
+19
-52
@@ -3,17 +3,15 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
"github.com/thejerf/suture/v4"
|
||||
|
||||
"github.com/owncloud/ocis/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/graph/pkg/flagset"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -24,32 +22,25 @@ func Execute(cfg *config.Config) error {
|
||||
Version: version.String,
|
||||
Usage: "Serve Graph API for oCIS",
|
||||
Compiled: version.Compiled(),
|
||||
|
||||
Authors: []*cli.Author{
|
||||
{
|
||||
Name: "ownCloud GmbH",
|
||||
Email: "support@owncloud.com",
|
||||
},
|
||||
},
|
||||
|
||||
Flags: flagset.RootWithConfig(cfg),
|
||||
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Server.Version = version.String
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
|
||||
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",
|
||||
@@ -69,49 +60,28 @@ func NewLogger(cfg *config.Config) log.Logger {
|
||||
)
|
||||
}
|
||||
|
||||
// ParseConfig reads graph configuration from fs.
|
||||
// ParseConfig loads graph configuration from known paths.
|
||||
func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
sync.ParsingViperConfig.Lock()
|
||||
defer sync.ParsingViperConfig.Unlock()
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
viper.SetEnvPrefix("GRAPH")
|
||||
viper.AutomaticEnv()
|
||||
|
||||
if c.IsSet("config-file") {
|
||||
viper.SetConfigFile(c.String("config-file"))
|
||||
} else {
|
||||
viper.SetConfigName("graph")
|
||||
|
||||
viper.AddConfigPath("/etc/ocis")
|
||||
viper.AddConfigPath("$HOME/.ocis")
|
||||
viper.AddConfigPath("./config")
|
||||
conf, err := ociscfg.BindSourcesToStructs("graph", cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
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")
|
||||
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &shared.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
if err := viper.Unmarshal(&cfg); err != nil {
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("Failed to parse config")
|
||||
}
|
||||
|
||||
return nil
|
||||
conf.LoadOSEnv(config.GetEnv(cfg), false)
|
||||
bindings := config.StructMappings(cfg)
|
||||
return ociscfg.BindEnv(conf, bindings)
|
||||
}
|
||||
|
||||
// SutureService allows for the graph command to be embedded and supervised by a suture supervisor tree.
|
||||
@@ -121,10 +91,7 @@ type SutureService struct {
|
||||
|
||||
// NewSutureService creates a new graph.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Graph.Supervised = true
|
||||
}
|
||||
cfg.Graph.Log.File = cfg.Log.File
|
||||
cfg.Graph.Commons = cfg.Commons
|
||||
return SutureService{
|
||||
cfg: cfg.Graph,
|
||||
}
|
||||
|
||||
@@ -6,12 +6,10 @@ import (
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/graph/pkg/flagset"
|
||||
"github.com/owncloud/ocis/graph/pkg/metrics"
|
||||
"github.com/owncloud/ocis/graph/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/graph/pkg/server/http"
|
||||
"github.com/owncloud/ocis/graph/pkg/tracing"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -20,19 +18,15 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: "Start integrated server",
|
||||
Flags: flagset.ServerWithConfig(cfg),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
// When running on single binary mode the before hook from the root command won't get called. We manually
|
||||
// call this before hook from ocis command, so the configuration can be loaded.
|
||||
if !cfg.Supervised {
|
||||
return ParseConfig(ctx, cfg)
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
logger.Debug().Str("service", "graph").Msg("ignoring config file parsing when running supervised")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
@@ -97,10 +91,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
})
|
||||
}
|
||||
|
||||
if !cfg.Supervised {
|
||||
sync.Trap(&gr, cancel)
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
|
||||
+113
-36
@@ -1,72 +1,96 @@
|
||||
package config
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
type Log struct {
|
||||
Level string
|
||||
Pretty bool
|
||||
Color bool
|
||||
File string
|
||||
}
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string
|
||||
Token string
|
||||
Pprof bool
|
||||
Zpages bool
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Token string `ocisConfig:"token"`
|
||||
Pprof bool `ocisConfig:"pprof"`
|
||||
Zpages bool `ocisConfig:"zpages"`
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string
|
||||
Namespace string
|
||||
Root string
|
||||
Addr string `ocisConfig:"addr"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
Root string `ocisConfig:"root"`
|
||||
}
|
||||
|
||||
// Server configures a server.
|
||||
type Server struct {
|
||||
Version string
|
||||
Name string
|
||||
Version string `ocisConfig:"version"`
|
||||
Name string `ocisConfig:"name"`
|
||||
}
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool
|
||||
Type string
|
||||
Endpoint string
|
||||
Collector string
|
||||
Service string
|
||||
Enabled bool `ocisConfig:"enabled"`
|
||||
Type string `ocisConfig:"type"`
|
||||
Endpoint string `ocisConfig:"endpoint"`
|
||||
Collector string `ocisConfig:"collector"`
|
||||
Service string `ocisConfig:"service"`
|
||||
}
|
||||
|
||||
// Reva defines all available REVA configuration.
|
||||
type Reva struct {
|
||||
Address string
|
||||
Address string `ocisConfig:"address"`
|
||||
}
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string
|
||||
JWTSecret string `ocisConfig:"jwt_secret"`
|
||||
}
|
||||
|
||||
type Spaces struct {
|
||||
WebDavBase string
|
||||
WebDavPath string
|
||||
DefaultQuota string
|
||||
WebDavBase string `ocisConfig:"webdav_base"`
|
||||
WebDavPath string `ocisConfig:"webdav_path"`
|
||||
DefaultQuota string `ocisConfig:"default_quota"`
|
||||
}
|
||||
|
||||
type LDAP struct {
|
||||
URI string `ocisConfig:"uri"`
|
||||
BindDN string `ocisConfig:"bind_dn"`
|
||||
BindPassword string `ocisConfig:"bind_password"`
|
||||
|
||||
UserBaseDN string `ocisConfig:"user_base_dn"`
|
||||
UserSearchScope string `ocisConfig:"user_search_scope"`
|
||||
UserFilter string `ocisConfig:"user_filter"`
|
||||
UserEmailAttribute string `ocisConfig:"user_mail_attribute"`
|
||||
UserDisplayNameAttribute string `ocisConfig:"user_displayname_attribute"`
|
||||
UserNameAttribute string `ocisConfig:"user_name_attribute"`
|
||||
UserIDAttribute string `ocisConfig:"user_id_attribute"`
|
||||
|
||||
GroupBaseDN string `ocisConfig:"group_base_dn"`
|
||||
GroupSearchScope string `ocisConfig:"group_search_scope"`
|
||||
GroupFilter string `ocisConfig:"group_filter"`
|
||||
GroupNameAttribute string `ocisConfig:"group_name_attribute"`
|
||||
GroupIDAttribute string `ocisConfig:"group_id_attribute"`
|
||||
}
|
||||
|
||||
type Identity struct {
|
||||
Backend string `ocisConfig:"backend"`
|
||||
LDAP LDAP `ocisConfig:"ldap"`
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
File string
|
||||
Log Log
|
||||
Debug Debug
|
||||
HTTP HTTP
|
||||
Server Server
|
||||
Tracing Tracing
|
||||
Reva Reva
|
||||
TokenManager TokenManager
|
||||
Spaces Spaces
|
||||
*shared.Commons
|
||||
|
||||
File string `ocisConfig:"file"`
|
||||
Log *shared.Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
Server Server `ocisConfig:"server"`
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Reva Reva `ocisConfig:"reva"`
|
||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
||||
Spaces Spaces `ocisConfig:"spaces"`
|
||||
Identity Identity `ocisConfig:"identity"`
|
||||
|
||||
Context context.Context
|
||||
Supervised bool
|
||||
@@ -76,3 +100,56 @@ type Config struct {
|
||||
func New() *Config {
|
||||
return &Config{}
|
||||
}
|
||||
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9124",
|
||||
Token: "",
|
||||
},
|
||||
HTTP: HTTP{
|
||||
Addr: "127.0.0.1:9120",
|
||||
Namespace: "com.owncloud.web",
|
||||
Root: "/graph",
|
||||
},
|
||||
Server: Server{},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Service: "graph",
|
||||
},
|
||||
Reva: Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
},
|
||||
TokenManager: TokenManager{
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
Spaces: Spaces{
|
||||
WebDavBase: "https://localhost:9200",
|
||||
WebDavPath: "/dav/spaces/",
|
||||
DefaultQuota: "1000000000",
|
||||
},
|
||||
Identity: Identity{
|
||||
Backend: "cs3",
|
||||
LDAP: LDAP{
|
||||
URI: "ldap://localhost:9125",
|
||||
BindDN: "",
|
||||
BindPassword: "",
|
||||
UserBaseDN: "ou=users,dc=ocis,dc=test",
|
||||
UserSearchScope: "sub",
|
||||
UserFilter: "(objectClass=posixaccount)",
|
||||
UserEmailAttribute: "mail",
|
||||
UserDisplayNameAttribute: "displayName",
|
||||
UserNameAttribute: "uid",
|
||||
// FIXME: switch this to some more widely available attribute by default
|
||||
// ideally this needs to be constant for the lifetime of a users
|
||||
UserIDAttribute: "ownclouduuid",
|
||||
GroupBaseDN: "ou=groups,dc=ocis,dc=test",
|
||||
GroupSearchScope: "sub",
|
||||
GroupFilter: "(objectclass=groupOfNames)",
|
||||
GroupNameAttribute: "cn",
|
||||
GroupIDAttribute: "cn",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package config
|
||||
|
||||
import "github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
|
||||
// with all the environment variables an extension supports.
|
||||
func GetEnv(cfg *Config) []string {
|
||||
var r = make([]string, len(structMappings(cfg)))
|
||||
for i := range structMappings(cfg) {
|
||||
r = append(r, structMappings(cfg)[i].EnvVars...)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
|
||||
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
|
||||
// us propagate changes easier.
|
||||
func StructMappings(cfg *Config) []shared.EnvBinding {
|
||||
return structMappings(cfg)
|
||||
}
|
||||
|
||||
// structMappings binds a set of environment variables to a destination on cfg.
|
||||
func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
return []shared.EnvBinding{
|
||||
{
|
||||
EnvVars: []string{"GRAPH_CONFIG_FILE"},
|
||||
Destination: &cfg.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_LEVEL", "GRAPH_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_PRETTY", "GRAPH_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_COLOR", "GRAPH_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_LOG_FILE", "GRAPH_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENABLED", "GRAPH_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_TYPE", "GRAPH_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GRAPH_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GRAPH_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_HTTP_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_URL", "GRAPH_SPACES_WEBDAV_BASE"},
|
||||
Destination: &cfg.Spaces.WebDavBase,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_SPACES_WEBDAV_PATH"},
|
||||
Destination: &cfg.Spaces.WebDavPath,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"},
|
||||
Destination: &cfg.Spaces.DefaultQuota,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"OCIS_JWT_SECRET", "GRAPH_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"REVA_GATEWAY"},
|
||||
Destination: &cfg.Reva.Address,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_IDENTITY_BACKEND"},
|
||||
Destination: &cfg.Identity.Backend,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_URI"},
|
||||
Destination: &cfg.Identity.LDAP.URI,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_BIND_DN"},
|
||||
Destination: &cfg.Identity.LDAP.BindDN,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_BIND_PASSWORD"},
|
||||
Destination: &cfg.Identity.LDAP.BindPassword,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_BASE_DN"},
|
||||
Destination: &cfg.Identity.LDAP.UserBaseDN,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.UserEmailAttribute,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.UserDisplayNameAttribute,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_NAME_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.UserNameAttribute,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_UID_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.UserIDAttribute,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_FILTER"},
|
||||
Destination: &cfg.Identity.LDAP.UserFilter,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_USER_SCOPE"},
|
||||
Destination: &cfg.Identity.LDAP.UserSearchScope,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_GROUP_BASE_DN"},
|
||||
Destination: &cfg.Identity.LDAP.GroupBaseDN,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_GROUP_SEARCH_SCOPE"},
|
||||
Destination: &cfg.Identity.LDAP.GroupSearchScope,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_GROUP_FILTER"},
|
||||
Destination: &cfg.Identity.LDAP.GroupFilter,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.GroupNameAttribute,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"GRAPH_LDAP_GROUP_ID_ATTRIBUTE"},
|
||||
Destination: &cfg.Identity.LDAP.GroupIDAttribute,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// RootWithConfig applies cfg to the root flagset
|
||||
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Value: flags.OverrideDefaultString(cfg.File, ""),
|
||||
Usage: "Path to config file",
|
||||
EnvVars: []string{"GRAPH_CONFIG_FILE"},
|
||||
Destination: &cfg.File,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "log-level",
|
||||
Usage: "Set logging level",
|
||||
EnvVars: []string{"GRAPH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-pretty",
|
||||
Usage: "Enable pretty logging",
|
||||
EnvVars: []string{"GRAPH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "log-color",
|
||||
Usage: "Enable colored logging",
|
||||
EnvVars: []string{"GRAPH_LOG_COLOR", "OCIS_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: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ServerWithConfig applies cfg to the root flagset
|
||||
func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Enable log to file",
|
||||
EnvVars: []string{"GRAPH_LOG_FILE", "OCIS_LOG_FILE"},
|
||||
Destination: &cfg.Log.File,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"GRAPH_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"GRAPH_TRACING_TYPE", "OCIS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"GRAPH_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"GRAPH_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "graph"),
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"GRAPH_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"GRAPH_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-pprof",
|
||||
Usage: "Enable pprof debugging",
|
||||
EnvVars: []string{"GRAPH_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-zpages",
|
||||
Usage: "Enable zpages debugging",
|
||||
EnvVars: []string{"GRAPH_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9120"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"GRAPH_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-root",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/graph"),
|
||||
Usage: "Root path of http server",
|
||||
EnvVars: []string{"GRAPH_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
|
||||
Usage: "Set the base namespace for the http service for service discovery",
|
||||
EnvVars: []string{"GRAPH_HTTP_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "spaces-webdav-base",
|
||||
Value: flags.OverrideDefaultString(cfg.Spaces.WebDavBase, "https://localhost:9200"),
|
||||
Usage: "spaces webdav base URL to use when rendering drive WabDAV URLs",
|
||||
EnvVars: []string{"GRAPH_SPACES_WEBDAV_BASE", "OCIS_URL"},
|
||||
Destination: &cfg.Spaces.WebDavBase,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "spaces-webdav-path",
|
||||
Value: flags.OverrideDefaultString(cfg.Spaces.WebDavPath, "/dav/spaces/"),
|
||||
Usage: "spaces webdav path to use when rendering drive WabDAV URLs",
|
||||
EnvVars: []string{"GRAPH_SPACES_WEBDAV_PATH"},
|
||||
Destination: &cfg.Spaces.WebDavPath,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "default-space-quota",
|
||||
Value: flags.OverrideDefaultString(cfg.Spaces.DefaultQuota, "1000000000"),
|
||||
Usage: "default quota used for all spaces if no custom quota was given",
|
||||
EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"},
|
||||
Destination: &cfg.Spaces.DefaultQuota,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
|
||||
Usage: "Used to validate the reva access JWT, should equal reva's jwt-secret",
|
||||
EnvVars: []string{"GRAPH_JWT_SECRET", "OCIS_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "reva-gateway-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Address, "127.0.0.1:9142"),
|
||||
Usage: "Address of REVA gateway endpoint",
|
||||
EnvVars: []string{"REVA_GATEWAY"},
|
||||
Destination: &cfg.Reva.Address,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package identity
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
|
||||
cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
msgraph "github.com/yaegashi/msgraph.go/beta"
|
||||
)
|
||||
|
||||
type Backend interface {
|
||||
GetUser(ctx context.Context, nameOrId string) (*msgraph.User, error)
|
||||
GetUsers(ctx context.Context, queryParam url.Values) ([]*msgraph.User, error)
|
||||
|
||||
GetGroup(ctx context.Context, nameOrId string) (*msgraph.Group, error)
|
||||
GetGroups(ctx context.Context, queryParam url.Values) ([]*msgraph.Group, error)
|
||||
}
|
||||
|
||||
func CreateUserModelFromCS3(u *cs3.User) *msgraph.User {
|
||||
if u.Id == nil {
|
||||
u.Id = &cs3.UserId{}
|
||||
}
|
||||
return &msgraph.User{
|
||||
DisplayName: &u.DisplayName,
|
||||
Mail: &u.Mail,
|
||||
// TODO u.Groups are those ids or group names?
|
||||
OnPremisesSamAccountName: &u.Username,
|
||||
DirectoryObject: msgraph.DirectoryObject{
|
||||
Entity: msgraph.Entity{
|
||||
ID: &u.Id.OpaqueId,
|
||||
Object: msgraph.Object{
|
||||
AdditionalData: map[string]interface{}{
|
||||
"uidnumber": u.UidNumber,
|
||||
"gidnumber": u.GidNumber,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Loaded 100 of 333 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user