Overview

This is a memo about trying Cantaloupe’s Access Control.

https://cantaloupe-project.github.io/manual/5.0/access-control.html

Bearer Authentication

I referenced the following.

https://cantaloupe-project.github.io/manual/5.0/access-control.html#Tiered Access

All or Nothing Access

This returns an error when the authentication information is incorrect.

I configured it so that images are returned when the token is test, as shown below.

defenahier}duefnetatiedthdhofnuoeekrdr''rraetenscidnotthz=eku{aaer=ertl(c&nnuloo.hsepnse=t_nttta=rcgie.aduoeoxsvre"ed'nteatrtes[ll_[e'='euw7s>=rcei.t=etst.">'{q{.hhB}uf?e4e)e|i(a0asnr'd1rtasBe,e_mterrhea.e,rlcaeehdvrnaeagrrltssuhe'et]|-="n1Ua]TmFe-.8d"o'wncase=='authorization'}

I created a Google Colab notebook to verify the above behavior.

https://colab.research.google.com/github/nakamura196/000_tools/blob/main/Cantaloupeのaccess_controlのテスト.ipynb

The results show that when the token is correct, images can be retrieved, and when the token is incorrect or not provided, images cannot be retrieved.

Login with Degraded Access for Unauthenticated Users

The iiif-auth-server provides an example of login with degraded access for unauthenticated users, and I tried to reproduce it in Cantaloupe.

https://github.com/digirati-co-uk/iiif-auth-server

Specifically, when authentication information is incorrect, a grayscale image is returned. There may be some errors, but I prepared the following script.

defedenenahrfrie{}dfuffe[dueeiefnriixftaqlttrd''eilltihdueuhoeslxeeeloeenrekttot=nnnerrsanaeuacraasnitmdnrtaaUmmiaz=_etenutcReeomeu,rr=sitI_ne(cru&t_o_.w=,ooiee.hrcnfpi=pnxseuo'iatFett=titaedlrhiFxieefade=es_litoxcnrei'>neeelentosftrfa(x.ens[nii_[="mutb.s'tolw7t>#ereaei=renei.o{_insxoexnt.k3ra_setn{qt=ahe0ensinn]}u[m?1n2qdtoaa)e'ee(],u_rnmmsrx'=ee)eetet=B=sx=((_qr=ettffhuaa"_euiieec"rtunrllastgeersieedt_rrsii.nne_fat.opaaruiy"snammsrl"u(tee'iebuh__]'n(r.ww.]afisiifmi_pttielslhhn_eti__danrteena)(xx{dm"tt_e/ee|e"nnnx+)ssat.iimeelooenxann,sts,)ietvon"ans.l(i*uro"een)|q,u#ne"asgUmtrse_ae.uydr#"oi{.w)e*nx"ctaetsnoesir=oe=nm}o'"va)eu}t"ahnoyriezxatteinosni'on}&.last

The Google Colab execution results are shown below. Unauthenticated users receive a grayscale image, while authenticated users receive a color image.

Summary

I would like to use the above features to attempt implementing the IIIF Authentication API.