The president addressed a smaller, heavily secured gathering as his administration intensifies its legal and rhetorical attacks on journalists.