Commit graph

45 commits

Author SHA1 Message Date
Marek Smoliński d4805cc428
Extend DatabaseSessionStart posthog event (#28931) 2023-07-14 07:15:02 +00:00
dependabot-batcher[bot] c6529af658
Batched Dependabot updates (#28863)
* Bump @grpc/grpc-js from 1.6.7 to 1.8.8

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.6.7 to 1.8.8.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.6.7...@grpc/grpc-js@1.8.8)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.53.0 in /examples/go-client

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /examples/desktop-registration

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump tough-cookie from 4.1.2 to 4.1.3

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/sashabaranov/go-openai from 1.12.0 to 1.13.0

Bumps [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/apiextensions-apiserver from 0.27.2 to 0.27.3

Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.27.2 to 0.27.3.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/bufbuild/connect-go from 1.7.0 to 1.9.0

Bumps [github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/bufbuild/connect-go/releases)
- [Commits](https://github.com/bufbuild/connect-go/compare/v1.7.0...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/connect-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/sqs from 1.22.0 to 1.23.2

Bumps [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) from 1.22.0 to 1.23.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.22.0...service/ecs/v1.23.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/glue from 1.53.0 to 1.54.0

Bumps [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) from 1.53.0 to 1.54.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.53.0...service/ec2/v1.54.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/glue
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.35.0 to 1.36.0

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.35.0...service/s3/v1.36.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /assets/backport

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/iam from 1.1.0 to 1.1.1

Bumps [cloud.google.com/go/iam](https://github.com/googleapis/google-cloud-go) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/dlp/v1.1.0...iam/v1.1.1)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/iam
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc from 1.56.1 to 1.56.2 in /api

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.56.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.56.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /build.assets/tooling

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/ec2 in /assets/aws

Bumps [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) from 1.102.0 to 1.103.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.102.0...service/ec2/v1.103.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

* make grpc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-batcher[bot] <122306277+dependabot-batcher[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2023-07-10 15:07:46 +00:00
Noah Stride 6122933e68
Machine ID: Add guides to the Enroll Integration page (#28646)
* First pass at adding buttons to the integrations page

* Add analytics events for clicking Machine ID enrollment tiles

* Run prettier

* Fix eslint complaints

* Push fixed icons

* Flatten the styling for the Jenkins logo

* Rearrange machine ID title code

* Remove logs from event processing

* Switch to coloured gitLab icon

* Use GitLabs proper name for CI/Cd

* Fix imports

* Further adjustments from PR

---------

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
2023-07-10 13:27:52 +00:00
dependabot-batcher[bot] 7e6b941dcd
Batched Dependabot updates (#28584)
* Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 in /api

Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue

Bumps [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) from 1.10.25 to 1.10.30.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/dynamodb/attributevalue/v1.10.25...feature/dynamodb/attributevalue/v1.10.30)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/sashabaranov/go-openai from 1.10.1 to 1.12.0

Bumps [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) from 1.10.1 to 1.12.0.
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.10.1...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/container from 1.21.0 to 1.22.1

Bumps [cloud.google.com/go/container](https://github.com/googleapis/google-cloud-go) from 1.21.0 to 1.22.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.21.0...pubsub/v1.22.1)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/container
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/google/go-attestation

Bumps [github.com/google/go-attestation](https://github.com/google/go-attestation) from 0.4.4-0.20220404204839-8820d49b18d9 to 0.5.0.
- [Release notes](https://github.com/google/go-attestation/releases)
- [Commits](https://github.com/google/go-attestation/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-attestation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/glue from 1.51.0 to 1.53.0

Bumps [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) from 1.51.0 to 1.53.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.51.0...service/ec2/v1.53.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/glue
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/protobuf from 1.30.0 to 1.31.0

Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/alicebob/miniredis/v2 from 2.30.2 to 2.30.4

Bumps [github.com/alicebob/miniredis/v2](https://github.com/alicebob/miniredis) from 2.30.2 to 2.30.4.
- [Release notes](https://github.com/alicebob/miniredis/releases)
- [Changelog](https://github.com/alicebob/miniredis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alicebob/miniredis/compare/v2.30.2...v2.30.4)

---
updated-dependencies:
- dependency-name: github.com/alicebob/miniredis/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/sigstore/cosign/v2 in /integrations/kube-agent-updater

Bumps [github.com/sigstore/cosign/v2](https://github.com/sigstore/cosign) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/sigstore/cosign/releases)
- [Changelog](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sigstore/cosign/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: github.com/sigstore/cosign/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/sys from 0.9.0 to 0.10.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/sys/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.4

Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/text from 0.10.0 to 0.11.0

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/elastic/go-elasticsearch/v8 from 8.8.1 to 8.8.2

Bumps [github.com/elastic/go-elasticsearch/v8](https://github.com/elastic/go-elasticsearch) from 8.8.1 to 8.8.2.
- [Release notes](https://github.com/elastic/go-elasticsearch/releases)
- [Changelog](https://github.com/elastic/go-elasticsearch/blob/v8.8.2/CHANGELOG.md)
- [Commits](https://github.com/elastic/go-elasticsearch/compare/v8.8.1...v8.8.2)

---
updated-dependencies:
- dependency-name: github.com/elastic/go-elasticsearch/v8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/storage from 1.30.1 to 1.31.0

Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.30.1 to 1.31.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.30.1...pubsub/v1.31.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/mod in /integrations/kube-agent-updater

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/mod/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/net from 0.11.0 to 0.12.0 in /api

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/mod from 0.11.0 to 0.12.0 in /build.assets/tooling

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/mod/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

* revert attestation and tpm updates

* fix: make grpc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2023-07-05 21:15:42 +00:00
Grzegorz Zdunek 3c4ed44a09
Connect My Computer: check permissions before showing in the UI (#28346)
* Move CMC icon and setup document to common `ConnectMyComputer` directory

* Add permissions to show CMC

* Use `cluster.leaf` to check if a cluster is a root cluster

* Rename `isConnectMyComputerPermittedForRootCluster` to `canUseConnectMyComputer`

* Add licenses

* Rename `DocumentSetup` to `DocumentConnectMyComputerSetup`

* Check `cluster.leaf` flag to verify if the cluster is a root cluster

* Do not throw in `canUseConnectMyComputer`

* Add comments

* Use the same field name in a documentation comment

* Use relative import
2023-07-03 08:14:11 +00:00
Lisa Kim f6906f330e
Discover: Add deployed method field to deploy service event (#28336)
* Define a  deployed_method field to discover deploy event

* Add deployed_method field to expected events

* Add deployed method type and define its field when emitting event from web UI

* Address CR and add another field

* Address CR
2023-06-29 23:36:28 +00:00
Noah Stride 0d3d88156b
Machine ID: Add support for BotJoin analytics event (#28293)
* Add support for BotJoin analytics event

* `provision_token_name` -> `join_token_name`
2023-06-28 15:11:07 +00:00
Grzegorz Zdunek bcf6e8fd30
Connect My Computer: Add ACL (#28131)
* Add ACL to Connect

* Apply Zac's suggestions

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Rename `convertToApiResourceAccess`

* Use `recorded_sessions` and `active_sessions` instead of `sessions` to avoid confusion.

Web has two fields for "sessions", and we should have too.

* Reserve "sessions" too

* Rename `ACL` to `acl`

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-06-28 07:34:06 +00:00
Noah Stride ac9054cb6a
Machine ID: Add usage event for bot creation (#28279)
* Add usage event for bot creation

* Update for latest protos from cloud

* Add BotName field to BotCreate event

* Update protos from cloud master

* import order

* Use `ClientUsername`

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-06-27 14:29:01 +00:00
Yassine Bounekhla 6be5d884e4
add saml wizard to ui (#27518) 2023-06-16 13:50:46 +00:00
Michael Wilson 1b3201a97c
Add the notion of friendly names to access request details. (#27495)
* At the notion of friendly names to access request details.

Access request details can now return friendly names. This will help display
access request resources in a way that allows easier reviewing of Okta apps
and user groups, where the names are not human readable.

* Use friendly name for nodes, tune variable names.

* Add in DetailsID helper function for use by the enterprise UI.

* Request apps instead of app servers, remove DetailsID as its no longer needed.

* Push friendly name into app and usergroup UI objects.

* Fix apps test.

* Linting.

* [Connect] Add FriendlyName to AccessRequest (#27694)

---------

Co-authored-by: Michael <michael.myers@goteleport.com>
2023-06-13 14:02:16 +00:00
Michelle Bergquist 5c3c84ab73
add new CTA event property (#27216) 2023-06-06 22:03:54 +00:00
Rafał Cieślak 53b0118cff
Document lack of stability of lib/teleterm gRPC API (#27275) 2023-06-06 08:19:06 +00:00
Lisa Kim 4d8f2d20e7
Add integration enroll usage event (#26880)
* Add integration enroll usage event

* Add new events to the frontend
2023-05-25 16:51:04 +00:00
Rafał Cieślak daca5bf29b
Preserve backwards compatibility of teleport.lib.teleterm.v1.Gateway (#26705) 2023-05-23 12:08:38 +00:00
Rafał Cieślak 2d9a75537a
Spawn gateway CLI client directly (#26441)
* Return os.exec.Cmd as gateway CLI command

* Remove separate Props type from DocumentTerminal

* Refactor Kind type exported from documentsService

* Export makeRuntimeSettings from MainProcess mock

* PtyProcess: Join args in logger name

* ptyHostService: Pass ptyOptions explicitly instead of using spread

I noticed that we pass both argsList and args to the PtyProcess constructor.
While TypeScript allows that, it is a bit confusing when inspecting the
actual values received in the constructor.

* Add empty DocumentGatewayCliClient

* Start terminal from DocumentGatewayCliClient

* Add waiting state for DocumentGatewayCliClient

* Remove targetSubresourceName from DocumentGatewayCliClient title
2023-05-22 08:40:33 +00:00
Edoardo Spadolini 64ed94f602
Split ssh_port into ssh_port_v2, k8s_port (#25987)
Same goes for foo_sessions in UserActivityReport.
2023-05-11 10:36:39 +00:00
Jakub Nyckowski ae8f2fa929
Assist - Configuration and usage (#25953)
* Assist - Configuration and usage

* Add network config test

* Add config test

* Run GCI

* Address review comments
2023-05-11 01:56:55 +00:00
matheus 0697011eaa
Add events to cta clicks (#25325)
* (wip) add unlock feature button to support page

* Fix typo

* (wip) add locked feature join session

* Improve session join style

* Add session join lock button

* Remove hover on locked join menu

* Update copy

* Only show `join as...` when appropriate

* (wip)

* Make ButtonLockedFeature theme sensitive

* Remove debug stuff

* Adjust feature button height

* Fix session join button on locked

* Remove unused import

* typo

* Add link to cta button

* Remove teams flag

* Add cta service

* Update snapshots

* Lock button style

* Add cta to context

* Rename cta to ctaService

* Stories and tests

* Add comments clarifying that ctas are not used currently

* add showActiveSessionsCTA to useSessions

* Licenses

* Lint license

* Remove commented out code

* Add missing types

* Replace cta service for an object with cta on context

* Fix menu hack

* small refactor in styled stuff

* Update SessionJoinBtn to use master code

* Snapshot update

* Add events to cta clicks

* rebase

* revert e ref update

* Revert e change

* Update proto message to start at 1

* Use enum from proto files instead of rewriting

* Improve comments on usageevents.proto cta enum

* Fix import

* Fix type errs

* Add comments

* Rename CtaEvents > CtaEvent

* Copy the CtaEvent enum instead of importing from proto

* Add back blank line

* Fix import order

* Update proto files

* Add TODO comment
2023-05-05 18:53:02 +00:00
Edoardo Spadolini 2966be6a57
Tweak protogen to not change protos from cloud (#24688)
* Tweak protogen to not change protos from cloud

* Use strategy: all whenever possible
2023-04-18 14:22:12 +00:00
Lisa Kim ab1206a133
Discover: Add new usage reporting events (#24567)
* Add aws connect account and enroll rds dbs event

* Update FE types to reflect backend changes

* Rename

* Add missing convert usager
2023-04-14 18:23:18 +00:00
dependabot-batcher[bot] 64eee28c6e
Batched Dependabot updates (#24327)
* Bump github.com/docker/docker in /integrations/kube-agent-updater

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.21+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.21...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/docker/docker in /examples/service-discovery-api-client

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.1+incompatible to 23.0.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.1...v23.0.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump uuid from 1.3.0 to 1.3.1

Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.3.0...1.3.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/net from 0.8.0 to 0.9.0 in /api

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump bitflags from 2.0.2 to 2.1.0

Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.0.2 to 2.1.0.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump libc from 0.2.140 to 0.2.141

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.140 to 0.2.141.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.140...0.2.141)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.4.0 to 1.5.0

Bumps [github.com/Azure/azure-sdk-for-go/sdk/azcore](https://github.com/Azure/azure-sdk-for-go) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.4.0...sdk/azcore/v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azcore
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/bufbuild/connect-go from 1.5.2 to 1.6.0

Bumps [github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/bufbuild/connect-go/releases)
- [Commits](https://github.com/bufbuild/connect-go/compare/v1.5.2...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/connect-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/kms from 1.10.0 to 1.10.1

Bumps [cloud.google.com/go/kms](https://github.com/googleapis/google-cloud-go) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/kms/v1.10.0...kms/v1.10.1)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/kms
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/text from 0.8.0 to 0.9.0

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/feature/ec2/imds from 1.13.1 to 1.13.2

Bumps [github.com/aws/aws-sdk-go-v2/feature/ec2/imds](https://github.com/aws/aws-sdk-go-v2) from 1.13.1 to 1.13.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.13.1...service/mq/v1.13.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/ec2/imds
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* regenerate porehog file after updating connect-go

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-batcher[bot] <122306277+dependabot-batcher[bot]@users.noreply.github.com>
Co-authored-by: Tobiasz Heller <tobiasz.heller@goteleport.com>
2023-04-11 12:57:19 +00:00
Edoardo Spadolini 851cb6598e
Fix package names for v1 protos, misc proto changes (#24183)
* Delete teleterm's ptyHost/v1, added by mistake

* Add package name to protos conforming to PACKAGE_VERSION_SUFFIX

* use go run in buf-connect-go.gen.yaml directly

* Run protogen in place

* Run the buf-go generation off of go run

This also adds protoc-gen-go-grpc to go.mod
2023-04-06 22:53:31 +00:00
Edoardo Spadolini c296b77734
usagereporter: on-prem dial home (#23916)
* Fix prehog protos package name

* sync prehog/v1alpha/teleport.proto from cloud

* AggregatingUsageReporter

* graceful stopping

* alerts WIP

* Split reporter and submitter

* batch_uuid

* Naming

* more naming

* Move backend stuff in a "service" object

* Return the correct err from gracefulstop

* Tweak alert link

* Better field comments

* payloadContext rather than a manual type assertion

* Rework reporter logic

* Close the base context at the end of run

* Use the count parameter in listUserActivityReports

* Use ttl parameter in createUserActivityReportsLock

* service tests

* submitter test

* reporter test

* Document GracefulStopper.GracefulStop

* Fix errorf/warnf that don't need formatting

* Add debug line on a successful report

* fix license

* sync prehog proto from cloud

* Only send non-nil events through test channel

This fixes a hang/data race, as we effectively "send" a nil event
whenever the ticker hits

* Docs and variable names

* Add some debug info to the lock and the alert

* Sync prehog protos from cloud

This includes a move to prehog.v1 for the new rpc and messages

* mechanical: rename imports of prehog/v1alpha

This renames imports of ".../prehog/v1alpha" from prehogv1a to prehogv1,
and imports of ".../prehog/v1alpha/prehogv1alphaconnect" from prehogv1c
to prehogv1ac, to avoid confusion with imports of the newly added
".../prehog/v1" and ".../prehog/v1/prehogv1connect".

* Merge remote-tracking branch 'origin/master' into espadolini/usagereporter-onprem
2023-04-05 19:24:32 +00:00
Lisa Kim 877f1e1018
Discover: Add more database type event names (#23742)
* Add unguided database event names

* Add database doc event names
2023-04-04 21:00:38 +00:00
Grzegorz Zdunek 057ff52f89
Connect: Collect protocol origin (#23898)
* Add `origin` field to protocol event

* Capture protocol event origin

* Use positional arguments

* Missing rename
2023-04-04 12:51:02 +00:00
Marco André Dinis c55586a85e
Metrics: add IsSSO to Discover Events (#23791)
* Metrics: add IsSSO to Discover Events

* review pt1

* use services.UserGetter interface

* godocs, renamings

* add isSSO to user identity

* remove ctx from convert

* add godocs to usermetadata fields

* add UserType enum
2023-03-31 15:17:07 +00:00
Edoardo Spadolini 779c8be19d
usagereporter: resource heartbeats (#23093)
* sync prehog/v1alpha/teleport.proto from cloud

* AnonymizeAndSubmit does not need to be fallible

* DELETE IN: 5.1.0

* Add AnonymizeNonEmpty method to HMACAnonymizer

* Add usagereporter encoding for ResourceHeartbeatEvent

* Emit ResourceHeartbeatEvent on heartbeats

* Use "static" field to ResourceHeartbeatEvent

* KeepAlive's Name field should never be empty

* Use the kube cluster name

* launch submitEvents in a goroutine in AddEventsToQueue

* Handle the OpenSSH node resources

* Skip unknown heartbeats

* Add better docs for KeepAliveType
2023-03-24 18:47:58 +00:00
dependabot-batcher[bot] c0c8cca3f2
Batched Dependabot updates (#23301)
* Update bitflags requirement in /lib/srv/desktop/rdp/rdpclient

Updates the requirements on [bitflags](https://github.com/bitflags/bitflags) to permit the latest version.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.0.1)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/protobuf from 1.29.1 to 1.30.0 in /api

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.29.1 to 1.30.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.29.1...v1.30.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/go-piv/piv-go from 1.10.0 to 1.11.0 in /api

Bumps [github.com/go-piv/piv-go](https://github.com/go-piv/piv-go) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/go-piv/piv-go/releases)
- [Commits](https://github.com/go-piv/piv-go/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/go-piv/piv-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump iso7816-tlv from 0.4.2 to 0.4.3

Bumps [iso7816-tlv](https://github.com/jkowalsk/iso7816-tlv) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/jkowalsk/iso7816-tlv/releases)
- [Commits](https://github.com/jkowalsk/iso7816-tlv/commits)

---
updated-dependencies:
- dependency-name: iso7816-tlv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump bitflags from 1.3.2 to 2.0.1

Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.0.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.0.1)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/kms from 1.8.0 to 1.10.0

Bumps [cloud.google.com/go/kms](https://github.com/googleapis/google-cloud-go) from 1.8.0 to 1.10.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/dlp/v1.8.0...kms/v1.10.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/kms
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/mod from 0.8.0 to 0.9.0

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/mod/releases)
- [Commits](https://github.com/golang/mod/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/Azure/azure-sdk-for-go/sdk/azidentity

Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/sdk/azidentity/v1.2.2/CHANGELOG.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azidentity/v1.2.1...sdk/azidentity/v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.86.1 to 1.90.0

Bumps [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) from 1.86.1 to 1.90.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.86.1...service/ec2/v1.90.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/alicebob/miniredis/v2 from 2.30.0 to 2.30.1

Bumps [github.com/alicebob/miniredis/v2](https://github.com/alicebob/miniredis) from 2.30.0 to 2.30.1.
- [Release notes](https://github.com/alicebob/miniredis/releases)
- [Changelog](https://github.com/alicebob/miniredis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alicebob/miniredis/compare/v2.30.0...v2.30.1)

---
updated-dependencies:
- dependency-name: github.com/alicebob/miniredis/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.3

Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.3.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.26.1...v0.26.3)

---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/schollz/progressbar/v3 from 3.13.0 to 3.13.1

Bumps [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/schollz/progressbar/releases)
- [Commits](https://github.com/schollz/progressbar/compare/v3.13.0...v3.13.1)

---
updated-dependencies:
- dependency-name: github.com/schollz/progressbar/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

* go mod tidy

* revert bitflags update

* fix proto generation

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-batcher[bot] <122306277+dependabot-batcher[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2023-03-20 21:20:09 +00:00
Alan Parra f6ce23b7cf
chore: Bump protoc-gen-go and protoc-gen-grpc-go (#22976)
Update to versions 1.30.0 and 1.3.0, respectively.

* https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.30.0
* https://github.com/grpc/grpc-go/releases/tag/cmd%2Fprotoc-gen-go-grpc%2Fv1.3.0
2023-03-20 04:49:56 +00:00
Alan Parra 7ec7c76cb6
chore: Bump google.golang.org/protobuf to v1.29.1 (#23133)
* chore: Bump google.golang.org/protobuf to v1.29.1

* Update generated protos

* Tidy modules
2023-03-15 22:29:16 +00:00
Zac Bergquist 2519f40d8d
Add anonymized device ID to tp.user.login event (#22994)
Updates gravitational/teleport.e#829
2023-03-14 16:06:15 +00:00
Edoardo Spadolini acdf61d931
usagereporter: Use the batched event ingest RPC (#22739)
* Sync prehog/v1alpha/teleport.proto

* Use the new SubmitEvents rpc

* Remove leftover file

* Warn against changing usageReporterMaxBatchSize
2023-03-14 08:58:03 +00:00
dependabot-batcher[bot] 1f1775bb07
Batched Dependabot updates (#22961)
* Bump libc from 0.2.139 to 0.2.140

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.139 to 0.2.140.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.139...0.2.140)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/klog/v2 from 2.90.0 to 2.90.1

Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/googleapis/gax-go/v2 from 2.7.0 to 2.7.1

Bumps [github.com/googleapis/gax-go/v2](https://github.com/googleapis/gax-go) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/googleapis/gax-go/releases)
- [Commits](https://github.com/googleapis/gax-go/compare/v2.7.0...v2.7.1)

---
updated-dependencies:
- dependency-name: github.com/googleapis/gax-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp

Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/protobuf from 1.28.1 to 1.29.0

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.29.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.1...v1.29.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/prometheus/common from 0.40.0 to 0.42.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.42.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.40.0...v0.42.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/jackc/pgx/v4 from 4.18.0 to 4.18.1

Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.18.0 to 4.18.1.
- [Release notes](https://github.com/jackc/pgx/releases)
- [Changelog](https://github.com/jackc/pgx/blob/v4.18.1/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v4.18.0...v4.18.1)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/protobuf from 1.28.1 to 1.29.0 in /api

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.29.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.1...v1.29.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/russellhaering/gosaml2 from 0.9.0 to 0.9.1 in /api

Bumps [github.com/russellhaering/gosaml2](https://github.com/russellhaering/gosaml2) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/russellhaering/gosaml2/releases)
- [Commits](https://github.com/russellhaering/gosaml2/compare/v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: github.com/russellhaering/gosaml2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update generated protos

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2023-03-13 15:45:25 +00:00
Vitor Enes 6a1d1aedc3
Emit new AgentMetadataEvent (#22068)
* Emit new `AgentMetadataEvent`

Part of https://github.com/gravitational/cloud/issues/3550.

This commits adds a new `UpstreamInventoryAgentMetadata` that is sent
from a Teleport agent to an auth server.
Once received, it is transformed into an `AgentMetadataEvent` and sent
to PreHog.

Most `UpstreamInventoryAgentMetadata` fields are intentionally kept as
empty in this PR. Follow up PRs will be opened with the mechanisms
required to fill them (as described in #21337).

* server_id -> host_id

* compute OS and host architecture

* Compute OS version and container runtime

* Close stream if agent receives an agent metadata message

* cmd -> exec ; file -> read

* implement fetchOSVersion for linux

* Remove unused import

* Add note about `agentMetadataCh`

* Allow commands with args

* Remove parseFun abstraction

* fetch glibc version

* fetch container orchestrator

* Fix lint

* Fix TODO

* Add note about glibc version

* cmd -> command

* fetch cloud environment

* fetch install methods

* GLibCVersion -> GlibcVersion

* Use `http.NewRequestWithContext`

* Add missing comment

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* GLibCVersion -> GlibcVersion

* Fix lint

* Fix helm unit tests

* Add missing comments

* 5 second timeout on http requests

* Spawn gorountine that fetches metadata on each new stream

* Use `defaults.HTTPClient()`

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Add missing import

* Handle error

* Revert "Spawn gorountine that fetches metadata on each new stream"

This reverts commit fe4f2790be.

* Send agent metadata to auth server once per stream

* Improve note about agentMetadataDone

* Don't process command output & file content on the agent

Since agents cannot be trusted, regex validation and sanitization should
happen in PreHog anyways. So this commit removes such logic in favor of
moving it to PreHog.

* Fix lint

* Trim space

* Move handling of `AgentMetadataEvent` to `handleControlStream`

* Use cached hello message

* Move metadata files to lib/inventory/metadata

* make sending of agent metadata more self contained

* Minimize diff

* Send all system roles to PreHog

* Remove unused import

* Add parsing of command output / file content back

* Usage reporter refactor

* Usage reporter refactor

* Add missing handling of inventory agent metadata msg

* Fix ICS usage reporter

* Improve comments

* Add cached `metadata.Get*` methods

* Use systemctl status instead of is-active

* Add `Metadata` struct

* return pointer in `FetchMetadata`

* Pass context to `GetMetadata`

* metadataFetchConfig -> fetchConfig

* GetMetadata -> Get

* Add note about `Get` result

* Ensure install methods are non-nil

* Exit `metadata.Get` if context is closed

* Replace sync.Once with atomic.Bool.Swap

* Initialize channel

* Fix lint

* Fix lint

* Make `metadata.Get` return an error instead of bool

* Allow multiple true/false values for env vars

* Use `strings.Cut`

* Use /etc/os-release ID instead of NAME

* Improve `autoEmitMetadata`

* Use `gnu_get_libc_version`

* Ubuntu -> ubuntu

* Use GOARCH

* gofmt

* Move import C up

* Variables may include quotes

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Default values for ID and VERSION_ID

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Blank lines are permitted

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Anonymize host id

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-10 12:45:29 +00:00
Rafał Cieślak f43297f56a
Connect: Remove leftovers from resource cache removal (#22772)
* Connect: Remove leftovers from resource cache removal

* GetAll* RPCs were used in the resource cache and are no longer used.
* ListApps was pretty much never actually used as we didn't ever list apps
  in Connect.
* ClusterContext.state.searchValue ceased to be used after we moved to
  fetching resources from the backend.

* Remove remaining leftovers from tshd client mock

* Remove unused imports
2023-03-10 10:05:18 +00:00
Noah Stride 6eaea0300e
Machine ID Agent Anonymous Analytics (#22174)
* Start fleshing out tbot anonymous analytics submission

* Support overriding telemetry endpoint

* Add debug message on success

* Refactor sendTelemetry to be compatible with unit testing

* Improve telemetry log message cppy

* Ensure exit occurs after telemetry submitted

* Improve mocking for tests

* Finish automated test

* Fix imports

* Switch to info level message when nto enabled

* Use preferred package import anme

* Use tbot specific telemetry endpoints

* Use start time instead of now in timestamp

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Add missing license headers

* Add brief comment

* Correct staging domain

* Ensure anonymous telemetry sends

* Exit telemetry wait early if context is already cancelled

* Correct linter errors

* Fail faster on telemetry submission

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-06 10:24:07 +00:00
Rafał Cieślak 6578af1efd
Connect: Remove resource cache (#21964)
* Connect: Remove resource cache

This commit refactors parts of the Electron app which still depend on
the resource cache, that is cluster sync and `tsh ssh` executed from the
command bar.

A number of adjustments has been made to executing `tsh ssh` from the
command bar, namely the logic of resolving the hostname has been moved
from the command launcher to useDocumentTerminal. The UI was also
adjusted to allow the user to reconnect to an SSH server if resolving
the hostname fails. This has a nice benefit of also allowing them to
retry if the PTY couldn't be created for some reason.

---

Before gravitational/webapps#1307, Connect was pulling all resources
from the cluster on app start and cluster login. Then it'd show them to
you in tables if you opened a new tab with cluster resources. There were
at least two problems with this approach:

1. It was slow for big clusters as pagination, filtering and sorting
   were all done client-side and blocked the main thread.
2. It wasn't possible to implement advanced search unless we copied the
   implementation from the backend to tshd.

gravitational/webapps#1307 made it so that instead of depending on that
resource cache to show resource tables, Connect would pull paginated
resources from the backend.

However, the resource tables were not the only part of the app depending
on that cache. Due to time constraints, we weren't able to refactor all
of them. We managed to refactor autocomplete (gravitational/webapps#1406)
and the remaining places are listed in #21800.

This PR refactors those remaining places to not use the cache by either
not depending on resource details or by making a call to the proxy
instead.

* Add missing license
2023-02-27 15:32:19 +00:00
Rafał Cieślak 0cdfa0b0ef
Connect: Use SSH server UUID instead of hostname for file transfer (#21913)
* Add ResourceURI.GetServerUUID

* Use server UUID when calling TeleportClient.TransferFiles

* Mark removed FileTransferRequest fields as reserved
2023-02-17 10:24:12 +00:00
Edoardo Spadolini e3ce1f83c4
Emit usage events for port, kube.request, sftp (#21740)
* Update prehog/teleport.proto

* Add port as a tp.session.start with kind ssh_port

* Emit tp.kube.request events

* update prehog teleport.proto

* Emit tp.sftp usage event
2023-02-15 09:51:43 +00:00
Michelle Bergquist 8dfa07559b
capture custom role creation in prehog (#21123)
* add e2e role creation events

* add role name

* reset proto

* cleartext default role names

* constant
2023-02-09 19:23:29 +00:00
Rafał Cieślak 9fa007ca5f
Remove code related to restarting lib/teleterm gateways (#21457)
The Electron app no longer asks tshd to restart gateways. This was changed
in gravitational/webapps#1383.

This PR merely removes the tshd implementation of that RPC.
2023-02-09 08:21:12 +00:00
Grzegorz Zdunek 7ed92c1c18
Connect: return logged in user in ListRootClusters (#20809)
* Add integration/teleterm_test with tests for get* and list* clusters

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* Move `testAddingRootCluster to integration/teleterm_test

* Add `ClusterWithDetails` type instead of enriching existing `Cluster` with optional properties

* Remove unnecessary condition

* Add license

* Bunch of renames

* Do more in mustLogin

* Remove watcher

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2023-02-08 16:45:53 +00:00
Lisa Kim c7a11477ee
[Web:Discover] Report events (#20581)
* Define event types

* Define event names for each flow

* Report events upon start, exiting, and next steps

* Update json property name change

* Emit user skipped event

* Emit error events

* Handle unloading event for 'completed' step

* Move updating event state into hook

* Finish emitting events for desktop

* Address CR: rename DiscoverDesktop to DiscoverResources

* Various changes:

- address CR: remove use of ref
- diagnostic traces can also be a success, only emit event on failed traces
- add mysql to discover events
- consistent naming on exit prompt

* Update and add new event names

* Update tests

* Emit events for unimplemented flows (apps and other dbs)

* Redo emitting events for test connection

Send event for EACH test connection failure or success.
If a user does not do any testing, send a skipped event.
2023-02-03 19:30:56 +00:00
Rafał Cieślak 3ac5a0aedb
Refactor prehog & teleterm protos to match project conventions (#20810)
* Adjust go_package of lib/prehog Go protobufs

This makes them follow the pattern set out by api/proto and proto.

* Adjust go_package of lib/teleterm Go protobufs

* Use single buf.gen.yaml to generate JS protos

This also entailed changing the location of lib/teleterm protos and changing
the value of their package specifier to match the conventions in other parts
of the codebase. This is a breaking change but that is fine for Connect
as the protos are used locally only and each build ships with matching
protobufs.

* Make web/packages/teleterm use protobufs from gen-proto-js

We used to copy protobufs over to web/packages/teleterm/src/services/tshd
since webapps used to be in a separate repo.

This is no longer the case, so we can just make teleterm use protobufs
from gen-proto-js.

* Move prehog & teleterm protos into proto/teleport/lib

* Generate JS protos to gen/proto/js

* Move lib/teleterm Go protobufs to gen/proto/go

* Move lib/prehog Go protobufs to gen/proto/go

* Rename lib/teleterm proto package

* Re-enable linter rules for teleterm & prehog

* Update prehogv1 path in usagereporter_test.go

* Use except instead of ignore_only to allow Google API-style responses

* Add UNARY_RPC to api/proto & proto

* Ignore gen/ when running addlicense

* buf-js.gen.yaml: Remove comment about lack of go_package for JS

* Move prehog protos to proto/prehog/v1alpha

* Adjust prehog's go_package to match proto package
2023-02-03 14:47:06 +00:00