Hi All,
I'm using filebeat (7.17.9) and trying to setup google workspace integration.
I've followed all the steps in:
I've got a json credential file:
{
"type": "service_account",
"project_id": "gwm-1688565370135",
"private_key_id": "xxx",
"private_key": "xxx",
"client_email": "gwm-service-account@gwm-xxx.iam.gserviceaccount.com",
"client_id": "xxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/gwm-service-account%40gwm-1688565370135.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}
This is the config file:
# Module: google_workspace
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.17/filebeat-module-google_workspace.html
- module: google_workspace
saml:
enabled: true
var.jwt_file: "/etc/filebeat/customer_json/xxx_googlews_auth.json"
var.delegated_account: "gwm-service-account@gwm-xxx.iam.gserviceaccount.com"
# var.jwt_file: credentials.json
# var.delegated_account: admin@example.com
# var.initial_interval: 24h
# var.http_client_timeout: 60s
# var.user_key: all
# var.interval: 2h
This is the error i'm getting:
2023-07-14T13:37:53.483+0100 ERROR [input.httpjson-cursor] v2/input.go:115 Error while processing http request: failed to execute http client.Do: server responded with$
"error": {
"code": 401,
"message": "Access denied. You are not authorized to read activity records.",
"errors": [
{
"message": "Access denied. You are not authorized to read activity records.",
"domain": "global",
"reason": "authError",
"location": "Authorization",
"locationType": "header"
}
]
}
}
{"id": "97E5B91E284F6ECB", "input_source": "https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/admin", "input_url": "https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/admin"}
I've checked the client id, the service account name, the domain wide delegation and it is all as it should be.
Anyone else seen this issue?
Thanks
John