You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the APIKey CRD schema to support the RBAC design requirements, including cross-namespace references, consumer-provided secrets, and conditions pattern.
New version
apiVersion: devportal.kuadrant.io/v1alpha1kind: APIKeymetadata:
name: mobile-app-payment-keynamespace: consumer-team-mobile # Consumer's own namespacespec:
# Cross-namespace reference to APIProductapiProductRef:
name: payment-api-v1namespace: payment-services # Owner's namespace# Reference to secret containing API key (namespace-local reference)# Consumer creates this secret in their own namespace before creating APIKey# Controller reads API key from this secret on approvalsecretRef:
name: mobile-app-payment-key-secret# Rate limiting plan tierplanTier: "basic"# e.g., "free", "basic", "premium", "enterprise"# Who requested this API keyrequestedBy:
userId: "alice"email: "alice@mobile-team.example.com"# Use case justificationuseCase: "Mobile app integration for payment processing in our iOS/Android apps"status:
# Approval conditions (following CertificateSigningRequest pattern)# Lifecycle states:# - Pending: No conditions (initial state after creation)# - Approved: Approved condition with status "True"# - Denied: Denied condition with status "True"# - Failed: Failed condition with status "True"# Example: Approved stateconditions:
- type: Approvedstatus: "True"reason: "ApprovedByOwner"message: "Approved for mobile team's payment integration project"lastTransitionTime: "2026-03-30T14:00:00Z"# OR for Denied state:# - type: Denied# status: "True"# reason: "RejectedByOwner"# message: "API product not available for external use"# lastTransitionTime: "2026-03-30T14:00:00Z"# OR for Pending state (initial):# conditions: [] # Empty array = Pending state# Rate limits from selected planlimits:
daily: 10000monthly: 300000custom:
- limit: 100window: 1m# Authentication schemeauthScheme:
credentials:
authorizationHeader:
prefix: "Bearer"authenticationSpec:
selector:
matchLabels:
kuadrant.io/apikey: mobile-app-payment-key# API hostname from HTTPRouteapiHostname: "api.payment.example.com"
Acceptance Criteria
Add spec.apiProductRef.namespace field (string, required) for cross-namespace references
Add spec.secretRef field (LocalObjectReference, required) for namespace-local reference to consumer's secret containing API key
Replace status.phase with status.conditions array following Kubernetes conditions pattern
Remove deprecated status fields: status.secretRef, status.canReadSecret, status.reviewedBy, status.reviewedAt, status.apiKeyValue
Keep status.limits
Consider bumping API version to v1alpha2 to signal breaking changes (being in dev preview support mode we will ask users to delete existing CRs and recreate)
Breaking changes: The current v1alpha1 API is in dev preview support mode, so breaking changes are acceptable.
Consumer-provided secrets: Consumer creates secret with API key in their own namespace and references it via spec.secretRef. Consumer has secret read permissions in their own namespace to access the API key anytime. Controller creates enforcement secret in kuadrant namespace on approval (see separate issue for controller implementation).
Description
Update the APIKey CRD schema to support the RBAC design requirements, including cross-namespace references, consumer-provided secrets, and conditions pattern.
New version
Acceptance Criteria
spec.apiProductRef.namespacefield (string, required) for cross-namespace referencesspec.secretReffield (LocalObjectReference, required) for namespace-local reference to consumer's secret containing API keystatus.phasewithstatus.conditionsarray following Kubernetes conditions patternApproved,Denied,Failedwith type, status, reason, message, lastTransitionTimestatus.secretRef,status.canReadSecret,status.reviewedBy,status.reviewedAt,status.apiKeyValuestatus.limitsConsider bumping API version to v1alpha2 to signal breaking changes(being in dev preview support mode we will ask users to delete existing CRs and recreate)Related
Notes
Breaking changes: The current v1alpha1 API is in dev preview support mode, so breaking changes are acceptable.
Consumer-provided secrets: Consumer creates secret with API key in their own namespace and references it via
spec.secretRef. Consumer has secret read permissions in their own namespace to access the API key anytime. Controller creates enforcement secret in kuadrant namespace on approval (see separate issue for controller implementation).