# Fingerprint plugin: make base64encode url friendly

**URL:** https://discuss.elastic.co/t/fingerprint-plugin-make-base64encode-url-friendly/134215
**Category:** Logstash
**Created:** [June 1, 2018, 11:57am UTC](https://discuss.elastic.co/t/fingerprint-plugin-make-base64encode-url-friendly/134215 "2018-06-01T11:57:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)
#### Post date: [June 1, 2018, 11:57am UTC](https://discuss.elastic.co/t/fingerprint-plugin-make-base64encode-url-friendly/134215/1 "2018-06-01T11:57:26Z")

</div>

I am using the `fingerprint` plugin to create custom `_id` fields that **should** be base64 encoded:

```
  fingerprint {
    key => "somekey"
    base64encode => true
    method => "SHA512"
    source => ["username"]
    target => "[@metadata][custom_id]"
   }

   truncate {
    fields => "[@metadata][custom_id]"
    length_bytes => 20
   }

```

However, here is an example key that was created:

`lStqstfpWw5OHe+B3FBi`

The above is **NOT** url friendly therefore manipulation by id becomes cumbersome since it needs encoding/decoding.

Any suggestion to make the `_id` url friendly?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 29, 2018, 11:57am UTC](https://discuss.elastic.co/t/fingerprint-plugin-make-base64encode-url-friendly/134215/2 "2018-06-29T11:57:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
