Skip to content
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

Merged
merged 7 commits into from
Apr 17, 2024
Merged

http acl support #1724

merged 7 commits into from
Apr 17, 2024

Conversation

RanMaoyi
Copy link
Contributor

@RanMaoyi RanMaoyi marked this pull request as draft March 26, 2024 10:56
@JaylinYu JaylinYu marked this pull request as ready for review April 14, 2024 14:36
@JaylinYu
Copy link
Member

sth is wrong in CI.

@JaylinYu JaylinYu marked this pull request as draft April 15, 2024 18:15
@RanMaoyi RanMaoyi marked this pull request as ready for review April 16, 2024 10:34
@RanMaoyi RanMaoyi marked this pull request as draft April 16, 2024 10:53
@RanMaoyi RanMaoyi marked this pull request as ready for review April 16, 2024 13:53
@JaylinYu
Copy link
Member

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>
@JaylinYu
Copy link
Member

will merge this after 0.21.9 is out.

Signed-off-by: jaylin <jaylin@emqx.io>

rv = nmq_auth_http_sub_pub(work->cparam, true, tq, &work->config->auth_http);
if (rv != 0) {
log_error("Auth failed! subscribe packet!");
Copy link
Member

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??

conn_param_free(work->cparam);
work->code = rv;
work->state = CLOSE;
nng_aio_finish(work->aio, 0);
Copy link
Member

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) {
Copy link
Member

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

Choose a reason for hiding this comment

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

weird format??

@JaylinYu JaylinYu merged commit ae51ffa into master Apr 17, 2024
88 of 89 checks passed
@JaylinYu JaylinYu deleted the moi/dev branch April 17, 2024 23:40
@JaylinYu
Copy link
Member

Whoops MQTT V5 still fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants