Skip to content

Sessions tab hardcodes namespace: 'default' when listing Argo Workflows, causing Forbidden in any other tenant namespace #3302

Description

@ciassj

Component: services/ark-dashboard

Description:

The Sessions page (components/sections/sessions-section.tsx) treats Argo Workflow runs as one type of "session" and fetches them via useWorkflows(). The namespace argument passed to this call is a hardcoded literal string instead of the actual current tenant namespace:

// services/ark-dashboard/ark-dashboard/components/sections/sessions-section.tsx:1058
} = useWorkflows('default', filters);

This is inconsistent with the rest of the component, which does correctly read the real namespace from the URL just a few lines earlier and preserves it when updating query params:

// same file, lines 1019-1023
// Preserve namespace parameter
const namespace = searchParams.get('namespace');
if (namespace) {
params.set('namespace', namespace);
}

That namespace value is simply never threaded into the useWorkflows('default', filters) call on line 1058.

Impact: In any tenant namespace other than literally default, opening the Sessions tab (under Operations) fails with:

Error: workflows.argoproj.io is forbidden: User "system:serviceaccount::ark-api-sa"
cannot list resource "workflows" in API group "argoproj.io" in the namespace "default"

This is because ark-api-sa's RBAC is (correctly) scoped only to its own tenant namespace, so a request against the hardcoded default namespace is rejected. This will reproduce for any tenant namespace that isn't named default — likely every real deployment on a shared multi-tenant cluster.

Steps to reproduce:

  1. Install ARK in any namespace other than default (e.g. via the standard tenant-provisioning flow).
  2. Open the dashboard, navigate to Operations → Sessions.
  3. Observe the Forbidden error listing workflows.argoproj.io in namespace default.

Expected behavior: Sessions tab lists workflow-type sessions from the current tenant nam other page in the dashboard.

Suggested fix: Replace the hardcoded 'default' on line 1058 with the namespace value already derived on line 1020 (or whatever the canonical current-namespace source is elsewhere in the app, e.g. the pattern used in use-namespaced-navigation.ts / buildScopedPath).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions