Skip to content

Conversation

@dervoeti
Copy link
Member

@dervoeti dervoeti commented Nov 21, 2025

Description

Optional follow-up for #779:

As @adwk67 mentioned in his comment, there were comments in the code about some necessary refactoring that might make sense once we add LDAP support. This is the PR that refactors the mentioned TODO items. In general, initialization logic was moved from main.rs into the specific backend, basically two things per backend:

  • Reading the credentials
  • Initializing the HTTP client for the backends that need it

We now have resolve functions that enrich the basic backend configuration from the CRD with the resolved data so we have it available as shared state in the get_user_info functions.

I ran the tests for Keycloak, OpenLDAP and AAS, they were all successful. There was no test for Entra as far as I know.
I couldn't find out how to run the ActiveDirectory integration test but I did not need to touch the AD backend anyway, because it doesn't need to resolve credentials. We could add a resolve function there as well that just copies the data, so the code looks more consistent with the other backends, but since I did not know how to run the integration test I preferred to leave it as it is. It's probably also fine this way.

The diff looks bigger than it is in the Github UI, the get_user_info functions for example were barely changed.

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

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@dervoeti dervoeti requested a review from adwk67 November 21, 2025 16:05
@dervoeti dervoeti moved this to Development: Waiting for Review in Stackable Engineering Nov 21, 2025
@dervoeti dervoeti self-assigned this Nov 21, 2025
@dervoeti dervoeti changed the title refactor: move initialization into backends refactor(user-info-fetcher): move initialization into backends Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

2 participants