Skip to content

[WIP] ipa-keycloak: Test IPA-Keycloak integration with Github Action #25

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rjeffman
Copy link
Member

@rjeffman rjeffman commented May 13, 2025

This Github workflow uses FreeIPA-Cluster-Test to run a simple login test against the IPA-Keycloak integration environment.

Summary by Sourcery

Introduce a GitHub Actions workflow to automate IPA-Keycloak integration testing and a minimal FreeIPA demo environment with automated provisioning, configuration, and artifact handling.

New Features:

  • Add test-ipa-keycloak job to provision a FreeIPA cluster, configure Keycloak as an OIDC IDP, and tear down the environment
  • Add minimal-demo job to build a minimal container image, deploy a FreeIPA environment, and record or collect demo artifacts

CI:

  • Configure workflow concurrency to cancel in-progress runs on new pushes
  • Add conditional steps to collect and upload server logs on failures and demo recordings on success

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @rjeffman - I've reviewed your changes - here's some feedback:

  • Avoid hard-coding the OIDC client secret and user password in the workflow—pull them from GitHub Secrets instead.
  • Either implement the headless OIDC login steps for jdoe or remove the commented placeholders to keep the workflow runnable end-to-end.
  • The minimal-demo job sources venv/bin/activate without creating the virtual environment—add a step to set up and install dependencies into the venv first.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rjeffman
Copy link
Member Author

@f-trivino, this is an unfinished example for testing IPA-Keycloak using the Github Action.

Any help on filling the missing steps is very welcome.

@rjeffman rjeffman force-pushed the ipa_keycloak_action branch from c1b509d to b384ee4 Compare May 13, 2025 23:34
This Github workflow uses FreeIPA-Cluster-Test to run a simple login
test against the IPA-Keycloak integration environment.

Signed-off-by: Rafael Guterres Jeffman <[email protected]>
@rjeffman rjeffman force-pushed the ipa_keycloak_action branch from b384ee4 to 543d8f5 Compare May 13, 2025 23:35
@abbra
Copy link
Collaborator

abbra commented May 14, 2025

@rjeffman keycloak container has no python, so you cannot use ansible. We probably need to extend the container to include python.

@rjeffman
Copy link
Member Author

@abbra this container cannot be easily extended, and I don't actually want to extend it, as it is the official keycloak container. I was even thinking on mounting the conf directory as a volume.

It's probably a bug on the FreeIPA-Cluster-Test action.

@abbra
Copy link
Collaborator

abbra commented May 18, 2025

@rjeffman The issue here is that we don't know which host is really built with a version that requires running a script. For example, in this topology we only need to run it on the server host (IPA server) and not on keycloak.

Perhaps, one can inspect podman to see if there is unknown init and skip that one? We only care about /sbin/init because this is what would allow systemd running

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

Successfully merging this pull request may close these issues.

2 participants