generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add entraid SCIM function #6
Merged
Merged
Conversation
This file contains 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
…els for some of the outputs.
Gary-H9
approved these changes
Sep 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was referenced Sep 9, 2024
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.
Tracking stories:
Description:
This PR merges the
feature/add-entra-id-scim-function
branch into the main branch. The branch introduces a Python script that automates the synchronsation of EntraID groups and their members with AWS Identity Center. This functionality ensures consistency between EntraID and AWS Identity Center, streamlining user and group management across these platforms.What it does:
azure-aws-sso-
by default).Tests Included:
Unit Tests:
function/tests/unit/
test_aws_functions.py
: Tests AWS-specific operations.test_azure_functions.py
: Tests EntraID-specific operations.test_member_syncing.py
: Tests the member sync logic.Integration Tests:
function/tests/integration/
test_sync_function_integration_test.py
: Verifies end-to-end sync between EntraID and AWS Identity Center.Instructions for Running Tests:
1. Install Prerequisites:
Ensure you have Python installed (version 3.6 or later is recommended).
To run the tests using the
unittest
framework, which is included with Python, you need to install the required dependencies listed inrequirements-dev.txt
. Run the following command to install them:This command will install all necessary libraries, including:
boto3
: AWS SDK for Python to interact with AWS services.requests
: To make HTTP requests to EntraID.requirements-dev.txt
file.2. Set Up Environment Variables:
Before running the script or tests, set up the required environment variables:
AZURE_TENANT_ID
: EntraID Tenant IDAZURE_CLIENT_ID
: EntraID Application (client) IDAZURE_CLIENT_SECRET
: EntraID Application SecretLOG_LEVEL
: (Optional) Logging level (default:INFO
)You can export these variables in your terminal:
3. Run Unit Tests:
Execute unit tests using Python's built-in
unittest
framework:This command will discover and run all unit tests located in the
tests/unit/
directory.4. Run Integration Tests:
Execute integration tests using
unittest
:This command will discover and run all integration tests located in the
tests/integration/
directory.5. Run All Tests:
To run both unit and integration tests, use the following commands:
This command will discover and run all integration tests located in the
tests/integration/
directory.Alternatively, to run all tests at once:
Additional Notes:
dry_run
is set toTrue
by default and if looking to apply changes, it needs to be set toFalse
explicitly.