Merge pull request #11778 from JimMoen/azure-id-saml-support
Azure Entra ID saml support
This commit is contained in:
commit
5c01b3dac1
|
@ -207,8 +207,15 @@ add_user_(Username, Password, Role, Desc) ->
|
||||||
description = Desc
|
description = Desc
|
||||||
},
|
},
|
||||||
mnesia:write(Admin),
|
mnesia:write(Admin),
|
||||||
|
?SLOG(info, #{msg => "dashboard_sso_user_added", username => Username, role => Role}),
|
||||||
flatten_username(#{username => Username, role => Role, description => Desc});
|
flatten_username(#{username => Username, role => Role, description => Desc});
|
||||||
[_] ->
|
[_] ->
|
||||||
|
?SLOG(info, #{
|
||||||
|
msg => "dashboard_sso_user_add_failed",
|
||||||
|
reason => "username_already_exists",
|
||||||
|
username => Username,
|
||||||
|
role => Role
|
||||||
|
}),
|
||||||
mnesia:abort(<<"username_already_exist">>)
|
mnesia:abort(<<"username_already_exist">>)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
{deps, [
|
{deps, [
|
||||||
{emqx_ldap, {path, "../../apps/emqx_ldap"}},
|
{emqx_ldap, {path, "../../apps/emqx_ldap"}},
|
||||||
{emqx_dashboard, {path, "../../apps/emqx_dashboard"}},
|
{emqx_dashboard, {path, "../../apps/emqx_dashboard"}},
|
||||||
{esaml, {git, "https://github.com/emqx/esaml", {tag, "v1.1.2"}}}
|
{esaml, {git, "https://github.com/emqx/esaml", {tag, "v1.1.3"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_dashboard_sso, [
|
{application, emqx_dashboard_sso, [
|
||||||
{description, "EMQX Dashboard Single Sign-On"},
|
{description, "EMQX Dashboard Single Sign-On"},
|
||||||
{vsn, "0.1.1"},
|
{vsn, "0.1.2"},
|
||||||
{registered, [emqx_dashboard_sso_sup]},
|
{registered, [emqx_dashboard_sso_sup]},
|
||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
|
|
|
@ -95,6 +95,10 @@ sp_saml_callback(post, Req) ->
|
||||||
State = #{enable := true} ->
|
State = #{enable := true} ->
|
||||||
case (provider(saml)):callback(Req, State) of
|
case (provider(saml)):callback(Req, State) of
|
||||||
{redirect, Redirect} ->
|
{redirect, Redirect} ->
|
||||||
|
?SLOG(info, #{
|
||||||
|
msg => "dashboard_saml_sso_login_successful",
|
||||||
|
redirect => "SAML login successful. Redirecting with LoginMeta."
|
||||||
|
}),
|
||||||
Redirect;
|
Redirect;
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
?SLOG(info, #{
|
?SLOG(info, #{
|
||||||
|
|
Loading…
Reference in New Issue