FIPS 140-2 specifies conditions applicable to the environment of RSA (and other) key generation, and refers to FIPS 186-4 for the generation itself.
Several recent Java Card Smart Cards can internally generate RSA-2048 key pairs per FIPS 186-4, with security policy and FIPS 140-2 level 3 certificate to attest that. Here is the one on top of the list at time of writing. A trivial Java Card applet runnign in that Smart Card's Java Card Virtual Machine can generate such RSA key, and export the private key, in clear if you want that. Such key would be for a FIPS-approved algorithm (certs# 1506-1507), and generated according to FIPS 186-4, as attested by a FIPS 140-2 level 3 certificate. That's not enough to pretend that the key was generated in a FIPS 140-2 compliant environment, because the security policy mentions
- "The module is a limited operational environment under the FIPS 140-2 definitions";
- accordingly the FIPS 140-2 level 3 certificate does not cover "operation environment";
- "firmware loaded into this module (..) requires a separate FIPS 140-2 validation" where my reading is that this sentence applies to Java Card applets.
However a (less trivial) Java Card applet could "securely generate RSA key pair (with) access to private exponent in order to process it further" (as asked), for some definition of process like encryption of the private key under a master public key (a form of key escrow). I do not rule out that a FIPS 140-2 validation of that applet could be obtained, such that it would then be correct to tell that the RSA key pair was generated in a FIPS 140-2 validated environment.