2010-07-12 5 views
42

나는 이전에 question에 openID로 app 엔진의 remote_api를 사용하는 것에 대해 질문했으며, 그 대답은 안전하고 안전하지 않은 것으로 잘 작동했습니다. 어떤 시점에서 곧 그러나, 응용 프로그램 엔진에 뭔가를 변경하지 않으며,이 솔루션은 더 이상 안전하게 일 - OpenID를 사용하는 앱 엔진의 remote_api 보안

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

는 (항상 302을 반환) 작동이 중지 다음

즉, 내가 얻을 수있는 보안 인수를 제거하기 위해 필요 그것은 작동합니다.

release of the 1.3.5 SDK 'HTTPS 또는 HTTP를 통해 원격 API 명령을 전송할 수 있음'을 약속 했으므로 혼란 스럽습니다. this discussion을 기반으로 'secure = True'인수가 이미 내게 제공되었다고 생각했기 때문입니다.

내 생각에 '안전한'인수가 작동을 멈추게하는 것이이 기능의 릴리스였습니다. 그래서 내 질문의 첫 번째 부분은 - 나는 실제로 remote_api 명령을 사용하여 안전하게 'secure = True'인수를 사용하여 1.3.5 이전에 릴리스 되었습니까?

쿠키 해킹이 안전하게 작동하지 않게되면 같은 질문에 나열된 Nick Johnson의 솔루션을 사용해 보았습니다.하지만 이와 함께 또한 동일한 302 응답을 얻는 'secure = True'를 제공 할 수 없었습니다.

openID로 안전하게 remote_api를 실행하려면 어떻게해야합니까? 1.3.5에는이 문제를 해결하는 새로운 기능이 포함되어 있습니까? 어떻게 사용합니까? 건배,

콜린

+0

내 해킹이나 닉의 덜 해킹 된 해킹을 사용하고 있습니까? [http://blog.notdot.net/2010/06/Using-remote-api-with-OpenID-authentication] –

+0

두 가지 모두 시도했습니다. 동일한 동작을 얻습니다. 'secure = True'로 설정하면 항상 302 - 제거 '보안 = True'모든 것이 잘 작동합니다. remote_api 진입 점의 app.yaml에 'secure : optional'이 있습니다. 나는 원래 secure = True로 해킹을 성공적으로 사용하고 있었고, 언젠가 (1.3.5 이전 출시 발표) 302가 반환되기 시작했습니다. 이 시점에서 Nick의 덜 해킹 된 해킹을 시도했지만 '안전 = True'없이는 작동하지 않았습니다. 'secure = True'가없는 경우 동일한 쿠키가 제대로 작동했기 때문에 쿠키에 문제가 없다고 확신합니다. – hawkett

+0

안전한 openid는 아직 Google 애플리케이션 엔진에서 작동하지 않습니다. http://code.google.com/p/googleappengine/issues/detail?id=3586 – iamgopal

답변

1

감사이

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

경고 : 앱이 HTTPS를 사용하여 보안 모드에서 실행하는 경우이 글을 쓰는 시점에서 오픈 ID는 지원되지 않습니다. 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. 

에서 최종 개정에

감사 this, 당신은 새로운 SDK와 함께 그것을 시도 했습니까?

+0

@eugene 8 월 21 일에 @iamgopal이 제공 한 링크와 동일한 정보입니다. 따라서 Google은이 기능을 1.3.5로 폐지했습니다. – hawkett

+0

나는 그렇게 생각한다. 아마도 1.3.6 로드맵을 기다려야한다. – Eugene

+0

@eugene 1.3.7이 (가) 있습니다.나는이 대답이 이미 질문/코멘트에 없었던 것을 추가한다고 생각하지 않는다. – hawkett

관련 문제