In the US it is controlled by FAR 61.3(i):
(l) Inspection of certificate. Each person who holds an airman certificate, medical certificate, authorization, or license required by this part must present it and their photo identification as described in paragraph (a)(2) of this section for inspection upon a request from:
(1) The Administrator;
(2) An authorized representative of the National Transportation Safety Board;
(3) Any Federal, State, or local law enforcement officer; or
(4) An authorized representative of the Transportation Security Administration.
By that definition, a private security does not have the right to inspect your certificates. It may be different if they are actual airport police...