# OPCUA certificate rejected with error: Bad\_SecurityChecksFailed

**URL:** <https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 11, 2024, 9:45am UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095 "2024-01-11T09:45:48Z")\
**Posts on this page:** 17\
**Page:** 3

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 30, 2024, 6:53pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/41 "2024-01-30T18:53:22Z")

</div>

Sorry, not yet. We don't have acces to the PLC 🥲 managed by another firm.  
I keep you updated as soon as we can run the test. I Hope before the freeze for the 8.1.38...

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 2:34pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/42 "2024-01-31T14:34:54Z")

</div>

We run the test today.

The **CA certificate** is now accepted by Ignition with the change 👍

But, we have an issue about the **CRL**.

We place the file in:

```auto
client/security/pki/issuers/crl

```

**The crl file seems to be ignored by Ignition ?**  
Is there any logger to see if the file is read and processed ?

**What is the Ignition behaviour if the certificate used for the connection is not provided in the CRL.**

Would it be possible to have a message log like **"serial number not found" in CRL**?

**If the serial number is found with a revocation date expired, Ignition disconnect the opc connection ?**

(As a side note: the crl file we grab on site has only 3 days of validity, so we change the date of the server)

```auto
INFO | jvm 1 | 2024/01/24 15:01:05 | W [o.e.m.o.s.c.u.v.CertificateValidationUtil] [14:01:05]: Failed to add custom revocation checker; REVOCATION_LIST_FOUND check will be ignored. 

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d2f632acdb9de41fda002943f031a3d47b25d64.jpeg)

* * *

We run some test with **UaExpert**  
**UaExpert seems to refuse to connect because the certificate is not found in the CRL file**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/616c624105eb4df0ff3b528b79c8dd5b4e5fc582.jpeg)

Edit: full screenshot

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2d8db743ee39238813819cb058fabeac1d9b1f8d.jpeg)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2024, 2:39pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/43 "2024-01-31T14:39:09Z")

</div>

I think UaExpert is failing because you don’t have 2 CRLs, one for each issuer.

The warning in Ignition is saying that the presence of a CRL file for each issuer cert is not being enforced.

I don’t know if I can add some logging or not. This stuff just calls into Java libraries pretty quickly.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 31, 2024, 2:53pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/44 "2024-01-31T14:53:06Z")

</div>

> [@mazeyrat](#):
>
> log like **"serial number not found" in CRL**?

That would be rather noisy, since unrevoked certs are not supposed to be in the file. Not being there is the "good" case.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 2:56pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/45 "2024-01-31T14:56:15Z")

</div>

Ok I see ! That's right.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/46 "2024-01-31T15:29:50Z")

</div>

You mean I need a CRL file for the CA and another file for the sub CA ?  
Ignition is looking for 2 files too ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2024, 3:53pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/47 "2024-01-31T15:53:48Z")

</div>

No, Ignition is ultimately doesn't care if there are any, as the warning suggested.

UaExpert wants 2. Each CRL is tied to a certificate. Any certificate signing another certificate could/should have a CRL.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/48 "2024-01-31T16:09:22Z")

</div>

OK, But for Ignition how can I make the proof that the CRL file provided for the sub CA is taken in account ?

In my use case,

```auto
Failed to add custom revocation checker; REVOCATION_LIST_FOUND check will be ignored. 

```

is relative to the crl missing for CA or the serial number of the certificat not found in CA\_Subordinate01.crl ?

Do I need that my customer provide me a CRL file with the certificate used revocated in order that I can check Ignition disconnect the opc connection ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2024, 4:17pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/49 "2024-01-31T16:17:00Z")

</div>

> [@mazeyrat](#):
>
> Do I need that my customer provide me a CRL file with the certificate used revocated in order that I can check Ignition disconnect the opc connection ?

Yes I suppose you might need to do that. There doesn't seem to be any logging and the revocation checking code is all part of the Java security libraries.

I'm not sure there's a lot of value in pursuing this... you don't have any mechanism in place to automatically update the CRLs in Ignition as far as I can see. In the future the PKI infrastructure is meant to be managed by an OPC UA GDS that is acting as a certificate/security manager, but that's not supported by Ignition at the moment, even if you had one.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 7:43pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/50 "2024-01-31T19:43:55Z")

</div>

> [@Kevin.Herron](#):
>
> Looks like it's already the right format. The directory is watched by a Java file watch service, it should get noticed more or less immediately.

I was supposed the crl file could be copied in Ignition crl directory and it will be evaluated ?

You mean the file is only evaluated when the opc client connection is connecting.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2024, 7:46pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/51 "2024-01-31T19:46:58Z")

</div>

It gets decoded and loaded into memory when it's put in that directory, but nothing uses it until a certificate chain needs to be validated.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/52 "2024-01-31T19:54:06Z")

</div>

Ok thanks a lot for all these clarification.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 1, 2024, 8:43am UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/53 "2024-02-01T08:43:56Z")

</div>

As a workaround, do you think it could be possible to call some code from a gateway script using something like:  
**org.eclipse.milo.opcua.stack.core.util.validation.OpcUaCertificateRevocationChecker**  
to be able to trigger an alarm in Ignition if the certificate has been revoked ?

Probably not easy...but if we can have a script function exposed by the opcua module to periodically check the revocation of opcua certificate, we will be able to alert the user/administrator. Not perfect but better than nothing.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 28, 2024, 1:42pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/54 "2024-02-28T13:42:13Z")

</div>

Do you know the ETA for 8.1.38 ?  
We have to push it on site as soon as possible with this change.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 28, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/55 "2024-02-28T13:46:44Z")

</div>

Planned for March 5, 2024.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 23, 2025, 12:18pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/56 "2025-01-23T12:18:25Z")

</div>

@Kevin.Herron  
Our customer try to renew an opcua certificat in the PLC and he has the following issue:

```python
required KeyUsage 'nonRepudiation' not found

```

This a probably changed regarding the previous certificat, but I'm not sure this key is mandatory in opcua spec ? Ignition is perhaps too strict ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0eb3eb995c6180a3b00c47eca857f880c2467605.jpeg)  
sorry, I don't have better logs that this screenshot...

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 23, 2025, 2:34pm UTC](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095/57 "2025-01-23T14:34:58Z")

</div>

‘nonRepudiation’ is a required KeyUsage for application instance certificates.

It was never checked for issuer certs and the other unnecessary checks were removed entirely by [CertificateValidationUtil issuer certificate KeyUsage checks · Issue #1206 · eclipse-milo/milo · GitHub](https://github.com/eclipse-milo/milo/issues/1206)

[Previous page](https://forum.inductiveautomation.com/t/opcua-certificate-rejected-with-error-bad-securitychecksfailed/84095.md?page=2)
