Best way to implement "Loading data with signed URLs" in WMS extension #700
Unanswered
benjaminleighton
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You better use titiler python module instead of forking it. This way you can have your own tiler application with you own custom |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering if there is an elegant way to implement https://developmentseed.org/titiler/examples/code/working_with_signed_urls/ for the WMS extension? In our fork we modify the WMS extension to expect base64 and then decode that in the layer parameter of the wms function https://github.com/AusClimateService/nbic-titiler/blob/main/src/titiler/extensions/titiler/extensions/wms.py#L288
As suggested in the Titiler documentation, a DatasetPathParams dependency could be implemented to decode a base64 url. However this is insufficient. Clients make subsequent queries based on layers returned in the initial GetCapabilities response, they will be presigned-urls in this use case and therefore need to be base64 encoded. We achieve that by re-encoding the decoded urls back to base64 prior to building the GetCapabilities response https://github.com/AusClimateService/nbic-titiler/blob/main/src/titiler/extensions/titiler/extensions/wms.py#L383.
I'd like to put in a pull request to enable presigned-url capability for WMS in Titiler but I can't figure out how to rewrite the encoding logic elegantly? Would it be ok to put this in conditional logic so that behaviour is controlled in the initial GetCapabilities request and maybe (if it is possible) in subsequent more specific WMS requests. Perhaps this could be achieved by passing an encoded=True parameter?
Beta Was this translation helpful? Give feedback.
All reactions