
CA Optics — анализатор пробелов в условном доступе Azure AD
Проект архивирован из-за изменения приоритетов разработки и перенаправления моих усилий в сообществе на другие области (PoC, другие инструменты и демо/презентации), проект переведён в режим только для чтения.
Azure AD Conditional Access Gap Analyzer — это решение для выявления пробелов, которые могут существовать в сложных конфигурациях политик условного доступа Azure Active Directory.
Если вы новичок в условном доступе, рекомендуем ознакомиться со следующей статьёй Microsoft: https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/overview
Однострочная команда для запуска этого инструмента: (если вы планируете прочитать только эту часть и уже завершили установку)
node ./ca/main.js --mapping --skipObjectId=259fcf40-ff7c-4625-9b78-cd11793f161f --clearPolicyCache --clearTokenCache --clearMappingCache
После выполнения предварительных требований и прочтения этого README ознакомьтесь со следующим:
политики reportOnly не считаются завершающими:
Читайте: scope
запускайте каждое сканирование с --clearPolicyCache
запускайте каждое сканирование с --clearMappingCache, если вы вносите изменения в группы/пользователей, связанных с политиками
в область действия попадают только политики, нацеленные на пользователей и приложения (это наиболее распространённая область, но означает, например, что политика регистрации безопасности не оценивается)
Читайте: scope
Начните с тестовой среды, чтобы получить опыт и составить представление о механике работы инструмента
если у вас есть известные группы или пользователи, исключённые из политик, определите объекты для исключения из сканирования с помощью --skipObjectIds, если вы не хотите подтвердить исключения
Если вы запускаете сканирование в нескольких средах, убедитесь, что перед запуском новых сканирований удалены логины и кэши
Читайте:параметры
az account clear и выполните новый вход в среду, которую планируете сканировать, с помощью az loginЧитайте другие важные примечания
Release notes: 0.7.1
- Updated depedencies and report text outputs
Release notes: 0.7
- Uses beta endpoint now by default, --expand option now expands the results to report regardless of the use of --allTerminations
Release notes: 0.6.9
- using --expand=9c06d103-f5b0-4404-bb25-aec4636912cd,47087cd3-64e9-470b-980a-5662f498e016 and expand 10 group members to for separate inspection.
Release notes: 0.6.8
- When you update policy with any guest conditions in GUI that policy will be only available from the beta endpoint after the update (during preview).
- This update brings normalization for policies that are transfered to beta endpoint due to this behavior.
- The policy will be evaluated like the previous guest conditions, as long as the following conditions are included "internalGuest,b2bCollaborationGuest,b2bCollaborationMember" and no tenants are excluded from the policy. In order to evaluate transferred policies,
- use '--allowPreviewPolicies' when running CaOptics to account for this behavior
Release notes: 0.6.6-7 beta
- Allow use of different login endpoints for login and graph with params: --altLogin --altGraph
- Allow use of custom filtering for policies (this only recommended, when the policies do not adhere to expected schema)
Release notes: 0.6.5 beta
- Added counter to reporting when high number of permutations is also added to report (default is to add only unterminated)
- Minor code fixes changing <var> to <let>
- Report filename now includes day, month, year and tenantId e.g. report_day_4_month_9_year_2022-tenant_48f55450-183a-45d6-a9ce-68f3cbc68947.csv
Release notes: 0.6.4 beta
- Get more groups per single call (less batching)
- Fix race condition detected when generally using for await loops
- Enclose values with "" between delimitters (CSV)
Release notes: 0.6.3 beta
- Optimizations to way the mapped objects are handled.
- Mapped objects are cached. You can recreate the object mapping by using parama 'clearMappingCache'
- Lookup keys will start from 'user/group/role' conditions always first
- Added possibility to populate usermap with random UUID's to test for performance impact (this just debug option, and not really something that would be in non-beta versions)
Release notes: 0.6.2 beta
- Separated cache params into separate functions -> (clearTokenCache and ClearPolicyCache)
- Added possibility of running pre-optimized algorithm on permutations with param --aggressive (High memory consumption, only here for A/B testing)
- merge completed.
Release notes: 0.6.1 beta
- Basic version of CSV reporting added
- Streamlined permutation generation to ensure essential permutations are generated, and some permutations are are terminated earlier on the lookups
Release notes: 0.6 beta (first non "silent" release)
- App displayNames added to MD report. Object type added to the user type
Release notes: 0.5.2,0.5.1,0.5 beta (see previous branches for release notes)

Пример обнаружения пробелов между политиками
❌ Любая перестановка со значением 0 означает, что для данной конкретной комбинации условий не было завершающих политик.
| Политика | Завершения | поиск |
|---|---|---|
| All | 0 | Applications:88cc92be-d474-4d95-a57d-7b3ef701f510 -> Locations:finland -> users:GuestsOrExternalUsers |
| All | 0 | Applications:88cc92be-d474-4d95-a57d-7b3ef701f510 -> Locations:finland -> users:Jane Doe |
| All | 0 | Applications:88cc92be-d474-4d95-a57d-7b3ef701f510 -> Locations:finland -> users:John Doe |
✅ Подробное описание обнаружения читайте в docs/example.md
Перестановки генерируются getPol2.js