canonical / glauth-k8s-operator

A Charmed Operator for running GLAuth on Kubernetes
https://charmhub.io/glauth-k8s
Apache License 2.0
0 stars 0 forks source link

Investigate glauth sql backend usage #59

Open nsklikas opened 2 months ago

nsklikas commented 2 months ago

Following up the discussion on https://github.com/canonical/glauth-k8s-operator/issues/55#issuecomment-2283271731.

The issue is that right now the postgres backend (I assume all backends) fetch all the users from the database and filter them in memory. There are 2 things we can approach on this: 1) Add more logic when constructing the db query, IF we are trying to search for a user based on cn we should let the database to do the filtering and use the power of its existing indexes 2) Add a jsonb index that allows us to perform more complex search operations based on random attributes

(1) is easier to implement and should result in a speed up in most cases, (2) will be harder to implement as we will have to check the database version and may not be used that much.

When we have more real world usage of glauth with a backend we will need to evaluate whether we need to refactor the database logic.

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-1010.

This message was autogenerated