Skip to content

Initialize access monitoring service#54000

Closed
bernardjkim wants to merge 2 commits into
bernard/access-monitorfrom
bernard/init-access-monitor
Closed

Initialize access monitoring service#54000
bernardjkim wants to merge 2 commits into
bernard/access-monitorfrom
bernard/init-access-monitor

Conversation

@bernardjkim
Copy link
Copy Markdown
Contributor

Supports: #51682
RFD: #51979
Requires: #53769
Changelog: Teleport now supports automatic reviews of access requests

This PR initializes and runs the new internal access monitoring service. This service runs as part of the Auth Service, and it is responsible for monitoring and automatically reviewing access requests.

Comment thread lib/auth/accessmonitoring/accessmonitoring.go
Comment thread lib/service/service.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we OK putting this feature in Teleport OSS? I am absolutely in favor if doing so, this makes development and testing easier, but we might want to check with product before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hey @r0mant @roraback, did we want the built-in automatic reviews feature to be available in Teleport OSS, or should it only be in Enterprise?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bernardjkim This should be an enterprise feature and require Identity Governance. If some of the code is in OSS, that should be fine, but the core auto-approval services should not run unless you run enterprise with IG enabled.

Comment thread lib/service/service.go
if err != nil {
return trace.Wrap(err)
}
process.RegisterFunc("auth.access_monitoring_service", func() error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going to happen for hosted plugins? We currently run hosted plugins in teleport.e's plugin manager, and this looks a lot like a plugin but runs as an auth service. I'd like to understand the goal: what should run where, and what's the criteria. My main concern is the increasing number of different ways of running things in teleport.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This service should be functionally the same as a hosted plugin for access reviews. We we're originally thinking about implementing it as a hosted plugin, but it made more sense to implement it as an auth service. The hosted plugins will continue to be managed by teleport.e's plugin manager.

I'm not sure if it'll work out as I'm planning, but once we're done with the initial implementation of automatic reviews, I'd like to reimplement the hosted plugins using this new AccessMonitor. This will replace the App that we use for plugins. And hopefully, we can eventually unify the different implementations we have of the App.

@hugoShaka
Copy link
Copy Markdown
Contributor

This doesn't need to happen in this PR, but could we add a few metrics for the service covering at least:

  • the number of ARs processed
  • the number of ARs discarded because not matching
  • the number of automatic reviews performed, labeled with their state
  • an histogram of the time it took to process the AR

@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Apr 14, 2025

Does it make sense to call this the "access monitoring service"??

Is this related to the access monitoring feature we already have (with the Athena audit log), or is it a completely different thing?

@bernardjkim
Copy link
Copy Markdown
Contributor Author

could we add a few metrics for the service covering at least: ...

I'll be working on access request metrics after this PR. I'll make sure to include these.

@bernardjkim
Copy link
Copy Markdown
Contributor Author

bernardjkim commented Apr 15, 2025

Is this related to the access monitoring feature we already have (with the Athena audit log), or is it a completely different thing?

Ah, this is not related to Athena audit logs. This service implements automatic reviews of Access Requests using Access Monitoring Rules. How about access_request_monitoring_service?

@flyinghermit flyinghermit removed their request for review April 15, 2025 12:34
@bernardjkim
Copy link
Copy Markdown
Contributor Author

Service initialization moved into teleport.e https://github.com/gravitational/teleport.e/pull/6371.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants