[MapProxy] Implement Mapproxy Authentication with Key/Token

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MapProxy] Implement Mapproxy Authentication with Key/Token

Berger, Steffen
Hi,
I'm building a Django-based UserManagement to plugin into MapProxy's Authentication/Authorization system.
With Basic Auth everthing works fine, but I would also like to allow users to authenticate with a token (e.g uuid)

I had the idea to add this token to the URL http://myurl.de/<uuid>/service?. It need some adoption of the "PATH_INFO" in the authentication middleware, but it works fine except on thing:

It is not possible to use the URL in a Desktop GIS system, because the OnlineResource URL in the Capabilites Document does (of course) not contain the token.

And here comes the question:
Is possible the modify the OnlineResource Url within the Authentication/Authorization Middleware?


Thanks in Advance!

Steffen

 

 

Steffen Berger
Anwendungsentwicklung
Tel. +49 30 22183-3534 | Fax +49 30 22183-1199
[hidden email]

atene KOM GmbH
Agentur für Kommunikation, Organisation und Management
Invalidenstr. 91 | 10115 Berlin

 

www.atenekom.eu | Datenschutzerklärung
Apps | facebook | XING | YouTube

Geschäftsführer: Tim Brauckmüller  |  AG Berlin Charlottenburg  |  HRB 111699  |  USt-ID: DE259091767

 

 


_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Implement Mapproxy Authentication with Key/Token

Oliver Tonnhofer-5
Hi,

MapProxy uses the X-Script-Name header to build to correct URLs for the capabilities documents. See https://mapproxy.org/docs/nightly/deployment.html#http-proxy

If your doing this from a middleware, then you should try to set HTTP_X_SCRIPT_NAME in the environ to /<uuid>


Regards,
Oliver

--
Oliver Tonnhofer  | Omniscale GmbH & Co KG  | https://omniscale.com
OpenStreetMap WMS and tile services         | https://maps.omniscale.com



> On 15. Feb 2019, at 14:58, Berger, Steffen <[hidden email]> wrote:
>
> Hi,
> I'm building a Django-based UserManagement to plugin into MapProxy's Authentication/Authorization system.
> With Basic Auth everthing works fine, but I would also like to allow users to authenticate with a token (e.g uuid)
>
> I had the idea to add this token to the URL http://myurl.de/<uuid>/service?. It need some adoption of the "PATH_INFO" in the authentication middleware, but it works fine except on thing:
>
> It is not possible to use the URL in a Desktop GIS system, because the OnlineResource URL in the Capabilites Document does (of course) not contain the token.
>
> And here comes the question:
> Is possible the modify the OnlineResource Url within the Authentication/Authorization Middleware?
>
>
> Thanks in Advance!
>
> Steffen
>  
>  
> <atene_logo_1133be95-9699-480d-b2d9-203a3b08d087.png>
>
> Steffen Berger
> Anwendungsentwicklung
> Tel. +49 30 22183-3534 | Fax +49 30 22183-1199
> [hidden email]
>
> atene KOM GmbH
> Agentur für Kommunikation, Organisation und Management
> Invalidenstr. 91 | 10115 Berlin
>
>  
> www.atenekom.eu | Datenschutzerklärung
> Apps | facebook | XING | YouTube
> Geschäftsführer: Tim Brauckmüller  |  AG Berlin Charlottenburg  |  HRB 111699  |  USt-ID: DE259091767
>
>  
>
>  
>
> _______________________________________________
> MapProxy mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Implement Mapproxy Authentication with Key/Token

Berger, Steffen
Hi Oliver,

Thanks for your help. It works perfectly fine!

Cheers,
Steffen

 

 

Steffen Berger
Anwendungsentwicklung
Tel. +49 30 22183-3534 | Fax +49 30 22183-1199
[hidden email]

atene KOM GmbH
Agentur für Kommunikation, Organisation und Management
Invalidenstr. 91 | 10115 Berlin

 

www.atenekom.eu | Datenschutzerklärung
Apps | facebook | XING | YouTube

Geschäftsführer: Tim Brauckmüller  |  AG Berlin Charlottenburg  |  HRB 111699  |  USt-ID: DE259091767

 

 

Am Dienstag, den 19.02.2019, 12:59 +0100 schrieb Oliver Tonnhofer:
Hi,

MapProxy uses the X-Script-Name header to build to correct URLs for the capabilities documents. See https://mapproxy.org/docs/nightly/deployment.html#http-proxy

If your doing this from a middleware, then you should try to set HTTP_X_SCRIPT_NAME in the environ to /<uuid>


Regards,
Oliver



_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy