# Mutual TLS with mender

**URL:** <https://hub.mender.io/t/mutual-tls-with-mender/3263>\
**Category:** General Discussions\
**Tags:** yocto, zeus\
**Created:** [February 23, 2021, 12:40pm UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263 "2021-02-23T12:40:11Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 10:07am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/22 "2021-03-23T10:07:52Z")

</div>

Hmm, I see. This looks like a bug in `mender-artifact`, since this is not a mender-partitioned sdimg, the command will not work.

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 23, 2021, 10:14am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/23 "2021-03-23T10:14:52Z")

</div>

@oleorhagen

What can be done?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 10:17am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/24 "2021-03-23T10:17:34Z")

</div>

just to establish a baseline:

Where did you obtain the image?

And what is your goal? To install Mender and test it out?

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 23, 2021, 10:23am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/25 "2021-03-23T10:23:34Z")

</div>

@oleorhagen

I obtained image once after integrating mender with yocto for i.MX8QM board.  
We wanted to test mutual tls mender security feature in our security suite.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 10:31am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/26 "2021-03-23T10:31:48Z")

</div>

I see, with `meta-mender`?

The reason I’m wondering is that you’re image only has three partitions, and we usually require `4` for Mender rootfs updates to work.

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 23, 2021, 10:36am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/27 "2021-03-23T10:36:57Z")

</div>

@oleorhagen

Yes, with meta-mender.

Mender rootfs update is working with these three partition.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 11:27am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/28 "2021-03-23T11:27:43Z")

</div>

Interesting, I will then consider this a bug in `mender-artifact`.

Thank you! I will look into it.

In the meantime, it is possible to loopback mount the partitions, and copy the files manually 🙂

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 11:31am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/29 "2021-03-23T11:31:26Z")

</div>

Ticket can be found [here](https://tracker.mender.io/browse/MEN-4566) If you are curious 🙂

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 23, 2021, 11:38am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/30 "2021-03-23T11:38:40Z")

</div>

@oleorhagen

How to copy the files manually?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 23, 2021, 11:40am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/31 "2021-03-23T11:40:45Z")

</div>

This should do the trick:

> <https://unix.stackexchange.com/questions/316401/how-to-mount-a-disk-image-from-the-command-line>

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 23, 2021, 11:43am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/32 "2021-03-23T11:43:37Z")

</div>

@oleorhagen

Thanks will go through that.

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 24, 2021, 5:55am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/33 "2021-03-24T05:55:29Z")

</div>

@tranchitella

I am getting same above mentioned issue while starting mtls edge proxy with newly created user credentials in Hosted mender.  
Is there any deadline for that?  
What is this error? How to overcome it?

 ![docker_run_err](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/0/01168f46a93e63347136c5e2a5ae9e69835cac3a.jpeg)

---

<div class="post-metadata">

**Author:** ![tranchitella](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tranchitella/32/606_2.png) [@tranchitella](https://hub.mender.io/u/tranchitella)\
**Post date:** [March 24, 2021, 6:34am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/34 "2021-03-24T06:34:28Z")

</div>

@chaithanya can you reach [hosted.mender.io](http://hosted.mender.io) from that machine? The context deadline means the operation times out. Can you try to run “curl [https://hosted.mender.io](https://hosted.mender.io)” and see if you get response?

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 24, 2021, 7:06am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/35 "2021-03-24T07:06:13Z")

</div>

@tranchitella

I am able to login through web browser using those credentials.  
But I get error if I run “curl [https://hosted.mender.io](https://hosted.mender.io)”

 ![hosted_mender_access_err](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/8/88a4da72b25e4fca3071e514fc1c71ec73f58964.jpeg)

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 24, 2021, 12:02pm UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/36 "2021-03-24T12:02:13Z")

</div>

@oleorhagen

After mounting disk image, found that ‘data’ folder in the image is empty.  
Why it is so?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [March 24, 2021, 1:07pm UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/37 "2021-03-24T13:07:01Z")

</div>

Is there any chance you could share the necessary steps required to reproduce your `meta-mender` build?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 24, 2021, 1:07pm UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/38 "2021-03-24T13:07:34Z")

</div>

> [@chaithanya](#):
>
> But I get error if I run “curl [https://hosted.mender.io](https://hosted.mender.io)”

It looks like something is very off in your networking. What does `host hosted.mender.io` return?

> [@chaithanya](#):
>
> After mounting disk image, found that ‘data’ folder in the image is empty.  
> Why it is so?

Your fdisk output shows a 10MB data partition which is awfully small. I suspect something is incorrect in your configuration. You may need to update the [Yocto variables specifying the partition sizes](https://docs.mender.io/system-updates-yocto-project/variables).

Drew

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 25, 2021, 4:52am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/39 "2021-03-25T04:52:49Z")

</div>

> [@drewmoseley](#):
>
> It looks like something is very off in your networking. What does `host hosted.mender.io` return?

$ host [hosted.mender.io](http://hosted.mender.io)

[hosted.mender.io](http://hosted.mender.io) has address 3.225.60.34  
[hosted.mender.io](http://hosted.mender.io) has address 34.231.149.185  
[hosted.mender.io](http://hosted.mender.io) mail is handled by 10 [aspmx3.googlemail.com](http://aspmx3.googlemail.com).  
[hosted.mender.io](http://hosted.mender.io) mail is handled by 5 [alt1.aspmx.l.google.com](http://alt1.aspmx.l.google.com).  
[hosted.mender.io](http://hosted.mender.io) mail is handled by 5 [alt2.aspmx.l.google.com](http://alt2.aspmx.l.google.com).  
[hosted.mender.io](http://hosted.mender.io) mail is handled by 1 [aspmx.l.google.com](http://aspmx.l.google.com).  
[hosted.mender.io](http://hosted.mender.io) mail is handled by 10 [aspmx2.googlemail.com](http://aspmx2.googlemail.com).

> [@drewmoseley](#):
>
> Your fdisk output shows a 10MB data partition which is awfully small. I suspect something is incorrect in your configuration. You may need to update the [Yocto variables specifying the partition sizes](https://docs.mender.io/system-updates-yocto-project/variables).

Okay. I will increase the data partition size and let you know.

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://hub.mender.io/u/chaithanya)\
**Post date:** [March 25, 2021, 9:40am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/40 "2021-03-25T09:40:29Z")

</div>

@oleorhagen

Mainly downloaded meta-mender from github and few changes are done in machine configuration file and uboot as per the mender document.

---

<div class="post-metadata">

**Author:** ![tranchitella](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tranchitella/32/606_2.png) [@tranchitella](https://hub.mender.io/u/tranchitella)\
**Post date:** [March 26, 2021, 5:09am UTC](https://hub.mender.io/t/mutual-tls-with-mender/3263/41 "2021-03-26T05:09:37Z")

</div>

@chaithanya this is not an error, it is expected to see a redirection to the UI.  
What you report is very strange: you can access [hosted.mender.io](http://hosted.mender.io), but when you start the mTLS ambassador it times out trying to log in to Hosted Mender. Does the networking of your Docker setup work fine? If you start an alpine container, can you curl Hosted Mender?

[Previous page](https://hub.mender.io/t/mutual-tls-with-mender/3263.md?page=1)

[Next page](https://hub.mender.io/t/mutual-tls-with-mender/3263.md?page=3)
