  Our goal is to measure and model the magnetic field distribution in the disk
wind of the young stellar object (YSO) IRAS 21078+5211. We performed sensitive
global Very Long Baseline Interferometry observations of the polarized emission
of the 22 GHz water masers tracing individual streamlines of the
magnetohydrodynamic (MHD) disk wind in IRAS 21078+5211. Our
resistive-radiative-gravito-MHD simulations of a jet around a forming massive
star are able to reproduce the maser kinematics in the inner jet cavity. We
measure a weak level of 0.3%-3.2% of linear and circular polarization in 24 and
8 water masers, respectively. The detected polarized masers sample the
direction and the strength of the magnetic field along five distinct
streamlines within the inner 100 au region of the disk wind. Along the four
streamlines at smaller radii from the jet axis (< 25 au), the sky-projected
direction of the magnetic field forms, in most cases, a small offset angle of <
30$^{\circ}$ with the tangent to the streamline. Along the stream at larger
radii (50-100 au), the magnetic field is sampled at only three separated
positions, and it is found to be approximately perpendicular to the streamline
tangent at heights of approximately 10 and 40 au, and parallel to the tangent
at about 70 au. According to our simulations, the magnetic field lines should
coincide with the flow streamlines in the inner jet cavity. The small tilt in
the magnetic field direction observed along the inner streams can be well
explained by Faraday rotation, assuming a realistic low level of ionization for
the molecular shell of the jet of namely 10$^{-2}$. The magnetic field
amplitudes measured from maser circular polarization are all within a
relatively small range of 100-700 mG, which is in good agreement with the
simulation results and consistent with reduced magnetic diffusivity in the jet
cavity owing to efficient shock ionization.
