# New prototype block for managing device identity certificates

**URL:** <https://forums.balena.io/t/new-prototype-block-for-managing-device-identity-certificates/349702>\
**Category:** balenaHub\
**Created:** [October 16, 2021, 2:33am UTC](https://forums.balena.io/t/new-prototype-block-for-managing-device-identity-certificates/349702 "2021-10-16T02:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/awilson/32/6177_2.png) [@awilson](https://forums.balena.io/u/awilson)\
**Post date:** [October 16, 2021, 2:33am UTC](https://forums.balena.io/t/new-prototype-block-for-managing-device-identity-certificates/349702/1 "2021-10-16T02:33:57Z")

</div>

I’m working on a prototype Balena Block for creating asymmetric key pairs, generating CSRs, self-signed certs, and TLSA records (for publishing client certs as DANE DNS records).

For context: I use this code in a few of my Balena projects. For maintainability, I want to have one source of truth so that if I extend the tool to support another public key algo (for instance) I won’t need to update every instance of the identity manager. This places all crypto assets in the same directory, and the assumption is that the volume will only be mounted where access to the private key is necessary.

I would **love** to get feedback on this, and if it can be tweaked to be more generally useful, I’m open to making changes.

Here’s the repo: [GitHub - ValiMail/identity-manager: Balena Block for managing DNS-bound device identity](https://github.com/ValiMail/identity-manager)

It hasn’t been published as a block yet, so depending on how you deploy, you may need to pull it in as a git submodule.

---

<div class="post-metadata">

**Author:** ![bucknalla](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/bucknalla/32/298_2.png) [@bucknalla](https://forums.balena.io/u/bucknalla)\
**Post date:** [October 16, 2021, 10:42am UTC](https://forums.balena.io/t/new-prototype-block-for-managing-device-identity-certificates/349702/2 "2021-10-16T10:42:55Z")

</div>

Hey @awilson your balenablock looks great!

We just had an internal hackathon this week and one of the things I was working on was a [template balenablock repo](https://github.com/balena-io-playground/balenablock-template) to help people get started with blocks. We don’t currently host balenablock images, so something I was experimenting with was using GitHub actions to self-publish docker images for the blocks; you might find this useful for sharing the pre-built images for your block. Check out the [.github/workflows/publish.yml](https://github.com/balena-io-playground/balenablock-template/blob/master/.github/workflows/publish.yml) to see how we’re doing this!

All the best,  
Alex

---

<div class="post-metadata">

**Author:** ![awilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/awilson/32/6177_2.png) [@awilson](https://forums.balena.io/u/awilson)\
**Post date:** [October 18, 2021, 6:31pm UTC](https://forums.balena.io/t/new-prototype-block-for-managing-device-identity-certificates/349702/4 "2021-10-18T18:31:38Z")

</div>

Thanks @bucknalla that template repo is really helpful!
