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

CA-393199: Disable external auth should clean pbis cache #5642

Merged
merged 1 commit into from
Jun 5, 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
8 changes: 8 additions & 0 deletions ocaml/xapi/extauth_plugin_ADpbis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,14 @@ module AuthADlw : Auth_signature.AUTH_MODULE = struct
let on_disable config_params =
(* but in the ldap plugin, we should 'leave the AD/kerberos domain', i.e. we should *)
(* (1) remove the machine account from the kerberos realm, (2) remove the keytab locally *)

(* Clean pbis cache as we are disabling external auth and will leave domain *)
( try pbis_common "/opt/pbis/bin/ad-cache" ["--delete-all"] |> ignore
with e ->
Printexc.to_string e
|> debug "Got error cleaning pbis cache, ignore the error %s"
) ;

let pbis_failure =
try
( if
Expand Down
Loading