CI communication behind reverse proxy #1018

Closed
opened 2025-11-02 03:45:27 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @w9n on GitHub (Aug 30, 2017).

I use gitea behind an oauth reverse proxy with ssl termination and need the AppURL as seen from outside. When using DroneCI i dont want to communicate through the proxy with oauth but through a local bridge. The URL of the drone pulls come from ComposeHTTPSCloneURL.

I have created a little fix for me but im not sure if this should be handled here, the gitea sdk or in Drone

Originally created by @w9n on GitHub (Aug 30, 2017). I use gitea behind an oauth reverse proxy with ssl termination and need the `AppURL` as seen from outside. When using DroneCI i dont want to communicate through the proxy with oauth but through a local bridge. The URL of the drone pulls come from ComposeHTTPSCloneURL. I have created a little fix for me but im not sure if this should be handled here, the gitea sdk or in Drone
Author
Owner

@BlackVoid commented on GitHub (Sep 10, 2017):

You can use the following if you use auth_request:

satisfy  any;
auth_request /XXX/oauth2/auth;
allow  127.0.0.1;
deny   all;
@BlackVoid commented on GitHub (Sep 10, 2017): You can use the following if you use auth_request: satisfy any; auth_request /XXX/oauth2/auth; allow 127.0.0.1; deny all;
Author
Owner

@w9n commented on GitHub (Sep 17, 2017):

Im currently usinglua-resty-openidc not the auth_request module. Not sure how allow 127.0.0.1 would satisfy the internal ip of the nginx container, but could be a possibility to allow the subnet of the backend.

@w9n commented on GitHub (Sep 17, 2017): Im currently using[lua-resty-openidc]( https://github.com/pingidentity/lua-resty-openidc) not the auth_request module. Not sure how `allow 127.0.0.1` would satisfy the internal ip of the nginx container, but could be a possibility to allow the subnet of the backend.
Author
Owner

@BlackVoid commented on GitHub (Sep 17, 2017):

You can enter a subnet ex. 192.168.1.0/24. I hosted everything on the same machine without containers so ip depends on your setup.

On 17 September 2017 14:41:08 GMT+02:00, w9n notifications@github.com wrote:

Im currently usinglua-resty-openidc not the auth_request
module. Not sure how allow 127.0.0.1 would satisfy the internal ip of
the nginx container, but could be a possibility to allow the subnet of
the backend.

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/go-gitea/gitea/issues/2428#issuecomment-330041068

@BlackVoid commented on GitHub (Sep 17, 2017): You can enter a subnet ex. 192.168.1.0/24. I hosted everything on the same machine without containers so ip depends on your setup. On 17 September 2017 14:41:08 GMT+02:00, w9n <notifications@github.com> wrote: >Im currently using[lua-resty-openidc]( >https://github.com/pingidentity/lua-resty-openidc) not the auth_request >module. Not sure how `allow 127.0.0.1` would satisfy the internal ip of >the nginx container, but could be a possibility to allow the subnet of >the backend. > >-- >You are receiving this because you commented. >Reply to this email directly or view it on GitHub: >https://github.com/go-gitea/gitea/issues/2428#issuecomment-330041068
Author
Owner

@w9n commented on GitHub (Sep 18, 2017):

This way might be a little bit of a security drawback/configuration overhead compared to direct communication through a bridge, but it keeps the app much simpler. Thank you for your help!

@w9n commented on GitHub (Sep 18, 2017): This way might be a little bit of a security drawback/configuration overhead compared to direct communication through a bridge, but it keeps the app much simpler. Thank you for your help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1018