Hello, We updated our gdcn community edition insta...
# gooddata-cn
t
Hello, We updated our gdcn community edition instance from 2.2.1 to version 2.3.2 and with the same provisioned gdcn objects (user, user token, workspace, dashboard), render of the dashboard fails on some 404 error:
Copy code
{
  "detail": "The requested endpoint does not exist or you do not have permission to access it.",
  "status": 404,
  "title": "Not Found",
  "traceId": "4fd65bdfc2a7bdf2"
}
We use dashboard render via user provisioned token:
Copy code
script.innerText = `import { setContext } from "${serviceUrl}/components/${workspaceId}.js";
import factory, { TigerTokenAuthProvider } from "${serviceUrl}/components/tigerBackend.js";

setContext({
    backend: factory()
        .onHostname("${serviceUrl}")
        .withAuthentication(new TigerTokenAuthProvider("${userToken}")),
    workspaceId: "${workspaceId}"
});`;
Can you please tell where could be problem?
✔️ 1
here is excerpt of the workspaces/layout response:
Copy code
{
    "workspaceDataFilters": [
        {
            "columnName": "kbc_project_id",
            "id": "embed_telemetry",
            "title": "Filter by KBC project ID column",
            "workspace": {
                "id": "embed_telemetry",
                "type": "workspace"
            },
            "workspaceDataFilterSettings": [
                {
                    "filterValues": [
                        "90_kbc-testing-azure-east-us-2"
                    ],
                    "id": "90_kbc-testing-azure-east-us-2_filter",
                    "title": "90_kbc-testing-azure-east-us-2 filter",
                    "workspace": {
                        "id": "90_kbc-testing-azure-east-us-2",
                        "type": "workspace"
                    }
                }
            ]
        }
    ],
    "workspaces": [
        {
            "customApplicationSettings": [],
            "hierarchyPermissions": [],
            "id": "90_kbc-testing-azure-east-us-2",
            "model": {
                "analytics": {
                    "analyticalDashboardExtensions": [
                        {
                            "id": "27e00f24-e0ef-4f01-aed3-9e2049022af7",
                            "permissions": [
                                {
                                    "assignee": {
                                        "id": "3",
                                        "type": "user"
                                    },
                                    "name": "VIEW"
                                }
                            ]
                        }
                    ],
                    "analyticalDashboards": [],
                    "dashboardPlugins": [],
                    "filterContexts": [],
                    "metrics": [],
                    "visualizationObjects": []
                },
                "ldm": {
                    "datasets": [],
                    "dateInstances": []
                }
            },
            "name": "90_kbc-testing-azure-east-us-2 workspace",
            "parent": {
                "id": "embed_telemetry",
                "type": "workspace"
            },
            "permissions": [
                {
                    "assignee": {
                        "id": "3",
                        "type": "user"
                    },
                    "name": "VIEW"
                }
            ],
            "settings": []
        },
afaik workspace
90_kbc-testing-azure-east-us-2
should be set up properly with all the permissions.
b
Hi Tomas, the workspace permissions look okay, but you are trying to access analyticalDashboard (27e00f24-e0ef-4f01-aed309e2049022af7 from parent workspace embed_telemetry, which doesn't seem to exist. I believe the issue roots from the change of how the parent objects are now being referred to, which changed with 2.3 version of GD.CN. Please check https://www.gooddata.com/developers/cloud-native/doc/versions/object-id-change/
t
Hi Boris, I followed your suggestion and understand the change of the dashboardId, tried it with the new one (27e00f24-e0ef-4f01-aed3-9e2049022af7) and now it works. thank you!
b
Great, happy to hear!
t
now I am trying it under the
dev_latest
tag of gdcn ce and it fails.
Copy code
curl '<https://telemetry.east-us-2.azure.keboola-testing.com/api/v1/entities/workspaces/121_kbc-testing-azure-east-us-2/analyticalDashboards/27e00f24-e0ef-4f01-aed3-9e2049022af7?include=filterContexts%2CvisualizationObjects&metaInclude=accessInfo>' \
  -H 'accept: application/vnd.gooddata.api+json' \
  -H 'authorization: Bearer MzpnZGNucHJvdmlzaW9pbmluZzpzclMvd2JQb2RmbnNkZGlzYmEzTTZtTmhwbGpwWmhkYg==' \
  --compressed
{"detail":"The requested endpoint does not exist or you do not have permission to access it.","status":404,"title":"Not Found","traceId":"0e09d9cbbe473651"}%
however getting
<https://telemetry.east-us-2.azure.keboola-testing.com/api/v1/entities/workspaces/121_kbc-testing-azure-east-us-2/analyticalDashboards/27e00f24-e0ef-4f01-aed3-9e2049022af7>
under admin token returns success I also checked via
/api/v1/layout/workspaces
and the user 3 should have access according to it, see:
Copy code
"workspaceDataFilters": [
    {
        "columnName": "kbc_project_id",
        "id": "embed_telemetry",
        "title": "Filter for kbc_project_id column in workspace embed_telemetry",
        "workspace": {
            "id": "embed_telemetry",
            "type": "workspace"
        },
        "workspaceDataFilterSettings": [
            {
                "filterValues": [
                    "121_kbc-testing-azure-east-us-2"
                ],
                "id": "121_kbc-testing-azure-east-us-2_filter",
                "title": "121_kbc-testing-azure-east-us-2 filter setting for embed_telemetry filter",
                "workspace": {
                    "id": "121_kbc-testing-azure-east-us-2",
                    "type": "workspace"
                }
            }
        ]
    }
],
"workspaces": [
    {
        "customApplicationSettings": [],
        "hierarchyPermissions": [],
        "id": "121_kbc-testing-azure-east-us-2",
        "model": {
            "analytics": {
                "analyticalDashboardExtensions": [],
                "analyticalDashboards": [],
                "dashboardPlugins": [],
                "filterContexts": [],
                "metrics": [],
                "visualizationObjects": []
            },
            "ldm": {
                "datasets": [],
                "dateInstances": []
            }
        },
        "name": "121_kbc-testing-azure-east-us-2 workspace",
        "parent": {
            "id": "embed_telemetry",
            "type": "workspace"
        },
        "permissions": [
            {
                "assignee": {
                    "id": "3",
                    "type": "user"
                },
                "name": "VIEW"
            }
        ],
        "settings": [],
        "userDataFilters": []
    },
could it be problem that I am using the dev_latest image?
b
Hi Tomas, let me check 🙂
I believe this could be related to permissions, maybe lack of explicitly mentioned permission on dashboard. I am not aware of any related functionality change in the next CN release (which the dev_latest should reflect), but since it's a dev, not everything might be fully functional. Are the permission set the same as in your prod ?
t
in prod right now we use gdcn version 2.2 and trying dev_latest. And yes the permissions are set the same in prod provisioning of the gdcn that runs on gdcn version 2.2.
I think it could be related to the breaking change 2.2 => 2.3.
b
maybe it could related to introducing dashboard permissions in CN 2.3 - user needs to have dashboard permission set as well along with the workspace permission. More info can be found here: https://www.gooddata.com/developers/cloud-native/doc/2.3/manage-organization/manage-permissions/set-permissions-for-dashboards/
👍 1
t
ahh ok, that might be it, so according to the docs you provided we have to assign VIEW permissions to the user in the particular dashboard Set Permissions For a Dashboard. thank you Boris!