digitalutsc / islandora_group

Islandora Group extends access control with Drupal's Group module
0 stars 2 forks source link

Private File and Group access control with Image IIIF server #4

Open kylehuynh205 opened 2 years ago

kylehuynh205 commented 2 years ago

Condition:

Issue:

OpenSeadragon Viewer is unable to load the image

Diagnose

Private file system and Group module blocks access if the object is private (public, works as normal)

How OpenSeadragon Viewer works ?

Potential Solution:

Intercept and override header the returned request from Cantaloupe to Drupal with the following module: https://github.com/digitalutsc/private_files_adapter
==> fooling Drupal think that it's not Basic Authentication request (otherwise will be blocked when it's reach at route /system/file/{file uri}

What's next ?

kylehuynh205 commented 2 years ago

Book Viewer Issues:

Diagnose

Similar to the issue in OpenSeadragon, to fix it, need to pass down the JWT token in all the requests exchanged between Drupal and Cantaloupe:

Found

https://github.com/ProjectMirador/mirador/issues/3081 https://github.com/ProjectMirador/mirador/pull/3082 ==> Solved the 403 for only the first page loading, but the thumbnails requests of other page are still missing the access control(solved by add cookie in the requests from Cantaloupe to Drupal in delegate script https://github.com/digitalutsc/private_files_adapter/blob/main/scripts/delegates.rb#L233).

Mirador configuration: https://github.com/ProjectMirador/mirador/blob/4a54e525caccef457ed1ff789f6307168b3b8b5a/src/config/settings.js

kstapelfeldt commented 2 years ago

Either we integrate or we develop documentation to help implement it.