cloudflare / logshare

logshare is a library & CLI client for retrieving logs from Cloudflare's Enterprise Log Share service.
https://support.cloudflare.com/hc/en-us/articles/216672448
BSD 3-Clause "New" or "Revised" License
80 stars 24 forks source link

[feat] Add option to skip the attempt to create the bucket #31

Closed jbellow closed 5 years ago

jbellow commented 6 years ago

In my case, the bucket that I want to write to is tightly locked down and the only permissions that are given are those that are absolutely needed. In this case, the account does not have Editor permissions on the bucket, so the Bucket Create call will always fail with an authorization error.

This PR adds the ability to skip bucket creation via a new CLI option. This is useful in situations where the user that is trying to write to the bucket has no permissions other than roles/storage.objectCreator

jacobbednarz commented 6 years ago

@jbellow This makes sense. Would you also be able to update the README with the new flag's details?

Side note: Have you contacted support about using the log push functionality? I would be suspecting this functionality will be removed once log push is a thing since Cloudflare can drop logs into a dedicated bucket for you on GCS and S3.

jbellow commented 6 years ago

@jacobbednarz Thanks for the feedback! I've updated the readme to reflect the new flag that I'm adding here.

I've heard about a new push functionality feature that will insert directly into BQ, but not into a bucket. AFAIK, it's not yet ready for us to start adopting, but I'll ask when I next talk to our contacts there and see if there's anything that might be ready in the near term.

nouvellonsteph commented 5 years ago

Thanks, @jbellow for the PR, this is appreciated. I think Logpush will be the solution for the long-term, can't wait to see this going GA.

Looks legit, @oliafi waiting for your thoughts and I think we could merge this one.