Java appengine 2 appengine身份验证的AppIdentity服务
我对提供appengine server 2服务器身份验证的新机制感到困惑 我有两个应用程序。App1和App2。 App1通过安全的restful接口与App2交互 App2接口在web.xml中以管理员角色进行保护Java appengine 2 appengine身份验证的AppIdentity服务,java,google-app-engine,google-oauth,Java,Google App Engine,Google Oauth,我对提供appengine server 2服务器身份验证的新机制感到困惑 我有两个应用程序。App1和App2。 App1通过安全的restful接口与App2交互 App2接口在web.xml中以管理员角色进行保护 <security-constraint> <web-resource-collection> <url-pattern>/V3/publish/*</url-pattern> </web-resource-collectio
<security-constraint>
<web-resource-collection>
<url-pattern>/V3/publish/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
/V3/发布/*
这似乎只适用于“谷歌API”应用程序,而不适用于其他系统(即用户appengine应用程序)
问题1。我可以使用AppIdentityService以安全的方式调用另一个appengine应用程序,使用auth_Controint角色吗
感谢您的帮助
-lp您不能将应用程序标识添加到另一个应用程序管理员列表中。(您邀请的电子邮件必须接受邀请)
您可以使用AppIdentityService使用应用程序的公钥/私钥对内容进行签名(由Google管理,包括密钥轮换),请参阅和一些示例代码:也许'X-Appengine-Inbound-Appid'
就足够了。它在应用程序引擎到应用程序引擎请求中设置,不能在外部请求中设置
我们在Python中使用类似的内容:
app_id = self.request.headers.get('X-Appengine-Inbound-Appid', None)
if app_id not in {'some', 'other'}:
logging.warn(u'Callback from strange caller: %s', app_id)
....
else:
....