-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http acl support #1724
http acl support #1724
Conversation
sth is wrong in CI. |
Whoops, I found a websocket bug in the failed CI |
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
…logic Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
will merge this after 0.21.9 is out. |
Signed-off-by: jaylin <jaylin@emqx.io>
nanomq/apps/broker.c
Outdated
|
||
rv = nmq_auth_http_sub_pub(work->cparam, true, tq, &work->config->auth_http); | ||
if (rv != 0) { | ||
log_error("Auth failed! subscribe packet!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if only part of sub topics are not allowed??
nanomq/apps/broker.c
Outdated
conn_param_free(work->cparam); | ||
work->code = rv; | ||
work->state = CLOSE; | ||
nng_aio_finish(work->aio, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just return suback with reason code
@@ -1103,6 +1104,22 @@ handle_pub(nano_work *work, struct pipe_content *pipe_ct, uint8_t proto, | |||
topic = work->pub_packet->var_header.publish.topic_name.body; | |||
uint32_t len = work->pub_packet->var_header.publish.topic_name.len; | |||
|
|||
if (work->config->auth_http.enable) { | |||
struct topic_queue *tq = topic_queue_init(topic, len); | |||
if (tq == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only one topic exsits for pub msg
if (check_properties(sub_pkt->properties) != SUCCESS) { | ||
if (work->proto_ver == MQTT_PROTOCOL_VERSION_v5) { | ||
sub_pkt->properties = decode_properties(work->msg, | ||
(uint32_t *)&bpos, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird format??
Whoops MQTT V5 still fail |
related on https://github.com/nanomq/NanoNNG/pull/905/files