Skip to content

bug: ApisixConsumer jwtAuth requires private_key in schema #400

@kayx23

Description

@kayx23

Summary

ApisixConsumer.spec.authParameter.jwtAuth.value.private_key is currently required by the CRD schema.

Please triage whether this should be relaxed so symmetric JWT configurations do not require an unused private key.

Current behavior

APISIX itself supports JWT consumer credentials that use symmetric secrets without requiring a private key, but the ApisixConsumer schema currently requires both:

  • key
  • private_key

for jwtAuth.value.

At the same time, the translator accepts multiple JWT shapes and simply forwards whichever fields are present, including secret, public_key, private_key, and algorithm.

As a result, some JWT consumer configurations supported by APISIX are rejected by the CRD schema before they reach translation.

Use cases affected

  • configuring JWT consumer credentials with secret for symmetric algorithms such as HS256
  • using ApisixConsumer for JWT setups that do not require an asymmetric private key

Code context

  • api/v2/apisixconsumer_types.go
  • config/crd/bases/apisix.apache.org_apisixconsumers.yaml
  • internal/adc/translator/apisixconsumer.go

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions