radius-project / dashboard

Frontend experience for Project Radius
15 stars 7 forks source link

Dashboard App Graph: Failed to load resource: the server responded with a status of 403 (Forbidden) #68

Closed willdavsmith closed 7 months ago

willdavsmith commented 7 months ago

Steps to reproduce

Install Radius v0.32 deploy an application rad run or rad deploy and open dashboard visit the APP GRAPH tab on the application in the dashboard and an infinite load will happen

Observed behavior

Checking the logs shows a Failed to load resource: the server responded with a status of 403 (Forbidden) for a POST request to the http://localhost:7007/api/kubernetes/proxy/apis/api.ucp.dev/v1alpha3//planes/radius/local/resourcegroups/default/providers/Applications.Core/applications/dashboarddemo/getGraph?api-version=2023-10-01-preview endpoint

Desired behavior

App graph shows

Workaround

Edit the dashboard clusterrole to use all verbs instead of just get and list k edit clusterrole -n radius-system dashboard

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    meta.helm.sh/release-name: radius
    meta.helm.sh/release-namespace: radius-system
  creationTimestamp: "2024-04-09T05:07:49Z"
  labels:
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: dashboard
    app.kubernetes.io/part-of: radius
  name: dashboard
  resourceVersion: "1701"
  uid: <uid>
rules:
- apiGroups:
  - api.ucp.dev
  resources:
  - '*'
  verbs:
  - '*'

Additional context

No response

Would you like to support us?

AB#11739

kachawla commented 7 months ago

@willdavsmith do we know why we are doing HTTP POST for get graph?

nithyatsu commented 7 months ago

@kachawla, we use a POST on this API since we are computing graph which is a custom action on an existing resource (application). This is so that we are compatible with ARM (https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-operations#resource-actions-post). cc @rynowak

kachawla commented 7 months ago

@kachawla, we use a POST on this API since we are computing graph which is a custom action on an existing resource (application). This is so that we are compatible with ARM (https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-operations#resource-actions-post). cc @rynowak

Makes sense. Thank you @nithyatsu!