为什么我没有收到 G Suite 帐户的 Google 安全事件?
Why am I not receiving Google security events for G Suite accounts?
我已经按照 here, with an additional layer of validation using our back-end server as described here. However, when I try to register my application for Cross-Account Protection 的描述为我的应用程序成功实施 Google 登录,我只能接收来自个人(以 @gmail.com
结尾)帐户的事件.
我的流配置对象如下所示:
{
"delivery": {
"delivery_method": "https://schemas.openid.net/secevent/risc/delivery-method/push",
"url": MY_RECEIVER_ENDPOINT
},
"events_requested": [
"https://schemas.openid.net/secevent/risc/event-type/account-credential-change-required",
"https://schemas.openid.net/secevent/risc/event-type/account-disabled",
"https://schemas.openid.net/secevent/risc/event-type/sessions-revoked",
"https://schemas.openid.net/secevent/risc/event-type/account-enabled",
"https://schemas.openid.net/secevent/risc/event-type/account-purged",
"https://schemas.openid.net/secevent/risc/event-type/verification",
"https://schemas.openid.net/secevent/oauth/event-type/tokens-revoked"
]
}
并且当我使用 Google 注册端点时,我得到一个 200 响应代码,并且可以使用以下方法成功测试 verify
事件:
def test_event_stream(auth_token, nonce):
headers = {'Authorization': 'Bearer {}'.format(auth_token)}
state = {'state': nonce}
response = requests.post('https://risc.googleapis.com/v1beta/stream:verify', json=state, headers=headers)
return response
它也将以 200 响应,我在我的应用程序日志中看到以下有效负载(解码 jwt 令牌后):
{
"aud": [
"MY_CLIENT_ID.apps.googleusercontent.com"
],
"events": {
"https://schemas.openid.net/secevent/risc/event-type/verification": {
"state": "MESSAGE at Fri Nov 8 01:31:13 2019"
}
},
"iat": 1573176640,
"iss": "https://accounts.google.com",
"jti": "JTI_VALUE"
}
当我在安全面板中撤销我的应用程序的访问权限时,我也可以从我自己的个人 Google 帐户收到 'https://accounts.google.com/risc/event/all-token-revoked'
事件,但不会从我的工作帐户(GSuite ) 当我执行相同的操作时。
是否需要我们的 GSuite 管理员或我在开发人员控制台中为此应用程序启用设置?此处的任何帮助将不胜感激,这是一个重要的障碍。
这里的简短回答是 Google 目前不会为 G Suite 帐户发送安全事件。他们在 today (11/12/2019) 中添加了以下内容:
我已经按照 here, with an additional layer of validation using our back-end server as described here. However, when I try to register my application for Cross-Account Protection 的描述为我的应用程序成功实施 Google 登录,我只能接收来自个人(以 @gmail.com
结尾)帐户的事件.
我的流配置对象如下所示:
{
"delivery": {
"delivery_method": "https://schemas.openid.net/secevent/risc/delivery-method/push",
"url": MY_RECEIVER_ENDPOINT
},
"events_requested": [
"https://schemas.openid.net/secevent/risc/event-type/account-credential-change-required",
"https://schemas.openid.net/secevent/risc/event-type/account-disabled",
"https://schemas.openid.net/secevent/risc/event-type/sessions-revoked",
"https://schemas.openid.net/secevent/risc/event-type/account-enabled",
"https://schemas.openid.net/secevent/risc/event-type/account-purged",
"https://schemas.openid.net/secevent/risc/event-type/verification",
"https://schemas.openid.net/secevent/oauth/event-type/tokens-revoked"
]
}
并且当我使用 Google 注册端点时,我得到一个 200 响应代码,并且可以使用以下方法成功测试 verify
事件:
def test_event_stream(auth_token, nonce):
headers = {'Authorization': 'Bearer {}'.format(auth_token)}
state = {'state': nonce}
response = requests.post('https://risc.googleapis.com/v1beta/stream:verify', json=state, headers=headers)
return response
它也将以 200 响应,我在我的应用程序日志中看到以下有效负载(解码 jwt 令牌后):
{
"aud": [
"MY_CLIENT_ID.apps.googleusercontent.com"
],
"events": {
"https://schemas.openid.net/secevent/risc/event-type/verification": {
"state": "MESSAGE at Fri Nov 8 01:31:13 2019"
}
},
"iat": 1573176640,
"iss": "https://accounts.google.com",
"jti": "JTI_VALUE"
}
当我在安全面板中撤销我的应用程序的访问权限时,我也可以从我自己的个人 Google 帐户收到 'https://accounts.google.com/risc/event/all-token-revoked'
事件,但不会从我的工作帐户(GSuite ) 当我执行相同的操作时。
是否需要我们的 GSuite 管理员或我在开发人员控制台中为此应用程序启用设置?此处的任何帮助将不胜感激,这是一个重要的障碍。
这里的简短回答是 Google 目前不会为 G Suite 帐户发送安全事件。他们在 today (11/12/2019) 中添加了以下内容: