# How to pass certificate via AWX credential

**URL:** <https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [July 16, 2024, 10:53am UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291 "2024-07-16T10:53:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amvj](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/amvj/32/383_2.png) [@amvj](https://forum.ansible.com/u/amvj)\
**Post date:** [July 16, 2024, 10:53am UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/1 "2024-07-16T10:53:27Z")

</div>

One of the user is trying to pass certificates via credential. For that he created credential type and credential in AWX. The credential contains ca\_certificate, certificate, key etc.

However, the system is unable to identify the certificate upon execution.

Credential type:  
fields:

- id: ca\_cert  
type: string  
label: CA Certificate
- id: client\_cert  
type: string  
label: Client Certificate
- id: client\_key  
type: string  
label: client Key

Injector config:  
extra\_vars:  
ca\_cert: ‘{{ ca\_cert }}’  
client\_key: ‘{{ client\_key }}’  
client\_cert: ‘{{ client\_cert }}’

I have attached screenshot of the credential with this.

Error:  
**To see the full traceback, use -vvv. The error was: Exception: Task failed to complete. (failed; no start line: cadata does not contain a certificate (\_ssl.c:4163))**

**23**

**fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “Task failed to complete. (failed; no start line: cadata does not contain a certificate (\_ssl.c:4163))”}**

 ![Credential](https://us1.discourse-cdn.com/ansible/original/2X/7/781ff0e6cb184d969e895561337f57beaf2d06cf.png)

Please let me know whether any issue with this and how this can be resolved.

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [July 17, 2024, 6:47pm UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/2 "2024-07-17T18:47:25Z")

</div>

Hello @amvj,  
Would you mind providing the specific credential type that you are using? We have quite a few different types and the configuration will vary based on that.

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [July 17, 2024, 6:50pm UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/3 "2024-07-17T18:50:14Z")

</div>

Would you mind also providing us with the version you are using as well, please? Thank you so much for your time!

---

<div class="post-metadata">

**Author:** ![tvo318](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tvo318/32/3406_2.png) [@tvo318](https://forum.ansible.com/u/tvo318)\
**Post date:** [July 17, 2024, 7:03pm UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/4 "2024-07-17T19:03:23Z")

</div>

Also, have you tried to pass the CA certs the way it was described (syntax-wise) in the example from step 4 of [Creating a New Custom Credential Type](https://ansible.readthedocs.io/projects/awx/en/latest/userguide/credential_types.html#create-a-new-credential-type)?

---

<div class="post-metadata">

**Author:** ![amvj](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/amvj/32/383_2.png) [@amvj](https://forum.ansible.com/u/amvj)\
**Post date:** [July 18, 2024, 5:16am UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/5 "2024-07-18T05:16:52Z")

</div>

Hi  
We are using a custom credential and the same has been provided above. I am repasting it once again:

Credential type:  
fields:

- id: ca\_cert  
type: string  
label: CA Certificate
- id: client\_cert  
type: string  
label: Client Certificate
- id: client\_key  
type: string  
label: client Key

Injector config:  
extra\_vars:  
ca\_cert: ‘{{ ca\_cert }}’  
client\_key: ‘{{ client\_key }}’  
client\_cert: ‘{{ client\_cert }}’

The AWX version is 24.2.0

---

<div class="post-metadata">

**Author:** ![amvj](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/amvj/32/383_2.png) [@amvj](https://forum.ansible.com/u/amvj)\
**Post date:** [July 18, 2024, 5:17am UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/6 "2024-07-18T05:17:48Z")

</div>

Thanks for the link. This looks interesting. I will give a try.  
If there are any known examples with this please let me know.

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [July 24, 2024, 7:00pm UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/7 "2024-07-24T19:00:01Z")

</div>

Please let us know if you were able to resolve this via the provided documentation. Thank you so much for your time!

---

<div class="post-metadata">

**Author:** ![amvj](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/amvj/32/383_2.png) [@amvj](https://forum.ansible.com/u/amvj)\
**Post date:** [August 7, 2024, 3:57am UTC](https://forum.ansible.com/t/how-to-pass-certificate-via-awx-credential/7291/8 "2024-08-07T03:57:58Z")

</div>

Sorry for the late response. We are still looking into this.

For some reason I am not getting notified for the thread updates. Today I manually checked it seen your message.
