使用OpenID在应用程序引擎中保护remote_api

我以前问过关于使用应用程序引擎的remote_api与openID的问题,答案工作得很好,既安全又不安全。 不久之后的某个时候,应用程序引擎中的某些内容发生了变化,解决scheme不再安全地工作 – 即以下内容

remote_api_stub.ConfigureRemoteDatastore(app_id=app_id, path='/remote_api', auth_func=auth_func, servername=host, secure=True) 

停止工作(总是返回302),我需要删除安全参数才能使其工作。

1.3.5 SDK的发布承诺“远程API命令可以通过HTTPS或HTTP发送”,这让我感到困惑,因为我的印象是,提供“安全=真”的论点已经给了我这个,基于这个讨论 。

我的怀疑是,这个function的释放导致“安全”的论点停止工作。 所以,我的问题的第一部分 – 我实际上在1.3.5发布之前通过使用'secure = True'参数安全地运行remote_api命令?

一旦cookie破解安全地停止工作,我尝试了尼克·约翰逊的解决scheme在同一个问题列出,但同时,我不能提供'安全=真',得到相同的302响应。

我需要做什么才能安全地使用openID运行remote_api? 1.3.5是否包含了新的function,如何使用它们? 干杯,

科林

关心这一点

http://code.google.com/intl/en-US/appengine/articles/openid.html

警告:在撰写本文时,如果您的应用程序使用HTTPS以安全模式运行,则不支持OpenID。

在1.3.7版本的最新版本中对此有所了解

 def ConfigureRemoteDatastore(app_id, path, auth_func, servername=None, rpc_server_factory=appengine_rpc.HttpRpcServer, rtok=None, secure=False): """Does necessary setup to allow easy remote access to an AppEngine datastore. Either servername must be provided or app_id must not be None. If app_id is None and a servername is provided, this function will send a request to the server to retrieve the app_id. Args: app_id: The app_id of your app, as declared in app.yaml. path: The path to the remote_api handler for your app (for example, '/remote_api'). auth_func: A function that takes no arguments and returns a (username, password) tuple. This will be called if your application requires authentication to access the remote_api handler (it should!) and you do not already have a valid auth cookie. servername: The hostname your app is deployed on. Defaults to <app_id>.appspot.com. rpc_server_factory: A factory to construct the rpc server for the datastore. rtok: The validation token to sent with app_id lookups. If None, a random token is used. secure: Use SSL when communicating with the server. 

那么,你用新的SDK尝试了吗?