itk-dev/azure-ad-delta-sync
Composer 安装命令:
composer require itk-dev/azure-ad-delta-sync
包简介
Composer package for Azure AD Delta Sync flow
README 文档
README
Composer package for the Azure AD Delta Sync flow.
Usage
If you are looking to use this in a Symfony or Drupal project you should use either:
- Symfony: itk-dev/azure-ad-delta-sync-symfony
- Drupal: itk-dev/azure-ad-delta-sync-drupal
Direct installation
To install this package directly run
composer require itk-dev/azure-ad-delta-sync
Flow
To start the flow one needs to call the
Controller run(HandlerInterface $handler) command.
Therefore, you must create your own handler that implements
HandlerInterface.
Example Usage
<?php use ItkDev\AzureAdDeltaSync\Handler\HandlerInterface; class SomeHandler implements HandlerInterface { public function collectUsersForDeletionList(): void { // Some start logic } public function removeUsersFromDeletionList(array $users): void { // Some user logic } public function commitDeletionList(): void { // Some commit logic } }
To start the flow provide a HTTP Client that implements
PSR-18 CLientInterface,
and the required options seen in the example beneath.
Note that this example uses Guzzle HTTP Client. For a list of PSR-18 implementing libraries click here.
use GuzzleHttp\Client; use ItkDev\AzureAdDeltaSync\Controller; $options = [ 'uri' => 'https://aarhus.../RetrieveProvisioningData/...', // System provisioning uri 'security_key' => 'some_security_key', // Provisioning data security key 'client_secret' => 'some_client_secret', // System provisioning client secret ]; $handler = new SomeHandler(); $client = new Client(); $controller = new Controller($client, $this->options); $controller->run($handler);
General comments
Note that this package does not do the synchronization of users, instead it provides a list of all users that currently has access to the system in question.
Should the configured system contain no users an exception will be thrown. This is to avoid using systems to be under the impression that every single user should be deleted.
Development Setup
A docker-compose.yml file with a PHP 8.2 image is included in this project.
To install the dependencies you can run
docker compose pull
docker compose up -d
docker compose exec phpfpm composer install
Unit Testing
We use PHPUnit for unit testing. To run the tests:
docker compose exec phpfpm composer install docker compose exec phpfpm ./vendor/bin/phpunit tests
The test suite uses Mocks for generation of test doubles.
Coding Standard
PHP files (PHP_CodeSniffer)
Check PHP coding standards
docker compose run --rm phpfpm composer install docker compose run --rm phpfpm composer coding-standards-check
Apply coding standard changes
docker compose run --rm phpfpm composer coding-standards-apply
Markdown files
docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md' docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md' --fix
GitHub Actions
All code checks mentioned above are automatically run by GitHub Actions when a pull request is created.
To run the actions locally, install act and run
act -P ubuntu-latest=shivammathur/node:focal pull_request
Use act -P ubuntu-latest=shivammathur/node:focal pull_request --list to see
individual workflow jobs that can be run, e.g.
act -P ubuntu-latest=shivammathur/node:focal pull_request --job phpcsfixer
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
itk-dev/azure-ad-delta-sync 适用场景与选型建议
itk-dev/azure-ad-delta-sync 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.11k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 itk-dev/azure-ad-delta-sync 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 itk-dev/azure-ad-delta-sync 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-17