Skip to content

Commit fff8223

Browse files
committed
fix(crd): remove spec.auth.mode - auth type is global, not per-agent
BREAKING CHANGE: Removed spec.auth.mode field from AgentRuntime CRD The authentication mode (federated-jwt vs client-secret) is configured globally at the namespace level via authBridge.clientAuthType, not per-agent. Having a per-agent mode field was misleading and could create conflicts. Changes: - Removed AuthConfig.Mode field - Updated webhook to inject routes when spec.auth.outbound is present, regardless of mode - Routes are only effective when namespace has federated-jwt enabled - Regenerated CRD manifests - Updated tests to remove mode field - Removed separate documentation (will be added to existing auth guide) The authentication mode is a platform-wide setting that applies to all agents in a namespace. Individual agents configure only their outbound routes via spec.auth.outbound. Assisted-By: Claude Code Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
1 parent 317a057 commit fff8223

7 files changed

Lines changed: 35 additions & 484 deletions

File tree

charts/operator/crds/agent.rossoctl.dev_agentruntimes.yaml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,16 @@ spec:
6767
configures AuthBridge to perform token exchange when calling the
6868
specified destinations, requesting the appropriate audiences.
6969
properties:
70-
mode:
71-
default: client-secret
72-
description: |-
73-
Mode selects the authentication mechanism.
74-
75-
Values:
76-
federated-jwt Use SPIFFE JWT-SVID for client authentication
77-
with Keycloak. Requires SPIRE and Keycloak 26.6+
78-
with federated client authentication enabled.
79-
client-secret Use traditional OAuth2 client credentials (default).
80-
The operator provisions a client secret.
81-
disabled No authentication configured. Use for public
82-
endpoints or when authentication is handled elsewhere.
83-
enum:
84-
- federated-jwt
85-
- client-secret
86-
- disabled
87-
type: string
8870
outbound:
8971
description: |-
9072
Outbound defines token exchange routes for calling other services.
9173
Each route tells AuthBridge which audiences to request when calling
92-
a specific destination. Only used when mode is federated-jwt.
74+
a specific destination.
75+
76+
Routes are only effective when the namespace is configured with
77+
SPIFFE authentication (authBridge.clientAuthType: federated-jwt).
78+
The authentication mode is set globally at the namespace level, not
79+
per-agent.
9380
items:
9481
description: OutboundRoute defines a token exchange route for
9582
a specific destination.
@@ -124,8 +111,6 @@ spec:
124111
- destination
125112
type: object
126113
type: array
127-
required:
128-
- mode
129114
type: object
130115
authBridgeMode:
131116
description: |-
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.17.1
7+
spec:
8+
group: ""
9+
names:
10+
kind: ""
11+
plural: ""
12+
scope: ""
13+
versions: null

operator/api/v1alpha1/agentruntime_types.go

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,24 +167,14 @@ type AgentRuntimeSpec struct {
167167

168168
// AuthConfig defines authentication configuration for an agent or tool.
169169
type AuthConfig struct {
170-
// Mode selects the authentication mechanism.
171-
//
172-
// Values:
173-
// federated-jwt Use SPIFFE JWT-SVID for client authentication
174-
// with Keycloak. Requires SPIRE and Keycloak 26.6+
175-
// with federated client authentication enabled.
176-
// client-secret Use traditional OAuth2 client credentials (default).
177-
// The operator provisions a client secret.
178-
// disabled No authentication configured. Use for public
179-
// endpoints or when authentication is handled elsewhere.
180-
//
181-
// +kubebuilder:validation:Enum=federated-jwt;client-secret;disabled
182-
// +kubebuilder:default=client-secret
183-
Mode string `json:"mode"`
184-
185170
// Outbound defines token exchange routes for calling other services.
186171
// Each route tells AuthBridge which audiences to request when calling
187-
// a specific destination. Only used when mode is federated-jwt.
172+
// a specific destination.
173+
//
174+
// Routes are only effective when the namespace is configured with
175+
// SPIFFE authentication (authBridge.clientAuthType: federated-jwt).
176+
// The authentication mode is set globally at the namespace level, not
177+
// per-agent.
188178
//
189179
// +optional
190180
Outbound []OutboundRoute `json:"outbound,omitempty"`

operator/config/crd/bases/agent.rossoctl.dev_agentruntimes.yaml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,16 @@ spec:
6767
configures AuthBridge to perform token exchange when calling the
6868
specified destinations, requesting the appropriate audiences.
6969
properties:
70-
mode:
71-
default: client-secret
72-
description: |-
73-
Mode selects the authentication mechanism.
74-
75-
Values:
76-
federated-jwt Use SPIFFE JWT-SVID for client authentication
77-
with Keycloak. Requires SPIRE and Keycloak 26.6+
78-
with federated client authentication enabled.
79-
client-secret Use traditional OAuth2 client credentials (default).
80-
The operator provisions a client secret.
81-
disabled No authentication configured. Use for public
82-
endpoints or when authentication is handled elsewhere.
83-
enum:
84-
- federated-jwt
85-
- client-secret
86-
- disabled
87-
type: string
8870
outbound:
8971
description: |-
9072
Outbound defines token exchange routes for calling other services.
9173
Each route tells AuthBridge which audiences to request when calling
92-
a specific destination. Only used when mode is federated-jwt.
74+
a specific destination.
75+
76+
Routes are only effective when the namespace is configured with
77+
SPIFFE authentication (authBridge.clientAuthType: federated-jwt).
78+
The authentication mode is set globally at the namespace level, not
79+
per-agent.
9380
items:
9481
description: OutboundRoute defines a token exchange route for
9582
a specific destination.
@@ -124,8 +111,6 @@ spec:
124111
- destination
125112
type: object
126113
type: array
127-
required:
128-
- mode
129114
type: object
130115
authBridgeMode:
131116
description: |-

0 commit comments

Comments
 (0)