Skip to content

Draft: Use Managed Identity for Getting Application Certificate in Container #6

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jacdavi
Copy link
Collaborator

@jacdavi jacdavi commented Mar 13, 2025

🗣 Description

Based on new features from Microsoft, this changes how we get the application's certificate inside the container.
With this change, we now use a User-Managed Identity to access key vault instead of passing the certificate as a secure environment variable.
This was previously unsupported when deploying in a vnet.

This also removes a configuration option for certificate expiration.
We no longer need to rotate frequently since the certificate remains in key vault, so the expiration is fixed at 1 year.

This also updates our terraform providers to the latest versions (needed for identities to work).

  • Requires adding subscription ID to provider
  • Some minor variable name changes
  • Requires updating storage references (IDs used to be URLs, but aren't anymore)

💭 Motivation and context

Previously we were passing the application certificate as a secure environment variable to the container.
This was not ideal, and had increased the risk of the certificate being leaked.
Since Microsoft has now added supported for using a Managed Identity inside an Azure Container Instance behind a vnet, this PR switches to using that for key vault access.

🧪 Testing

Tested in westus2 with and without a vnet and verified certificate installed in the container

Draft

This is currently a draft as we wait for Microsoft to fully roll out the update to all US commercial and GCC high regions

@jacdavi jacdavi self-assigned this Mar 13, 2025
@jacdavi
Copy link
Collaborator Author

jacdavi commented Mar 13, 2025

FYI @MichaelHicks-MSFT and @eagbaya

Everything should be good to go, though I'd like to test in GCC High and confirm Microsoft's update has rolled out to all regions before merging.

@jacdavi jacdavi added blocked This issue or pull request is awaiting the outcome of another issue or pull request improvement This issue or pull request will add new or improve existing functionality gearconnect Relates to GearConnect (m365) labels Mar 15, 2025
@jacdavi jacdavi marked this pull request as draft March 25, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request is awaiting the outcome of another issue or pull request gearconnect Relates to GearConnect (m365) improvement This issue or pull request will add new or improve existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant