Skip to content

CA-401274: Remove external auth limitation during set_hostname_live #6116

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

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions ocaml/xapi/xapi_host.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1337,21 +1337,6 @@ let serialize_host_enable_disable_extauth = Mutex.create ()

let set_hostname_live ~__context ~host ~hostname =
with_lock serialize_host_enable_disable_extauth (fun () ->
let current_auth_type =
Db.Host.get_external_auth_type ~__context ~self:host
in
(* the AD extauth plugin is incompatible with a hostname change *)
( if current_auth_type = Xapi_globs.auth_type_AD then
let current_service_name =
Db.Host.get_external_auth_service_name ~__context ~self:host
in
raise
(Api_errors.Server_error
( Api_errors.auth_already_enabled
, [current_auth_type; current_service_name]
)
)
) ;
(* hostname is valid if contains only alpha, decimals, and hyphen
(for hyphens, only in middle position) *)
let is_invalid_hostname hostname =
Expand Down
Loading