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

User info fetcher #433

Merged
merged 119 commits into from
Jan 4, 2024
Merged

User info fetcher #433

merged 119 commits into from
Jan 4, 2024

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Apr 13, 2023

Description

This injects a new component into the OPAs, which is used to query a directory backend (such as Keycloak) for additional user information, such as groups and roles. See #477. This is a first step towards implementing #237.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Reviewer

Acceptance

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@nightkr
Copy link
Member Author

nightkr commented Apr 13, 2023

This is very much a prototype, before any actual release we'd need to make the backends configurable, and at least have the scaffolding to add support for more directory backends (such as LDAP).

There's also a corresponding Trino integration, over at https://github.com/stackabletech/trino-operator/tree/spike/user-info-fetcher.

@fhennig
Copy link
Member

fhennig commented Apr 13, 2023

heya! Looks like this is related to this long open ticket we have: #237

I've got a few questions. Will every OPA instance query the group data on its own? How long is group membership for a user cached?

@nightkr
Copy link
Member Author

nightkr commented Apr 13, 2023

Yes, good catch.

@nightkr
Copy link
Member Author

nightkr commented Apr 13, 2023

The current spike doesn't do any caching. We have a few avenues for turning it on eventually, either adding it to the group-fetcher sidecar ourselves, or by turning on OPA's built-in http.send cache. The former would give us more control, the latter would be trivial to implement.

Each OPA currently runs independently of each other, so each instance would be run its own independent cache unless we introduce a shared cache component of some kind.

@fhennig
Copy link
Member

fhennig commented Apr 13, 2023

Got it, thanks 👌

@soenkeliebau
Copy link
Member

Just so this isn't lost, @Jimvin expressed a keen interest to have ways of invalidating specific caches as well as @lfrancke who I believe mentioned the ability to evict specific users from all caches.
Probably not for version 0, but worth keeping in mind.

@NickLarsenNZ NickLarsenNZ dismissed stale reviews from Techassi and sbernauer December 20, 2023 19:55

All comments resolved

sbernauer
sbernauer previously approved these changes Jan 2, 2024
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

Gone through all changes again (including the new labels mechanism) and LGTM.
Many thanks for everyone that has participated, it was a great group effort!

rust/user-info-fetcher/Cargo.toml Outdated Show resolved Hide resolved
@sbernauer
Copy link
Member

We need the fixes from stackabletech/operator-templating#306, but with these the kuttl test passes again

sbernauer
sbernauer previously approved these changes Jan 3, 2024
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

@NickLarsenNZ NickLarsenNZ self-requested a review January 4, 2024 11:32
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

Tests pass, good to go. Thanks everyone for your contributions

@NickLarsenNZ NickLarsenNZ added this pull request to the merge queue Jan 4, 2024
Merged via the queue into main with commit 8d0a06a Jan 4, 2024
30 checks passed
@NickLarsenNZ NickLarsenNZ deleted the spike/user-info-fetcher branch January 4, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants