Skip to content

Commit

Permalink
Merge pull request #2802 from emqx/dev/1.9.2
Browse files Browse the repository at this point in the history
Sync code from refs/heads/dev/1.9.2 to enterprise
  • Loading branch information
Kinplemelon authored Jul 9, 2024
2 parents 701d976 + e7f4df2 commit 8309fb5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hooks/Auth/useAuthnCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export default function useAuthnCreate() {
refresh_interval: 300,
verify_claims: {},
ssl: createSSLForm(),
headers: {
Accept: 'application/json',
},
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/hooks/Auth/useProcessAuthData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ export default function useProcessAuthData() {
verify_claims,
ssl,
disconnect_after_expire,
headers,
} = data
let tempData: any = {
enable,
from,
use_jwks,
verify_claims,
disconnect_after_expire,
headers,
}
if (use_jwks) {
tempData = {
Expand Down
4 changes: 4 additions & 0 deletions src/schemaText/schema-text-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,10 @@
"client_attrs_init_expression": {
"label": "Attribute Expression",
"desc": "A single-line expression that dynamically extracts attribute values from existing client information can use the following fields:<br/><br/>- `clientid`: client ID<br/>- `username`: user name<br/>- `cn`: CN field of TLS certificate<br/>- `dn`: DN field of TLS certificate<br/>- `user_property.*`: extracts the property value from the `User-Property` of the MQTT CONNECT packet, e.g. `user_property.foo`<br/><br/>You can use predefined string functions to dynamically process the information. For example, to extract the prefix of a dot-separated client ID: `nth(1, tokens(clientid, '.'))`; to extract a partial username: `substr(username, 0, 5)`. You can read more about variform expressions in EMQX docs.<br/>"
},
"mqtt_keepalive_check_interval": {
"label": "Keep Alive Check Interval",
"desc": "The frequency of checking for incoming MQTT packets determines how often the server will check for new MQTT packets.<br />If a certain amount of time passes without any packets being sent from the client, this time will be added up.<br />Once the accumulated time exceeds `keepalive-interval * keepalive-multiplier`, the connection will be terminated.<br />The default is set to 30 seconds, with a minimum value of 1 second and a maximum value of `keepalive-interval / 2`.<br />"
}
},
"ssl_opts": {
Expand Down
4 changes: 4 additions & 0 deletions src/schemaText/schema-text-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,10 @@
"client_attrs_init_expression": {
"label": "属性表达式",
"desc": "一个行表达式,用于从客户端现有信息中动态提取属性值,可以使用以下字段:<br/><br/>- `clientid`:客户端 ID<br/>- `username`:用户名<br/>- `cn`:TLS 证书的 CN 字段<br/>- `dn`:TLS 证书的 DN 字段<br/>- `user_property.*`:从 MQTT CONNECT 数据包的 `User-Property` 中提取属性值,例如 `user_property.foo`<br/><br/>支持使用预定义的字符串函数对信息进行动态处理。例如,要提取由点分隔的客户端 ID 的前缀:`nth(1, tokens(clientid, '.'))`;要截取用户名部分信息:`substr(username, 0, 5)`。您可以在 EMQX 文档中了解有关 variform 表达式的更多信息。<br/>"
},
"mqtt_keepalive_check_interval": {
"label": "保活检查间隔",
"desc": "检查传入 MQTT 数据包的频率决定了服务器检查新 MQTT 数据包的频率。<br />如果客户端在一定时间内没有发送任何数据包,这段时间将会累积。<br />一旦累积时间超过 `keepalive-interval * keepalive-multiplier`,连接将会被终止。<br />默认值设置为 30 秒,最小值为 1 秒,最大值为 `keepalive-interval / 2`。"
}
},
"ssl_opts": {
Expand Down
5 changes: 5 additions & 0 deletions src/views/Auth/components/JwtConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('RuleEngine.headers')">
<key-and-value-editor v-model="jwtConfig.headers" />
</el-form-item>
</el-col>
<el-col :span="20">
<CommonTLSConfig v-model="jwtConfig.ssl" :is-edit="isEdit" />
</el-col>
Expand Down

0 comments on commit 8309fb5

Please sign in to comment.