Need to call ldap in App Engine's Python environment

戏子无情 提交于 2019-12-20 04:55:22

问题


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

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?

Thanks! A.


回答1:


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.)

See http://code.google.com/appengine/docs/python/runtime.html#The_Sandbox



来源:https://stackoverflow.com/questions/6319176/need-to-call-ldap-in-app-engines-python-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!