From 558d49abef35af86fe3fb3f65ee839c11376d460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 12 Jan 2023 15:10:55 +0000 Subject: [PATCH] =?UTF-8?q?commit=20078698fdf4e7c684669172f82df6efa8c84ac0?= =?UTF-8?q?b1=20Author:=20J=C3=B6rn=20Friedrich=20Dreyer=20=20Date:=20=20=20Thu=20Jan=2012=2016:09:34=202023=20+0100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit graph: add appRoleAssignments and minimal application resource (#5318) * bump libregraph-go lib Signed-off-by: Jörn Friedrich Dreyer * add appRoleAssignment stubs Signed-off-by: Jörn Friedrich Dreyer * add get application stub Signed-off-by: Jörn Friedrich Dreyer * fetch appRoles for application from settings service Signed-off-by: Jörn Friedrich Dreyer * initial list appRoleAssignments implementation Signed-off-by: Jörn Friedrich Dreyer * initial create appRoleAssignment implementation, extract assignmentToAppRoleAssignment, configurable app id and displayname Signed-off-by: Jörn Friedrich Dreyer * initial delete appRoleAssignment implementation, changed error handling and logging Signed-off-by: Jörn Friedrich Dreyer * initial expand appRoleAssignment on users Signed-off-by: Jörn Friedrich Dreyer * test user expand appRoleAssignment Signed-off-by: Jörn Friedrich Dreyer * test appRoleAssignment Signed-off-by: Jörn Friedrich Dreyer * fix education test by actually using the mocked roleManager Signed-off-by: Jörn Friedrich Dreyer * test getapplication Signed-off-by: Jörn Friedrich Dreyer * list assignments Signed-off-by: Jörn Friedrich Dreyer * use common not exists error handling Signed-off-by: Jörn Friedrich Dreyer * default to just 'ownCloud Infinite Scale' as application name Signed-off-by: Jörn Friedrich Dreyer * fix store_test Signed-off-by: Jörn Friedrich Dreyer * roll application uuid on init Signed-off-by: Jörn Friedrich Dreyer * fix tests Signed-off-by: Jörn Friedrich Dreyer * extract method Signed-off-by: Jörn Friedrich Dreyer * Apply suggestions from code review Co-authored-by: Michael Barz Signed-off-by: Jörn Friedrich Dreyer Co-authored-by: Michael Barz --- services/_includes/adoc/global_configvars.adoc | 18 +++++++++--------- services/_includes/adoc/graph_configvars.adoc | 18 ++++++++++++++++++ services/_includes/graph-config-example.yaml | 3 +++ services/_includes/graph_configvars.md | 2 ++ 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/services/_includes/adoc/global_configvars.adoc b/services/_includes/adoc/global_configvars.adoc index 62c1b55395a..36b3261aa60 100644 --- a/services/_includes/adoc/global_configvars.adoc +++ b/services/_includes/adoc/global_configvars.adoc @@ -26,7 +26,7 @@ a| [subs=-attributes] ++false ++ a| [subs=-attributes] -Flag to enable or disable the creation of the demo users. +The default role assignments the demo users should be setup. a| `LDAP_BIND_DN` @@ -535,7 +535,7 @@ a| [subs=-attributes] ++[]string ++ a| [subs=-attributes] -++[Authorization Origin Content-Type Accept X-Requested-With] ++ +++[Origin Accept Content-Type Depth Authorization Ocs-Apirequest If-None-Match If-Match Destination Overwrite X-Request-Id X-Requested-With Tus-Resumable Tus-Checksum-Algorithm Upload-Concat Upload-Length Upload-Metadata Upload-Defer-Length Upload-Expires Upload-Checksum Upload-Offset X-HTTP-Method-Override] ++ a| [subs=-attributes] A comma-separated list of allowed CORS headers. See following chapter for more details: *Access-Control-Request-Headers* at \https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers. @@ -552,7 +552,7 @@ a| [subs=-attributes] ++[]string ++ a| [subs=-attributes] -++[GET POST PUT PATCH DELETE OPTIONS] ++ +++[OPTIONS HEAD GET PUT POST DELETE MKCOL PROPFIND PROPPATCH MOVE COPY REPORT SEARCH] ++ a| [subs=-attributes] A comma-separated list of allowed CORS methods. See following chapter for more details: *Access-Control-Request-Method* at \https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method @@ -853,7 +853,7 @@ a| [subs=-attributes] ++false ++ a| [subs=-attributes] -Whether the ocis server should skip the client certificate verification during the TLS handshake. +Allow insecure connections to the frontend. a| `OCIS_JWT_SECRET` @@ -1078,7 +1078,7 @@ a| [subs=-attributes] ++ ++ a| [subs=-attributes] -Machine auth API key used to validate internal requests necessary for the access to resources from other services. +The machine auth API key used to validate internal requests necessary to access resources from other services. a| `OCIS_OIDC_ISSUER` @@ -1099,7 +1099,7 @@ a| [subs=-attributes] ++https://localhost:9200 ++ a| [subs=-attributes] -The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider. +URL of the OIDC issuer. It defaults to URL of the builtin IDP. a| `OCIS_SYSTEM_USER_API_KEY` @@ -1137,7 +1137,7 @@ a| [subs=-attributes] ++ ++ a| [subs=-attributes] -ID of the oCIS storage-system system user. Admins need to set the ID for the STORAGE-SYSTEM system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format. +ID of the oCIS STORAGE-SYSTEM system user. Admins need to set the ID for the STORAGE-SYSTEM system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format. a| `OCIS_SYSTEM_USER_IDP` @@ -1341,7 +1341,7 @@ a| [subs=-attributes] ++https://localhost:9200 ++ a| [subs=-attributes] -The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider. +The public facing URL of the oCIS frontend. a| `REVA_GATEWAY` @@ -1392,7 +1392,7 @@ a| [subs=-attributes] ++ ++ a| [subs=-attributes] -The storage transfer secret. +Transfer secret for signing file up- and download requests. a| `STORAGE_USERS_OCIS_ASYNC_UPLOADS` diff --git a/services/_includes/adoc/graph_configvars.adoc b/services/_includes/adoc/graph_configvars.adoc index f575486b58e..d075514e12b 100644 --- a/services/_includes/adoc/graph_configvars.adoc +++ b/services/_includes/adoc/graph_configvars.adoc @@ -289,6 +289,24 @@ a| [subs=-attributes] a| [subs=-attributes] Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the go-micro based grpc services. +a|`GRAPH_APPLICATION_ID` + + +a| [subs=-attributes] +++string ++ +a| [subs=-attributes] +++ ++ +a| [subs=-attributes] +The ocis application id shown in the graph. All app roles are tied to this. + +a|`GRAPH_APPLICATION_DISPLAYNAME` + + +a| [subs=-attributes] +++string ++ +a| [subs=-attributes] +++ownCloud Infinite Scale ++ +a| [subs=-attributes] +The oCIS application name + a|`OCIS_URL` + `GRAPH_SPACES_WEBDAV_BASE` + diff --git a/services/_includes/graph-config-example.yaml b/services/_includes/graph-config-example.yaml index 23486b1eb00..6320997e72d 100644 --- a/services/_includes/graph-config-example.yaml +++ b/services/_includes/graph-config-example.yaml @@ -40,6 +40,9 @@ token_manager: grpc_client_tls: mode: "" cacert: "" +application: + id: "" + displayname: ownCloud Infinite Scale spaces: webdav_base: https://localhost:9200 webdav_path: /dav/spaces/ diff --git a/services/_includes/graph_configvars.md b/services/_includes/graph_configvars.md index 9ea6fe9672e..1d74cbf8fa5 100644 --- a/services/_includes/graph_configvars.md +++ b/services/_includes/graph_configvars.md @@ -30,6 +30,8 @@ | OCIS_JWT_SECRET
GRAPH_JWT_SECRET | string | | The secret to mint and validate jwt tokens.| | OCIS_GRPC_CLIENT_TLS_MODE | string | | TLS mode for grpc connection to the go-micro based grpc services. Possible values are 'off', 'insecure' and 'on'. 'off': disables transport security for the clients. 'insecure' allows to use transport security, but disables certificate verification (to be used with the autogenerated self-signed certificates). 'on' enables transport security, including server ceritificate verification.| | OCIS_GRPC_CLIENT_TLS_CACERT | string | | Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the go-micro based grpc services.| +| GRAPH_APPLICATION_ID | string | | The ocis application id shown in the graph. All app roles are tied to this.| +| GRAPH_APPLICATION_DISPLAYNAME | string | ownCloud Infinite Scale | The oCIS application name| | OCIS_URL
GRAPH_SPACES_WEBDAV_BASE | string | https://localhost:9200 | The public facing URL of WebDAV.| | GRAPH_SPACES_WEBDAV_PATH | string | /dav/spaces/ | The WebDAV subpath for spaces.| | GRAPH_SPACES_DEFAULT_QUOTA | string | 1000000000 | The default quota in bytes.|