From e96d628fb7a5356f505ebf4e60b6b94161d3e2d3 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Mon, 14 Mar 2022 15:26:29 +0000 Subject: [PATCH] commit 51d1eb0182fce0ed3920689ac3ed5383b2eb2e84 Merge: 6cd3827e 899510b1 Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Mon Mar 14 16:23:46 2022 +0100 Merge pull request #3313 from owncloud/audit-config-docs fix audit config docs generation --- .../_includes/accounts-config-example.yaml | 63 ++ .../_includes/audit-config-example.yaml | 20 + .../_includes/glauth-config-example.yaml | 43 ++ .../_includes/graph-config-example.yaml | 50 ++ .../graph-explorer-config-example.yaml | 24 + extensions/_includes/idm-config-example.yaml | 26 + extensions/_includes/idm_configvars.md | 8 +- extensions/_includes/idp-config-example.yaml | 68 ++ extensions/_includes/nats-config-example.yaml | 14 + .../notifications-config-example.yaml | 23 + extensions/_includes/ocs-config-example.yaml | 45 ++ .../_includes/proxy-config-example.yaml | 183 ++++++ .../_includes/settings-config-example.yaml | 44 ++ .../_includes/storage-config-example.yaml | 605 ++++++++++++++++++ .../_includes/store-config-example.yaml | 19 + .../_includes/thumbnails-config-example.yaml | 38 ++ extensions/_includes/thumbnails_configvars.md | 2 +- extensions/_includes/web-config-example.yaml | 44 ++ .../_includes/webdav-config-example.yaml | 39 ++ extensions/accounts/configuration.md | 3 + extensions/glauth/configuration.md | 3 + extensions/graph-explorer/configuration.md | 3 + extensions/graph/configuration.md | 2 + extensions/idm/configuration.md | 3 + extensions/idp/configuration.md | 3 + extensions/nats/configuration.md | 3 + extensions/notifications/configuration.md | 3 + extensions/ocs/configuration.md | 3 + extensions/proxy/configuration.md | 3 + extensions/settings/configuration.md | 3 + extensions/store/configuration.md | 3 + extensions/thumbnails/configuration.md | 3 + extensions/web/configuration.md | 3 + extensions/webdav/configuration.md | 3 + grpc_apis/ocis/messages/accounts/v0/grpc.md | 2 +- grpc_apis/ocis/messages/settings/v0/grpc.md | 2 +- grpc_apis/ocis/messages/store/v0/grpc.md | 2 +- grpc_apis/ocis/messages/thumbnails/v0/grpc.md | 2 +- grpc_apis/ocis/services/accounts/v0/grpc.md | 2 +- grpc_apis/ocis/services/settings/v0/grpc.md | 2 +- grpc_apis/ocis/services/store/v0/grpc.md | 2 +- grpc_apis/ocis/services/thumbnails/v0/grpc.md | 2 +- helpers/configenvextractor.go | 37 +- helpers/example-config-generator.go.tmpl | 53 ++ helpers/extractor.go.tmpl | 6 +- 45 files changed, 1487 insertions(+), 27 deletions(-) create mode 100644 extensions/_includes/accounts-config-example.yaml create mode 100644 extensions/_includes/audit-config-example.yaml create mode 100644 extensions/_includes/glauth-config-example.yaml create mode 100644 extensions/_includes/graph-config-example.yaml create mode 100644 extensions/_includes/graph-explorer-config-example.yaml create mode 100644 extensions/_includes/idm-config-example.yaml create mode 100644 extensions/_includes/idp-config-example.yaml create mode 100644 extensions/_includes/nats-config-example.yaml create mode 100644 extensions/_includes/notifications-config-example.yaml create mode 100644 extensions/_includes/ocs-config-example.yaml create mode 100644 extensions/_includes/proxy-config-example.yaml create mode 100644 extensions/_includes/settings-config-example.yaml create mode 100644 extensions/_includes/storage-config-example.yaml create mode 100644 extensions/_includes/store-config-example.yaml create mode 100644 extensions/_includes/thumbnails-config-example.yaml create mode 100644 extensions/_includes/web-config-example.yaml create mode 100644 extensions/_includes/webdav-config-example.yaml create mode 100644 helpers/example-config-generator.go.tmpl diff --git a/extensions/_includes/accounts-config-example.yaml b/extensions/_includes/accounts-config-example.yaml new file mode 100644 index 00000000000..7ecc5b04f85 --- /dev/null +++ b/extensions/_includes/accounts-config-example.yaml @@ -0,0 +1,63 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9182 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9181 + root: / + cachettl: 604800 + cors: + allowedorigins: + - '*' + allowedmethods: + - GET + - POST + - PUT + - PATCH + - DELETE + - OPTIONS + allowedheaders: + - Authorization + - Origin + - Content-Type + - Accept + - X-Requested-With + allowcredentials: true +grpc: + addr: 127.0.0.1:9180 +tokenmanager: + jwtsecret: Pive-Fumkiu4 +asset: + path: "" +repo: + backend: cs3 + disk: + path: ~/.ocis/accounts + cs3: + provideraddr: localhost:9215 +index: + uid: + lower: 0 + upper: 1000 + gid: + lower: 0 + upper: 1000 +serviceuser: + uuid: 95cb8724-03b2-11eb-a0a6-c33ef8ef53ad + username: "" + uid: 0 + gid: 0 +hashdifficulty: 11 +demousersandgroups: true diff --git a/extensions/_includes/audit-config-example.yaml b/extensions/_includes/audit-config-example.yaml new file mode 100644 index 00000000000..9de28963184 --- /dev/null +++ b/extensions/_includes/audit-config-example.yaml @@ -0,0 +1,20 @@ +# Autogenerated +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: "" + token: "" + pprof: false + zpages: false +events: + endpoint: 127.0.0.1:9233 + cluster: test-cluster + consumergroup: audit +auditlog: + logtoconsole: true + logtofile: false + filepath: "" + format: json diff --git a/extensions/_includes/glauth-config-example.yaml b/extensions/_includes/glauth-config-example.yaml new file mode 100644 index 00000000000..08263a67676 --- /dev/null +++ b/extensions/_includes/glauth-config-example.yaml @@ -0,0 +1,43 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9129 + token: "" + pprof: false + zpages: false +ldap: + enabled: true + addr: 127.0.0.1:9125 +ldaps: + enabled: true + addr: 127.0.0.1:9126 + cert: ~/.ocis/ldap/ldap.crt + key: ~/.ocis/ldap/ldap.key +backend: + datastore: accounts + basedn: dc=ocis,dc=test + insecure: false + nameformat: cn + groupformat: ou + servers: [] + sshkeyattr: sshPublicKey + usegraphapi: true +fallback: + datastore: "" + basedn: dc=ocis,dc=test + insecure: false + nameformat: cn + groupformat: ou + servers: [] + sshkeyattr: sshPublicKey + usegraphapi: true +rolebundleuuid: 71881883-1768-46bd-a24d-a356a2afdf7f diff --git a/extensions/_includes/graph-config-example.yaml b/extensions/_includes/graph-config-example.yaml new file mode 100644 index 00000000000..836fc368551 --- /dev/null +++ b/extensions/_includes/graph-config-example.yaml @@ -0,0 +1,50 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9124 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9120 + root: /graph +reva: + address: 127.0.0.1:9142 +tokenmanager: + jwtsecret: Pive-Fumkiu4 +spaces: + webdavbase: https://localhost:9200 + webdavpath: /dav/spaces/ + defaultquota: "1000000000" + insecure: false + extendedspacepropertiescachettl: 0 +identity: + backend: cs3 + ldap: + uri: ldap://localhost:9125 + insecure: false + binddn: "" + bindpassword: "" + useserveruuid: false + writeenabled: false + userbasedn: ou=users,dc=ocis,dc=test + usersearchscope: sub + userfilter: (objectClass=inetOrgPerson) + useremailattribute: mail + userdisplaynameattribute: displayName + usernameattribute: uid + useridattribute: owncloudUUID + groupbasedn: ou=groups,dc=ocis,dc=test + groupsearchscope: sub + groupfilter: (objectclass=groupOfNames) + groupnameattribute: cn + groupidattribute: owncloudUUID diff --git a/extensions/_includes/graph-explorer-config-example.yaml b/extensions/_includes/graph-explorer-config-example.yaml new file mode 100644 index 00000000000..6328929703e --- /dev/null +++ b/extensions/_includes/graph-explorer-config-example.yaml @@ -0,0 +1,24 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9136 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9135 + root: /graph-explorer +graphexplorer: + clientid: ocis-explorer.js + issuer: https://localhost:9200 + graphurlbase: https://localhost:9200 + graphurlpath: /graph diff --git a/extensions/_includes/idm-config-example.yaml b/extensions/_includes/idm-config-example.yaml new file mode 100644 index 00000000000..6caa8ae4915 --- /dev/null +++ b/extensions/_includes/idm-config-example.yaml @@ -0,0 +1,26 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: "" + token: "" + pprof: false + zpages: false +idm: + ldapsaddr: 127.0.0.1:9235 + cert: ~/.ocis/idm/ldap.crt + key: ~/.ocis/idm/ldap.key + databasepath: ~/.ocis/idm/ocis.boltdb +createdemousers: false +serviceuserpasswords: + idmadmin: "" + reva: "" + idp: "" diff --git a/extensions/_includes/idm_configvars.md b/extensions/_includes/idm_configvars.md index e410bb13e44..5eb3fb18f0d 100644 --- a/extensions/_includes/idm_configvars.md +++ b/extensions/_includes/idm_configvars.md @@ -10,7 +10,7 @@ | IDM_LDAPS_CERT | string | ~/.ocis/idm/ldap.crt | File name of the TLS server certificate for the ldaps listener| | IDM_LDAPS_KEY | string | ~/.ocis/idm/ldap.key | File name for the TLS certificate key for the server certificate| | IDM_DATABASE_PATH | string | ~/.ocis/idm/ocis.boltdb | Full path to the idm backend database| -| IDM_CREATE_DEMO_USERS;ACCOUNTS_DEMO_USERS_AND_GROUPS | bool | true | Flag to enabe/disable the creation of the demo users| -| IDM_ADMIN_PASSWORD | string | idm | Password to set for the "idm" service users. Either cleartext or an argon2id hash| -| IDM_REVASVC_PASSWORD | string | reva | Password to set for the "reva" service users. Either cleartext or an argon2id hash| -| IDM_IDPSVC_PASSWORD | string | idp | Password to set for the "idp" service users. Either cleartext or an argon2id hash| \ No newline at end of file +| IDM_CREATE_DEMO_USERS;ACCOUNTS_DEMO_USERS_AND_GROUPS | bool | false | Flag to enabe/disable the creation of the demo users| +| IDM_ADMIN_PASSWORD | string | | Password to set for the "idm" service users. Either cleartext or an argon2id hash| +| IDM_REVASVC_PASSWORD | string | | Password to set for the "reva" service users. Either cleartext or an argon2id hash| +| IDM_IDPSVC_PASSWORD | string | | Password to set for the "idp" service users. Either cleartext or an argon2id hash| \ No newline at end of file diff --git a/extensions/_includes/idp-config-example.yaml b/extensions/_includes/idp-config-example.yaml new file mode 100644 index 00000000000..bea0a10161b --- /dev/null +++ b/extensions/_includes/idp-config-example.yaml @@ -0,0 +1,68 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9134 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9130 + root: / + tlscert: ~/.ocis/idp/server.crt + tlskey: ~/.ocis/idp/server.key + tls: false +asset: + path: "" +idp: + iss: https://localhost:9200 + identitymanager: ldap + uribasepath: "" + signinuri: "" + signedouturi: "" + authorizationendpointuri: "" + endsessionendpointuri: "" + insecure: false + trustedproxy: [] + allowscope: [] + allowclientguests: false + allowdynamicclientregistration: false + encryptionsecretfile: "" + listen: "" + identifierclientdisabled: true + identifierclientpath: ~/.ocis/idp + identifierregistrationconf: ~/.ocis/idp/identifier-registration.yaml + identifierscopesconf: "" + identifierdefaultbannerlogo: "" + identifierdefaultsigninpagetext: "" + identifierdefaultusernamehinttext: "" + signingkid: "" + signingmethod: PS256 + signingprivatekeyfiles: [] + validationkeyspath: "" + cookiebackenduri: "" + cookienames: [] + accesstokendurationseconds: 600 + idtokendurationseconds: 3600 + refreshtokendurationseconds: 94608000 + dyamicclientsecretdurationseconds: 0 +ldap: + uri: ldap://localhost:9125 + binddn: cn=idp,ou=sysusers,dc=ocis,dc=test + bindpassword: idp + basedn: ou=users,dc=ocis,dc=test + scope: sub + loginattribute: cn + emailattribute: mail + nameattribute: sn + uuidattribute: uid + uuidattributetype: text + filter: (objectClass=posixaccount) diff --git a/extensions/_includes/nats-config-example.yaml b/extensions/_includes/nats-config-example.yaml new file mode 100644 index 00000000000..8d33adb36ad --- /dev/null +++ b/extensions/_includes/nats-config-example.yaml @@ -0,0 +1,14 @@ +# Autogenerated +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: "" + token: "" + pprof: false + zpages: false +nats: + host: 127.0.0.1 + port: 9233 diff --git a/extensions/_includes/notifications-config-example.yaml b/extensions/_includes/notifications-config-example.yaml new file mode 100644 index 00000000000..728b67e097e --- /dev/null +++ b/extensions/_includes/notifications-config-example.yaml @@ -0,0 +1,23 @@ +# Autogenerated +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: "" + token: "" + pprof: false + zpages: false +notifications: + smtp: + host: 127.0.0.1 + port: "1025" + sender: god@example.com + password: godisdead + events: + endpoint: 127.0.0.1:9233 + cluster: test-cluster + consumergroup: notifications + revagateway: 127.0.0.1:9142 + machineauthsecret: change-me-please diff --git a/extensions/_includes/ocs-config-example.yaml b/extensions/_includes/ocs-config-example.yaml new file mode 100644 index 00000000000..cf813a0feeb --- /dev/null +++ b/extensions/_includes/ocs-config-example.yaml @@ -0,0 +1,45 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9114 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9110 + root: /ocs + cors: + allowedorigins: + - '*' + allowedmethods: + - GET + - POST + - PUT + - PATCH + - DELETE + - OPTIONS + allowedheaders: + - Authorization + - Origin + - Content-Type + - Accept + - X-Requested-With + allowcredentials: true +tokenmanager: + jwtsecret: Pive-Fumkiu4 +reva: + address: 127.0.0.1:9142 +identitymanagement: + address: https://localhost:9200 +accountbackend: accounts +storageusersdriver: ocis +machineauthapikey: change-me-please diff --git a/extensions/_includes/proxy-config-example.yaml b/extensions/_includes/proxy-config-example.yaml new file mode 100644 index 00000000000..7320a01993b --- /dev/null +++ b/extensions/_includes/proxy-config-example.yaml @@ -0,0 +1,183 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9205 + token: "" + pprof: false + zpages: false +http: + addr: 0.0.0.0:9200 + root: / + tlscert: ~/.ocis/proxy/server.crt + tlskey: ~/.ocis/proxy/server.key + tls: true +reva: + address: 127.0.0.1:9142 +policies: +- name: ocis + routes: + - type: "" + endpoint: / + backend: http://localhost:9100 + apachevhost: false + - type: "" + endpoint: /.well-known/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /konnect/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /signin/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /archiver + backend: http://localhost:9140 + apachevhost: false + - type: regex + endpoint: /ocs/v[12].php/cloud/(users?|groups) + backend: http://localhost:9110 + apachevhost: false + - type: "" + endpoint: /ocs/ + backend: http://localhost:9140 + apachevhost: false + - type: query + endpoint: /remote.php/?preview=1 + backend: http://localhost:9115 + apachevhost: false + - type: "" + endpoint: /remote.php/ + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /dav/ + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /webdav/ + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /status.php + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /index.php/ + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /data + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /app/ + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /graph/ + backend: http://localhost:9120 + apachevhost: false + - type: "" + endpoint: /graph-explorer + backend: http://localhost:9135 + apachevhost: false + - type: "" + endpoint: /api/v0/accounts + backend: http://localhost:9181 + apachevhost: false + - type: "" + endpoint: /accounts.js + backend: http://localhost:9181 + apachevhost: false + - type: "" + endpoint: /api/v0/settings + backend: http://localhost:9190 + apachevhost: false + - type: "" + endpoint: /settings.js + backend: http://localhost:9190 + apachevhost: false +- name: oc10 + routes: + - type: "" + endpoint: / + backend: http://localhost:9100 + apachevhost: false + - type: "" + endpoint: /.well-known/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /konnect/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /signin/ + backend: http://localhost:9130 + apachevhost: false + - type: "" + endpoint: /archiver + backend: http://localhost:9140 + apachevhost: false + - type: "" + endpoint: /ocs/ + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /remote.php/ + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /dav/ + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /webdav/ + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /status.php + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /index.php/ + backend: https://demo.owncloud.com + apachevhost: true + - type: "" + endpoint: /data + backend: https://demo.owncloud.com + apachevhost: true +oidc: + issuer: https://localhost:9200 + insecure: true + userinfocache: + size: 1024 + ttl: 10 +tokenmanager: + jwtsecret: Pive-Fumkiu4 +policyselector: null +presignedurl: + allowedhttpmethods: + - GET + enabled: true +accountbackend: accounts +useroidcclaim: email +usercs3claim: mail +machineauthapikey: change-me-please +autoprovisionaccounts: false +enablebasicauth: false +insecurebackends: false +authmiddleware: + credentialsbyuseragent: {} diff --git a/extensions/_includes/settings-config-example.yaml b/extensions/_includes/settings-config-example.yaml new file mode 100644 index 00000000000..23c6827b9e9 --- /dev/null +++ b/extensions/_includes/settings-config-example.yaml @@ -0,0 +1,44 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9194 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9190 + root: / + cachettl: 604800 + cors: + allowedorigins: + - '*' + allowedmethods: + - GET + - POST + - PUT + - PATCH + - DELETE + - OPTIONS + allowedheaders: + - Authorization + - Origin + - Content-Type + - Accept + - X-Requested-With + allowcredentials: true +grpc: + addr: 127.0.0.1:9191 +datapath: ~/.ocis/settings +asset: + path: "" +tokenmanager: + jwtsecret: Pive-Fumkiu4 diff --git a/extensions/_includes/storage-config-example.yaml b/extensions/_includes/storage-config-example.yaml new file mode 100644 index 00000000000..48ad0c7e8e1 --- /dev/null +++ b/extensions/_includes/storage-config-example.yaml @@ -0,0 +1,605 @@ +# Autogenerated +commons: null +file: "" +log: null +debug: + addr: 127.0.0.1:9109 + token: "" + pprof: false + zpages: false +reva: + jwtsecret: Pive-Fumkiu4 + skipusergroupsintoken: false + transfersecret: replace-me-with-a-transfer-secret + transferexpires: 86400 + oidc: + issuer: https://localhost:9200 + insecure: false + idclaim: preferred_username + uidclaim: "" + gidclaim: "" + ldap: + hostname: localhost + port: 9126 + cacert: ~/.ocis/ldap/ldap.crt + insecure: false + basedn: dc=ocis,dc=test + loginfilter: (&(objectclass=posixAccount)(|(cn={{login}})(mail={{login}}))) + userfilter: (&(objectclass=posixAccount)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}}))) + userattributefilter: (&(objectclass=posixAccount)({{attr}}={{value}})) + userfindfilter: (&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*))) + usergroupfilter: (&(objectclass=posixGroup)(cn={{query}}*)) + groupfilter: (&(objectclass=posixGroup)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}}))) + groupattributefilter: (&(objectclass=posixGroup)({{attr}}={{value}})) + groupfindfilter: (&(objectclass=posixGroup)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*))) + groupmemberfilter: (&(objectclass=posixAccount)(ownclouduuid={{.OpaqueId}}*)) + binddn: cn=reva,ou=sysusers,dc=ocis,dc=test + bindpassword: reva + idp: https://localhost:9200 + userschema: + uid: ownclouduuid + mail: mail + displayname: displayname + cn: cn + uidnumber: uidnumber + gidnumber: gidnumber + groupschema: + gid: cn + mail: mail + displayname: cn + cn: cn + gidnumber: gidnumber + usergrouprest: + clientid: "" + clientsecret: "" + redisaddress: localhost:6379 + redisusername: "" + redispassword: "" + idprovider: "" + apibaseurl: "" + oidctokenendpoint: "" + targetapi: "" + userowncloudsql: + dbusername: owncloud + dbpassword: secret + dbhost: mysql + dbport: 3306 + dbname: owncloud + idp: https://localhost:9200 + nobody: 90 + joinusername: false + joinownclouduuid: false + enablemedialsearch: false + ocdav: + webdavnamespace: /users/{{.Id.OpaqueId}} + davfilesnamespace: /users/{{.Id.OpaqueId}} + archiver: + maxnumfiles: 10000 + maxsize: 1073741824 + archiverurl: /archiver + userstorage: + eos: + drivercommon: + root: /eos/dockertest/reva + sharefolder: /Shares + userlayout: '{{substr 0 1 .Username}}/{{.Username}}' + enablehome: false + shadownamespace: "" + uploadsnamespace: "" + eosbinary: /usr/bin/eos + xrdcopybinary: /usr/bin/xrdcopy + masterurl: root://eos-mgm1.eoscluster.cern.ch:1094 + grpcuri: "" + slaveurl: root://eos-mgm1.eoscluster.cern.ch:1094 + cachedirectory: /tmp + enablelogging: false + showhiddensysfiles: false + forcesingleusermode: false + usekeytab: false + secprotocol: "" + keytab: "" + singleusername: "" + gatewaysvc: 127.0.0.1:9142 + local: + root: ~/.ocis/storage/local/users + sharefolder: /Shares + userlayout: '{{.Username}}' + enablehome: false + owncloudsql: + drivercommon: + root: ~/.ocis/storage/owncloud + sharefolder: /Shares + userlayout: '{{.Username}}' + enablehome: false + uploadinfodir: ~/.ocis/storage/uploadinfo + dbusername: owncloud + dbpassword: owncloud + dbhost: "" + dbport: 3306 + dbname: owncloud + s3: + drivercommon: + root: "" + sharefolder: "" + userlayout: "" + enablehome: false + region: default + accesskey: "" + secretkey: "" + endpoint: "" + bucket: "" + s3ng: + drivercommon: + root: ~/.ocis/storage/users + sharefolder: /Shares + userlayout: '{{.Id.OpaqueId}}' + enablehome: false + region: default + accesskey: "" + secretkey: "" + endpoint: "" + bucket: "" + ocis: + drivercommon: + root: ~/.ocis/storage/users + sharefolder: /Shares + userlayout: '{{.Id.OpaqueId}}' + enablehome: false + metadatastorage: + eos: + drivercommon: + root: /eos/dockertest/reva + sharefolder: /Shares + userlayout: '{{substr 0 1 .Username}}/{{.Username}}' + enablehome: false + shadownamespace: "" + uploadsnamespace: "" + eosbinary: /usr/bin/eos + xrdcopybinary: /usr/bin/xrdcopy + masterurl: root://eos-mgm1.eoscluster.cern.ch:1094 + grpcuri: "" + slaveurl: root://eos-mgm1.eoscluster.cern.ch:1094 + cachedirectory: /tmp + enablelogging: false + showhiddensysfiles: false + forcesingleusermode: false + usekeytab: false + secprotocol: "" + keytab: "" + singleusername: "" + gatewaysvc: 127.0.0.1:9142 + local: + root: ~/.ocis/storage/local/metadata + sharefolder: "" + userlayout: "" + enablehome: false + owncloudsql: + drivercommon: + root: "" + sharefolder: "" + userlayout: "" + enablehome: false + uploadinfodir: "" + dbusername: "" + dbpassword: "" + dbhost: "" + dbport: 0 + dbname: "" + s3: + drivercommon: + root: "" + sharefolder: "" + userlayout: "" + enablehome: false + region: default + accesskey: "" + secretkey: "" + endpoint: "" + bucket: "" + s3ng: + drivercommon: + root: ~/.ocis/storage/metadata + sharefolder: "" + userlayout: '{{.Id.OpaqueId}}' + enablehome: false + region: default + accesskey: "" + secretkey: "" + endpoint: "" + bucket: "" + ocis: + drivercommon: + root: ~/.ocis/storage/metadata + sharefolder: "" + userlayout: '{{.Id.OpaqueId}}' + enablehome: false + frontend: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: "" + grpcaddr: "" + httpnetwork: tcp + httpaddr: 127.0.0.1:9140 + protocol: "" + endpoint: "" + debugaddr: 127.0.0.1:9141 + services: + - datagateway + - ocdav + - ocs + - appprovider + config: {} + context: null + supervised: false + appproviderinsecure: false + appproviderprefix: "" + archiverinsecure: false + archiverprefix: archiver + datagatewayprefix: data + favorites: false + projectspaces: true + ocdavinsecure: false + ocdavprefix: "" + ocsprefix: ocs + ocsshareprefix: /Shares + ocshomenamespace: /users/{{.Id.OpaqueId}} + publicurl: https://localhost:9200 + ocscachewarmupdriver: "" + ocsadditionalinfoattribute: '{{.Mail}}' + ocsresourceinfocachettl: 0 + middleware: + auth: + credentialsbyuseragent: {} + datagateway: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: "" + grpcaddr: "" + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: "" + debugaddr: "" + services: [] + config: {} + context: null + supervised: false + publicurl: "" + gateway: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9142 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: 127.0.0.1:9142 + debugaddr: 127.0.0.1:9143 + services: [] + config: {} + context: null + supervised: false + commitsharetostoragegrant: true + commitsharetostorageref: true + disablehomecreationonlogin: false + sharefolder: Shares + linkgrants: "" + homemapping: "" + etagcachettl: 0 + storageregistry: + driver: spaces + homeprovider: /home + rules: [] + json: "" + appregistry: + driver: static + mimetypesjson: "" + users: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9144 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9144 + debugaddr: 127.0.0.1:9145 + services: + - userprovider + config: {} + context: null + supervised: false + driver: ldap + json: "" + usergroupscacheexpiration: 5 + groups: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9160 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9160 + debugaddr: 127.0.0.1:9161 + services: + - groupprovider + config: {} + context: null + supervised: false + driver: ldap + json: "" + groupmemberscacheexpiration: 5 + authprovider: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: "" + grpcaddr: "" + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: "" + debugaddr: "" + services: [] + config: {} + context: null + supervised: false + driver: ldap + json: "" + usergroupscacheexpiration: 0 + authbasic: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9146 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9146 + debugaddr: 127.0.0.1:9147 + services: + - authprovider + config: {} + context: null + supervised: false + authbearer: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9148 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9148 + debugaddr: 127.0.0.1:9149 + services: + - authprovider + config: {} + context: null + supervised: false + authmachine: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9166 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9166 + debugaddr: 127.0.0.1:9167 + services: + - authprovider + config: {} + context: null + supervised: false + authmachineconfig: + machineauthapikey: change-me-please + sharing: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9150 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9150 + debugaddr: 127.0.0.1:9151 + services: + - usershareprovider + - publicshareprovider + config: {} + context: null + supervised: false + userdriver: json + userjsonfile: ~/.ocis/storage/shares.json + usersqlusername: "" + usersqlpassword: "" + usersqlhost: "" + usersqlport: 1433 + usersqlname: "" + publicdriver: json + publicjsonfile: ~/.ocis/storage/publicshares.json + publicpasswordhashcost: 11 + publicenableexpiredsharescleanup: true + publicjanitorruninterval: 60 + userstoragemountid: "" + events: + address: 127.0.0.1:9233 + clusterid: test-cluster + storageshares: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9154 + httpnetwork: tcp + httpaddr: 127.0.0.1:9155 + protocol: "" + endpoint: localhost:9154 + debugaddr: 127.0.0.1:9156 + services: [] + config: {} + context: null + supervised: false + driver: "" + mountid: 1284d238-aa92-42ce-bdc4-0b0000009157 + alternativeid: 1284d238-aa92-42ce-bdc4-0b0000009154 + exposedataserver: false + dataserverurl: "" + httpprefix: "" + tempfolder: "" + readonly: false + dataprovider: + insecure: false + gatewayendpoint: "" + storageusers: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9157 + httpnetwork: tcp + httpaddr: 127.0.0.1:9158 + protocol: "" + endpoint: localhost:9157 + debugaddr: 127.0.0.1:9159 + services: [] + config: {} + context: null + supervised: false + driver: ocis + mountid: 1284d238-aa92-42ce-bdc4-0b0000009157 + alternativeid: "" + exposedataserver: false + dataserverurl: http://localhost:9158/data + httpprefix: data + tempfolder: ~/.ocis/tmp/users + readonly: false + dataprovider: + insecure: false + gatewayendpoint: "" + storagepubliclink: + storageport: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9178 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9178 + debugaddr: 127.0.0.1:9179 + services: [] + config: {} + context: null + supervised: false + driver: "" + mountid: 7993447f-687f-490d-875c-ac95e89a62a4 + alternativeid: "" + exposedataserver: false + dataserverurl: "" + httpprefix: "" + tempfolder: "" + readonly: false + dataprovider: + insecure: false + gatewayendpoint: "" + publicshareprovideraddr: "" + userprovideraddr: "" + storagemetadata: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9215 + httpnetwork: tcp + httpaddr: 127.0.0.1:9216 + protocol: "" + endpoint: "" + debugaddr: 127.0.0.1:9217 + services: [] + config: {} + context: null + supervised: false + driver: ocis + mountid: "" + alternativeid: "" + exposedataserver: false + dataserverurl: http://localhost:9216/data + httpprefix: "" + tempfolder: ~/.ocis/tmp/metadata + readonly: false + dataprovider: + insecure: false + gatewayendpoint: "" + appprovider: + port: + maxcpus: "" + loglevel: "" + grpcnetwork: tcp + grpcaddr: 127.0.0.1:9164 + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9164 + debugaddr: 127.0.0.1:9165 + services: + - appprovider + config: {} + context: null + supervised: false + externaladdr: 127.0.0.1:9164 + driver: "" + wopidriver: + appapikey: "" + appdesktoponly: false + appiconuri: "" + appinternalurl: "" + appname: "" + appurl: "" + insecure: false + iopsecret: "" + jwtsecret: "" + wopiurl: "" + appsurl: /app/list + openurl: /app/open + newurl: /app/new + permissions: + maxcpus: "" + loglevel: "" + grpcnetwork: "" + grpcaddr: "" + httpnetwork: "" + httpaddr: "" + protocol: "" + endpoint: localhost:9191 + debugaddr: "" + services: [] + config: {} + context: null + supervised: false + configs: {} + uploadmaxchunksize: 100000000 + uploadhttpmethodoverride: "" + checksumsupportedtypes: + - sha1 + - md5 + - adler32 + checksumpreferreduploadtype: "" + defaultuploadprotocol: tus +tracing: + enabled: false + type: jaeger + endpoint: "" + collector: "" + service: storage +asset: + path: "" diff --git a/extensions/_includes/store-config-example.yaml b/extensions/_includes/store-config-example.yaml new file mode 100644 index 00000000000..c6194266887 --- /dev/null +++ b/extensions/_includes/store-config-example.yaml @@ -0,0 +1,19 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9464 + token: "" + pprof: false + zpages: false +grpc: + addr: 127.0.0.1:9460 +datapath: ~/.ocis/store diff --git a/extensions/_includes/thumbnails-config-example.yaml b/extensions/_includes/thumbnails-config-example.yaml new file mode 100644 index 00000000000..2d5ecfea2cd --- /dev/null +++ b/extensions/_includes/thumbnails-config-example.yaml @@ -0,0 +1,38 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9189 + token: "" + pprof: false + zpages: false +grpc: + addr: 127.0.0.1:9185 +http: + addr: 127.0.0.1:9186 + root: /thumbnails +thumbnail: + resolutions: + - 16x16 + - 32x32 + - 64x64 + - 128x128 + - 1920x1080 + - 3840x2160 + - 7680x4320 + filesystemstorage: + rootdirectory: ~/.ocis/thumbnails + webdavallowinsecure: false + cs3allowinsecure: false + revagateway: 127.0.0.1:9142 + fontmapfile: "" + transfertokensecret: changemeplease + dataendpoint: http://127.0.0.1:9186/thumbnails/data diff --git a/extensions/_includes/thumbnails_configvars.md b/extensions/_includes/thumbnails_configvars.md index a2de2833729..5884e6ef252 100644 --- a/extensions/_includes/thumbnails_configvars.md +++ b/extensions/_includes/thumbnails_configvars.md @@ -10,7 +10,7 @@ | THUMBNAILS_HTTP_ADDR | string | 127.0.0.1:9186 | | | THUMBNAILS_HTTP_ROOT | string | /thumbnails | | | THUMBNAILS_FILESYSTEMSTORAGE_ROOT | string | ~/.ocis/thumbnails | | -| OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE | bool | true | | +| OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE | bool | false | | | OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE | bool | false | | | REVA_GATEWAY | string | 127.0.0.1:9142 | | | THUMBNAILS_TXT_FONTMAP_FILE | string | | | diff --git a/extensions/_includes/web-config-example.yaml b/extensions/_includes/web-config-example.yaml new file mode 100644 index 00000000000..a0560f49e09 --- /dev/null +++ b/extensions/_includes/web-config-example.yaml @@ -0,0 +1,44 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9104 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9100 + root: / + cachettl: 604800 +asset: + path: "" +file: "" +web: + path: "" + themeserver: https://localhost:9200 + themepath: /themes/owncloud/theme.json + config: + server: https://localhost:9200 + theme: "" + version: 0.1.0 + openidconnect: + metadataurl: https://localhost:9200/.well-known/openid-configuration + authority: https://localhost:9200 + clientid: web + responsetype: code + scope: openid profile email + apps: + - files + - search + - media-viewer + - external + externalapps: [] + options: {} diff --git a/extensions/_includes/webdav-config-example.yaml b/extensions/_includes/webdav-config-example.yaml new file mode 100644 index 00000000000..87b141f5459 --- /dev/null +++ b/extensions/_includes/webdav-config-example.yaml @@ -0,0 +1,39 @@ +# Autogenerated +tracing: + enabled: false + type: "" + endpoint: "" + collector: "" +log: + level: "" + pretty: false + color: false + file: "" +debug: + addr: 127.0.0.1:9119 + token: "" + pprof: false + zpages: false +http: + addr: 127.0.0.1:9115 + root: / + cors: + allowedorigins: + - '*' + allowedmethods: + - GET + - POST + - PUT + - PATCH + - DELETE + - OPTIONS + allowedheaders: + - Authorization + - Origin + - Content-Type + - Accept + - X-Requested-With + allowcredentials: true +ocispublicurl: https://127.0.0.1:9200 +webdavnamespace: /users/{{.Id.OpaqueId}} +revagateway: 127.0.0.1:9142 diff --git a/extensions/accounts/configuration.md b/extensions/accounts/configuration.md index 584b5b18309..8fffa2559a6 100644 --- a/extensions/accounts/configuration.md +++ b/extensions/accounts/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/accounts-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/accounts_configvars.md" >}} \ No newline at end of file diff --git a/extensions/glauth/configuration.md b/extensions/glauth/configuration.md index 7132fe0e50a..e45a0c0aa9d 100644 --- a/extensions/glauth/configuration.md +++ b/extensions/glauth/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/glauth-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/glauth_configvars.md" >}} \ No newline at end of file diff --git a/extensions/graph-explorer/configuration.md b/extensions/graph-explorer/configuration.md index c27fe24673a..a88cabd2d6d 100644 --- a/extensions/graph-explorer/configuration.md +++ b/extensions/graph-explorer/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/graph-explorer-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/graph-explorer_configvars.md" >}} \ No newline at end of file diff --git a/extensions/graph/configuration.md b/extensions/graph/configuration.md index 786dfb13399..dbd212255cb 100644 --- a/extensions/graph/configuration.md +++ b/extensions/graph/configuration.md @@ -7,6 +7,8 @@ geekdocEditPath: edit/master/docs/extensions/graph geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config +{{< include file="extensions/_includes/graph-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/graph_configvars.md" >}} \ No newline at end of file diff --git a/extensions/idm/configuration.md b/extensions/idm/configuration.md index 14200bcde07..1595260c784 100644 --- a/extensions/idm/configuration.md +++ b/extensions/idm/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/idm-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/idm_configvars.md" >}} \ No newline at end of file diff --git a/extensions/idp/configuration.md b/extensions/idp/configuration.md index bc6011eac8f..8aa88d203bc 100644 --- a/extensions/idp/configuration.md +++ b/extensions/idp/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/idp-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/idp_configvars.md" >}} \ No newline at end of file diff --git a/extensions/nats/configuration.md b/extensions/nats/configuration.md index 20ba82f34b1..4d414c90dee 100644 --- a/extensions/nats/configuration.md +++ b/extensions/nats/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/nats-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/nats_configvars.md" >}} \ No newline at end of file diff --git a/extensions/notifications/configuration.md b/extensions/notifications/configuration.md index 7da0ba47b65..7e260efbd5b 100644 --- a/extensions/notifications/configuration.md +++ b/extensions/notifications/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/notifications-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/notifications_configvars.md" >}} \ No newline at end of file diff --git a/extensions/ocs/configuration.md b/extensions/ocs/configuration.md index 502fead64e2..af9bd28c453 100644 --- a/extensions/ocs/configuration.md +++ b/extensions/ocs/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/ocs-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/ocs_configvars.md" >}} \ No newline at end of file diff --git a/extensions/proxy/configuration.md b/extensions/proxy/configuration.md index 785922489ac..e127a101553 100644 --- a/extensions/proxy/configuration.md +++ b/extensions/proxy/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/proxy-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/proxy_configvars.md" >}} \ No newline at end of file diff --git a/extensions/settings/configuration.md b/extensions/settings/configuration.md index b20e913a7f5..ac61a75705e 100644 --- a/extensions/settings/configuration.md +++ b/extensions/settings/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/settings-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/settings_configvars.md" >}} \ No newline at end of file diff --git a/extensions/store/configuration.md b/extensions/store/configuration.md index a974e254af4..d556218cf14 100644 --- a/extensions/store/configuration.md +++ b/extensions/store/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/store-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/store_configvars.md" >}} \ No newline at end of file diff --git a/extensions/thumbnails/configuration.md b/extensions/thumbnails/configuration.md index 7b6e85bde53..1f10b136676 100644 --- a/extensions/thumbnails/configuration.md +++ b/extensions/thumbnails/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/thumbnails-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/thumbnails_configvars.md" >}} \ No newline at end of file diff --git a/extensions/web/configuration.md b/extensions/web/configuration.md index d55237fd905..ee3e60d7d8f 100644 --- a/extensions/web/configuration.md +++ b/extensions/web/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/web-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/web_configvars.md" >}} \ No newline at end of file diff --git a/extensions/webdav/configuration.md b/extensions/webdav/configuration.md index 7ae4a048607..53c2820012f 100644 --- a/extensions/webdav/configuration.md +++ b/extensions/webdav/configuration.md @@ -8,5 +8,8 @@ geekdocFilePath: configuration.md geekdocCollapseSection: true --- +## Example YAML Config + +{{< include file="extensions/_includes/webdav-config-example.yaml" language="yaml" >}} {{< include file="extensions/_includes/webdav_configvars.md" >}} \ No newline at end of file diff --git a/grpc_apis/ocis/messages/accounts/v0/grpc.md b/grpc_apis/ocis/messages/accounts/v0/grpc.md index e2352264e6a..f3e5a7dc4b9 100644 --- a/grpc_apis/ocis/messages/accounts/v0/grpc.md +++ b/grpc_apis/ocis/messages/accounts/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.accounts.v0" url: /grpc_apis/ocis_messages_accounts_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/settings/v0/grpc.md b/grpc_apis/ocis/messages/settings/v0/grpc.md index 49bc3f8bb9a..c66b8b82dd2 100644 --- a/grpc_apis/ocis/messages/settings/v0/grpc.md +++ b/grpc_apis/ocis/messages/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.settings.v0" url: /grpc_apis/ocis_messages_settings_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/store/v0/grpc.md b/grpc_apis/ocis/messages/store/v0/grpc.md index 26f4875e983..c66475274e0 100644 --- a/grpc_apis/ocis/messages/store/v0/grpc.md +++ b/grpc_apis/ocis/messages/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.store.v0" url: /grpc_apis/ocis_messages_store_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md index f5493903c69..de0d505d6fc 100644 --- a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.thumbnails.v0" url: /grpc_apis/ocis_messages_thumbnails_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/accounts/v0/grpc.md b/grpc_apis/ocis/services/accounts/v0/grpc.md index 236fc8e2a90..6359dd621f4 100644 --- a/grpc_apis/ocis/services/accounts/v0/grpc.md +++ b/grpc_apis/ocis/services/accounts/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.accounts.v0" url: /grpc_apis/ocis_services_accounts_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/settings/v0/grpc.md b/grpc_apis/ocis/services/settings/v0/grpc.md index 4734ab60d45..61c5e9aa382 100644 --- a/grpc_apis/ocis/services/settings/v0/grpc.md +++ b/grpc_apis/ocis/services/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.settings.v0" url: /grpc_apis/ocis_services_settings_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/store/v0/grpc.md b/grpc_apis/ocis/services/store/v0/grpc.md index 09ff4fca8d0..64c629355b4 100644 --- a/grpc_apis/ocis/services/store/v0/grpc.md +++ b/grpc_apis/ocis/services/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.store.v0" url: /grpc_apis/ocis_services_store_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:31Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/thumbnails/v0/grpc.md b/grpc_apis/ocis/services/thumbnails/v0/grpc.md index 6ba0fa46fe0..cde4422fd32 100644 --- a/grpc_apis/ocis/services/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/services/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.thumbnails.v0" url: /grpc_apis/ocis_services_thumbnails_v0 -date: 2022-03-14T12:10:16Z +date: 2022-03-14T15:25:30Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/helpers/configenvextractor.go b/helpers/configenvextractor.go index bc504fc32e8..1d5b9f6f81d 100644 --- a/helpers/configenvextractor.go +++ b/helpers/configenvextractor.go @@ -6,14 +6,20 @@ import ( "log" "os" "os/exec" + "path" "path/filepath" "strings" "text/template" ) +var targets = map[string]string{ + "example-config-generator.go.tmpl": "output/exampleconfig/example-config-generator.go", + "extractor.go.tmpl": "output/env/runner.go", +} + func main() { fmt.Println("Getting relevant packages") - paths, err := filepath.Glob("../../*/pkg/config/defaultconfig.go") + paths, err := filepath.Glob("../../*/pkg/config/defaults/defaultconfig.go") if err != nil { log.Fatal(err) } @@ -24,27 +30,36 @@ func main() { for i := range paths { paths[i] = replacer.Replace(paths[i]) } - content, err := ioutil.ReadFile("extractor.go.tmpl") + + for template, output := range targets { + GenerateIntermediateCode(template, output, paths) + RunIntermediateCode(output) + } + fmt.Println("Cleaning up") + os.RemoveAll("output") +} + +func GenerateIntermediateCode(templatePath string, intermediateCodePath string, paths []string) { + content, err := ioutil.ReadFile(templatePath) if err != nil { log.Fatal(err) } - fmt.Println("Generating intermediate go code") + fmt.Println("Generating intermediate go code for " + intermediateCodePath + " using template " + templatePath) tpl := template.Must(template.New("").Parse(string(content))) - os.Mkdir("output", 0700) - runner, err := os.Create("output/runner.go") + os.MkdirAll(path.Dir(intermediateCodePath), 0700) + runner, err := os.Create(intermediateCodePath) if err != nil { log.Fatal(err) } tpl.Execute(runner, paths) - fmt.Println("Running intermediate go code") - os.Chdir("output") +} + +func RunIntermediateCode(intermediateCodePath string) { + fmt.Println("Running intermediate go code for " + intermediateCodePath) os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis") - out, err := exec.Command("go", "run", "runner.go").Output() + out, err := exec.Command("go", "run", intermediateCodePath).Output() if err != nil { log.Fatal(err) } fmt.Println(string(out)) - fmt.Println("Cleaning up") - os.Chdir("../") - os.RemoveAll("output") } diff --git a/helpers/example-config-generator.go.tmpl b/helpers/example-config-generator.go.tmpl new file mode 100644 index 00000000000..705a5e875ac --- /dev/null +++ b/helpers/example-config-generator.go.tmpl @@ -0,0 +1,53 @@ +package main + +import ( + "fmt" + "log" + "os" + "path/filepath" + "strings" + + "gopkg.in/yaml.v2" + {{- range $key, $value := .}} + pkg{{$key}} "{{$value}}" + {{- end}} +) + +func main() { + replacer := strings.NewReplacer( + "github.com/owncloud/ocis/", "", + "/pkg/config/defaults", "", + ) + cfg := map[string]string{ + {{- range $key, $value := .}} + replacer.Replace("{{$value}}"): func() string { + fmt.Println("Generating example YAML config for {{ $value -}}") + c := pkg{{$key}}.DefaultConfig() + pkg{{$key}}.EnsureDefaults(c) + pkg{{$key}}.Sanitize(c) + yml, err := yaml.Marshal(c) + if err != nil { + log.Fatalf("Marshalling yaml for pkg0 failed: %s\n", err) + } + return "# Autogenerated\n" + string(yml) + }(), + {{- end}} + } + for pkg, yml := range cfg { + targetFolders := []string{ + // TODO: comment in when it is clear how to commit this to the structure of the master|main branch + // filepath.Join("../../", pkg, "/config"), + "../../docs/extensions/_includes/", + } + for _, targetFolder := range targetFolders { + os.MkdirAll(targetFolder, 0700) + targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml")) + if err != nil { + log.Fatalf("Failed to create target file for : %s", err) + } + defer targetYamlFile.Close() + targetYamlFile.WriteString(yml) + } + } +} + diff --git a/helpers/extractor.go.tmpl b/helpers/extractor.go.tmpl index 3503ea22749..76ec507b3a9 100644 --- a/helpers/extractor.go.tmpl +++ b/helpers/extractor.go.tmpl @@ -23,13 +23,13 @@ type ConfigField struct { func main() { fmt.Println("Generating documentation for environment variables:") -content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl") +content, err := ioutil.ReadFile("../../docs/templates/CONFIGURATION.tmpl") if err != nil { log.Fatal(err) } replacer := strings.NewReplacer( "github.com/owncloud/ocis/", "", - "/pkg/config", "", + "/pkg/config/defaults", "", ) var fields []ConfigField var targetFile *os.File @@ -41,7 +41,7 @@ m := map[string]interface{}{ {{- end }} } - targetFolder := "../../../docs/extensions/_includes/" + targetFolder := "../../docs/extensions/_includes/" for pkg, conf := range m { fields = GetAnnotatedVariables(conf) if len(fields) > 0 {