Among the four known transneptunian dwarf planets, Haumea is an exotic, very elongated, and fast rotating body. In contrast to the other dwarf planets, its size, shape, albedo, and density are not well constrained. Here we report results of a multi-chord stellar occultation, observed on 2017 January 21. Secondary events observed around the main body are consistent with the presence of a ring of opacity 0.5, width 70 km, and radius 2,287$_{-45}^{+75}$ km. The Centaur Chariklo was the first body other than a giant planet to show a ring system and the Centaur Chiron was later found to possess something similar to Chariklos rings. Haumea is the first body outside the Centaur population with a ring. The ring is coplanar with both Haumeas equator and the orbit of its satellite Hiiaka. Its radius places close to the 3:1 mean motion resonance with Haumeas spin period. The occultation by the main body provides an instantaneous elliptical limb with axes 1,704 $pm$ 4 km x 1,138 $pm$ 26 km. Combined with rotational light-curves, it constrains Haumeas 3D orientation and its triaxial shape, which is inconsistent with a homogeneous body in hydrostatic equilibrium. Haumeas largest axis is at least 2,322 $pm$ 60 km, larger than thought before. This implies an upper limit of 1,885 $pm$ 80 kg m$^{-3}$ for Haumeas density, smaller and less puzzling than previous estimations, and a geometric albedo of 0.51 $pm$ 0.02, also smaller than previous estimations. No global N$_2$ or CH$_4$ atmosphere with pressures larger than 15 and 50 nbar (3-$sigma$ limits), respectively, is detected.