Skip to content

feat(standalone): allow more characters in credential_id for API-driven mode#12295

Merged
AlinsRan merged 3 commits into
apache:masterfrom
AlinsRan:feat/standalone-credential-id-schema
Jun 9, 2025
Merged

feat(standalone): allow more characters in credential_id for API-driven mode#12295
AlinsRan merged 3 commits into
apache:masterfrom
AlinsRan:feat/standalone-credential-id-schema

Conversation

@AlinsRan

@AlinsRan AlinsRan commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Description

standalone credential_etcd_id format: {username}/credentials/{credential_id}

username:

pattern = [[^[a-zA-Z0-9_]+$]]

credential_id:
_M.credential = {
type = "object",
properties = {
-- metadata
id = id_schema,

local id_schema = {
anyOf = {
{
type = "string", minLength = 1, maxLength = 64,
pattern = [[^[a-zA-Z0-9-_.]+$]]

Which issue(s) this PR fixes:

Fixes #

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:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Jun 9, 2025
@AlinsRan AlinsRan changed the title feat(credentials): credentials allows -_. in it feat(standalone): credentials allows -_. in it Jun 9, 2025
@AlinsRan AlinsRan changed the title feat(standalone): credentials allows -_. in it feat(standalone): allow more characters in credential_id for API-driven mode Jun 9, 2025
@AlinsRan
AlinsRan merged commit 055588b into apache:master Jun 9, 2025
24 checks passed
@AlinsRan
AlinsRan deleted the feat/standalone-credential-id-schema branch June 9, 2025 11:18
laz-xyr pushed a commit to laz-xyr/apisix that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants