* Remove logging from circuit breaker
The logging is never output, and if it was would be very verbose.
Instead of dropping the level down to trace the logger is removed
entirely.
* Add constants from trace library
The logging functionality in trace is being removed in an upcoming
release. To prepare the logging component keys are copied from trace
into teleport.
* Convert trace.ComponentFields to teleport.ComponentFields
* Replace trace.Component with teleport.ComponentKey
* Replace trace logging constants
Adds the new linter and configures it to prevent direct error
comparisions and type assertions in favor of errors.Is and errors.As.
All current violations caught by the linter have been updated
accordingly.
This fixes two issues with the GCS session handler.
1. The "pass through" function wasn't actually passing through anything.
It always ignores errors from the delete call.
2. Prefer path over filepath here, since we always want paths delimited
by `/`. This isn't a critical issue now, but would result in all
sorts of failures if we were to try and run Teleport on systems like
windows where the filepath separator is not `/`.
This commit introduces GRPC API for streaming sessions.
It adds structured events and sync streaming
that avoids storing events on disk.
You can find design in rfd/0002-streaming.md RFD.
When S3/GCS credentials given to teleport have write-only access,
fetching the bucket attributes will fail. This shouldn't prevent
Teleport from starting and uploading sessions.
Print a helpful error message instead.
- before uploading a session, check that it doesn't already exist; we
don't want to lose an existing session
- when auto-creating a missing bucket at startup, set predefined ACLs to
`projectPrivate`, which means "Project team members get access
according to their roles." See
https://cloud.google.com/storage/docs/json_api/v1/buckets/insert#parameters
Spring cleaning!
A very mechanical cleanup using several linters (unused, deadcode,
structcheck). Build and tests still pass so no behavior should be
affected.