The Congressional Space Medal of Honor was authorized by the United States Congress in 1969 to recognize "any astronaut who in the performance of his or her duties has distinguished himself or herself by exceptionally meritorious efforts and contributions to the welfare of the Nation and mankind". It is awarded by the President of the United States in Congress's name on recommendations from the Administrator of the National Aeronautics and Space Administration. The award is a separate decoration from the Medal of Honor, which is a military award for extreme bravery and gallantry in combat.
Although the Congressional Space Medal of Honor is a civilian award of the United States government, it is authorized as a military decoration for display on U.S. military uniforms due to the prestige of the decoration. In such cases, the Congressional Space Medal of Honor is worn as a ribbon following all United States Armed Forces decorations.
To be awarded the Congressional Space Medal of Honor, an astronaut must perform feats of extraordinary accomplishment while participating in space flight under the authority of NASA. Typically, the Congressional Space Medal of Honor is awarded for scientific discoveries or actions of tremendous benefit to mankind. The decoration may also be awarded for extreme bravery during a space emergency or in preventing a major space disaster, or posthumously to those astronauts who die while performing a US space mission. As of 2004, all 17 astronauts killed on US missions had been awarded the medal.
https://en.wikipedia.org/wiki/Congressional_Space_Medal_of_Honor