✅ Problems with authentication after deployments
Conversation starts here:
https://discord.com/channels/143867839282020352/156079822454390784/1195075081592913950
4 Replies
Henkypenky
anyone knows when after deploying we get this bug that we need to clear cookies
Authorization failed. These requirements were not met:
2024-01-11T18:40:00.424560843Z: [INFO] DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
2024-01-11T18:41:14.353252516Z: [INFO] Request finished HTTP/1.1 GET https://foo/StatusCode/401 - 302 0 - 0.0881ms
Quoted by
<@246732334282440704> from #web (click here)
React with ❌ to remove this embed.
already implemented DataProtection with azure blob storage and azure key vault
i see the keys.xml is generated fine
but i still get those errors
these are the auth settings for the app
This change happened when we transitioned from azure app service (windows) to azure app service (linux)
azure app service windows runs on IIS
and it persists using
If the app is hosted in IIS, keys are persisted to the HKLM registry in a special registry key that's ACLed only to the worker process account. Keys are encrypted at rest using DPAPI.
so it was automatically managed
we were getting this warnings:
which were fixed by implementing DataProtection using Azure Blobs and Azure Key Vault
we haven't gotten those warnings so far
but we still get the 401 (302 redirections)
after deployment
we have to clear cookies and it works just fine
the docs state:
so we did this
also:
so we are good on this part
i can see the xml being generated on the blob
and no errors thrown on the wrap unwrap of the key
but still the issue remains
an expected behaviour i tried was to delete the keys.xml and restart the app, and this obviously generated the same problem without deployment
but if it works this way, why doesn't it work after a deployment?
this is another issue:
and this
also this:
if anyone needs more info please tag me
i'm at the end of the rope here, i have no idea what it can be
one more thing, roles are managed in the app in azure
so claims are in each users identity but i don't think the issue is