Why does backoffice log out after ~1 minute?
t

TackleMcClean 🏅

about 1 year ago
We have suffered from this issue before when setting up a new project on Azure. Old thread: https://discord.com/channels/869656431308189746/1183873525031911554 Now, we are seeing this issue on local development on localhost:8080 on a project where we're upgrading from Umbraco 10 to 13. After logging into the CMS, there is about a 40-60 second wait. Then there is a call to
/umbraco/backoffice/umbracoapi/authentication/GetRemainingTimeoutSeconds
that returns:
)]}',
0.0
Upon which the user is logged out showing message "Session timed out." We have tried using incognito mode to rule out cookies, as well as completely fresh browser profile in Chrome. Are we missing something completely basic for this problem to occur? appsetting Umbraco.CMS.Global.TimeOut is set to
08:00:00
. 8 hours is more than 1 minute. We have not supplied any other setting that should affect this. In our previous 'fresh' project the settings were also default. Umbraco.CMS.Security.KeepUserLoggedIn is not set to
true
thus it should be interpreted as the default
false
. > When set to false a user will be logged out after a specific amount of time has passed with no activity. You can specify this time span in the global settings with the TimeOut key. This is exactly what we've done. Umbraco.CMS.Security.AllowConcurrentLogins is showing a bit of a strange behavior. We don't have this defined at all. But setting it to true, and then restarting Umbraco, and then simply reloading the browser window of the recently auto-logged out user in a fresh browser profile will automatically log them in and show the backoffice. Logging out above mentioned user and then logging in seems to work fine as well.
GetRemainingTimeoutSeconds
returns the full 8 hours. However, logging out, setting
AllowConcurrentLogins
to false again and then logging back in, the problem reappears. In our tests, this is the only browser window using the site. Why are we seeing this problem?
uSync Migrations - custom Nested Content migration
r

Rich G

about 1 year ago
Hey, Appreciate the fantastic uSync migrations project I've inherited a v8 project that has a custom implementation of a Nested Content datatype. From what I can tell there's not much difference to the original Nested Content datatype, but I don't know the history of the project. I've recreated the DocType with a standard Nested Content DataType so I can see how the data is different in preparation to use uSync migrations. The data structure is the same it seems, but new lines are handled differently. Custom Nested Content
<layout>
      <Value><![CDATA[[
  {
    "key": "f0a8df2b-f1f4-4a80-9c16-2b70a52216ae",
    "name": "Standard",
    "ncContentTypeAlias": "standard",
    "pageHeader": [
      {
        "key": "d7774230-5a6c-4415-b0e0-88193b4a379f",
        "name": "Hero",
        "ncContentTypeAlias": "hero",
        "title": "Hero Title Custom Nested Content",
        "subTitle": "Hero subTitle Custom Nested Content",
        "component": []
      }
    ],
    "display": [
      {
        "key": "c172bc9a-14e8-4a78-8567-7a4375bdf469",
        "name": "Html",
        "ncContentTypeAlias": "html",
        "text": "<p>Custom display</p>"
      }
    ]
  }
]]]></Value>
    </layout>
Standard Nested Content
<layout13>
      <Value><![CDATA[[
  {
    "key": "d2327547-8933-4803-ac84-a9c769326c60",
    "name": "Standard",
    "ncContentTypeAlias": "standard",
    "pageHeader": "[\r\n  {\r\n    \"key\": \"21275e98-78c6-4563-933f-4389bfeef470\",\r\n    \"name\": \"Hero\",\r\n    \"ncContentTypeAlias\": \"hero\",\r\n    \"title\": \"Hero Title Standard Nested Content\",\r\n    \"subTitle\": \"Hero subTitle Standard Nested Content\",\r\n    \"component\": []\r\n  }\r\n]",
    "display": "[\r\n  {\r\n    \"key\": \"e073dbe0-9d90-40e7-be69-a4a0141fe236\",\r\n    \"name\": \"Html\",\r\n    \"ncContentTypeAlias\": \"html\",\r\n    \"text\": \"<p>Standard display</p>\"\r\n  }\r\n]"
  }
]]]></Value>
    </layout13>
tbc.
Umbraco hosted in Azure is showing a lot of Cryptographic warnings in the log
c

CarlCod_es

about 1 year ago
We've got Umbraco hosted in Azure, in a load-balanced environment with deployment slots. We're seeing a lot of warnings in the logs. Umbraco Version 13.0.1 W : Error unprotecting the session cookie. Stack Trace : System.Security.Cryptography.CryptographicException: The key {078a31d2-3d8c-4b43-baeb-a639524b05c5} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Session.CookieProtection.Unprotect(IDataProtector protector, String protectedText, ILogger logger) We also see a rare instance of an error, but this seems much less frequent Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. Stacktrace : System.Security.Cryptography.CryptographicException: The key {84cea658-5bcd-439a-b175-d1c4bb7956f7} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext) Anyone seen this issue, or similar?