Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitors need an authenticated user when running checks #421

Open
PeteDarinzo opened this issue Nov 21, 2024 · 2 comments
Open

Monitors need an authenticated user when running checks #421

PeteDarinzo opened this issue Nov 21, 2024 · 2 comments

Comments

@PeteDarinzo
Copy link
Contributor

There are cases when monitor checks require an authorized user or at least rely on the username getter from the BaseService.

@jskupsik
Copy link
Contributor

+1 - I've encountered this need recently as well.

A neat way to do this would be to "assert an ad-hoc user context", ie something like:

asUser(email: '[email protected]', roles: ['HOIST_ADMIN', 'HOIST_ADMIN_READER']) {
    assert username == '[email protected]'
    assert user.hasRole('HOIST_ADMIN_READER')
    // ...
}

@lbwexler
Copy link
Member

jakub -- clever idea -- seems like it could generally be useful for monitoring, if we needed to monitor mutliple things that only certain users could do. trying to think of other times where it would be usful.

Need to convince ourselves of the security of it. Certainly would not want it to be the "authUser" which I think should only arise via Authentication service.

A dedicated 'monitor' user seems perhaps easier to reason about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants