Summary
Per design PermissionsCA is not full chain validated. Nor the expiration date is validated.
Access control plugin validates only the S/MIME signature which causes an expired PermissionsCA to be taken as valid.
Details
The fact that PermissionsCA is not being validated implies that it's up to the user to set up a certificate management process in order to guarantee security. With this into account it makes sense then, imho, to concatenate certificates in order to preserve the chain. In fact this is mandatory for IdentityCA otherwise I get this authentication error with unable to get issuer certificate
message. In other words, if I do not concatenate the RootCA to IdentityCA certificate I can't create a Participant.
And here comes the issue, if I do the same process with PermissionsCA, assuming it's another intermediate CA issued by RootCA, the system would fail because this validation with sk_x509_num()
not allowing the certificate store to hold more than one certificate, which would happen in this scenario: PermissionsCA and RootCA. Is there any reason behind this logic? To me there are 2 main reasons why this should be allowed:
- It maintains consistency related to IdentityCA
Let's remember IdentityCA needs to be fully chained in order to get issuer certificate.
- Since we stablished that is up to the user to validate PermissionsCA (like expiration dates) because the Access Control plugin does not, by design, it's far more convenient to have it fully-chained.
Also according to Secure DDS spec PermissionsCA don't need to be self-signed so there is no problem with that.
All the details provided above are based on my experience using Fast-DDS (2.6.9) while working with ROS 2 and trying different PKI architectures. Please correct me if I made any mistake on something.
PoC
I'm working with ROS 2 Humble, using fastrtps v2.6.9
.
I would happily share some PoC (basically how to create some certificates, not much needed for the PoC tbh) if you decide this is the right place to discuss it.
Impact
Even though this issue is responsible for:
- allowing
governance/permissions
from an expired PermissionsCA
- having the system crash when PermissionsCA is not self-signed and contains the full-chain. This was hard to debug because no error was shown, that lead me to create this PR.
the impact is low.
Summary
Per design PermissionsCA is not full chain validated. Nor the expiration date is validated.
Access control plugin validates only the S/MIME signature which causes an expired PermissionsCA to be taken as valid.
Details
The fact that PermissionsCA is not being validated implies that it's up to the user to set up a certificate management process in order to guarantee security. With this into account it makes sense then, imho, to concatenate certificates in order to preserve the chain. In fact this is mandatory for IdentityCA otherwise I get this authentication error with
unable to get issuer certificate
message. In other words, if I do not concatenate the RootCA to IdentityCA certificate I can't create a Participant.And here comes the issue, if I do the same process with PermissionsCA, assuming it's another intermediate CA issued by RootCA, the system would fail because this validation with
sk_x509_num()
not allowing the certificate store to hold more than one certificate, which would happen in this scenario: PermissionsCA and RootCA. Is there any reason behind this logic? To me there are 2 main reasons why this should be allowed:All the details provided above are based on my experience using Fast-DDS (2.6.9) while working with ROS 2 and trying different PKI architectures. Please correct me if I made any mistake on something.
PoC
I'm working with ROS 2 Humble, using
fastrtps v2.6.9
.I would happily share some PoC (basically how to create some certificates, not much needed for the PoC tbh) if you decide this is the right place to discuss it.
Impact
Even though this issue is responsible for:
governance/permissions
from an expired PermissionsCAthe impact is low.