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

Disable Superuser Request by Defualt #5567

Merged
merged 2 commits into from Sep 15, 2021
Merged

Disable Superuser Request by Defualt #5567

merged 2 commits into from Sep 15, 2021

Conversation

1995parham
Copy link
Contributor

@1995parham 1995parham commented Aug 25, 2021

I think we don't need superuser to be enabled by default but these default configurations cause superuser request be enabled by default acorrding the following code:

case application:get_env(?APP, super_req) of
    undefined ->
        emqx_hooks:put('client.authenticate', {emqx_auth_http, check, [#{auth => maps:from_list(AuthReq),
                                                                         super => undefined}]});
    {ok, SuperReq} ->
        PoolOpts1 = proplists:get_value(pool_opts, SuperReq),
        PoolName1 = proplists:get_value(pool_name, SuperReq),
        {ok, _} = ehttpc_sup:start_pool(PoolName1, PoolOpts1),
        emqx_hooks:put('client.authenticate', {emqx_auth_http, check, [#{auth => maps:from_list(AuthReq),
                                                                         super => maps:from_list(SuperReq)}]})
end

also by using environment variables there is no way to disable them.

@1995parham
Copy link
Contributor Author

I think we have the same setup here but when we lunch EMQX with its chart, I think the plugin from the emq repository is used so we have timeouts because we cannot disable superuser requests.

@1995parham
Copy link
Contributor Author

@Rory-Z sorry for mentioning you, can you please check this?

@turtleDeng turtleDeng merged commit 9d993e1 into emqx:main-v4.3 Sep 15, 2021
@1995parham 1995parham deleted the main-v4.3 branch September 15, 2021 03:38
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