Skip to content

feat: add plugin attach-consmer-label#11604

Merged
moonming merged 8 commits into
apache:masterfrom
dspo:dspo/attach-consumer-label
Sep 27, 2024
Merged

feat: add plugin attach-consmer-label#11604
moonming merged 8 commits into
apache:masterfrom
dspo:dspo/attach-consumer-label

Conversation

@dspo

@dspo dspo commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

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
}'
```

❶ Label the `department` information for the consumer.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

membphis added a commit that referenced this pull request May 12, 2026
… levels in v3.x sections (#13360)

- Replace `## Doc improvements` (3.13.0 / 3.14.0 / 3.14.1) and
  `## Developer productivity` (3.13.0) with H3 so they nest under the
  release header instead of starting a new top-level section.
- 3.12.0: correct OpenResty version typo `v1.27.11` -> `1.27.1.1` (#11936).
- 3.11.0: fix plugin name typo `attach-consmer-label` -> `attach-consumer-label` (#11604).
- 3.5.0: the `google-cloud-logging` `client_email` entry referenced #9813
  (proxy-rewrite); the actual PR is #9622.
- 3.0.0: fix `APSISIX` typo in the `enable_cpu_affinity` entry.

Refs #13359.
wistefan pushed a commit to wistefan/apisix that referenced this pull request Jun 16, 2026
… levels in v3.x sections (apache#13360)

- Replace `## Doc improvements` (3.13.0 / 3.14.0 / 3.14.1) and
  `## Developer productivity` (3.13.0) with H3 so they nest under the
  release header instead of starting a new top-level section.
- 3.12.0: correct OpenResty version typo `v1.27.11` -> `1.27.1.1` (apache#11936).
- 3.11.0: fix plugin name typo `attach-consmer-label` -> `attach-consumer-label` (apache#11604).
- 3.5.0: the `google-cloud-logging` `client_email` entry referenced apache#9813
  (proxy-rewrite); the actual PR is apache#9622.
- 3.0.0: fix `APSISIX` typo in the `enable_cpu_affinity` entry.

Refs apache#13359.
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