需要在App Engine的Python环境中调用ldap [英] Need to call ldap in App Engine's Python environment

查看:65
本文介绍了需要在App Engine的Python环境中调用ldap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Ldap身份验证后端添加到通过GAE运行的Django项目. 项目运行正常.唯一的问题确实是GAE不支持Ldap.我的意思是:

I'm trying to add an Ldap authentication backend to a Django project running over GAE. The project runs ok. The only problem really is Ldap is not supported by GAE. I mean:

import ldap

将生成服务器错误.尽管如此,我确实知道我可以通过zipimport使自己的模块可用.

will generate a server error. Nonetheless, I do know that I could make my own modules available through zipimport.

有人有解决类似问题的经验吗?考虑到较低级别的依赖关系,这种解决方法是否可以成为有效的解决方案?

Does anybody have any experience solving similar issues? Can this sort of workaround be an effective solution considering lower level dependencies?

谢谢! 答:

推荐答案

App Engine不允许您直接打开套接字.除非您打算连接的LDAP服务器具有可在互联网上看到的HTTP前端,否则您将需要一个计划B.(例如,您可以定期将LDAP的摘录上载到您的应用.)

App Engine doesn't let you open sockets directly. Unless the LDAP server you're planning to connect to has an internet-visible HTTP front-end, you need a Plan B. (E.g., you could periodically upload extract from LDAP to your App.)

请参见 http://code.google.com/appengine/docs /python/runtime.html#The_Sandbox

这篇关于需要在App Engine的Python环境中调用ldap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆