Content
View differences
Updated by Sajan Gurung 9 months ago
While setting up integration using `integration_oidc_setup.sh`, it doesn't set the storage scope. This is required to make the API request to the Nextcloud from OpenProject side.
<img class="image_resized op-uc-image op-uc-image_inline" style="width:393px;" src="/api/v3/attachments/755563/content">
Todo:
* [x] add an option to provide storage scope: `OP_STORAGE_SCOPE`
* [x] set the storage scope in OP
#### Test steps:
1. Add keycloak as IDP in both Nextcloud and OpenProject
2. Run the following command from integration app root directory:
```text
NC_HOST=https://nextcloud.local \
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=https://openproject.local \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
OP_STORAGE_NAME=nextcloud \
OP_STORAGE_AUDIENCE=nextcloud \
OP_STORAGE_SCOPE=add-nc-aud \
bash integration_oidc_setup.sh
```
1. Check that the "Storage Scope" is set in OP
<img class="image_resized op-uc-image op-uc-image_inline" style="width:343px;" src="/api/v3/attachments/777602/content">
<img class="image_resized op-uc-image op-uc-image_inline" style="width:393px;" src="/api/v3/attachments/755563/content">
Todo:
* [x] add an option to provide storage scope: `OP_STORAGE_SCOPE`
* [x] set the storage scope in OP
#### Test steps:
1. Add keycloak as IDP in both Nextcloud and OpenProject
2. Run the following command from integration app root directory:
```text
NC_HOST=https://nextcloud.local \
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=https://openproject.local \
OP_ADMIN_USERNAME=admin \
OP_ADMIN_PASSWORD=admin \
OP_STORAGE_NAME=nextcloud \
OP_STORAGE_AUDIENCE=nextcloud \
OP_STORAGE_SCOPE=add-nc-aud \
bash integration_oidc_setup.sh
```
1. Check that the "Storage Scope" is set in OP
<img class="image_resized op-uc-image op-uc-image_inline" style="width:343px;" src="/api/v3/attachments/777602/content">