Skip to content

Commit b7ba1f8

Browse files
committed
Merge remote-tracking branch 'origin/release-5.4' into release-5.5
2 parents 4e57b85 + e7003fe commit b7ba1f8

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

en_US/access-control/authn/authn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ password_hash_algorithm {
160160

161161
EMQX supports using placeholders in the query statements and HTTP requests. During the authentication step, these placeholders will be replaced with actual client information to construct a query or HTTP request that matches the current client.
162162

163+
A valid placeholder follows the format `${PATH.TO.VALUE}`, where PATH.TO.VALUE is a dot-notated path to a value in an object. Valid characters include letters, digits, dots (`.`), and underscores (`_`). Placeholders containing unsupported characters will be treated as plain text.
164+
163165
For example, in EMQX MySQL authenticator, The default query SQL uses the placeholder `${username}`:
164166

165167
```

en_US/access-control/authz/authz.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ If set properly, caching can greatly improve performance. So, it is recommended
7171

7272
EMQX authorizers allow using placeholders in their configuration. During the authorization step, these placeholders are replaced with actual client information to construct a query or HTTP request that matches the current client.
7373

74+
A valid placeholder follows the format `${PATH.TO.VALUE}`, where PATH.TO.VALUE is a dot-notated path to a value in an object. Valid characters include letters, digits, dots (`.`), and underscores (`_`). Placeholders containing unsupported characters will be treated as plain text.
75+
7476
#### Placeholders in Data Queries
7577

7678
Placeholders are used to construct query statement. For example, in one EMQX MySQL authorizer, the default query SQL uses the placeholder `${username}`:

zh_CN/access-control/authn/authn.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ password_hash_algorithm {
144144

145145
EMQX 允许使用占位符动态构造认证数据查询语句、HTTP 请求,占位符会在认证器执行时替换为真实的客户端信息,以构造出与当前客户端匹配的查询语句或 HTTP 请求。
146146

147+
一个有效的占位符格式为 ${PATH.TO.VALUE},其中 PATH.TO.VALUE 是对象中值的点符号路径。允许的字符包括字母、数字、点(`.`)和下划线(`_`)。
148+
如果占位符中包含不支持的字符,将被视为普通文本处理。
149+
147150
以 MySQL 认证器为例,默认的查询 SQL 中使用了 `${username}` 占位符:
148151

149152
```sql

zh_CN/access-control/authz/authz.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ EMQX 支持对授权数据进行缓存,以便缓解由于大量客户端的订
7171

7272
EMQX 允许使用占位符动态构造授权数据查询语句、HTTP 请求,占位符会在授权检查器执行时替换为真实的客户端信息,以构造出与当前客户端匹配的查询语句或 HTTP 请求。
7373

74+
一个有效的占位符格式为 ${PATH.TO.VALUE},其中 PATH.TO.VALUE 是对象中值的点符号路径。允许的字符包括字母、数字、点(`.`)和下划线(`_`)。
75+
如果占位符中包含不支持的字符,将被视为普通文本处理。
76+
7477
#### 数据查询占位符
7578

7679
用于在查询权限数据时构造数据查询语句。以 MySQL 授权检查器为例,默认的查询 SQL 中使用了 `${username}` 占位符:

0 commit comments

Comments
 (0)