Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jwt-auth): support configuring key_claim_name #11772

Conversation

shreemaan-abhishek
Copy link
Contributor

Description

Support configuring key_claim_name like kong: https://docs.konghq.com/hub/kong-inc/jwt/configuration/#config-key_claim_name

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request plugin labels Nov 21, 2024
@Revolyssup Revolyssup self-requested a review November 22, 2024 07:38
Revolyssup
Revolyssup previously approved these changes Nov 22, 2024
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update the doc at same time

Revolyssup
Revolyssup previously approved these changes Nov 25, 2024
nic-6443
nic-6443 previously approved these changes Nov 25, 2024
}
},
key_claim_name = {
type = "string",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a limitation about the length, the minimum length should be 1

empty string isn’t acceptable

key_claim_name = {
type = "string",
default = "key",
minLength = "1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wrong, we should use minLength = 1, it should be a number

https://json-schema.org/understanding-json-schema/reference/string

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Revolyssup Revolyssup self-requested a review November 27, 2024 06:48
@shreemaan-abhishek shreemaan-abhishek merged commit 528ec89 into apache:master Nov 27, 2024
36 checks passed
@shreemaan-abhishek shreemaan-abhishek deleted the make-key-claim-name-configurable branch November 27, 2024 07:25
@mikyll mikyll mentioned this pull request Nov 27, 2024
5 tasks
@mikyll
Copy link
Contributor

mikyll commented Nov 29, 2024

This PR fixed #11276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants