File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ let certificate_type =
3737let certificate_purpose =
3838 Enum
3939 ( " certificate_purpose"
40- , [(" licensing" , " Trusted certificates that are for licensing purpose." )]
40+ , [
41+ (" licensing" , " Trusted certificates that are for licensing purpose." )
42+ ; ( " ldaps"
43+ , " Trusted certificates that are for LDAPS connections to external \
44+ authentication services."
45+ )
46+ ]
4147 )
4248
4349let t =
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ open Datamodel_roles
1010 to leave a gap for potential hotfixes needing to increment the schema version.*)
1111let schema_major_vsn = 5
1212
13- let schema_minor_vsn = 902
13+ let schema_minor_vsn = 903
1414
1515(* Historical schema versions just in case this is useful later *)
1616let rio_schema_major_vsn = 5
Original file line number Diff line number Diff line change @@ -2049,7 +2049,7 @@ let external_auth_set_ldaps =
20492049 ~lifecycle:
20502050 [
20512051 ( Published
2052- , " 26.6 .0-next"
2052+ , " 26.12 .0-next"
20532053 , " This call enables or disables LDAPS for external authentication on \
20542054 the host"
20552055 )
@@ -2060,21 +2060,21 @@ let external_auth_set_ldaps =
20602060 param_type= Ref _host
20612061 ; param_name= " host"
20622062 ; param_doc= " The host whose LDAPS configuration should be set"
2063- ; param_release= numbered_release " 26.6 .0-next"
2063+ ; param_release= numbered_release " 26.12 .0-next"
20642064 ; param_default= None
20652065 }
20662066 ; {
20672067 param_type= Bool
20682068 ; param_name= " ldaps"
20692069 ; param_doc= " Whether to enable or disable LDAPS"
2070- ; param_release= numbered_release " 26.6 .0-next"
2070+ ; param_release= numbered_release " 26.12 .0-next"
20712071 ; param_default= None
20722072 }
20732073 ; {
20742074 param_type= Bool
20752075 ; param_name= " force"
20762076 ; param_doc= " Force the operation even if already in the desired state"
2077- ; param_release= numbered_release " 26.6 .0-next"
2077+ ; param_release= numbered_release " 26.12 .0-next"
20782078 ; param_default= Some (VBool false )
20792079 }
20802080 ]
Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ let external_auth_set_ldaps =
665665 ~lifecycle:
666666 [
667667 ( Published
668- , " 26.6 .0-next"
668+ , " 26.12 .0-next"
669669 , " This call enables or disables LDAPS for external authentication on \
670670 all hosts in the pool"
671671 )
@@ -676,21 +676,21 @@ let external_auth_set_ldaps =
676676 param_type= Ref _pool
677677 ; param_name= " pool"
678678 ; param_doc= " The pool whose LDAPS configuration should be set"
679- ; param_release= numbered_release " 26.6 .0-next"
679+ ; param_release= numbered_release " 26.12 .0-next"
680680 ; param_default= None
681681 }
682682 ; {
683683 param_type= Bool
684684 ; param_name= " ldaps"
685685 ; param_doc= " Whether to enable or disable LDAPS"
686- ; param_release= numbered_release " 26.6 .0-next"
686+ ; param_release= numbered_release " 26.12 .0-next"
687687 ; param_default= None
688688 }
689689 ; {
690690 param_type= Bool
691691 ; param_name= " force"
692692 ; param_doc= " Force the operation even if already in the desired state"
693- ; param_release= numbered_release " 26.6 .0-next"
693+ ; param_release= numbered_release " 26.12 .0-next"
694694 ; param_default= Some (VBool false )
695695 }
696696 ]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ let hash x = Digest.string x |> Digest.to_hex
33(* BEWARE: if this changes, check that schema has been bumped accordingly in
44 ocaml/idl/datamodel_common.ml, usually schema_minor_vsn *)
55
6- let last_known_schema_hash = " 2d8501063ef6b243facc24a3dbdc2a5d "
6+ let last_known_schema_hash = " d07be505e5b74fbe2b069bd8247da1a9 "
77
88let current_schema_hash : string =
99 let open Datamodel_types in
Original file line number Diff line number Diff line change @@ -89,26 +89,29 @@ let tdb_tool = !Xapi_globs.tdb_tool
8989
9090let domain_krb5_dir = Filename. concat Xapi_globs. samba_dir " lock/smb_krb5"
9191
92- (* Legacy certificates folder *)
93- let certs_dir = " /etc/stunnel/certs"
92+ let ca_bundle_for_purpose purpose =
93+ Printf. sprintf " %s/%s-%s.pem" Constants. trusted_certs_by_purpose_dir
94+ Constants. trusted_certs_root_prefix purpose
9495
95- let ldaps_ca_bundle = " /etc/trusted-certs/ca-bundle- ldaps.pem "
96+ let ldaps_ca_bundle = ca_bundle_for_purpose " ldaps"
9697
97- let general_ca_bundle = " /etc/trusted-certs/ca-bundle- general.pem "
98+ let general_ca_bundle = ca_bundle_for_purpose " general"
9899
99- (* * Return the best available CA bundle/cert path, in priority order:
100- ldaps-specific bundle > general bundle > legacy certs dir .
100+ (* * Return the best available CA bundle path, in priority order:
101+ ldaps-specific bundle > general bundle.
101102 Returns [None] if none exist. *)
102-
103103let ca_bundle_path () =
104- [ldaps_ca_bundle; general_ca_bundle; certs_dir]
105- |> List. find_opt Sys. file_exists
104+ [ldaps_ca_bundle; general_ca_bundle] |> List. find_opt Sys. file_exists
106105
107106let assert_ca_exists = function
108107 | true ->
109108 ca_bundle_path ()
110109 |> Option. to_result
111- ~none: (gen_ex E_NO_CERTS " No certs to setup TLS connection to DC" )
110+ ~none:
111+ (gen_ex E_NO_CERTS
112+ " No certs to setup TLS connection to DC. Note: ldaps does not \
113+ support non-CA certs"
114+ )
112115 |> maybe_raise
113116 |> ignore
114117 | false ->
You can’t perform that action at this time.
0 commit comments