36 Commits
Author SHA1 Message Date
Tiago Silva e15fd609d4 session-search[31]: add needs_further_review filter and response field (#67754)
* session-search[31]: replace needs_further_review bool with enum reason filter

Replaces the optional bool needs_further_review filter on both
SearchSessionSummariesParams and SearchSessionSummariesRequest with
repeated NeedsReviewReason filter_needs_further_review_reasons, letting
callers narrow results to sessions flagged for specific reasons rather
than any-or-none. The access graph and public API protos are regenerated
accordingly, and the enterprise service layer is updated to forward the
new field.

tctl recordings search replaces --[no-]needs-review with --review-reason,
a Kingpin enum flag accepting individual reason names or all to match any
flagged session. The valid values live in reviewReasonNames, a single map
that drives both flag validation and proto enum conversion. A parity test
asserts that reviewReasonNames contains exactly one entry per
non-UNSPECIFIED NeedsReviewReason value, so adding a proto reason without
wiring it into the CLI fails the test.

* fix test

* update docs
2026-07-03 12:17:55 +00:00
Ryan Clark 05557d92e9 Add protos for desktop session search (#67803)
* Add protos for desktop session search

* Add desktop type to the message
2026-06-15 16:15:48 +00:00
Tiago Silva 723043621d sessionsearch[22]: add SearchMode enum to session search protos (#66205)
Adds a `SearchMode` enum to session search protos, allowing clients to choose the search mode that best fits their keywords.

Some searches perform better with embeddings only, while others work better with strict keyword matching. This change lets clients opt into their preferred search method, while keeping hybrid search as the default.

Signed-off-by: Tiago Silva <[email protected]>
2026-04-27 14:30:35 +00:00
Tiago Silva 60a7e68e07 sessionsearch[9]: add session search proto definitions for Auth and Access Graph (#64711)
Adds two proto files that together define the session summary search
feature.

  proto/accessgraph/v1/session_search.proto — internal, Auth->Access Graph
    Used exclusively by the Auth server. Defines SessionRecordingService
    with two RPCs:
      - SearchSessionSummaries: a bidirectional streaming RPC the Auth
        server uses to paginate through session summaries stored in the
        Access Graph. The Auth server sends search_params on the first
        message, receives batches of SessionSummary results each
        terminated by a PageComplete, and sends FetchMore to advance pages.
        Each SessionSummary includes session_end_event — the raw audit
        event the Auth server evaluates against the requesting user's RBAC
        permissions before deciding whether to forward the result to client.
      - StoreSessionSummary: used by the summarizer pipeline to persist
        session summaries and their vector embeddings to the Access Graph.

  api/proto/teleport/sessionsearch/v1/session_search.proto — public, Client->Auth
    Used by Teleport clients (tsh, web UI handler, etc.). Defines
    SessionSearchService.SearchSessionSummaries as a unary-request /
    server-streaming RPC. The Auth server implements this service: it
    receives the client's filter criteria, fans out to the Access Graph
    via the internal bidi stream above (handling all pagination
    internally), filters each result using session_end_event, and streams
    only the permitted SessionSummary results back. Clients see a single
    continuous stream with no pagination mechanics exposed to them.

Signed-off-by: Tiago Silva <[email protected]>
2026-04-13 13:27:12 +00:00
Cam Hutchison 8a32b4d971 usagereporter: Add Identity Security streaming/aggregating events (#63753)
* proto/prehog: Sync from cloud repo for access graph usage

Sync the `prehog.v1` proto package sfrom the cloud
repo to bring in the changes for access graph usage events.

* proto/accessgraph: Extend EventsStreamV2 response for usage events

Extend the EventsStreamV2 response to allow usage events to be sent back
to teleport.

The usage events that can be sent back are currently all defined in the
`prehog.v1alpha` protobuf package. As this does not have a `go_package`
statement, we need to add a `M` flag to the buf config for generating
the Go code. There is no canonical package for the generated code as the
protos live and are generated in two repos (cloud and teleport).

* proto: Regenerate proto/grpc code for access graph usage events

Regenerate the generated proto code to include the changes for access
graph usage events. This includes the following packages:
- `prehog.v1` (Go and Typescript)
- `accessgraph.v1alpha` (Go)

The contents of this commit were auto-generated with:

    make grpc/host

* usagereporter: Add anonymizer for identity security events

Add types compatible with `Anonymizer` for the two identity security
events:
* `prehogv1a.IdentitySecurityGraphSizeEvent`
* `prehogv1a.IdentitySecurityAuditLogsIngestedEvent`

These events are directly transformed as they contain no anonymizable
data.

* usage: Aggregate access graph queries per user

Extend `aggregating.Reporter` to aggregate the number of access graph
queries per user so we can generate monthly user active reports of
access graph usage for self-hosted Teleport customers.

* aggregating: Rename some identitySecurity -> sessionSummary

Rename some variables and functions in the aggregating reporter to more
tightly scope the naming, using "sessionSummary" instead of
"identitySecurity". Another report is to be added named
"identitySecurity" as an aggregation of more general data about the
product.

The existing report defined in the proto -
`IdentitySecuritySummariesGeneratedReport` has been retained as that is
a larger change to make across repositories and with "Summaries" in the
name, is scoped enough to differentiate it from the upcoming report.

* aggregating: Aggregate identity security events into new report

Aggregate the `IdentitySecurityGraphSizeEvent` and
`IdentitySecurityAuditLogsIngestedEvent` events into the
`IdentitySecurityReport` aggregated report.

Aggregation for the graph size events is simply taking the last size of
each provider, as these are essentially guages reporting the size at a
point in time. Aggregation for the audit log events are an accumulation
by provider giving a total count over the report window.
2026-04-10 03:46:59 +00:00
Tiago Silva c3c1425908 Add support for multiple Host CAs in AccessGraph registration (#62611)
Updates the RegisterRequest proto to support multiple Host CA certificates
by introducing a new host_ca_pems repeated field while maintaining backwards
compatibility by deprecating the existing host_ca_pem field. This enables
proper authentication during Host CA rotation and HSM scenarios where
multiple certificates may be active simultaneously.

Signed-off-by: Tiago Silva <[email protected]>
2026-01-06 17:30:05 +00:00
Cam Hutchison e06e2e78f7 proto/accessgraph: Add RPC for sending k8s audit logs to Access Graph (#59566)
* proto/accessgraph: Add RPC for sending k8s audit logs to Access Graph

Add a `KubeAuditLogsStream()` rpc to the `AccessGraphService` for
streaming Kubernetes apiserver audit logs from the Teleport discovery
service to access graph. This is intended for EKS audit logs which are
made available via CloudWatch, but can accommodate other k8s services.

The audit log messages are represented as a `google.protobuf.Struct` so
as to not depend on the k8s.io .proto files, but also as k8s typically
uses protos internally only - the expectation is that we'll receive the
apiserver audit logs as json-encoded strings. This encode easily as a
`google.protobuf.Struct`.

* proto: Generate protos for accessgraph

Generate proto and grpc code for changes to accessgraph/v1alpha1:

    make grpc/host

These changes add the `KubeAuditLogsStream()` rpc and associated types.
2025-10-16 00:33:50 +00:00
Tiago Silva 2c9c003399 Remove LastSyncTime from AWS and Azure resource proto definitions and related code (#59818)
Signed-off-by: Tiago Silva <[email protected]>
2025-10-01 14:05:00 +00:00
Julia Ogris 565947d136 access-graph: Add AWS KMS key discovery to access graph (#56874)
* access-graph: Add KMS resource protos

Add the `AWSKMSKeyV1` protobuf messages to support importing KMS key
into the access graph.

This new type is added to the `AWSResource` oneof.

The Go bindings were regenerated using `make grpc`.

* access-graph: Add AWS KMS key discovery to access graph

Implement AWS KMS keys discovery and ingest into access graph. The
fetcher discovers keys across all specified regions.

For each KMS key, the fetcher retrieves the following details:

* Key metadata, including ARN, creation date, and HSM cluster ID
* Resource tags
* Key aliases
* The key policy document

Add a mock KMS client  to support comprehensive unit testing of the new
fetcher, covering various key configurations and error cases.

The new KMS key resource is integrated into the existing discovery framework,
including the merge, deduplication, and reconciliation steps.

The required IAM policy for access graph discovery is updated to include the
necessary `kms:` permissions.

Correct typo in the `GlueTableName` field name.

* Address review feedback

* Address second set of review feedback

* Regenerate go-bindings for proto

* Fix golden files with new AWS KMS actions
2025-08-08 00:29:41 +00:00
Tiago Silva a86adc3244 feat: add TeleportCluster and Organization fields to AuditLogConfig and OktaConfigV1 respectively (#55276)
This PR adds the Teleport cluster name and okta organuzation name into
respective configs.

Signed-off-by: Tiago Silva <[email protected]>
2025-05-30 09:37:04 +00:00
Tiago Silva eb7b2f5a36 [iac] add github organization name to proto (#54951)
* [iac] add github organization name to proto

This PR adds the github organization name to GithubConfigV1 proto
message.

Signed-off-by: Tiago Silva <[email protected]>

* add github plugin type

* add secret plugin

---------

Signed-off-by: Tiago Silva <[email protected]>
2025-05-20 12:06:45 +00:00
Julia Ogris f9e5f7ed50 Add protos for Identity Activity Center (#54653)
* protos: Add protos for Identity Activity Center

Add new and extend protos for the new Identity Activity
Center feature in Access Graph. Identity centers around activities of user,
allows to easily correlate log items by identity target or type and proactively
provides alerts such as impossible travel.

* Fix according to review

Fix according to review comments.
2025-05-12 17:06:10 +00:00
Tiago Silva 338e67fa49 [netiq] add entitlements field to NetIQResourceAssignmentRef (#53705)
This PR expands `NetIQResourceAssignmentRef` message to include the
`entitlements` to carry information about how a particular role/resource
is mapped into other IdPs.

Each entitlement contains information about name and specially the
`value` field where the information is carried.

Signed-off-by: Tiago Silva <[email protected]>
2025-04-09 09:40:48 +00:00
Tiago SilvaandGabriel Corado 075109ac3d netiq: add access graph protobufs (#50477)
* netiq: add access graph protobufs

This PR introduces the necessary protobuf changes to accommodate Access Graph receiving NetIQ stream of changes.

Part of https://github.com/gravitational/access-graph/issues/634

Signed-off-by: Tiago Silva <[email protected]>

* Update netiq.proto

Co-authored-by: Gabriel Corado <[email protected]>

---------

Signed-off-by: Tiago Silva <[email protected]>
Co-authored-by: Gabriel Corado <[email protected]>
2024-12-20 14:17:17 +00:00
Matt Brock ef7a93fa3d Protobuf and configuration for Access Graph Azure Discovery (#50364)
* Protobuf and configuration for Access Graph Azure Discovery

* Adding godoc and removing Integration field from fileconf
2024-12-18 20:05:56 +00:00
Matt BrockandTiago Silva 4b55d7bad5 Adding Azure integration protobuf messages and gRPC methods (#48628)
* Adding Azure integration gRPC messages and RPC methods

* Make derive

* Update proto/accessgraph/v1alpha/azure.proto

Co-authored-by: Tiago Silva <[email protected]>

* Update proto/accessgraph/v1alpha/azure.proto

Co-authored-by: Tiago Silva <[email protected]>

* Update proto/accessgraph/v1alpha/azure.proto

Co-authored-by: Tiago Silva <[email protected]>

* PR feedback

* More PR feedback and generating protobuf code

* Make derive

* Adding identities field to principals, condition to role assignments, and role name to role definitions

* Rebase conflicts

* Did not fully fetch from origin/master when rebasing

* Removing azure config field and keeping poll_interval as-is

* Correct from parent branch

* Apply suggestions from code review

Co-authored-by: Tiago Silva <[email protected]>

* PR feedback

* Adding doc comments to access graph proto

* Adding object type to principals

* Adding location to Azure virtual machines

* Update proto/accessgraph/v1alpha/access_graph_service.proto

Co-authored-by: Tiago Silva <[email protected]>

* Moving Azure Discovery protobuf config to the Azure Discovery PR

* Make grpc

---------

Co-authored-by: Tiago Silva <[email protected]>
2024-12-02 17:42:11 +00:00
Tiago Silva ca3f9167cd [aws_sync] reuse existing resources on AWS failures (#45821)
Currently, if a AWS call fails due to a rate limited API or a network issue, Discovery service considers the underlying ret psources as deleted from AWS.
This causes several problems because those resources will be removed from access graph view.

This PR changes that behavior and ensures resources are reused on failures.
2024-09-06 09:37:18 +00:00
Tiago Silva 045880f4f5 [access-graph] extract S3 bucket tags (#45364)
* [access-graph] extract S3 bucket tags

This PR extracts the AWS bucket tags by calling `GetBucketTagging`.

Part of https://github.com/gravitational/access-graph/issues/898

Signed-off-by: Tiago Silva <[email protected]>

* add tests

* handle comments

---------

Signed-off-by: Tiago Silva <[email protected]>
2024-08-16 08:21:43 +00:00
Tiago Silva fa6002b5aa [sec_scan][3] add PrivateKey, AuthorizedKey and Device to Access Graph resources (#43468)
This PR extends the Access Graph resources to be able include the newly added `teleport.access_graph.v1.PrivateKey`,
`teleport.access_graph.v1.AuthorizedKey` and existing device trust information `teleport.devicetrust.v1.Device`.

Part of https://github.com/gravitational/access-graph/issues/637

Signed-off-by: Tiago Silva <[email protected]>
2024-07-09 09:51:59 +00:00
Jakub Nyckowski 4160786a3e Add "Access Graph Path Changed" event tracking (#42029)
* Add "Access Graph Path Changed" event tracking

The update introduces support for access path changes. The necessary objects, events, and methods are adjusted accordingly. Icon representation for the new event in the Audit Event List is also added.

* Add affected_resource_type field

* Update audit event messages and add resource kind

Updated the description and formatting of audit events when an access graph path is changed. Additionally, the "affected_resource_kind" field was added to provide more information about the affected resource.

* fmt

* Update access path change message in audit events

The message text for changes to access paths in audit/audit events has been updated. This modification improves the clarity of the description for such events.
2024-06-04 14:43:41 +00:00
Krzysztof Skrzętnicki 86f51a8811 Add properties field to the edge message (#41943)
* Add dynamically typed properties field to the edge message

* Move to `map<string,string>` for edge properties.
2024-05-27 12:01:09 +00:00
Justinas Stankevičius 400e07653e Access Graph: Entra ID application sync prerequisites (#41650)
* Add access graph settings to Entra ID plugin

* Move Entra ID labels to OSS

* Add Entra resources and RPC to Access Graph proto

* Add azure-oidc integration to web.

Current code assumes that Integration is always either AwsOidc,
or an external audit storage integration

* Change app sso cache to a repeated field
2024-05-20 18:57:42 +00:00
Krzysztof Skrzętnicki a1c2a1e2e5 Add database objects to the accessgraph ResourceEntry (#41696) 2024-05-17 15:10:44 +00:00
Justinas StankevičiusandJakub Nyckowski 6fbfadc230 Access Graph: sync AWS identity providers (#41368)
* Add AWSSAMLProviderV1 to access graph proto

* Access Graph: sync AWS SAML Providers

* Parse SAML entity descriptor before sending to TAG

* Add protos for AWS OIDC providers

* Fetch AWS OIDC providers

* Fetch signing certificates for AWS SAML providers

* Deflake identity provider fetch test

The concrete implementation of IAM mock uses a map,
resulting in non-deterministic iteration order.
Sort the results before comparing to alleviate.

* Update lib/srv/discovery/fetchers/aws-sync/iam_test.go

Co-authored-by: Jakub Nyckowski <[email protected]>

---------

Co-authored-by: Jakub Nyckowski <[email protected]>
2024-05-14 16:20:36 +00:00
Tiago Silva d85562975f AccessGraph: Expose ResourceID property for IAM analysis (#41006)
This PR exposes and sends RDS database and cluster region unique and
immutable resource id field.

Signed-off-by: Tiago Silva <[email protected]>
2024-05-01 14:52:34 +00:00
Jakub Nyckowski f0a16af531 Introduce Access Graph EventsStreamV2 (#40807)
* Introduce Access Graph EventsStreamV2

A new GRPC method EventsStreamV2 is introduced. The new method allows returning responses from the Access Graph.
The new API is required by crown jewel implementation. The new API will be used to emit audit events from the access graph.

* Add new fields to Event protobuf for better tracking

Added two new fields, AffectedResourceName and AffectedResourceSource, to the Event protobuf. These additions allow for a more detailed and efficient tracking of changes and their sources, improving overall monitoring and event handling.

* Add AccessPathChanged event and update service file

A new proto file, events.proto, has been added to define the AccessPathChanged event, detailing changes in access paths. The access_graph_service.proto has been updated to use this new event instead of the legacy one. The relevant changes are also reflected in the generated Go file, access_graph_service.pb.go.

* Missing files
2024-04-26 17:37:29 +00:00
Tiago Silva 18759385d2 TAG: Add GitlabEventStream protos (#40655)
This PR introduces the required boilerplate code to be able to import
Gitlab structure into TAG

Part of https://github.com/gravitational/access-graph/issues/635

Signed-off-by: Tiago Silva <[email protected]>
2024-04-18 17:21:58 +00:00
Tiago Silva 994a671a04 TAG: Poll AWS RDS instances and clusters fom AWS (#39013)
This PR polls the AWS RDS instances & clusters and syncs them into TAG.

Part of https://github.com/gravitational/access-graph/issues/459

Signed-off-by: Tiago Silva <[email protected]>
2024-03-07 20:14:16 +00:00
Tiago Silva 58ebf54854 TAG: Poll AWS EKS clusters fom AWS (#38984)
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of https://github.com/gravitational/access-graph/issues/459

Signed-off-by: Tiago Silva <[email protected]>
2024-03-07 19:16:24 +00:00
Tiago Silva 0acccd0dd2 Unify AWS API import for cross account (#37339)
This PR unifies the object references to support cross account imports
in TAG

Signed-off-by: Tiago Silva <[email protected]>
2024-01-26 17:33:02 +00:00
Tiago Silva 3d18711571 TAG: Add AWS importer API (#37078)
This PR introduces the API for the `discovery_service` to push AWS
discovered resources into TAG for import and analysis.

Part of https://github.com/gravitational/access-graph/issues/48

Signed-off-by: Tiago Silva <[email protected]>
2024-01-25 18:08:59 +00:00
Justinas Stankevičius 7a8c3dd58e Add auth management methods to Access Graph gRPC service (#36466)
* Add registration service proto

* Fold registration service into main access graph service

* Add ClusterName to RegisterRequest
2024-01-16 13:00:51 +00:00
Tiago Silva 63130294d7 Add Access List messages to TAG protobuf (#36176)
This PR adds requests to the TAG service in order for Teleport being
able to push access lists changes to TAG

Part of https://github.com/gravitational/access-graph/issues/266
2024-01-03 10:48:25 +00:00
Tiago Silva 8c0b6e41f3 TAG: Add protobuf for resource definition for Kube, App, DB and Windows (#35000)
This PR adds the necessary API boilerplace code for TAG to be able to
receice Windows, Kube, App and Database servers from Teleport.

Part of https://github.com/gravitational/access-graph/issues/265
Part of https://github.com/gravitational/access-graph/issues/264
Part of https://github.com/gravitational/access-graph/issues/263
Part of https://github.com/gravitational/access-graph/issues/262
2023-12-04 09:56:52 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <[email protected]>
2023-12-01 17:48:14 +00:00
Jakub Nyckowski 3e77e345ee Add Access Graph protobuf file (#34373)
* Add Access Graph protobuf file

Added Access Graph proto file definitions. This GRPC service defines the schema Teleport will use to talk to Access Graph service.

* Regenerate proto

* Replace multiple sends command with a stream

* Move messages to separate proto files
Rename the service proto file to better describe its content.

* Address review comments

* Regenerate protos

* Add comment
2023-11-10 22:48:40 +00:00