Skip to content

Commit ea927a5

Browse files
committed
change acl to access_control for clarity
1 parent c24fbf5 commit ea927a5

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

DEFAULT_CONFIG.json5

+4-4
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
// ],
176176
// },
177177
// ],
178-
// /// configure acl rules
179-
// acl: {
178+
// /// configure access control (ACL) rules
179+
// access_control: {
180180
// ///[true/false] acl will be activated only if this is set to true
181181
// "enabled": false,
182182
// ///[deny/allow] default permission is deny (even if this is left empty or not specified)
@@ -186,12 +186,12 @@
186186
// [
187187
// {
188188
// "actions": [
189-
// "put"
189+
// put, get, declare_subscriber, declare_queryable
190190
// ],
191191
// "flows":["egress","ingress"],
192192
// "permission": "allow",
193193
// "key_exprs": [
194-
// "test/thr"
194+
// "test/demo"
195195
// ],
196196
// "interfaces": [
197197
// "lo0"

commons/zenoh-config/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,9 @@ validated_struct::validator! {
497497

498498
/// Configuration of the downsampling.
499499
downsampling: Vec<DownsamplingItemConf>,
500-
pub acl: AclConfig {
500+
501+
///Configuration of the access control (ACL)
502+
pub access_control: AclConfig {
501503
pub enabled: bool,
502504
pub default_permission: Permission,
503505
pub rules: Option<Vec<AclConfigRules>>

zenoh/src/net/routing/interceptor/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub(crate) fn interceptor_factories(config: &Config) -> ZResult<Vec<InterceptorF
6464
// Uncomment to log the interceptors initialisation
6565
// res.push(Box::new(LoggerInterceptor {}));
6666
res.extend(downsampling_interceptor_factories(config.downsampling())?);
67-
res.extend(acl_interceptor_factories(config.acl())?);
67+
res.extend(acl_interceptor_factories(config.access_control())?);
6868
Ok(res)
6969
}
7070

zenoh/tests/acl.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const KEY_EXPR: &str = "test/demo";
1010
const VALUE: &str = "zenoh";
1111

1212
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
13-
#[cfg(not(target_os = "windows"))]
1413
async fn test_acl() {
1514
zenoh_util::init_log_from_env();
1615
test_pub_sub_deny().await;
@@ -56,7 +55,7 @@ async fn test_pub_sub_deny() {
5655
let mut config_router = get_basic_router_config().await;
5756
config_router
5857
.insert_json5(
59-
"acl",
58+
"access_control",
6059
r#"{
6160
"enabled": true,
6261
"default_permission": "deny",
@@ -104,7 +103,7 @@ async fn test_pub_sub_allow() {
104103
let mut config_router = get_basic_router_config().await;
105104
config_router
106105
.insert_json5(
107-
"acl",
106+
"access_control",
108107
r#"{
109108
110109
"enabled": false,
@@ -152,7 +151,7 @@ async fn test_pub_sub_allow_then_deny() {
152151
let mut config_router = get_basic_router_config().await;
153152
config_router
154153
.insert_json5(
155-
"acl",
154+
"access_control",
156155
r#"
157156
{"enabled": true,
158157
"default_permission": "allow",
@@ -212,7 +211,7 @@ async fn test_pub_sub_deny_then_allow() {
212211
let mut config_router = get_basic_router_config().await;
213212
config_router
214213
.insert_json5(
215-
"acl",
214+
"access_control",
216215
r#"
217216
{"enabled": true,
218217
"default_permission": "deny",
@@ -272,7 +271,7 @@ async fn test_get_qbl_deny() {
272271
let mut config_router = get_basic_router_config().await;
273272
config_router
274273
.insert_json5(
275-
"acl",
274+
"access_control",
276275
r#"{
277276
"enabled": true,
278277
"default_permission": "deny",
@@ -328,7 +327,7 @@ async fn test_get_qbl_allow() {
328327
let mut config_router = get_basic_router_config().await;
329328
config_router
330329
.insert_json5(
331-
"acl",
330+
"access_control",
332331
r#"{
333332
"enabled": true,
334333
"default_permission": "allow",
@@ -384,7 +383,7 @@ async fn test_get_qbl_deny_then_allow() {
384383
let mut config_router = get_basic_router_config().await;
385384
config_router
386385
.insert_json5(
387-
"acl",
386+
"access_control",
388387
r#"
389388
{"enabled": true,
390389
"default_permission": "deny",
@@ -455,7 +454,7 @@ async fn test_get_qbl_allow_then_deny() {
455454
let mut config_router = get_basic_router_config().await;
456455
config_router
457456
.insert_json5(
458-
"acl",
457+
"access_control",
459458
r#"
460459
{"enabled": true,
461460
"default_permission": "allow",

0 commit comments

Comments
 (0)