Skip to content

Align git identity with SSSD settings - #467

Merged
Bobzemob merged 2 commits into
mainfrom
cmyers_git-identity
Sep 4, 2026
Merged

Align git identity with SSSD settings#467
Bobzemob merged 2 commits into
mainfrom
cmyers_git-identity

Conversation

@cmyers-mieweb

Copy link
Copy Markdown
Collaborator

Followup to Issue #256

Update the container git identity profile to derive LDAP URI, search base, username attribute, and bind credentials from the same SSSD environment used for authentication. Add a workflow smoke test covering bound and anonymous lookups, rootDSE discovery, and no-op cases, and document the first-login git config behavior for LDAP-backed users.

Update the container git identity profile to derive LDAP URI, search base, username attribute, and bind credentials from the same SSSD environment used for authentication. Add a workflow smoke test covering bound and anonymous lookups, rootDSE discovery, and no-op cases, and document the first-login git config behavior for LDAP-backed users.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns the container’s “first login” git identity setup with the same SSSD-derived LDAP configuration used for authentication, adds a CI smoke test for the profile script, and documents the behavior for admins configuring LDAP-backed environments.

Changes:

  • Update git-identity.sh to derive LDAP URI, search base, username attribute, and bind behavior from SSSD_* env vars (with rootDSE discovery fallback).
  • Add a workflow-executed smoke test covering bound vs anonymous lookups, rootDSE discovery, config no-op, and non-interactive no-op.
  • Document the first-login git config behavior in the LDAP admin guide.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
mie-opensource-landing/docs/admins/ldap-servers.md Documents the git identity profile behavior and its dependence on SSSD_* LDAP settings.
images/base/test-git-identity.sh Adds a stub-based smoke test for LDAP mail lookup, rootDSE discovery, and no-op behavior.
images/base/git-identity.sh Switches git identity LDAP lookup to use the same SSSD_* env-driven connection/bind parameters as SSSD.
.github/workflows/build-images.yml Runs the new smoke test in CI prior to building images.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +37 to 41
bind=(-x)
if [ -n "${SSSD_LDAP_DEFAULT_BIND_DN:-}" ] && [ -n "${SSSD_DEFAULT_AUTHTOK:-}" ] &&
{ [ -z "${SSSD_DEFAULT_AUTHTOK_TYPE:-}" ] || [ "${SSSD_DEFAULT_AUTHTOK_TYPE}" = "password" ]; }; then
bind+=(-D "$SSSD_LDAP_DEFAULT_BIND_DN" -w "$SSSD_DEFAULT_AUTHTOK")
fi
Comment thread images/base/git-identity.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@Bobzemob Bobzemob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Bobzemob
Bobzemob merged commit 4c23e6e into main Sep 4, 2026
8 checks passed
@Bobzemob
Bobzemob deleted the cmyers_git-identity branch September 4, 2026 20:09
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.

3 participants