President Kennedy had read the novel Seven Days in May shortly after its publication and believed that the scenario could actually occur in the United States. According to director John Frankenheimer, the project received encouragement and assistance from Kennedy through White House press secretary Pierre Salinger, who conveyed to Frankenheimer Kennedy's wish that the film be produced. In spite of Defense Department opposition, Kennedy arranged to visit the Kennedy Compound in Hyannis Port for a weekend when the film needed to shoot outside the White House.
...
In an early example of guerrilla filmmaking, Frankenheimer photographed Martin Balsam ferrying to the supercarrier USS Kitty Hawk in San Diego without prior permission. Another example occurred when Frankenheimer wanted a shot of Douglas entering the Pentagon, but unable to receive permission, he rigged a camera in a parked car.
That Kennedy was playing with fire, big time.