This file consists of some smoke testing to be done before the release (major and minor) of integration_application application.
The need for this smoke testing (manual) is that we do not have e2e test setup to automate that involves both OpenProject and Nextcloud.
Table of Content:
-
Section B: Single-Sign-On through OpenID Connect Identity Provider
-
- 1. Link/Unlink a work package for a file/folder in Nextcloud
- 2. Link/Unlink a work package for a file/folder from OpenProject
- 3. Direct upload file/folder from OpenProject to Nextcloud
- 4. Create a WorkPackage from Nextcloud
- 5. Check notification in
OpenProjectwidget in Nextcloud - 6. Check New folder with automatically managed permissions in OpenProject
- In
OpenProject, navigate toAdministration > Files. - Create a file storage type
Nextcloudand name it asNextcloudinOpenProject. - In admin setting of
Nextcloud, navigate toAdministration Settings > OpenProject. - Copy
OpenProjectOauth Credential (client_id and client_secret) and save them inNextcloud. - Copy
NextcloudOauth Credential (client_id and client_secret) and save them inOpenProject. - Disable project folder (automatically managed folder).
- Complete step Test No A1.
- In
Nextcloud, navigate toPersonal Settings > Openprojectand click onConnect to OpenProjectbutton. -
Nextcloudadmin should be connected as anOpenProjectadmin. - Also, create a user in both
Nextcloudas well asOpenProject. - From the personal section of the created user in
Nextcloud, connect toOpenProject. -
Nextclouduser should be connected as anOpenProjectuser.
- Complete step Test No A1.
- Select an
OpenProjectProject (for example,Demo Project) inOpenProject. - Navigate to
Project settings > FilesofDemo Project. - Add a file storage name
Nextcloud( chooseNo specific Folderoption ) forDemo Project.
- Complete step Test No A1.
- Complete step Test No A3.
- Navigate to
Demo Project > Work Packagesand double click any one of the work packages available. - Navigate to
Filestab, and login toNextcloud. -
OpenProjectadmin is connected toNextcloudas aNextcloudadmin. - Also, create a user in both
Nextcloudas well asOpenProject. - Add the created
OpenProjectuser as the member ofDemo Projectproject (admin can add members to a project). - Try to connect the created
OpenProjectuser as createdNextclouduser. -
OpenProjectuser should be connected as aNextclouduser.
- Complete step Test No A1.
- Enable
groupfoldersapplication inNextcloud. - Enable
Automatically managed foldersswitch in admin setting and set project folder. - Application password should be generated.
- Verify that
OpenProjectuser and group are created with userOpenProjectas sub-admin of the group. - Verify that
OpenProjectNoAutomaticProjectFoldersgroup is also created with userOpenProjectas sub-admin. - Try deleting
OpenProjectuser and group, those should not be deleted. - Try deleting
OpenProjectNoAutomaticProjectFoldersgroup, it should not be possible to delete. - Test group management (as user
OpenProject):- Login as
OpenProjectuser - Add a test user
user1to theOpenProjectgroup - Remove
user1from theOpenProjectgroup - Verify that
user1is automatically moved to theOpenProjectNoAutomaticProjectFoldersgroup
- Login as
- Complete smoke tests 1-6.
Before Running the script make sure that your
NextcloudandOpenProjectinstance is up and running
- Run the
integration_setup.shscript to set up integration without project folder with the following command:
SETUP_PROJECT_FOLDER=true \
NEXTCLOUD_HOST=<nextcloud_instance_url> \
OPENPROJECT_HOST=<openproject_instance_url> \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
NC_ADMIN_USERNAME=admin \
NC_ADMIN_PASSWORD=admin \
OPENPROJECT_STORAGE_NAME=Nextcloud \
bash integration_setup.sh- Upon success, try step Test No A2 (Skip first check).
- Upon success, try step Test No A4 (Skip first check).
- Also, to set up the integration configuration with project folder setup, just set environment
SETUP_PROJECT_FOLDER=trueand run the script. - Re-run the script again after it is already setup (Should not give any error).
- In Nextcloud, install and enable
oidcanduser_oidcapps. - Create a new user( with username, display name, password, and email)
- Run following command:
php occ config:system:set user_oidc --type boolean --value="true" oidc_provider_bearer_validation
- Go to
Administration > OpenID Connectand enablestore login tokensoption. - Go to
Administation > Security - Add OIDC client ("OpenID Connect clients" section):
- Add a client name (not an identifier)
- Add a redirect URL :
<openproject_instance_url>/auth/oidc-<idp-displayname-from-OP>/callback - After adding, choose
Access Token TypeasJWT Access Token (RFC9068). - Set
Refresh Token Expire TimetoNever - Save
- Copy the Client ID and Client secret (you will need these later in OpenProject and integration_openproject)
- In OpenProject, go to
Administration > Authentication > OpenID providers - Add a new custom OpenID provider:
- Display name:
nextcloud(use this name as redirect URL in Nextcloud: ) - Discovery URL:
<nextcloud_instance_url>/index.php/.well-known/openid-configuration - Client ID: Client ID copied earlier from Nextcloud
- Client secret: Client secret copied earlier from Nextcloud
- Display name:
- Go to
Administration > Files - Select the file storage type called Nextcloud (created earlier in previous test)
- Under
OAuth configuration, selectUse access token obtained during user log in
- Complete step Test No B.1.1.
- Complete step Test No B.1.2.
- In nextcloud, go to
Administration > OpenProject. - Under
Authentication Method, selectSingle-Sign-On through OpenID Connect Identity Provider. - In
Authentication settings, selectprovider TypeasNextcloud Hub. - Set Openproject
client IDby Client ID copied earlier in Test No B1.
- Complete step Test No B.1.1
- Complete step Test No B.1.2.
- Complete step Test No B.1.3.
- In
nextcloud, login as nextcloud-created user. - In
openproject, use the SSO button on the login page to sign in as the nextcloud-created user. - Login should be successful in
openproject. - Login should be successful in
openprojectwith username having created-nextcloud user's display name. - The OpenProject username must match the Nextcloud-created user’s name.
- Complete step Test No B.1.1.
- Complete step Test No B.1.2.
- Complete step Test No B.1.3.
- Complete step Test No B.1.4.
- In nextcloud, login as nextcloud-created user.
- Navigate to
Settings > Openproject - Should show user is connected as an OpenProject user.
- Complete smoke tests 1-6.
Here, keycloak is an External Provider
- Set up Keycloak using this guide: Keycloak Setup
- In nextcloud, go to
Administration > OpenID Connect. - Enable
store login tokensoptions. - Register a new providers with following data:
- Identifier:
keycloak - Client ID: nextcloud client id from keycloak
- Client Secret: nextcloud client secret from keycloak
- Discovery endpoint:
<keycloak_instance_url>/realms/<realm-name>/.well-known/openid-configuration - Scope:
openid email profile api_v3 - submit
- Identifier:
- Login as keycloak-created user in
Nextcloud. - Login Should be successful
- Logout
- In OpenProject, go to
Administration > Authentication > OpenID providers - Add a new custom OpenID provider:
- Display name:
keycloak - Discovery URL:
<keycloak_instance_url>/realms/<realm-name>/.well-known/openid-configuration - Client ID: Client ID of openproject from keycloak
- Client secret: Client secret of openproject from keycloak
- Display name:
- Login as keycloak-created user in
Openproject. - Log out, then Login as admin in
Openproject. - As an
OpenProjectadmin, add keycloak-created user as a member in one of the project.
- In nextcloud, go to
Administration > OpenProject. - Under
Authentication Method, selectSingle-Sign-On through OpenID Connect Identity Provider. - In
Authentication settings, selectprovider TypeasKeycloak. - Disable
token exchange
- Complete step Test No B.2.1.
- Complete step Test No B.2.2.
- Complete step Test No B.2.3.
- Complete step Test No B.2.4.
- In nextcloud, login as keycloak-created user.
- Navigate to
Settings > Openproject - Should show user is connected as an OpenProject user.
- Complete smoke tests 1-6.
- Complete step Test No B.2.1.
- Complete step Test No B.2.2.
- Complete step Test No B.2.3.
- Go to
Administration > OpenProjectin nextcloud - Under
Authentication Method, selectSingle-Sign-On through OpenID Connect Identity Provider - In
Authentication settings, selectprovider TypeasKeycloak - Enable
token exchange - Set
OpenProject client ID *asOpenproject
- Complete step Test No B.2.1.
- Complete step Test No B.2.2.
- Complete step Test No B.2.3.
- Complete step Test No B.2.5.
- In nextcloud, login as keycloak-created user.
- Navigate to
settings > Openproject - Should show user is connected as an OpenProject user.
- Complete smoke tests 1-6.
Before Running the script make sure that your
NextcloudandOpenProjectinstance is up and running If you're using Nextcloud as the Identity Provider (OIDC), make sure the following apps are installed and enabled in Nextcloud:
- oidc
- integration_openproject
If you are using a custom Identity Provider, ensure that:
- user_oidc app is installed and enabled in Nextcloud.
- The custom IdP is properly configured and accessible.
To add the Nextcloud storage, delete the 'nextcloud' file storage from OpenProject, reset the Nextcloud config, and run the script again.
- Complete step Test No B.1.1 (only the first , second and thrid steps are required).
- Complete step Test No B.1.2 (only the first and second steps are required).
- Run the
integration_oidc_setup.shscript to set up integration without project folder with the following command:
NC_INTEGRATION_PROVIDER_TYPE=nextcloud_hub \
NC_ADMIN_USERNAME=admin \
NC_ADMIN_PASSWORD=admin \
NC_INTEGRATION_ENABLE_NAVIGATION=false \
NC_INTEGRATION_ENABLE_SEARCH=false \
NC_HOST=<nextcloud_instance_url> \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
OP_STORAGE_NAME=nextcloud \
OP_HOST=<openproject_instance_url> \
OP_USE_LOGIN_TOKEN=true \
bash integration_oidc_setup.sh- Upon success, try step Test No B.1.4.
- Upon success, try step Test No B.1.5.
- Also, to set up the integration configuration with project folder setup, at first delete 'nextcloud' file storage from OpenProject.
- In nextcloud, delete the
OpenProjectuser, group and team folder from the nextcloud (if they exist). - Then, reset the Nextcloud config.
- set environment
SETUP_PROJECT_FOLDER=trueand run the script. - Run the script again after it is already setup (Should not give any error).
Before running the script make sure that you delete the 'nextcloud' file storage from OpenProject and reset the integration settings in Nextcloud.
- Complete step Test No B.2.1.
- Complete step Test No B.2.2.
- Complete step Test No B.2.3.
- Run the
integration_oidc_setup.shscript to set up integration without project folder with the following command:
NC_HOST=<nextcloud_instance_url> \
NC_ADMIN_USERNAME=admin \
NC_ADMIN_PASSWORD=admin \
NC_INTEGRATION_PROVIDER_TYPE=external \
NC_INTEGRATION_PROVIDER_NAME=keycloak \
NC_INTEGRATION_OP_CLIENT_ID=openproject \
NC_INTEGRATION_TOKEN_EXCHANGE=false \
NC_INTEGRATION_ENABLE_NAVIGATION=false \
NC_INTEGRATION_ENABLE_SEARCH=false \
OP_HOST=<openproject_instance_url> \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
OP_STORAGE_NAME=nextcloud \
OP_USE_LOGIN_TOKEN=true \
bash integration_oidc_setup.sh
- Upon success, try step Test No B.2.5.
- Also, to set up the integration configuration with project folder setup, at first delete 'nextcloud' file storage from OpenProject.
- In nextcloud, delete the
OpenProjectuser, group and team folder from the nextcloud (if they exist). - Then, reset the Nextcloud config.
- set environment
SETUP_PROJECT_FOLDER=trueand run the script. - Run the script again after it is already setup (Should not give any error).
Before Running the below script make sure that you delete the 'nextcloud' file storage from OpenProject and reset the Nextcloud config.
- Complete step Test No B.2.1.
- Complete step Test No B.2.2.
- Complete step Test No B.2.3.
- Run the
integration_oidc_setup.shscript to set up integration without project folder with the following command:
NC_HOST=<nextcloud_instance_url> \
NC_ADMIN_USERNAME=admin \
NC_ADMIN_PASSWORD=admin \
NC_INTEGRATION_PROVIDER_TYPE=external \
NC_INTEGRATION_PROVIDER_NAME=keycloak \
NC_INTEGRATION_OP_CLIENT_ID=openproject \
NC_INTEGRATION_TOKEN_EXCHANGE=true \
NC_INTEGRATION_ENABLE_NAVIGATION=false \
NC_INTEGRATION_ENABLE_SEARCH=false \
OP_HOST=<openproject_instance_url> \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
OP_STORAGE_NAME=nextcloud \
OP_STORAGE_AUDIENCE=nextcloud \
bash integration_oidc_setup.sh- Upon success, try step Test No B.2.8.
- Also, to set up the integration configuration with project folder setup, at first delete 'nextcloud' file storage from OpenProject.
- In nextcloud, delete the
OpenProjectuser, group and team folder from the nextcloud (if they exist). - Then, reset the Nextcloud config.
- set environment
SETUP_PROJECT_FOLDER=trueand run the script. - Run the script again after it is already setup (Should not give any error).
- In openproject, Select a file, navigate to sidebar
OpenProjecttab. - Search for any of the work packages in the
Demo Project. - Work packages are listed.
- Link to any one of the work packages appeared in the search lists.
- Linked work package appears in the
OpenProjectTab with a successful message. - Also, try linking other work packages, reload the browser and all the linked ones should appear in the
OpenProjectTab. - Hover to a work package to be unlinked, unlink button is visible.
- Unlink a work package and it should be deleted from the
OpenProjectTab with a successful message.
- Navigate to
Demo Project > Work Packagesand double click any one of the work packages available. - Navigate to
Filestab, clicklink existing files, select available files (for example, welcome.txt) from Nextcloud and link it to the work package. - Selected file is linked to the work package in
OpenProject - Also Navigate to nextcloud and see in the
OpenProjecttab for file (welcome.txt), the work package should be linked.
- Navigate to
Demo Project > Work Packagesand double click any one of the work packages available. - Navigate to
Filestab, clickUpload files, select available files from your local system (for example, local.txt) and upload choosing the upload location. - Uploaded file is linked to the work package in
OpenProject - Also Navigate to
Nextcloudand see in theOpenProjecttab for file (local.txt), the work package should be linked.
- Open the form to create work package from Nextcloud in the
OpenProjecttab for a file/folder. - Select
Demo Project, fill up the modal form and create. - Work package should be created and linked to the selected file.
Make sure your
OpenProjectis running along withworkerinstance
- Create a separate user in both
Nextcloudas well asOpenProject. - Connect
Nextclouduser toOpenProjectuser and vice-versa (OpenProjectuser toNextclouduser). - Now as an
OpenProjectadmin, assign any of theDemo Projectwork packages to the createdOpenProjectuser. - The
Nextclouduser should receive a notification regarding the assignment.
- Navigate to
Demo Project > Work Packagesand double click any one of the work packages available. - Navigate to
Filestab, clicklink existing files. - In a modal,
Nextcloud > OpenProject > Demo project(1)should be visible. - Also Navigate to
Nextcloudand in FilesOpenProject > Demo project(1)folder is created. - Try to delete
OpenProjectorOpenProject > Demo project(1). They should not be deleted.
- Check update is available:
php occ app:update --showonly integration_openproject - Run upgrade:
php occ app:update --allow-unstable integration_openproject - Verify upgrade: Confirm no errors and version updated
Important: When upgrading from old versions, the upgrade might fail with "Undefined constant" error due to a known cache issue in Nextcloud. To fix this, please run the following commands:
php occ upgrade php occ maintenance:mode --off
- Before upgrade: Perform complete setup with OAuth2 method (Project folder enabled)
- Perform Upgrade steps
- After upgrade: Check that the integration setup and other changes are preserved
- Before upgrade: Perform complete setup with sso method (Nextcloud Hub as IDP, Project folder enabled)
- Perform Upgrade steps
- After upgrade: Check that the integration setup and other changes are preserved
- Before upgrade: Perform complete setup with sso method (Keycloak as IDP, Token exchange disable, Project folder enabled)
- Perform Upgrade steps
- After upgrade: Check that the integration setup and other changes are preserved
- Before upgrade: Perform complete setup with sso method (Keycloak as IDP, Token exchange enable, Project folder enabled)
- Perform Upgrade steps
- After upgrade: Check that the integration setup and other changes are preserved