Looking at the error, are you sure you don't have a zip file renamed as pem.
The pem file should be a base64 file. Don't know what you are trying to do with base64 -d....
Original Message:
Sent: Mon July 31, 2023 02:46 AM
From: Anusha Pudari
Subject: Issue with CP4I Platform Deployment - Cert and Key Not Reflected in Java Project
Hi Francois Brandelik,
Yes, we tried it with permissions 640 and 660,But we are facing the same issue.
I am encountering an additional issue while deploying an application to an independent integration server in CP4I, which involves a FileRead Node in the message flow. For your reference, please find the attached Error.PNG.
------------------------------
Anusha Pudari
Original Message:
Sent: Mon July 31, 2023 01:20 AM
From: Francois Brandelik
Subject: Issue with CP4I Platform Deployment - Cert and Key Not Reflected in Java Project
Shouldn't the permissions be 640 ?
Have you tried it with permissions 640? or 660?
And just so that we understand the 4 should be for mqbrokers ...
------------------------------
Francois Brandelik
Original Message:
Sent: Sat July 29, 2023 03:54 AM
From: Anusha Pudari
Subject: Issue with CP4I Platform Deployment - Cert and Key Not Reflected in Java Project
Hi @David Brickell,
Are you pointing to /home/aceuser/generic?
Yes, I am pointing to /home/aceuser/generic/certs/filename.PEM(referring same path in code) when deployed in container.
When you access the pod, do you see the PEM file in the location you are referencing?
Yes I am able to see the PEM file in that location.
What are the permissions?
644
------------------------------
Anusha Pudari
Original Message:
Sent: Fri July 28, 2023 02:18 PM
From: David Brickell
Subject: Issue with CP4I Platform Deployment - Cert and Key Not Reflected in Java Project
You should probably open a support case for this as it would require some more time consuming review to provide a full RCA.
I suspect the issue is how you are referring to the PEM file in your code when deployed in container compared to how it's referenced when run locally.
Are you pointing to /home/aceuser/generic?
When you access the pod, do you see the PEM file in the location you are referencing? What are the permissions?
------------------------------
David Brickell
Original Message:
Sent: Fri July 28, 2023 12:40 PM
From: Anusha Pudari
Subject: Issue with CP4I Platform Deployment - Cert and Key Not Reflected in Java Project
Hi all,
I am facing an issue regarding a Java error in the CP4I Platform. The code (Sign and Verify) is working fine in the local App Connect toolkit, but whenever I am deploying the same application into a container, it is throwing an error. For your reference, please find the below error message:
Error:
Illegal base64 character d
2023-07-28 15:58:54.752 37 at java.util.Base64$Decoder.decode0(Base64.java:725)
2023-07-28 15:58:54.752 37 at java.util.Base64$Decoder.decode(Base64.java:537)
2023-07-28 15:58:54.753 37 at java.util.Base64$Decoder.decode(Base64.java:560)
2023-07-28 15:58:54.753 37 at com.esb.java.GenerateSignature.getPrivateKey(GenerateSignature.java:65)
2023-07-28 15:58:54.754 37 at com.esb.java.GenerateSignature.getSignature(GenerateSignature.java:76)
Exception in thread "Thread-22" 2023-07-28 15:58:54.754 37 java.lang.NullPointerException
2023-07-28 15:58:54.755 37 at java.util.Base64$Encoder.encode(Base64.java:272)
2023-07-28 15:58:54.755 37 at java.util.Base64$Encoder.encodeToString(Base64.java:326)
2023-07-28 15:58:54.756 37 at com.esb.java.GenerateSignature.getSignature(GenerateSignature.java:94)
Actually, I am storing the cert and key in PEM format on my local drives and providing the same path reference in the code(esql), which is working fine. However, when I deploy it in the CP4I platform using a generic type(created at configuration section) and upload a zip file containing the cert and key in PEM format, and then give a reference to an independent integration server (generic file), I encounter the above error.
Can anyone help me out with this?
Additionally, I would like to know why, when I attach the cert and key to the Java project, it is not being reflected when I deploy it in the CP4I platform. But when I am trying to develop the same in my local App Connect toolkit the code works fine( when I use the names of the cert and key directly in the code). However, during deployment, I encounter an error stating "file not found" as if the attached cert and key are not accessible.
------------------------------
Anusha Pudari
------------------------------