Skip to content

Fix modify samaccountname#969

Merged
Naksen merged 4 commits intodevfrom
bugfix/fix_modify_samaccountname
Mar 10, 2026
Merged

Fix modify samaccountname#969
Naksen merged 4 commits intodevfrom
bugfix/fix_modify_samaccountname

Conversation

@Naksen
Copy link
Collaborator

@Naksen Naksen commented Mar 10, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 10, 2026 14:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the LDAP modify flow to correctly rename Kerberos principals when sAMAccountName / userPrincipalName changes, by introducing a dedicated rename_princ operation across the Kerberos client/server stubs and adjusting tests accordingly.

Changes:

  • Switch LDAP modify logic from kadmin.modify_princ(...) to kadmin.rename_princ(...) for user/computer sAMAccountName-related renames.
  • Add rename_princ to the Kerberos kadmin abstraction (base/stub/client) and implement a new /principal/rename endpoint in the Kerberos config server.
  • Update API tests and test kadmin mocks to assert rename_princ usage.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/ldap_protocol/ldap_requests/modify.py Uses rename_princ for principal renames and adjusts the RDN modification guard.
app/ldap_protocol/kerberos/base.py Extends AbstractKadmin with rename_princ.
app/ldap_protocol/kerberos/client.py Fixes modify endpoint payload/path; adds rename_princ client call.
app/ldap_protocol/kerberos/stub.py Adds stubbed rename_princ.
.kerberos/config_server.py Adds manager method + /principal/rename route to support principal renaming.
tests/conftest.py Extends the mocked kadmin with rename_princ.
tests/test_api/test_main/test_router/test_modify.py Updates assertions to expect rename_princ calls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Naksen Naksen merged commit 13d738d into dev Mar 10, 2026
2 checks passed
@Naksen Naksen deleted the bugfix/fix_modify_samaccountname branch March 10, 2026 14:13
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