Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread LoveWeb2py
Yeah, docker containers have kibana and a couple other similar web services

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Dave S


On Wednesday, February 14, 2018 at 6:14:25 AM UTC-8, LoveWeb2py wrote:
>
> We serve web2py through nginx.
>
> I'm curious how django was able to do it.  We have multiple apps running 
> in docker containers and want web2py to be the portal.  That way we can use 
> auth. 
>

Are the docker containers running webservers, or are you sending RPC-like 
commands that (in effect) exec something in the docker?

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Anthony

>
> Also have a look at 
> http://web2py.com/books/default/chapter/29/09/access-control#Using-web2py-to-authorize-non-web2py-apps
> .
>

Here's an example of how the above would be achieved with 
Nginx: 
https://github.com/shopware/devdocs/blob/master/source/blog/_posts/2015-03-02-sso-with-nginx-auth_request.md.

So, in web2py you just need to set up an action to check for login and 
return either a 200 response or a 401 or 403. Nginx will then check that 
action on each request and manage the redirect to the web2py login page if 
the user is not logged in. This is still not the most efficient approach, 
as every request is still hitting web2py. Using web2py as a CAS provider is 
probably better, though it will require the other apps to implement an 
authentication check and redirect to the web2py application for login, etc.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Anthony
On Wednesday, February 14, 2018 at 9:51:29 AM UTC-5, Anthony wrote:
>
> On Wednesday, February 14, 2018 at 9:14:25 AM UTC-5, LoveWeb2py wrote:
>>
>> We serve web2py through nginx.
>>
>> I'm curious how django was able to do it.  We have multiple apps running 
>> in docker containers and want web2py to be the portal.  That way we can use 
>> auth.
>>
>
> Got it. Another option might be to proxy directly from Nginx to the other 
> apps, and just use web2py as a CAS provider for authentication (see 
> http://web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service
> ).
>

Also have a look 
at 
http://web2py.com/books/default/chapter/29/09/access-control#Using-web2py-to-authorize-non-web2py-apps.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Anthony
On Wednesday, February 14, 2018 at 9:14:25 AM UTC-5, LoveWeb2py wrote:
>
> We serve web2py through nginx.
>
> I'm curious how django was able to do it.  We have multiple apps running 
> in docker containers and want web2py to be the portal.  That way we can use 
> auth.
>

Got it. Another option might be to proxy directly from Nginx to the other 
apps, and just use web2py as a CAS provider for authentication 
(see 
http://web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service).

Anthony
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Manuele Pesenti

Hi Anthony and LoveWeb2py,

I used this controller exactly to let authenticated and authorized users 
access to a third part application not exposed to the web, I shared in 
order to collect opinions from experts, any suggest appreciated.


Cheers

    Manuele


On 14/02/2018 13:37, Anthony wrote:

On Tuesday, February 13, 2018 at 10:15:13 PM UTC-5, LoveWeb2py wrote:

Where did you use this or how did you use your version of the
proxy Manuele? Thank you for sharing!

Anthony - we want web2py to be the only interface to docker
containers.


Is there some web2py specific operations you need to happen between 
the client and the destination server (e.g., web2py 
authentication/authorization)? Otherwise, web2py is probably not the 
most efficient way to proxy HTTP requests. How are you serving web2py 
itself?


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread LoveWeb2py
We serve web2py through nginx.

I'm curious how django was able to do it.  We have multiple apps running in 
docker containers and want web2py to be the portal.  That way we can use auth. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Anthony
On Tuesday, February 13, 2018 at 10:15:13 PM UTC-5, LoveWeb2py wrote:
>
> Where did you use this or how did you use your version of the proxy 
> Manuele? Thank you for sharing!
>
> Anthony - we want web2py to be the only interface to docker containers.
>

Is there some web2py specific operations you need to happen between the 
client and the destination server (e.g., web2py 
authentication/authorization)? Otherwise, web2py is probably not the most 
efficient way to proxy HTTP requests. How are you serving web2py itself? 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-13 Thread LoveWeb2py
Where did you use this or how did you use your version of the proxy 
Manuele? Thank you for sharing!

Anthony - we want web2py to be the only interface to docker containers.

On Tuesday, February 13, 2018 at 9:32:57 AM UTC-5, Manuele wrote:
>
> I wrote something like that few years ago... maybe you can start from here:
>
> https://gist.github.com/manuelep/81ffe8ce57de4dc9b2d80a99c08992cc
>
> please let me know if you find any interest in it.
>
> Cheers
>
> Manuele
>
> On 13/02/2018 13:10, Anthony wrote:
>
> On Monday, February 12, 2018 at 9:43:53 PM UTC-5, LoveWeb2py wrote: 
>>
>> Django has a reverse proxy module... Wondering if web2py has something 
>> similar? 
>> https://djangopackages.org/grids/g/reverse-proxy/
>>
>
> I don't think so.
>  
>
>> I want to make web2py the single interface to multiple applications.
>>
>
> Can you explain further what you are trying to do? Why not use something 
> like Nginx as a reverse proxy?
>
> Anthony
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-13 Thread Manuele Pesenti

I wrote something like that few years ago... maybe you can start from here:

https://gist.github.com/manuelep/81ffe8ce57de4dc9b2d80a99c08992cc

please let me know if you find any interest in it.

Cheers

    Manuele


On 13/02/2018 13:10, Anthony wrote:

On Monday, February 12, 2018 at 9:43:53 PM UTC-5, LoveWeb2py wrote:

Django has a reverse proxy module... Wondering if web2py has
something similar?
https://djangopackages.org/grids/g/reverse-proxy/



I don't think so.

I want to make web2py the single interface to multiple applications.


Can you explain further what you are trying to do? Why not use 
something like Nginx as a reverse proxy?


Anthony


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Use web2py as a reverse proxy

2018-02-13 Thread Anthony
On Monday, February 12, 2018 at 9:43:53 PM UTC-5, LoveWeb2py wrote:
>
> Django has a reverse proxy module... Wondering if web2py has something 
> similar?
> https://djangopackages.org/grids/g/reverse-proxy/
>

I don't think so.
 

> I want to make web2py the single interface to multiple applications.
>

Can you explain further what you are trying to do? Why not use something 
like Nginx as a reverse proxy?

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.