cloudflare / cloudflare/cloudflare-gcp
Custom RequestHeaders Field for Zero Trust has hyphens in it
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
The schema that's provided [here](https://github.com/cloudflare/cloudflare-gcp/tree/master/logpush-to-bigquery) does not include any headers used by Cloudflare Access (namely, RequestHeaders. This is known and addressed [here](https://developers.cloudflare.com/cloudflare-one/analytics/logs/audit-logs/#using-the-cf-access-user-field).
However, I cannot add this to the BigQuery Schema easily, as the `RequestHeaders` isn't mentioned in the default schema, so I'm trying to hack around it by adding it manually inside the BigQuery Console.
This (I think) uses a `RECORD` data type, which requires nested fields to be added. But, FieldNames cannot have dashes `(-)` in them, only alphanumeric/underscore characters.
But the field I need to add to store usernames is `cf-access-user` (technically `RequestHeaders.cf-access-user`) has dashes... so in essence I cannot add in this field to BigQuery, unless I figure out some sort of magic to automatically convert the dashes into another name (to which, I'm having a heck of a time doing because I'm a newbie at BQ).
Any advice/insight you can provide would be extremely helpful.
Contributor guide
Assessment
This issue has not been assessed yet.