nextcloud / user_saml

:lock: App for authenticating Nextcloud users using SAML https://apps.nextcloud.com/apps/user_saml
https://portal.nextcloud.com/article/configuring-single-sign-on-10.html
GNU Affero General Public License v3.0
96 stars 75 forks source link

Invalid SP metadata: invalid_xml after upgrading from nextcloud 28.09 to 29.08 #902

Open jsalatiel opened 2 weeks ago

jsalatiel commented 2 weeks ago

After upgrade nextcloud, the app stopped working. I started getting invalid redirect URI on keycloak. After trying to regenerate a new metadata inside the https://mydomain/index.php/settings/admin/saml I get internal server error. The logs show:


{
  "reqId": "eV7qITLbbustQPj6TXFc",
  "level": 3,
  "time": "2024-11-05T21:48:48+00:00",
  "remoteAddr": "192.168.254.129",
  "user": "myuser",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/user_saml/saml/metadata?idp=1",
  "message": "Invalid SP metadata: invalid_xml",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0",
  "version": "29.0.8.1",
  "exception": {
    "Exception": "OneLogin\\Saml2\\Error",
    "Message": "Invalid SP metadata: invalid_xml",
    "Code": 3,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 232,
        "function": "getMetadata",
        "class": "OCA\\User_SAML\\Controller\\SAMLController",
        "type": "->",
        "args": [
          1
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 138,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\User_SAML\\Controller\\SAMLController"
          ],
          "getMetadata"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\User_SAML\\Controller\\SAMLController"
          ],
          "getMetadata"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 331,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\User_SAML\\Controller\\SAMLController",
          "getMetadata",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "user_saml.saml.getmetadata"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1058,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/user_saml/saml/metadata"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 49,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/custom_apps/user_saml/lib/Controller/SAMLController.php",
    "Line": 285,
    "message": "Invalid SP metadata: invalid_xml",
    "exception": {},
    "CustomMessage": "Invalid SP metadata: invalid_xml"
  }
}