Skip to content

Conversation

@dspo
Copy link
Contributor

@dspo dspo commented Sep 26, 2024

Description

Implement plugin attach-consumer-label.

The attach-consumer-label plugin attaches custom consumer-related labels, in addition to X-Consumer-Username and X-Credential-Indentifier, to authenticated requests, for upstream services to differentiate between consumers and implement additional logics.

Fixes # (issue)

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:XL This PR changes 500-999 lines, ignoring generated files. doc Documentation things enhancement New feature or request plugin labels Sep 26, 2024
nic-6443
nic-6443 previously approved these changes Sep 26, 2024
moonming
moonming previously approved these changes Sep 26, 2024
ronething
ronething previously approved these changes Sep 26, 2024
@dspo dspo dismissed stale reviews from ronething, moonming, and nic-6443 via d00f112 September 26, 2024 03:15
@nic-6443 nic-6443 requested a review from moonming September 27, 2024 05:51
@moonming moonming merged commit 0e97e91 into apache:master Sep 27, 2024
38 checks passed
}'
```

❶ Label the `department` information for the consumer.
Copy link
Member

Choose a reason for hiding this comment

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

I prefer the Markdown style, which is easy to render by different Markdown tools

1. xxxx
2. xxxx
3. xxxx

}'
```

❶ Consumer 的 `department` 标签信息。
Copy link
Member

Choose a reason for hiding this comment

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

ditto

}'
```

❶ 将 Consumer 标签 `department` 的值附加到请求头的 `X-Consumer-Department` 字段。
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things enhancement New feature or request plugin size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants