Skip to content
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

[TOAZ-355] [TOAZ-356] Use Managed Identity auth when running Azure Control Plane, support for Service Catalog deployed Azure Managed Apps #1451

Merged
merged 16 commits into from
Jun 20, 2024

Conversation

aaronegrant
Copy link
Contributor

@aaronegrant aaronegrant commented Jun 4, 2024

Refactor SAM ARM authorization code to support using a Managed Identity app id instead of Service Principal clientid/clientsecret/tenantid if optional config 'AZURE_MANAGED_APP_WORKLOAD_CLIENT_ID' is set

Service Catalog deployed app support, enabled with 'AZURE_SERVICE_CATALOG_ENABLED' config

Sam maintains its own list of Terra managed app plans https://github.com/broadinstitute/sam/blob/develop/src/main/resources/sam.conf#L192 and validates a billing profile managed app against this list during billing profile creation.
Service catalog managed apps do not have a plan defined so we will need change the validation in Sam to accept this.

@dvoet dvoet force-pushed the grantaar-create-bee-workflow-test branch from 74029cf to 001523d Compare June 17, 2024 20:17
aaronegrant and others added 4 commits June 18, 2024 10:21
…t' into grantaar-create-bee-workflow-test

# Conflicts:
#	src/main/resources/sam.conf
#	src/main/scala/org/broadinstitute/dsde/workbench/sam/config/AppConfig.scala
#	src/main/scala/org/broadinstitute/dsde/workbench/sam/config/AzureServicesConfig.scala
#	src/test/scala/org/broadinstitute/dsde/workbench/sam/api/TestSamRoutes.scala
#	src/test/scala/org/broadinstitute/dsde/workbench/sam/service/UserServiceSpecs/CreateUserSpec.scala
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
19.0% Duplication on New Code

See analysis details on SonarCloud

@aaronegrant aaronegrant changed the title grantaar - testing create bee workflow with latest develop branch [TOAZ-355] [TOAZ-356] Use Managed Identity auth when running Azure Control Plane, support for Service Catalog deployed Azure Managed Apps Jun 18, 2024
@aaronegrant aaronegrant marked this pull request as ready for review June 18, 2024 20:21
@@ -228,31 +228,41 @@ class AzureService(
/** Resolves a managed resource group in Azure and returns the terra.billingProfileId tag value. This is used for access control checks during route handling.
*/
def getBillingProfileId(request: GetOrCreatePetManagedIdentityRequest, samRequestContext: SamRequestContext): IO[Option[BillingProfileId]] =
// get the billing profile id from the database
// if not there, for backwards compatibility, get the billing profile id from a tag on the Azure resource
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this backwards compatibility is no longer needed

@@ -139,26 +119,6 @@ class AzureRoutesSpec extends AnyFlatSpec with Matchers with ScalatestRouteTest
}
}

it should "successfully create a pet managed identity for a user using MRG Azure tag for backwards compatibility" in {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backwards compatibility removed

@aaronegrant aaronegrant merged commit e7d4ef8 into develop Jun 20, 2024
27 of 28 checks passed
@aaronegrant aaronegrant deleted the grantaar-create-bee-workflow-test branch June 20, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants