Unable to perform authentication due to error : java.io.IOException: Invalid DER: length field too big (186)

Unable to perform authentication due to error : java.io.IOException: Invalid DER: length field too big (186)

Problem: Error message "Unable to perform authentication due to error : java.io.IOException: Invalid DER: length field too big (186)" obtained while adding Oracle Cloud monitor.

Reason: This issue occurs if we use AES128 Encryption Standard to protect the RSA key pair (PEM file) with a passphrase as mentioned in Oracle Cloud documentation. Hence, it is difficult to read the private key from the PEM file due to encryption.

Solution: 

Generating Private key:

As per the Oracle Cloud documentation:

           openssl genrsa -out ~/.oci/oci_api_key.pem -aes128 2048

Recommended way to generate private key file as per the solution in the Oracle Cloud Customer Connect forum:

           openssl genrsa -out ~/.oci/oci_api_key.pem 2048

Execute the above recommended command in the command line to obtain the private key.

Generating Public key:

Execute the below command in the command line to obtain the public key from the generated private key:

      openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

Generating Fingerprint:

After generating the Public key, upload the public key in Oracle Cloud console to obtain the Fingerprint.

Provide the PEM file path of the Private keyFingerprint along with Tenancy OCID and User OCID as inputs and try adding the Oracle Cloud monitor in Applications Manager.

 
If the issue still exists, reach out to our support with the screenshot of the error obtained to appmanager-support@manageengine.com along with the latest Support Information File (SIF) from Applications Manager with print all logs enabled for analysis.

                  New to ADSelfService Plus?