Skip to content

Commit

Permalink
libshvbroker: Disable password change for LDAP/Azure clients
Browse files Browse the repository at this point in the history
  • Loading branch information
syyyr committed Jan 30, 2024
1 parent 11dd752 commit 6622841
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libshvbroker/src/currentclientshvnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ shv::chainpack::RpcValue CurrentClientShvNode::callMethodRq(const shv::chainpack
}
shv::broker::AclManager *acl = app->aclManager();
const string user_name = cli->userName();
if (user_name.starts_with("ldap:")) {
SHV_EXCEPTION("Can't change password, because you are logged in over LDAP");
}
if (user_name.starts_with("azure:")) {
SHV_EXCEPTION("Can't change password, because you are logged in over Azure");
}
acl::AclUser acl_user = acl->user(user_name);
string current_password_sha1 = acl_user.password.password;
if(acl_user.password.format == acl::AclPassword::Format::Plain) {
Expand Down

0 comments on commit 6622841

Please sign in to comment.