防火墙后面的 Web 应用程序上的 OAuth——这可能吗?
我正在尝试构建一个网络应用程序来将事件添加到员工的谷歌日历中,并希望使用 OAuth 进行身份验证。
但是,我的 Web 应用程序被迫位于防火墙后面的 Intranet 上;服务器具有出站 Internet 访问权限,但如果您不在 Intranet 上或通过 VPN 连接到 Intranet,则会阻止入站访问。
我正在阅读 OAuth,但无法弄清楚身份验证握手过程的一部分是否会被我的防火墙阻止。 (如果不可能的话,我想在花时间实现之前知道它是否可能;并且知道如果我遇到错误我可以调试它们)。
I'm trying to construct a webapp to add events to an employee's google calendar and would like to use OAuth for authentication.
However, my webapp is forced to be on an intranet behind a firewall; the server has outbound internet access, but blocks in-bound access if you aren't on the intranet or VPNing into the intranet.
I'm reading up on OAuth, but can't figure out if part of the authentication-handshaking process would be blocked by my firewall. (And I'd like to know if its possible before spending time to implement if it isn't possible; and know so if I run into errors I can debug them).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了扩展 Planetjones 的答案,只要 google 可以解析您的应用程序 URL 的 DNS,oauth2 就应该在防火墙后面工作。我们在让 oauth2 在防火墙后面工作时遇到了一些问题,因为我们尝试使用非完全限定的域名。
To expand on planetjones's answer, as long as google can resolve the DNS for your application url oauth2 should work behind a fire wall. We had some issues getting getting oauth2 working behind our firewall because we were trying to use a non fully qualified domain name.
如果您的客户端可以设置授权标头,OAuth 应该可以通过 http、使用 POST 和 GET 正常工作。客户端应该创建所有请求,只要它遵循重定向,这应该没问题 - (据我所知)外部服务器发起入站连接的情况永远不会发生。
为了增加信心,请尝试使用防火墙后面的现有第三方服务进行 OAuth 以确保安全。 这看起来是一个很好的起点,此是遵循 OAuth 调用流程的权威指南。
OAuth should work just fine over http, using POSTs and GETs and if your client can set the Authorizatioon header. The client should create all the requests and as long as it follows redirects this should be ok - there's never (to my knowledge) a case where an external server initiates an inbound connection.
For added confidence try OAuth with an existing third party service from behind your firewall to be sure. This looks like a good starting point and this is the definitive guide for following the flows of an OAuth call.