首页 文章

AppEngine上的AppAssertionCredentials:如何模拟用户帐户?

提问于
浏览
2

我在我的python GAE应用程序上使用AppAssertionCredentials,以作为服务帐户进行身份验证 . 但是,这是一个通用服务帐户,我不知道如何授权它在我的Google Apps域中模拟用户帐户 .

这可以通过JWT凭证方式实现(请参阅此视频:http://www.youtube.com/watch?v=iK14bfd6qhs),但JWT不适用于appengine .

有什么建议?

1 回答

  • 7

    SignedJwtAssertionCredentials可以在App Engine上使用,只需确保打开PyCrypto 2.6,并将PKCS12密钥文件转换为PEM文件:

    $ openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem
    

    See the docs for SignedJwtAssertionCredentials .

相关问题