# Device authentication implementation

**URL:** <https://forum.pritunl.com/t/device-authentication-implementation/981>\
**Category:** Pritunl VPN\
**Created:** [April 20, 2023, 12:28pm UTC](https://forum.pritunl.com/t/device-authentication-implementation/981 "2023-04-20T12:28:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [April 20, 2023, 12:28pm UTC](https://forum.pritunl.com/t/device-authentication-implementation/981/1 "2023-04-20T12:28:20Z")

</div>

Hello,

We are very interested by the device authentication feature, especially to better manage the way some users could use unauthorized device to connect to VPN.

When enabled, all users will have to request VPN admin to enroll the device, however admin have no information at all about the device users is requesting for. Is there a way to have more information about the device directly in the interface ? Such as Mac Address, Dell S/N, Hostname, etc…

Moreover, is there a way to initiate TPM key creation on all our devices, and enroll them before users requesting for ? It looks complicated to manage a global enrollment at the same time for hundreds of users.

Thanks for helping!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 24, 2023, 8:38pm UTC](https://forum.pritunl.com/t/device-authentication-implementation/981/2 "2023-04-24T20:38:28Z")

</div>

The system hostname is used as the device name when registering the device. Other information may be added but it wouldn’t be possible to verify information like the mac address or serial numbers so this information shouldn’t be relied on as verification.

The process of verifying the 4 digit code is important to prevent approving unknown devices. Two servers can be initially created. One with device authentication and one without. This will allow users to connect while the device verification is being completed.

---

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [April 27, 2023, 2:16pm UTC](https://forum.pritunl.com/t/device-authentication-implementation/981/3 "2023-04-27T14:16:00Z")

</div>

Hi @zach , thanks for your answer.  
When you mention system hostname, which hostname are you refering to ?  
For example, a Pritunl device name is “thriving-plateau-1234”, which is not the computer hostname set in windows.  
Does it mean something is not properly configured on my side ?

Thanks!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [May 3, 2023, 8:28pm UTC](https://forum.pritunl.com/t/device-authentication-implementation/981/4 "2023-05-03T20:28:24Z")

</div>

The Go function `os.Hostname()` in [**pritunl-client-electron/service/utils/utils.go**](https://github.com/pritunl/pritunl-client-electron/blob/master/service/utils/utils.go#L1044) to get the hostname. Only the [**Pritunl Client v1.3.3484.2**](https://github.com/pritunl/pritunl-client-electron/releases/tag/1.3.3484.2) release will use this. There were some older releases that used the randomly generated profile ID.
