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

Fix EntraApplication resource issues #1975

Conversation

jemrobinson
Copy link
Member

@jemrobinson jemrobinson commented Jun 28, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).

🚦 Depends on

⤴️ Summary

  • Application operations were caching the authentication token which was getting stale. This caused resource operations to fail
  • Switch to using an updated token (and not storing it in the props)
  • Overwrite an existing secret if it exists
  • Some logging fixes to help with debugging

🌂 Related issues

Closes #1814
Closes #1903

🔬 Tests

Deployed a new SRE

@jemrobinson jemrobinson requested a review from a team as a code owner June 28, 2024 13:52
… than a prop. This means it will not be cached in the resource and consequently go stale.
@jemrobinson jemrobinson force-pushed the 1814-overwrite-application-secret branch from 72bef6e to 607c357 Compare June 28, 2024 13:57
Copy link

github-actions bot commented Jun 28, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/external/api
  graph_api.py 282-288, 309, 803, 810
  data_safe_haven/infrastructure
  project_manager.py 140, 232, 332, 351, 366, 380
  data_safe_haven/infrastructure/components/dynamic
  dsh_resource_provider.py
  entra_application.py 37-38, 44, 70, 126, 141
  file_share_file.py
  ssl_certificate.py
Project Total  

This report was generated by python-coverage-comment-action

@jemrobinson jemrobinson requested a review from a team June 28, 2024 14:00
Copy link
Member

@JimMadge JimMadge left a comment

Choose a reason for hiding this comment

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

LGTM

@jemrobinson jemrobinson merged commit 75fc1a0 into alan-turing-institute:develop Jun 28, 2024
11 checks passed
@jemrobinson jemrobinson deleted the 1814-overwrite-application-secret branch January 30, 2025 11:46
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.

Remove Entra groups and applications during SRE teardown Error when application secret already exists
2 participants