-
Notifications
You must be signed in to change notification settings - Fork 148
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
Expired API secret - Causes failure on api/workspaces #4110
Comments
@JaimieWi can you read #3998 (comment) and below, and see if that helps? I've seen an issue before where the core infra needs updating twice - pipeline running that includes |
@JaimieWi to answer your question, looks like default expiry is 1 year https://learn.microsoft.com/en-us/cli/azure/ad/sp/credential?view=azure-cli-latest#az-ad-sp-credential-reset |
Hi @marrobi Thank you for your quick response! I then re ran the DEV pipeline and it worked straight away. I have followed the same steps for PROD and still see the error like below
This was still manually running the credential reset command, so I will look into trying I can see now that the maximum for a secret is also 2 years. We will put something in place to make sure |
@JaimieWi have you run the dev pipeline twice? The secret it is complaining about is the
|
@marrobi I did run the DEV pipeline twice, that one is now successful. I changed the secrets in PROD and have rerun it twice, no change. The error is still present for our TRE Users.
|
Hi @marrobi Steps completed:
Still see the error. The web app is not using the correct value. It shows the ID of the original secret, has not updated to use a later one. How do I force the web app to recognise the new secret? |
It seems to be related to this - hashicorp/terraform-provider-azurerm#3129 and hashicorp/terraform-provider-azurerm#8745 - the issue has been closed, but not sure it is properly resolved. |
Hmm, we are using:
We should try changing to this format:
|
That has worked! Thank you @marrobi ! Just to reiterate, steps to update Entra secrets:
This can now be closed, but would be great if this could be an automated process (as you mentioned above). |
Great. I've added this to the engineering board so will leave this issue open, along with #2463 until we make the change to how to reference the secrets. |
Describe the bug
All our TRE Users are unable to access the TRE home page where APi call /api/workspaces is called. They are faced with a 500 error
The user is able to access their workspace, but cannot access the TRE home page.
Initially, this presented as an expired password in application insights. Log portion below:
In Entra, the "sp-aztre-cicd" service principal secret had expired (not the main API app reg). This was updated and added to AZURE_CREDENTIALS. Rerunning the pipeline got past the initial step that was failing. We now saw an error related to the TEST_ACCOUNT_CIENT_ID when registering bundles. Why would this secret expire?
Now troubleshooting in our DEV environment
Troubleshooting steps tried:
az ad sp credential reset --id "<ID>" --query 'password' --output tsv --only-show-errors
and updating test_account_client_secret in GitHub secrets. (In DEV where error had not occurred, but no new errors raised when updating secret)This TRE was deployed on 18th October 2023, the first failure happened on 18th October 2024. The secrets do not have an expiry in KeyVault, was a limit set on creation?
Steps to reproduce
Azure TRE release version (e.g. v0.14.0 or main):
v0.19.1
Deployed Azure TRE components - click the (i) in the UI:
UI Version: 0.5.28
API Version: 0.18.11
The text was updated successfully, but these errors were encountered: