Skip to content

Implementation for ldap provider group - #275

Merged
sankarrm70 merged 8 commits into
mainfrom
usr/rmsankar/74951_impl
Sep 11, 2026
Merged

sankarrm70 merged 8 commits into
mainfrom
usr/rmsankar/74951_impl

Conversation

@sankarrm70

Copy link
Copy Markdown
Collaborator

Description

This is an enhancement for ldap provider group modules

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, pep8, linting, or security issues
  • I have performed Ansible Sanity test using --docker default
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

sankarrm70 and others added 8 commits September 11, 2026 01:41
… with check/diff mode

- Add three new optional LDAP parameters: group_base_dn (str, <=255),
  provider_domain (str, <=255), authentication (bool)
- Wire all three into create/update with non-destructive semantics:
  None (omitted) preserves server value, explicit "" clears string
  fields, explicit False is transmitted for authentication
- Byte-exact comparison (no case/whitespace normalisation)
- Length validation rejects before API write
- Set supports_check_mode=True; guard all write calls behind
  if not self.module.check_mode
- Implement diff mode with before/after restricted to declared,
  differing parameters; no diff key when mode is off
- Explicitly exclude bind_password from all diff payloads
- Add attributes: block declaring full check_mode/diff_mode support
- Remove "check mode is not supported" note
- Add 35 new unit tests covering all FRs, check/diff mode,
  bind_password redaction, idempotency, and non-destructive semantics
- 1531/1531 collection-wide unit tests pass (--forked)

Story: Story-74951-ansible-powerscale-expanded-ldap-configuration-part1
AC: AC-001, AC-002-R, AC-003, AC-004, AC-005

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Story: Story-74951-ansible-powerscale-expanded-ldap-configuration-part1

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…pdate copyright

- Relocated group_base_dn, provider_domain, authentication documentation
  from top-level options to ldap_parameters.suboptions to match the
  argument spec in get_ldap_parameters()
- Updated copyright year from 2021-2024 to 2021-2026

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…authentication

- Full descriptions with constraints (<=255 chars), clearing/omission semantics
- Disambiguate group_base_dn vs base_dn; provider_domain vs user_domain/group_domain
- Document authentication: false as identity-only provider (Req-SEC-C-3)
- Add troubleshooting notes for invalid DN syntax and domain-qualification errors

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
EXAMPLES:
- Separate group search hierarchy (group_base_dn distinct from base_dn)
- Identity-only provider (authentication: false)
- Multi-domain qualification (provider_domain)
- Check-mode + diff preview with register/debug

Playbook (playbooks/modules/ldap.yml):
- Configure/clear group_base_dn, set/clear provider_domain
- Disable/re-enable authentication with idempotency re-run
- Check-mode + diff demonstration with register/debug
- All pre-existing tasks preserved unchanged

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Changelog fragment with minor_changes for documentation expansion,
  examples, playbook coverage, and troubleshooting notes
- Release note fragment documenting check_mode/diff_mode behavior change

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The test relied on class-level get_ldap_args retaining server_uris and
base_dn from its initial definition. However, prior test scenarios
(test_create Scenario 3/5) mutate the shared dict, clearing base_dn
and server_uris. When test_create_throws_exception runs afterward,
the create() method fails at parameter validation (base_dn is mandatory)
before reaching the API call where ApiException would be raised.

Fix: explicitly set server_uris, server_uri_state, and base_dn so the
code path reaches the mocked create_providers_ldap_item call.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@sankarrm70
sankarrm70 requested review from sapana05 and removed request for sapana05 September 11, 2026 13:16
@sankarrm70
sankarrm70 merged commit ce4670e into main Sep 11, 2026
25 checks passed
@sankarrm70
sankarrm70 deleted the usr/rmsankar/74951_impl branch September 11, 2026 15:29
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