Secure /v1/definitions on the workflow gateway (OIDC / API_KEY + Kubernetes auth)
Maintainers usually reply within 1 day
@ricardozanini is already working on this.
Since Nov 2, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
GET /v1/definitions and GET /v1/definitions/{namespace}/{name}/{version} on the workflow gateway are unauthenticated. They serve LogicFlowDefinition data the gateway reads with its own broadly-privileged ServiceAccount (an informer cache across every watched namespace). Any anonymous caller borrows that elevated access and can enumerate every workflow definition in every namespace — including embedded logic, endpoints, and secret references. This is a confused-deputy / privilege-escalation issue.
In scope: /v1/definitions (list + fetch) only.
Out of scope: /v1/runtime/* and /v1/instances/* — those are forwarded to backends that already enforce the quarkus-flow security model; the gateway just passes auth headers through.
Full design: adr/002-workflow-gateway-definitions-authz.md (branch feat/gateway-definitions-authz).
Decision
Two authorization paths in front of /v1/definitions, both filtering results to the namespaces the caller is entitled to.
1. Kubernetes-native (real RBAC, no drift)
- Authenticate via
TokenReview. - Filter with
SelfSubjectAccessReview(caller's own token): return a namespace only if the user maylist/get logicflowdefinitionsthere. - No impersonation, no extra gateway-SA RBAC, no extra user RBAC.
- Companion fix: add
aggregate-to-view|edit|adminlabels to the shippedlogicflowdefinition_{viewer,editor,admin}_role.yamlso namespaceview/edit/admininherits LFD read and the SSAR check isn't operationally brittle.
2. Quarkus-flow (mirror the runner verbatim)
Single-mode (NONE/API_KEY/OIDC), extends existing RuntimeSecuritySpec.
- Roles:
flow-admin(all namespaces),flow-invoker(restricted; blank scope →403). - OIDC JWT: top-level
rolesclaim (flow-admin/flow-invoker) +namespaceclaim (string / array / CSV /*). Notgroups/realm_access/scope. - API_KEY:
Authorization: Bearer <key>; roles + namespaces per key (omitted →*). 401invalid creds,403wrong namespace;/v1/openapi*stays open.- Accepted risk: OIDC namespace claim is a parallel authz source that can drift from real RBAC (why consoles use the k8s path).
3. Deterministic routing (route ≠ trust)
Local unverified decode selects one validator; that authority then verifies before trusting. When OIDC is configured:
- Opaque bearer → kube (
TokenReview). (OpenShift console) - JWT with kube markers (
kubernetes.io/ SA issuer) → kube. (SA token) - JWT
rolescontainsflow-*→ OIDC server (verify, then trust claims). - Otherwise → kube (
TokenReview). (external-OIDC kube users land here)
Acceptance criteria
- Unauthenticated
/v1/definitionsrequests are rejected (401). - k8s path returns only namespaces the caller can
list/get logicflowdefinitions(SSAR-verified). - OIDC path honors the verbatim
roles+namespacecontract; interchangeable with runner tokens. - API_KEY path honors per-key roles + namespaces via
Authorization: Bearer. - Routing is deterministic per the 4-step table; forged
rolesclaims fail signature verification. - Shipped LFD ClusterRoles carry aggregation labels.
-
/v1/openapi*remains unauthenticated. -
/v1/runtime/*and/v1/instances/*behavior unchanged.
Notes / open implementation choices
- Extend
api/v1security types (API-key namespace scoping, OIDC claim-name config, gateway security spec). - Optional: short-lived per-(identity, namespace) SSAR decision cache.
- Dominant language
- Go
- Stars
- 3
- Forks
- 3
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 18
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kubesmarts/logic-operator
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
kubesmarts/logic-operator#105 ·
Maintainers usually reply within 1 day
-
README gateway ingress example uses `className` instead of `ingressClassName`Possibly taken @mathecruz claimed this today. Opendocumentation
kubesmarts/logic-operator#99 · 1 assignee ·
Maintainers usually reply within 1 day
-
area/operator
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kubesmarts/logic-operator#88 ·
Maintainers usually reply within 1 day
-
area/gateway
Difficulty 5/5 Over a week Newbie friendliness 35/100
kubesmarts/logic-operator#79 ·
Maintainers usually reply within 1 day
-
area/operator
Difficulty 5/5 Over a week Newbie friendliness 35/100
kubesmarts/logic-operator#77 ·
Maintainers usually reply within 1 day
All issues in kubesmarts/logic-operator
Similar issues
-
good first issue help wanted javascript
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
fullsend-ai/fullsend#9733 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
karmada-io/karmada#8101 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day