Sync a set of group and group memberships between Entra ID and lakeFS Cloud
pip install -r requirements.txt
- Follow step #1 ("Register your application") of this guide
- When setting up permissions, make sure to grant the application the
Group.Read.All
permission and grant admin consent. - Ensure your lakeFS user is part of the
Admins
group OR has theAuthFullAccess
policy attached, OR is granted the following permissions:auth:ReadGroup
auth:CreateGroup
auth:AttachPolicy
- Set the following environment variables using:
ENTRA_TENANT_ID
- taken from the app registration page: "Directory (tenant) ID"ENTRA_APPLICATION_ID
- taken from the app registration page: "Application (client) ID"ENTRA_CLIENT_SECRET_VALUE
- taken from the Certificate & secrets -> Client Secrets, as created in step #1LAKEFS_ACCESS_KEY_ID
- your lakeFS access key IDLAKEFS_SECRET_ACCESS_KEY
- your lakeFS secret access keyLAKEFS_ENDPOINT
- Your lakeFS endpoint, e.g.https://<ORGANIZATION_ID>.<REGION>.lakefscloud.io
- Optionally, also set the following environment variables:
GROUP_FILTER
- a fnmatch filter. Only matching group names will be synced (e.g.LakeFSProject*
)LAKEFS_DEFAULT_POLICIES
- a comma-seperated list of policies to automatically attach to provisioned groups (e.g.AuthManageOwnCredentials,FSReadAll
)DRY_RUN
(true,false - default is false) - if set totrue
, will only print out the intended operations without executing the API calls
For convenience, you can use dotenv to configure these environment variables in a .env
file.
python sync.py