Open
Conversation
added 5 commits
February 9, 2026 12:09
… related API endpoints to utilize these schemas for better data handling and validation.
…ests, update API endpoints to accept parameters directly for improved clarity and simplicity.
…ary line breaks for improved readability.
…API interactions - Introduced new request models: AddPrincipalRequest, KtaddRequest, and ModifyPrincipalRequest for better structure and validation. - Updated API endpoints to use the new request models, ensuring correct JSON structure for principal creation and keytab addition. - Enhanced error handling and logging for keytab operations. - Refactored existing methods to accommodate new parameters for encryption algorithms and random key generation.
…o improve parameter handling and request structure - Modified the API endpoints for adding and renaming principals to align with new request models. - Adjusted assertions in tests to reflect changes in the expected arguments for kadmin methods. - Enhanced clarity by consolidating parameters in API requests.
2d19d1a to
77d0720
Compare
…g unnecessary None return
Naksen
requested changes
Feb 9, 2026
| async def modify_principal( | ||
| self, | ||
| principal_name: str, | ||
| new_principal_name: str | None = None, |
Collaborator
There was a problem hiding this comment.
Put запрос с full modify разве нет ? почему изменения опциональны ?
Collaborator
Author
There was a problem hiding this comment.
следовал из ТЗ, а так согласен, тут логичнее patch
| ) | ||
|
|
||
| if password is not None: | ||
| if password == "": |
Collaborator
There was a problem hiding this comment.
Зачем пересоздавать принципал, если передан пустой пароль ?
…s to modify principal functionality - Removed the rename_princ method from KAdminLocalManager and replaced it with modify_princ. - Updated API endpoint from rename_principal to modify_principal to reflect the new naming convention. - Adjusted related methods and error codes to use modify_principal terminology for consistency across the codebase.
rimu-stack
requested changes
Feb 17, 2026
Comment on lines
+265
to
+279
| def _parse_algorithms(self, algorithms: list[str] | None) -> list: | ||
| """Parse algorithm strings to kadmv EncryptionType. | ||
|
|
||
| :param algorithms: list of algorithm strings | ||
| :return: list of EncryptionType or None | ||
| """ | ||
| enc_types = [] | ||
| for alg in algorithms: | ||
| if enc_type := ALGORITHM_MAP.get(alg): | ||
| enc_types.append(enc_type) | ||
| else: | ||
| logging.warning(f"Unknown algorithm: {alg}, skipping") | ||
|
|
||
| return enc_types | ||
|
|
Comment on lines
+311
to
+316
| enc_types = self._parse_algorithms(algorithms) | ||
| if enc_types: | ||
| await self.loop.run_in_executor( | ||
| self.pool, | ||
| partial(princ.modify, enc_types=enc_types), | ||
| ) |
…PI endpoints - Eliminated the reset_principal_pw method from KerberosService and KerberosFastAPIAdapter. - Removed the corresponding API endpoint for resetting principal passwords from krb5_router. - Updated AuthorizationRules to reflect the removal of the KRB_RESET_PRINCIPAL_PW constant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Добавление функционала в работу с kadmin_api
в ktadd был добавлен атрибут is_rand_key
изменил создание принципала и модификацию. теперь это post и put соответственно по урлу /principal
в kadmind добавленпа обработка algorithms