sipi icon indicating copy to clipboard operation
sipi copied to clipboard

Skip authentication in pre_flight for /info.json

Open subotic opened this issue 8 years ago • 3 comments

For Knora, I would like to be able to skip the whole authentication/authorization roundtrip for info.json requests.

@benjamingeer @tobiasschweizer Would this be ok? I understand that we need to limit access to images, but are there any reasons against allowing free access to info.json?

@lrosenth How hard would it be to provide the pre_flight script with the type of request? For now, we have default and info, but you mentioned that there is going to be a third one.

subotic avatar Jun 23 '17 13:06 subotic

you could certainly do that in the lua function pre_flight.

tobiasschweizer avatar Jun 23 '17 13:06 tobiasschweizer

that's what I thought, but I only have the identifier available, e.g., HIVkUWwH9rm-GMITRopjdpC.jpg. That's why the second question for @lrosenth regarding the request type.

subotic avatar Jun 23 '17 14:06 subotic

I looked at the code: The preflight_script gets only 3 parameters:

  1. the prefix
  2. the identifier (which is the filename under which SIPI stores the image)
  3. the cookie(s) if available There is at the moment no way to determine which type of request. Bu I think it will make sense to transfer more information about the request to the preflight script. However doing so could break compatibility of existing pre_flight_scripts...

If You want to add more information to the preflight_script please make an issue and assign it to me!

lrosenth avatar Jun 23 '17 15:06 lrosenth