Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8a391ec
Use Group.Create instead of Group.ReadWrite.All for group creation
marrobi Nov 25, 2025
481daf8
Deployment works, permetations need testing, and docs updating.
marrobi Nov 26, 2025
6904b72
Update scripts and docs.
marrobi Nov 26, 2025
c755f30
Remove need for Directory.Read.All
marrobi Nov 26, 2025
9fd75cf
Rotating secret
marrobi Nov 26, 2025
6114d09
Merge branch 'main' of https://github.com/microsoft/AzureTRE into mar…
marrobi Nov 26, 2025
e7479bd
Merge branch 'main' into marrobi/issue2247
marrobi Nov 27, 2025
1b9c090
Update docs/tre-admins/auth.md
marrobi Nov 27, 2025
ccf5aee
Update docs/tre-admins/identities/application_admin.md
marrobi Nov 27, 2025
f93845e
Update docs/tre-admins/environment-variables.md
marrobi Nov 27, 2025
b79940f
Update docs/tre-admins/identities/application_admin.md
marrobi Nov 27, 2025
173ebd1
Update templates/workspaces/base/terraform/aad/aad.tf
marrobi Nov 27, 2025
430453a
Update PR review comments.
marrobi Nov 27, 2025
994d1f9
Update after linting feedback.
marrobi Nov 27, 2025
a86b286
Remove unused auth variables.
marrobi Nov 27, 2025
b78145f
fix linting
marrobi Nov 27, 2025
24dfd97
Update e2e tests
marrobi Nov 27, 2025
c79a9e0
Update CHANGELOG.md
marrobi Nov 27, 2025
d703251
Update docs/tre-templates/workspaces/base.md
marrobi Nov 27, 2025
da6a64f
Remove debreciated parameter.
marrobi Nov 27, 2025
6be936d
Merge branch 'marrobi/issue2247' of https://github.com/marrobi/AzureT…
marrobi Nov 27, 2025
e0c4bb8
simplify import
marrobi Nov 27, 2025
f883ce1
Remove more unused vars
marrobi Nov 27, 2025
3a9d8d8
fix spelling
marrobi Nov 27, 2025
83c0f4a
Update e2e tests given roles arent preconfigured in app reg.
marrobi Nov 28, 2025
e45ef5b
fix linting
marrobi Nov 28, 2025
bcddf1c
fix lint
marrobi Nov 28, 2025
cb9d51d
Fix linting
marrobi Nov 28, 2025
b6c60d1
Remove TEST_WORKSAPCE_ID from tests
marrobi Nov 28, 2025
1e4acdb
Add retry loop when getting workspace role IDs
marrobi Nov 28, 2025
d4ab72d
format
marrobi Nov 28, 2025
e0de499
Merge branch 'main' into marrobi/issue2247
marrobi Jan 8, 2026
c56c3ab
Udate to 2.2.27-3ubuntu2.5
marrobi Jan 8, 2026
ef60660
Merge branch 'main' into marrobi/issue2247
marrobi Jan 13, 2026
2081e43
Merge branch 'main' into marrobi/issue2247
marrobi Jan 14, 2026
a3a260b
Fix review comments
marrobi Jan 14, 2026
2e3499e
Merge branch 'marrobi/issue2247' of https://github.com/marrobi/AzureT…
marrobi Jan 14, 2026
7cf46b6
additiona e2e test fixes.
marrobi Jan 14, 2026
d41bd73
Remove passowrd rotation
marrobi Jan 14, 2026
596a707
remvoe wait_for
marrobi Jan 14, 2026
4442d7b
Attempt fix e2e tests
marrobi Jan 14, 2026
b75ce2f
Merge branch 'main' into marrobi/issue2247
marrobi Jan 20, 2026
47d6ca8
Merge branch 'main' into marrobi/issue2247
marrobi Jan 21, 2026
0895032
Add functions to manage token retrieval and role propagation checks
marrobi Jan 22, 2026
3ac17c1
Fix linting
marrobi Jan 22, 2026
066f79e
fix linting
marrobi Jan 22, 2026
4e897f2
stop linting remote modules
marrobi Jan 22, 2026
43e1600
Merge branch 'main' into marrobi/issue2247
marrobi Jan 22, 2026
cee5e3a
fix tflint rules
marrobi Jan 22, 2026
26e1f24
Modify tflint rules
marrobi Jan 22, 2026
31dcb0f
Fix role assignment for service principals in group membership
marrobi Jan 22, 2026
2aacf0e
up version
marrobi Jan 22, 2026
1fb42ea
Raise error on failed group membership assignment
marrobi Jan 22, 2026
be1b46c
Update add to group
marrobi Jan 23, 2026
a2eca08
Restore backwards compatibility.
marrobi Jan 23, 2026
09e476d
Revert some changes and highlight deprecation.
marrobi Jan 23, 2026
0f98f05
Fix role assignemnt logic
marrobi Jan 23, 2026
aa72c7a
fix test
marrobi Jan 23, 2026
49518a5
Use Application Admin for E2E direct role assignment
marrobi Jan 23, 2026
55dbb8b
Use Application Admin for E2E direct role assignment
marrobi Jan 23, 2026
b0e8c2d
Merge branch 'marrobi/issue2247' of https://github.com/marrobi/AzureT…
marrobi Jan 23, 2026
d5028fc
Pass APPLICATION_ADMIN credentials to E2E tests in CI
marrobi Jan 23, 2026
5b371c5
Switch to direct assingment
marrobi Jan 23, 2026
3687a5f
Add dependency on ampls_log_anaytics for azure_monitor_private_endpoint
marrobi Jan 26, 2026
1cac0eb
Merge branch 'main' into marrobi/issue2247
marrobi Jan 26, 2026
d6d4288
Update e2e helpers to verify token roles.
marrobi Jan 26, 2026
4dc7347
Merge branch 'marrobi/issue2247' of https://github.com/marrobi/AzureT…
marrobi Jan 26, 2026
6769d1a
blank line
marrobi Jan 26, 2026
57872b5
Merge remote-tracking branch 'upstream/main' into marrobi/issue2247
marrobi Mar 10, 2026
39e7f98
Refactor AAD authentication service to improve UUID validation and er…
marrobi Mar 10, 2026
73497dd
Enhance Azure AD application configuration to support existing identi…
marrobi Mar 10, 2026
985dea6
Fix bugs
marrobi Mar 10, 2026
445ef95
Add additonal imports.
marrobi Mar 11, 2026
c5e2bc7
Revert tf lint
marrobi Mar 11, 2026
ec8d3a9
fix linting
marrobi Mar 11, 2026
25e3789
Remove auth_type from base workspace template schema
marrobi Mar 12, 2026
daacec7
Fix testing issues
marrobi Mar 31, 2026
d2cd89e
add resilience for existing app reg
marrobi Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api_app/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.25.4"
__version__ = "0.25.5"
Comment thread
marrobi marked this conversation as resolved.
Outdated
5 changes: 1 addition & 4 deletions api_app/api/routes/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
get_current_workspace_owner_or_researcher_user_or_airlock_manager, \
get_current_workspace_owner_or_airlock_manager, \
get_current_workspace_owner_or_researcher_user_or_airlock_manager_or_tre_admin
from services.authentication import extract_auth_information
from services.azure_resource_status import get_azure_resource_status
from azure.cosmos.exceptions import CosmosAccessConditionFailedError
from .resource_helpers import cascaded_update_resource, delete_validation, enrich_resource_with_available_upgrades, get_identity_role_assignments, save_and_deploy_resource, construct_location_header, send_uninstall_message, \
Expand Down Expand Up @@ -99,9 +98,7 @@ async def retrieve_workspace_scope_id_by_workspace_id(workspace=Depends(get_work
@workspaces_core_router.post("/workspaces", status_code=status.HTTP_202_ACCEPTED, response_model=OperationInResponse, name=strings.API_CREATE_WORKSPACE, dependencies=[Depends(get_current_admin_user)])
async def create_workspace(workspace_create: WorkspaceInCreate, response: Response, user=Depends(get_current_admin_user), workspace_repo=Depends(get_repository(WorkspaceRepository)), resource_template_repo=Depends(get_repository(ResourceTemplateRepository)), operations_repo=Depends(get_repository(OperationRepository)), resource_history_repo=Depends(get_repository(ResourceHistoryRepository))) -> OperationInResponse:
try:
# TODO: This requires Directory.ReadAll ( Application.Read.All ) to be enabled in the Azure AD application to enable a users workspaces to be listed. This should be made optional.
auth_info = extract_auth_information(workspace_create.properties)
workspace, resource_template = await workspace_repo.create_workspace_item(workspace_create, auth_info, user.id, user.roles)
workspace, resource_template = await workspace_repo.create_workspace_item(workspace_create, user.id, user.roles)
except (ValidationError, ValueError) as e:
logger.exception("Failed to create workspace model instance")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e))
Expand Down
3 changes: 1 addition & 2 deletions api_app/db/repositories/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def is_workspace_storage_account_available(self, workspace_id: str) -> boo
)
return availability_result.name_available

async def create_workspace_item(self, workspace_input: WorkspaceInCreate, auth_info: dict, workspace_owner_object_id: str, user_roles: List[str]) -> Tuple[Workspace, ResourceTemplate]:
async def create_workspace_item(self, workspace_input: WorkspaceInCreate, workspace_owner_object_id: str, user_roles: List[str]) -> Tuple[Workspace, ResourceTemplate]:

full_workspace_id = str(uuid.uuid4())

Expand All @@ -114,7 +114,6 @@ async def create_workspace_item(self, workspace_input: WorkspaceInCreate, auth_i
**address_spaces_param,
**auto_app_registration_param,
**workspace_owner_param,
**auth_info,
**self.get_workspace_spec_params(full_workspace_id)}

workspace = Workspace(
Expand Down
36 changes: 0 additions & 36 deletions api_app/services/aad_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,25 +480,6 @@ def _get_batch_users_by_role_assignments_body(self, roles_graph_data):

return request_body

# This method is called when you create a workspace and you already have an AAD App Registration
# to link it to. You pass in the client_id and go and get the extra information you need from AAD
# If the auth_type is `Automatic`, then these values will be written by Terraform.
def _get_app_auth_info(self, client_id: str) -> dict:
graph_data = self._get_app_sp_graph_data(client_id)
if 'value' not in graph_data or len(graph_data['value']) == 0:
logger.debug(graph_data)
raise AuthConfigValidationError(f"{strings.ACCESS_UNABLE_TO_GET_INFO_FOR_APP} {client_id}")

app_info = graph_data['value'][0]
authInfo = {'sp_id': app_info['id'], 'scope_id': app_info['servicePrincipalNames'][0]}

# Convert the roles into ids (We could have more roles defined in the app than we need.)
for appRole in app_info['appRoles']:
if appRole['value'] in self.WORKSPACE_ROLES_DICT.keys():
authInfo[self.WORKSPACE_ROLES_DICT[appRole['value']]] = appRole['id']

return authInfo

def _ms_graph_query(self, url: str, http_method: str, json=None) -> dict:
msgraph_token = self._get_msgraph_token()
auth_headers = self._get_auth_header(msgraph_token)
Expand Down Expand Up @@ -550,23 +531,6 @@ def _get_identity_type(self, id: str) -> str:

return object_info["@odata.type"]

def extract_workspace_auth_information(self, data: dict) -> dict:
if ("auth_type" not in data) or (data["auth_type"] != "Automatic" and "client_id" not in data):
raise AuthConfigValidationError(strings.ACCESS_PLEASE_SUPPLY_CLIENT_ID)

auth_info = {}
# The user may want us to create the AAD workspace app and therefore they
# don't know the client_id yet.
if data["auth_type"] != "Automatic":
auth_info = self._get_app_auth_info(data["client_id"])

# Check we've get all our required roles
for role in self.WORKSPACE_ROLES_DICT.items():
if role[1] not in auth_info:
raise AuthConfigValidationError(f"{strings.ACCESS_APP_IS_MISSING_ROLE} {role[0]}")

return auth_info

def get_identity_role_assignments(self, user_id: str) -> List[RoleAssignment]:
identity_type = self._get_identity_type(user_id)
if identity_type == "#microsoft.graph.user":
Expand Down
4 changes: 0 additions & 4 deletions api_app/services/access_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ class UserRoleAssignmentError(Exception):


class AccessService(OAuth2AuthorizationCodeBearer):
@abstractmethod
def extract_workspace_auth_information(self, data: dict) -> dict:
pass

@abstractmethod
def get_identity_role_assignments(self, user_id: str) -> dict:
pass
Expand Down
8 changes: 0 additions & 8 deletions api_app/services/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
from services.access_service import AccessService, AuthConfigValidationError


def extract_auth_information(workspace_creation_properties: dict) -> dict:
access_service = get_access_service('AAD')
try:
return access_service.extract_workspace_auth_information(workspace_creation_properties)
except AuthConfigValidationError as e:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e))


def get_access_service(provider: str = AuthProvider.AAD) -> AccessService:
if provider == AuthProvider.AAD:
return AzureADAuthorization()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
OPERATION_ID = '11111111-7265-4b5f-9eae-a1a62928772f'


def sample_workspace(workspace_id=WORKSPACE_ID, auth_info: dict = {}) -> Workspace:
def sample_workspace(workspace_id=WORKSPACE_ID) -> Workspace:
workspace = Workspace(
id=workspace_id,
templateName="tre-workspace-base",
Expand All @@ -39,8 +39,7 @@ def sample_workspace(workspace_id=WORKSPACE_ID, auth_info: dict = {}) -> Workspa
updatedWhen=FAKE_CREATE_TIMESTAMP,
user=create_admin_user()
)
if auth_info:
workspace.properties = {**auth_info}

return workspace


Expand Down
16 changes: 6 additions & 10 deletions api_app/tests_ma/test_api/test_routes/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ async def test_get_workspace_history_returns_empty_list_when_no_history(self, ac
@patch("api.routes.resource_helpers.send_resource_request_message", return_value=sample_resource_operation(resource_id=WORKSPACE_ID, operation_id=OPERATION_ID))
@patch("api.routes.workspaces.WorkspaceRepository.save_item")
@patch("api.routes.workspaces.WorkspaceRepository.create_workspace_item")
@patch("api.routes.workspaces.extract_auth_information")
async def test_post_workspaces_creates_workspace(self, _, create_workspace_item, __, ___, resource_template_repo, app, client, workspace_input, basic_resource_template):
async def test_post_workspaces_creates_workspace(self, create_workspace_item, __, ___, resource_template_repo, app, client, workspace_input, basic_resource_template):
resource_template_repo.return_value = basic_resource_template
create_workspace_item.return_value = [sample_workspace(), basic_resource_template]
response = await client.post(app.url_path_for(strings.API_CREATE_WORKSPACE), json=workspace_input)
Expand All @@ -451,8 +450,7 @@ async def test_post_workspaces_creates_workspace(self, _, create_workspace_item,
@patch("api.routes.workspaces.WorkspaceRepository.save_item")
@patch("api.routes.workspaces.WorkspaceRepository.create_workspace_item")
@patch("api.routes.workspaces.WorkspaceRepository._validate_resource_parameters")
@patch("api.routes.workspaces.extract_auth_information")
async def test_post_workspaces_calls_db_and_service_bus(self, _, __, create_workspace_item, save_item_mock, send_resource_request_message_mock, resource_template_repo, app, client, workspace_input, basic_resource_template):
async def test_post_workspaces_calls_db_and_service_bus(self, __, create_workspace_item, save_item_mock, send_resource_request_message_mock, resource_template_repo, app, client, workspace_input, basic_resource_template):
resource_template_repo.return_value = basic_resource_template
create_workspace_item.return_value = [sample_workspace(), basic_resource_template]
await client.post(app.url_path_for(strings.API_CREATE_WORKSPACE), json=workspace_input)
Expand All @@ -466,8 +464,7 @@ async def test_post_workspaces_calls_db_and_service_bus(self, _, __, create_work
@patch("api.routes.workspaces.WorkspaceRepository.save_item")
@patch("api.routes.workspaces.WorkspaceRepository.create_workspace_item")
@patch("api.routes.workspaces.WorkspaceRepository._validate_resource_parameters")
@patch("api.routes.workspaces.extract_auth_information")
async def test_post_workspaces_returns_202_on_successful_create(self, _, __, create_workspace_item, ____, _____, resource_template_repo, app, client, workspace_input, basic_resource_template):
async def test_post_workspaces_returns_202_on_successful_create(self, __, create_workspace_item, ____, _____, resource_template_repo, app, client, workspace_input, basic_resource_template):
resource_template_repo.return_value = basic_resource_template
create_workspace_item.return_value = [sample_workspace(), basic_resource_template]
response = await client.post(app.url_path_for(strings.API_CREATE_WORKSPACE), json=workspace_input)
Expand All @@ -482,17 +479,16 @@ async def test_post_workspaces_returns_202_on_successful_create(self, _, __, cre
@patch("api.routes.workspaces.WorkspaceRepository.save_item")
@patch("api.routes.workspaces.WorkspaceRepository.create_workspace_item", return_value=[sample_workspace(), sample_resource_template()])
@patch("api.routes.workspaces.WorkspaceRepository._validate_resource_parameters")
@patch("api.routes.workspaces.extract_auth_information")
async def test_post_workspaces_returns_503_if_service_bus_call_fails(self, _, __, ___, ____, _____, delete_item_mock, resource_template_repo, app, client, workspace_input, basic_resource_template):
async def test_post_workspaces_returns_503_if_service_bus_call_fails(self, __, ___, ____, _____, delete_item_mock, resource_template_repo, app, client, workspace_input, basic_resource_template):
resource_template_repo.return_value = basic_resource_template
response = await client.post(app.url_path_for(strings.API_CREATE_WORKSPACE), json=workspace_input)

assert response.status_code == status.HTTP_503_SERVICE_UNAVAILABLE
delete_item_mock.assert_called_once_with(WORKSPACE_ID)

# [POST] /workspaces/
@patch("api.routes.workspaces.WorkspaceRepository.validate_input_against_template", side_effect=ValueError)
async def test_post_workspaces_returns_400_if_template_does_not_exist(self, _, app, client, workspace_input):
@patch("api.routes.workspaces.WorkspaceRepository.create_workspace_item", side_effect=ValueError)
async def test_post_workspaces_returns_400_if_template_does_not_exist(self, mock_create, app, client, workspace_input):
response = await client.post(app.url_path_for(strings.API_CREATE_WORKSPACE), json=workspace_input)
assert response.status_code == status.HTTP_400_BAD_REQUEST

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def test_create_workspace_item_creates_a_workspace_with_the_right_values(m
validate_input_mock.return_value = basic_resource_template
new_cidr_mock.return_value = "1.2.3.4/24"

workspace, _ = await workspace_repo.create_workspace_item(workspace_to_create, {}, "test_object_id", ["test_role"])
workspace, _ = await workspace_repo.create_workspace_item(workspace_to_create, "test_object_id", ["test_role"])

assert workspace.templateName == workspace_to_create.templateName
assert workspace.resourceType == ResourceType.Workspace
Expand Down Expand Up @@ -186,7 +186,7 @@ async def test_create_workspace_item_creates_a_workspace_with_custom_address_spa
mock_is_workspace_storage_account_available.return_value.return_value = False
validate_input_mock.return_value = basic_resource_template

workspace, _ = await workspace_repo.create_workspace_item(workspace_to_create, {}, "test_object_id", ["test_role"])
workspace, _ = await workspace_repo.create_workspace_item(workspace_to_create, "test_object_id", ["test_role"])

assert workspace.properties["address_space"] == workspace_to_create.properties["address_space"]

Expand All @@ -208,7 +208,7 @@ async def test_create_workspace_item_throws_exception_with_bad_custom_address_sp
validate_input_mock.return_value = basic_resource_template

with pytest.raises(InvalidInput):
await workspace_repo.create_workspace_item(workspace_to_create, {}, "test_object_id", ["test_role"])
await workspace_repo.create_workspace_item(workspace_to_create, "test_object_id", ["test_role"])


@pytest.mark.asyncio
Expand Down Expand Up @@ -273,7 +273,7 @@ async def test_create_workspace_item_raises_value_error_if_template_is_invalid(m
validate_input_mock.side_effect = ValueError

with pytest.raises(ValueError):
await workspace_repo.create_workspace_item(workspace_input, {}, "test_object_id", ["test_role"])
await workspace_repo.create_workspace_item(workspace_input, "test_object_id", ["test_role"])


def test_automatically_create_application_registration_returns_true(workspace_repo):
Expand Down
71 changes: 0 additions & 71 deletions api_app/tests_ma/test_services/test_aad_access_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ def user_with_role():
return User(id="user2", name="Test User 2", email="test2@example.com", roles=["WorkspaceOwner"])


def test_extract_workspace__raises_error_if_client_id_not_available():
access_service = AzureADAuthorization()
with pytest.raises(AuthConfigValidationError):
access_service.extract_workspace_auth_information(data={"auth_type": "Manual"})


@patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
@patch("services.aad_authentication.AzureADAuthorization._get_user_role_assignments")
@patch("services.aad_authentication.AzureADAuthorization._get_user_details")
Expand Down Expand Up @@ -306,71 +300,6 @@ def test_get_workspace_user_emails_by_role_assignment_with_groups_and_users_assi
assert "test_user4@email.com" in role_assignment_details["WorkspaceOwner"]


@patch(
"services.aad_authentication.AzureADAuthorization._get_app_auth_info",
return_value={"app_role_id_workspace_researcher": "1234"},
)
def test_extract_workspace__raises_error_if_owner_not_in_roles(get_app_auth_info_mock):
access_service = AzureADAuthorization()
with pytest.raises(AuthConfigValidationError):
access_service.extract_workspace_auth_information(data={"client_id": "1234"})


@patch(
"services.aad_authentication.AzureADAuthorization._get_app_auth_info",
return_value={"app_role_id_workspace_owner": "1234"},
)
def test_extract_workspace__raises_error_if_researcher_not_in_roles(
get_app_auth_info_mock,
):
access_service = AzureADAuthorization()
with pytest.raises(AuthConfigValidationError):
access_service.extract_workspace_auth_information(data={"client_id": "1234"})


@patch(
"services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data",
return_value={},
)
def test_extract_workspace__raises_error_if_graph_data_is_invalid(
get_app_sp_graph_data_mock,
):
access_service = AzureADAuthorization()
with pytest.raises(AuthConfigValidationError):
access_service.extract_workspace_auth_information(data={"client_id": "1234"})


@patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
def test_extract_workspace__returns_sp_id_and_roles(get_app_sp_graph_data_mock):
get_app_sp_graph_data_mock.return_value = {
"value": [
{
"id": "12345",
"appRoles": [
{"id": "1abc3", "value": "WorkspaceResearcher"},
{"id": "1abc4", "value": "WorkspaceOwner"},
{"id": "1abc5", "value": "AirlockManager"},
],
"servicePrincipalNames": ["api://tre_ws_1234"],
}
]
}
expected_auth_info = {
"sp_id": "12345",
"scope_id": "api://tre_ws_1234",
"app_role_id_workspace_owner": "1abc4",
"app_role_id_workspace_researcher": "1abc3",
"app_role_id_workspace_airlock_manager": "1abc5",
}

access_service = AzureADAuthorization()
actual_auth_info = access_service.extract_workspace_auth_information(
data={"auth_type": "Manual", "client_id": "1234"}
)

assert actual_auth_info == expected_auth_info


@pytest.mark.parametrize(
"user, workspace, expected_role",
[
Expand Down
4 changes: 2 additions & 2 deletions config.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ authentication:
# Setting AUTO_WORKSPACE_APP_REGISTRATION to false will:
# create an identity with `Application.ReadWrite.OwnedBy`.
# Setting AUTO_WORKSPACE_APP_REGISTRATION to true will:
# create an identity with `Application.ReadWrite.All` and `Directory.Read.All`.
# create an identity with `Application.ReadWrite.All`.
# When this is true, create Workspaces will also create an AAD Application automatically.
# When this is false, the AAD Application will need creating manually.
auto_workspace_app_registration: true
# Setting AUTO_WORKSPACE_GROUP_CREATION to true will create an identity with `Group.Create`
# Setting AUTO_WORKSPACE_GROUP_CREATION to true will create an identity with `Group.Create`, `Group.Read.All` and `User.ReadBasic.All` permissions.
Comment thread
marrobi marked this conversation as resolved.
auto_workspace_group_creation: false
# Setting this to true will remove the need for users to manually grant consent when creating new workspaces.
# The identity will be granted Application.ReadWrite.All and DelegatedPermissionGrant.ReadWrite.All permissions.
Expand Down
5 changes: 0 additions & 5 deletions config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@
"description": "Workspace AD Application. This will be created for you for future use - when creating workspaces.",
"type": "string",
"pattern": "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$"
},
"workspace_api_client_secret": {
"description": "Workspace AD Application secret. This will be created for you for future use - when creating workspaces.",
"type": "string",
"minLength": 11
}
},
"required": [
Expand Down
1 change: 0 additions & 1 deletion core/terraform/outputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fi
# Add a few extra values to the file to help us (i.e. for local debugging api_app and resource processor)
# shellcheck disable=SC2129
echo "TEST_WORKSPACE_APP_ID='${WORKSPACE_API_CLIENT_ID}'" >> ../private.env
echo "TEST_WORKSPACE_APP_SECRET='${WORKSPACE_API_CLIENT_SECRET}'" >> ../private.env

# These next ones from Check Dependencies
echo "SUBSCRIPTION_ID='${SUB_ID}'" >> ../private.env
Expand Down
Loading
Loading