OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[chore] update error code descriptions for oidc and oauth
Eric Schubert7204b1faf747
diff --git a/docs/system-admin-guide/files/external-file-storages/health-status/README.md b/docs/system-admin-guide/files/external-file-storages/health-status/README.mdindex 3d57a6afeca..2cf5e285693 100644--- a/docs/system-admin-guide/files/external-file-storages/health-status/README.md+++ b/docs/system-admin-guide/files/external-file-storages/health-status/README.md@@ -65,10 +65,9 @@ possible reasons and suggested solutions.| ERR_OD_DRIVE_ID_INVALID | The configured drive id has an invalid format. | There might be a typo in the drive id. | Consult the [drive guide](../../../integrations/one-drive/drive-guide/) and fetch the desired drive ID again, to fill out the input field. || ERR_OD_DRIVE_ID_NOT_FOUND | The configured drive id was not found. | There might be a typo in the drive id, the drive might be deleted, or your application has no permissions to see it. | Consult the [drive guide](../../../integrations/one-drive/drive-guide/) and fetch the desired drive ID again, to fill out the input field. || ERR_OD_TENANT_ID_WRONG | The configured directory (tenant) id is invalid. | There might be a typo or the tenant name or ID has changed recently. | Go to the correct application overview in the [Azure Portal](https://portal.azure.com/) and copy the correct tenant id to the input field. |-| ERR_OD_OAUTH_REQUEST_NOT_FOUND | ... | ... | ... |-| ERR_OD_OAUTH_REQUEST_UNAUTHORIZED | ... | ... | ... |-| ERR_OD_CLIENT_WRITE_PERMISSION_MISSING | The application is missing write permissions. | The application might be missing the API permission `Files.ReadWrite.All`. | Go to the correct application api permissions in the [Azure Portal](https://portal.azure.com/) and set the GRAPH API permission `File.ReadWrite.All` on application level. Do not forget to submit the administrator consent. |-| ERR_OD_CLIENT_CANT_DELETE_FOLDER | The application is missing permissions to delete. | ... | ... |+| ERR_OD_OAUTH_REQUEST_UNAUTHORIZED | The current user's token is invalid. | The token of the current user could not be used for accessing the remote file storage, or the refresh failed. | Remove the user token from **Account settings → Access tokens** of this file storage and redo the login. |+| ERR_OD_CLIENT_WRITE_PERMISSION_MISSING | The application is missing write permissions. | The Azure application might be missing the API permission `Files.ReadWrite.All`. | Go to the correct application api permissions in the [Azure Portal](https://portal.azure.com/) and set the GRAPH API permission `File.ReadWrite.All` on application level. Do not forget to submit the administrator consent. |+| ERR_OD_CLIENT_CANT_DELETE_FOLDER | The application is missing permissions to delete. | The Azure application might be misconfigured and thus cannot perform a file deletion in the connected drive. | Recheck the configuration of the application in the [Azure Portal](https://portal.azure.com/) and the connected drives. || ERR_OD_TEST_FOLDER_EXISTS | The folder needed for testing already exists. | A folder is created and deleted while testing the setup for automatically managed project folders. The deletion of this folder might have failed in a previous run. | Check the error message for the exact name of the folder. Go to the website of the drive and delete that folder. || WRN_OD_OAUTH_TOKEN_MISSING | The current user has no authentication token. | The current user probably never did a successful login from OpenProject to the file storage, or the token was deleted from the account details. | Visit any work package of a project, where the current file storage is used. Click on the **Login** button in the **Files** tab. || WRN_OD_UNEXPECTED_CONTENT | The connection request was successful, but unexpected content was found in the drive. | This warning is only shown, if the file storage is configured to automatically managed project folder permissions. There was data found in the drive, that is not a project folder created by OpenProject. | Go to your drive and migrate or delete the data from the drive root, that was not created by OpenProject. Further information about the unexpected data is found in the server logs. A drive configured for usage with the *Automatically managed project folders* option has a disrupted inheritance chain. Any data in here can only be seen by site owner. It is discouraged to use this drive for other purposes than the OpenProject integration. |@@ -78,17 +77,16 @@ possible reasons and suggested solutions.The following table lists the error codes of failures specific to Nextcloud, with a description of the possible reasonsand suggested solutions.-| Error code | Error description | Possible reasons | Next steps and solutions |-|------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-| ERR_NC_HOST_NOT_FOUND | No Nextcloud server was found at the configured host URL. | There might be a typo or the URL has changed. | Check the configuration and enter a valid URL. |-| ERR_NC_DEPENDENCY_MISSING | A required dependency is missing on the file storage. | Either the Integration OpenProject app or the Group Folders app is not enabled in Nextcloud. | Add the missing dependency to the Nextcloud server. |-| ERR_NC_DEPENDENCY_VERSION_MISMATCH | A required dependency has an outdated version. | Either the Integration OpenProject app or the Group Folders app is outdated or was not updated to the officially minimal supported version. | Update your apps to the latest version. It might be necessary to update your Nextcloud server to the latest version in order to be able to install the latest app versions. |-| ERR_NC_GROUP_FOLDER_NOT_FOUND | The group folder could not be found. | The group folder used by the Integration OpenProject app was not found. This folder is usually named `OpenProject` and is owned by the group `OpenProject`. | The group folder is used only by the automatically managed project folders mode. Try to disable this option in the Nextcloud administration for the Integration OpenProject app and reenable it afterwards. |-| ERR_NC_OAUTH_REQUEST_NOT_FOUND | ... | ... | ... |-| ERR_NC_OAUTH_REQUEST_UNAUTHORIZED | ... | ... | ... |-| ERR_NC_USERLESS_ACCESS_DENIED | The userless request was unauthorized | The configured app password is invalid. | Generate a new app password in the Nextcloud administration section of the Integration OpenProject app and copy it over to the OpenProject file storage configuration form. |-| WRN_NC_OAUTH_TOKEN_MISSING | The current user has no authentication token. | The current user probably never did a successful login from OpenProject to the file storage, or the token was deleted from the account details. | Visit any work package of a project, where the current file storage is used. Click on the **Login** button in the **Files** tab. |-| WRN_NC_UNEXPECTED_CONTENT | The connection request was successful, but unexpected content was found in the group folder. | The group folder `OpenProject` might contain data, that was put there by a user, or there are remnants from projects that no longer have a valid connection in OpenProject. | Go to Nextcloud and migrate or delete the data in the OpenProject group folder, that was not created by OpenProject. Further information about the unexpected data is found in the server logs. |+| Error code | Error description | Possible reasons | Next steps and solutions |+|------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|+| ERR_NC_HOST_NOT_FOUND | No Nextcloud server was found at the configured host URL. | There might be a typo or the URL has changed. | Check the configuration and enter a valid URL. |+| ERR_NC_DEPENDENCY_MISSING | A required dependency is missing on the file storage. | Either the Integration OpenProject app or the Group Folders app is not enabled in Nextcloud. | Add the missing dependency to the Nextcloud server. |+| ERR_NC_DEPENDENCY_VERSION_MISMATCH | A required dependency has an outdated version. | Either the Integration OpenProject app or the Group Folders app is outdated or was not updated to the officially minimal supported version. | Update your apps to the latest version. It might be necessary to update your Nextcloud server to the latest version in order to be able to install the latest app versions. |+| ERR_NC_GROUP_FOLDER_NOT_FOUND | The group folder could not be found. | The group folder used by the Integration OpenProject app was not found. This folder is usually named `OpenProject` and is owned by the group `OpenProject`. | The group folder is used only by the automatically managed project folders mode. Try to disable this option in the Nextcloud administration for the Integration OpenProject app and reenable it afterwards. |+| ERR_NC_OAUTH_REQUEST_UNAUTHORIZED | The current user's token is invalid. | The token of the current user could not be used for accessing the remote file storage. | If the file storage is configure to do the *Two-Way OAuth2 authorization code flow* remove the user token from **Account settings → Access tokens** of this file storage. If the storage is configured to use SSO login, please recheck the [SSO configuration guide](../../../integrations/nextcloud/oidc-sso/) for the settings of OpenProject and Nextcloud of your specific setup. |+| ERR_NC_USERLESS_ACCESS_DENIED | The userless request was unauthorized | The configured app password is invalid. | Generate a new app password in the Nextcloud administration section of the Integration OpenProject app and copy it over to the OpenProject file storage configuration form. |+| WRN_NC_OAUTH_TOKEN_MISSING | The current user has no authentication token. | The current user probably never did a successful login from OpenProject to the file storage, or the token was deleted from the account details. | Visit any work package of a project, where the current file storage is used. Click on the **Login** button in the **Files** tab. |+| WRN_NC_UNEXPECTED_CONTENT | The connection request was successful, but unexpected content was found in the group folder. | The group folder `OpenProject` might contain data, that was put there by a user, or there are remnants from projects that no longer have a valid connection in OpenProject. | Go to Nextcloud and migrate or delete the data in the OpenProject group folder, that was not created by OpenProject. Further information about the unexpected data is found in the server logs. |The officially minimal supported app versions are listed inthe [system admin guide](../../../../system-admin-guide/integrations/nextcloud/#required-system-versions).@@ -98,14 +96,14 @@ the [system admin guide](../../../../system-admin-guide/integrations/nextcloud/#Some file storages can be configured to use SSO login methods. There are a few checks run specifically for this typeof setup. The following table lists the error codes related to those checks.-| Error code | Error description | Possible reasons | Next steps and solutions |-|-----------------------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|-| ERR_OIDC_TOKEN_ACQUISITION_FAILED | No token could be acquired for accessing the file storage. | The OpenID Connect (OIDC) setup doesn't have the necessary audience, nor does it provide the possibility to exchange tokens. | ... |-| ERR_OIDC_TOKEN_EXCHANGE_FAILED | The token exchange failed. | ... | ... |-| ERR_OIDC_TOKEN_REFRESH_FAILED | The expired access token could not get refreshed. | ... | ... |-| WRN_OIDC_NON_OIDC_USER | The user is not a OIDC user. | The current user is provisioned to OpenProject, but not by an OIDC identity provider. | Log in to an admin user with the correct OIDC identity provider, the same one used by the file storage, and rerun the check. |-| WRN_OIDC_NON_PROVISIONED_USER | The user is not a provisioned user. | The current user is not provisioned by an OIDC identity provider. | Log in to an admin user with the correct OIDC identity provider, the same one used by the file storage, and rerun the check. |-| WRN_OFFLINE_ACCESS_SCOPE_MISSING | The OIDC provider has no `offline_access` scope. | The OIDC provider was configured without `offline_access` scope. While this does not cause the integration to break, this scope ensures, that refresh tokens to not expire and OpenProject can maintain a connection. | Add the scope `offline_access` to the OIDC provider configuration. |+| Error code | Error description | Possible reasons | Next steps and solutions |+|-----------------------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|+| ERR_OIDC_TOKEN_ACQUISITION_FAILED | No token could be acquired for accessing the file storage. | The OpenID Connect (OIDC) setup doesn't have the necessary audience, nor does it provide the possibility to exchange tokens. | Please check if you configured the correct file storage audience in OpenProject. |+| ERR_OIDC_TOKEN_EXCHANGE_FAILED | The token exchange failed. | The OIDC provider might not allow token exchange, or the exchange failed on the given audience. | Please check if you configured the correct file storage audience in OpenProject, and if the OIDC identity provider allows exchanging tokens for that audience. |+| ERR_OIDC_TOKEN_REFRESH_FAILED | The expired access token could not get refreshed. | The OIDC provider failed to refresh the token. This might happen due to an expired or revoked refresh token. | Please check the configuration of the OIDC identity provider of refresh tokens for misconfiguration. |+| WRN_OIDC_NON_OIDC_USER | The user is not a OIDC user. | The current user is provisioned to OpenProject, but not by an OIDC identity provider. | Log in to an admin user with the correct OIDC identity provider, the same one used by the file storage, and rerun the check. |+| WRN_OIDC_NON_PROVISIONED_USER | The user is not a provisioned user. | The current user is not provisioned by an OIDC identity provider. | Log in to an admin user with the correct OIDC identity provider, the same one used by the file storage, and rerun the check. |+| WRN_OFFLINE_ACCESS_SCOPE_MISSING | The OIDC provider has no `offline_access` scope. | The OIDC provider was configured without `offline_access` scope. While this does not cause the integration to break, this scope ensures, that refresh tokens to not expire and OpenProject can maintain a connection. | Add the scope `offline_access` to the OIDC provider configuration. |## Health checks for automatically managed project foldersdiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex d202e96e2d9..20a3086bed9 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -284,8 +284,8 @@ en:nc_dependency_version_mismatch: The %{dependency} app version is not supported. Please update your Nextcloud server.nc_group_folder_not_found: The group folder could not be found.nc_host_not_found: No Nextcloud server found at the configured host url. Please check the configuration.- nc_oauth_request_not_found: OpenProject couldn't find the root folder of Nextcloud using the current logged-in user. Please check the server logs for further information.- nc_oauth_request_unauthorized: The current user isn't authorized to see the main folder of Nextcloud or we couldn't acquire a token. Please check the server logs for further information.+ nc_oauth_request_not_found: The endpoint to fetch the currently connected user was not found. Please check the server logs for further information.+ nc_oauth_request_unauthorized: The current user isn't authorized to access the remote file storage. Please check the server logs for further information.nc_oauth_token_missing: OpenProject cannot test the user level communication with Nextcloud as the user did not yet link their Nextcloud account.nc_unexpected_content: Unexpected content found in the managed group folder.nc_userless_access_denied: The configured app password is invalid.@@ -294,8 +294,8 @@ en:od_client_write_permission_missing: The client seems to have write permissions missing. Please check the setup documentation for your storage.od_drive_id_invalid: The configured drive id seems invalid. Please check the configuration.od_drive_id_not_found: The configured drive id could not be found. Please check the configuration.- od_oauth_request_not_found: OpenProject couldn't find the root folder in the drive using the current logged-in user. Please check the server logs for further information.- od_oauth_request_unauthorized: The current user isn't authorized to see the root folder of OneDrive/SharePoint or we couldn't acquire a token. Please check the server logs for further information.+ od_oauth_request_not_found: The endpoint to fetch the currently connected user was not found. Please check the server logs for further information.+ od_oauth_request_unauthorized: The current user isn't authorized to access the remote file storage. Please check the server logs for further information.od_oauth_token_missing: OpenProject cannot test the user level communication with OneDrive/SharePoint as the user did not yet link their Microsoft account.od_tenant_id_wrong: The configured directory (tenant) id is invalid. Please check the configuration.od_test_folder_exists: The folder %{folder_name} needed for testing already exists. Please delete it and try again.