Treaty of Algeron
The Treaty of Algeron is an agreement between the United Federation of Planets and the Romulan Star Empire that somehow "keeps the peace" between the two powers, who presumably negotiated it following the events of "The Enterprise Incident" (TOS).
Under the terms of the treaty, the Federation may not develop or deploy cloaking technology, resulting in a significant tactical disadvantage for Federation starships. What the Romulans gave up in return (if anything) remains unclear.
In 2371, the Romulans agreed to loan one of their own cloaking devices to the Federation and installed it on the USS Defiant. It's use was to be restricted to the Gamma Quadrant under Romulan supervision. In return, the Federation agreed to share all intelligence that the ship acquired in the Gamma Quadrant.
During the Dominion War, the Federation deployed a field of cloaked, self-replicating mines to block access to the Bajoran Wormhole. It is unclear whether this event required another special dispensation from the Romulans or the Treaty only applies to starships and other crewed vehicles.
It is uncertain whether or not the holo-ship in Star Trek: Insurrection was a violation of the treaty or an approved use of a cloaking device on a operational starship. What can be seen from the movie is that the design of the ship itself was not common knowledge, so it is entirely possible that the entire Ba'ku relocation project was done in secret, and construction of the ship was a treaty violation.
Treaty of Algeron at Memory Alpha