Open
Conversation
57d28c6 to
39db0bf
Compare
Naksen
requested changes
Mar 2, 2026
Collaborator
Naksen
left a comment
There was a problem hiding this comment.
Опиши подробно механизмы:
- Выдачи нового RID
- Как глобальный пул делится на локальные пулы для каждого RID Set
- Как происходит обновление локального пула
296058c to
58726a2
Compare
bd76e79 to
4f6e9c7
Compare
Naksen
requested changes
Apr 2, 2026
Naksen
requested changes
Apr 2, 2026
Naksen
reviewed
Apr 3, 2026
Naksen
reviewed
Apr 3, 2026
added 21 commits
April 7, 2026 10:54
…st primary group ID in search tests
…nality with new get_rid_set method
…xpiration before API call
… better error handling
…RID management functionality
…related database operations
…Manager gateway initialization
… RID Manager setup process
…jectSIDGateway to raise it when SID is not found
…fix for testing environment
…ix for improved test environment clarity
…or consistency with production environment
added 2 commits
April 7, 2026 11:12
…improved domain controller retrieval
…nstead of objects for improved consistency and performance
c2111d9 to
f35eee2
Compare
added 3 commits
April 7, 2026 11:43
…ses to improve code organization and maintainability
…nd clean up unused methods in directory_create_use_case and directory_dao for improved clarity and maintainability
…irectory creation, improving clarity and maintainability
Naksen
reviewed
Apr 8, 2026
Collaborator
Author
|
сделал подгрузку атрибутов в |
…g by introducing caching and updating method signatures for improved clarity and performance
added 7 commits
April 9, 2026 15:15
… improved configuration management in tests
…correct domain initialization
…to ensure fresh state for each test run
…_controller for improved test accuracy
…before object SID assignment for improved domain controller setup
…y using or_ for improved readability and maintainability
…format existing identifiers and assign built-in SIDs for domain groups, improving data integrity and consistency
Naksen
reviewed
Apr 10, 2026
Naksen
requested changes
Apr 10, 2026
added 2 commits
April 10, 2026 13:57
…election and improve object SID handling by skipping entries with null parent IDs, ensuring better data integrity for domain groups.
…yRequest and add utility function to verify group inclusion by primary RID, improving group management logic.
…IDs during object SID migration, ensuring proper handling of top-level containers and configuration subtrees. Update upgrade function to add DomainIdentifier attribute and normalize object SID handling for domain directories.
Naksen
approved these changes
Apr 10, 2026
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.
Задача: https://tracker.yandex.ru/MULTIDIRECTORY-1051
Добавлено:
Изменено:
Есть 2 варианта формирования object_sid:
RID задан(системный sid, для сущностей domain admins, domain users и подобные) их диапазон ридов от 500 до 1100 и они не запрашиваются у DC.
Формат objectSid
sid_prefix-ridRID запрашивается у DC, диапозон от 1100 и до 1млрд.
Формат objectSid
sid_prefix-domain_identifier-ridКак работает:
Тут особо логики нет, просто кладем в бд objectSid с заданым RID, минуя DC RIDSet RIDManager. ObjectSIDUseCase.add --> ObjectSIDGateway.add
app/ldap_protocol/rid_manager/object_sid_use_case.py
app/ldap_protocol/rid_manager/object_sid_gateway.py
Берем DC домена, по нему получаем его RIDSet. У полученного RIDSet запрашиваем RID.
ObjectSIDUseCase.add --> RIDManagerUseCase.get_domain_controller --> RIDSetUseCase.allocate_next_rid(domain_controller)
app/ldap_protocol/rid_manager/object_sid_use_case.py
app/ldap_protocol/rid_manager/rid_manager_use_case.py
app/ldap_protocol/rid_manager/rid_set_use_case.py
2.1 Проверяем может ли локальный пул(rIDPreviousAllocationPool) у RIDSet выдать RID. Если да - выдаем RID(rIDNextRID +1), если нет - текущий пул(rIDPreviousAllocationPool) заменяем значением следующего забронированного пула(rIDAllocationPool) и запрашиваем у RIDManager новый следущий пул(rIDAllocationPool), так же меняем rIDNextRID по нижней границе этого пула, после выдаем RID
В АД следущий пул запрашивается при 50% заполнености текущего, технически, делается тоже самое
RIDSetUseCase.is_pool_exceeded -->RIDSetGateway.get_rid_next_rid --> RIDSetGateway.update_next_rid_and_pool
| ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀🠝
🠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
RIDManagerUseCase.allocate_pool -> RIDSetUseCase.reset_attrs_when_pool_exceeded