Open Shawcs opened 2 months ago
Is that normal that we can open the JKS with no password (and not empty password) ?
I think this is the way JKS/keytool works. The password is just an integrity check, and when the password is omitted, the integrity check is just skipped.
But I think a truststore should be updated if the password changes. Even if cert-manager does not yet support this, ref. https://github.com/cert-manager/cert-manager/issues/3450. But in cert-manager solving this is more complex, since the password is externalized. And not inlined, as in trust-manager.
/kind bug
It seems this was my task - introduction of security trust stores by passwords Can the issue be in that reconcile function doesn't compare old and new password fields?
It seems it was my task. Can the issue be in that reconcile function doesn't compare old and new password fields?
We should probably add a new hash annotation for the truststore password (if any). And reconcile the target if hash doesn't match . Similar to what we do with bundle data.
How is this issue urgent? I can tackle this. P.S. I see tests regarding this issue have been merged
/assign
Hello, I tried to fix this issue, password changes are reflecting rebuilding of additional formats targets. However, it brought an issue with Patch of password hash field.
Hi !
I noticed some problems around password for generated p12 and JKS file.
short description:
For JKS you can alway open it with a no password and the password you setup in the bundle
For p12 and JKS if the password is updated after the bundle creation the created resources in destination namespace are not re generated and keep the old password, even if the bundle update it's generation.
Reproduction of the problem
create a bundle with jks and p12 with a password
From the generated configmap download the jks and p12 and try to read them
and
(this is like entering the command and hit enter when the keytool prompt for jks password) in both cas the keytool list the jks content. Is that normal that we can open the JKS with no password (and not empty password) ?
For the p12:
update the bundle password
here the status will update in:
refresh and download again the p12 and jks from the configmap
Open them again with password (I renamed the file this time with a "second" to avoid conflicts) : for p12
openssl pkcs12 -info -in certs_second.p12 -password pass:firstpassword <- works
Suggestion
For me there is two options: