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

False MSAL warning #1252

Closed
tsundvoll opened this issue Dec 12, 2023 · 3 comments
Closed

False MSAL warning #1252

tsundvoll opened this issue Dec 12, 2023 · 3 comments
Assignees
Labels
improvement Improvement to existing functionality

Comments

@tsundvoll
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Start broker with docker compose up broker
  2. Run backend with dotnet run --project api
  3. Start frontend with npm start
  4. Observe the logs
2023-12-12 09:16:00 - warn: Microsoft.Identity.Web.TokenAcquisition[0]
      => SpanId:b61c0b92ea8e183b, TraceId:e1c3834f3d1bf9c0e0d063372bfc1a37, ParentId:0000000000000000 => ConnectionId:0HMVQT9NF3RTT => RequestPath:/echo/plants RequestId:0HMVQT9NF3RTT:00000037 => Api.Controllers.EchoController.GetEchoPlantInfos (api)
      False MSAL 4.57.0.0 MSAL.NetCore .NET 8.0.0 Ubuntu 20.04.6 LTS [2023-12-12 08:16:00Z] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization

2023-12-12 09:16:01 - warn: Microsoft.Identity.Web.TokenAcquisition[0]
      => SpanId:80665597bfc4eb5c, TraceId:60290276817c8332e6954c63318cec53, ParentId:0000000000000000 => ConnectionId:0HMVQT9NF3RTT => RequestPath:/echo/plants RequestId:0HMVQT9NF3RTT:0000003F => Api.Controllers.EchoController.GetEchoPlantInfos (api)
      False MSAL 4.57.0.0 MSAL.NetCore .NET 8.0.0 Ubuntu 20.04.6 LTS [2023-12-12 08:16:01Z] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization

Expected behavior
Expected no warnings

Screenshots
If applicable, add screenshots to help explain your problem.

@tsundvoll tsundvoll added the bug Something isn't working label Dec 12, 2023
@UsamaEquinorAFK
Copy link
Contributor

Cant recreate this in windows. Although I get this warning. Warning: File mosquitto/config/passwd_file has world readable permissions. Future versions will refuse to load this file.

@sondreo sondreo self-assigned this Mar 21, 2024
@sondreo
Copy link
Contributor

sondreo commented Mar 22, 2024

The warning, which originates from MSAL for dotnet, suggests to leverage a distributed token cache.

For reference, a distributed token cache scheme may be implemented, for instance by setting up a Redis cache in Docker. A distributed cache will persist, and a cached token will not be lost on server restart.

This warning should be considered developer feedback, and is a recommendation for web apps, and not necessarily a bug or error, as discussed in the MSAL for .NET-repo. For now, the warning may be left as-is.

As a future improvement, we should consider implementing a distributed L2 cache for Flotilla.

@sondreo sondreo added improvement Improvement to existing functionality and removed bug Something isn't working labels Mar 22, 2024
@aeshub
Copy link
Contributor

aeshub commented May 23, 2024

This issue has automatically been marked as stale as there has been no activity for 60 days.

@aeshub aeshub added the stale This issue or pull request already exists label May 23, 2024
@Christdej Christdej removed the stale This issue or pull request already exists label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants