# Pbs\_snapshot --obfuscate redesign

**URL:** <https://community.openpbs.org/t/pbs-snapshot-obfuscate-redesign/1558>\
**Category:** Developers\
**Created:** [April 16, 2019, 3:28pm UTC](https://community.openpbs.org/t/pbs-snapshot-obfuscate-redesign/1558 "2019-04-16T15:28:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [April 16, 2019, 3:28pm UTC](https://community.openpbs.org/t/pbs-snapshot-obfuscate-redesign/1558/1 "2019-04-16T15:28:26Z")

</div>

Hi,

I’m proposing a change to the way pbs\_snapshot --obfuscate works:  
[https://pbspro.atlassian.net/wiki/spaces/PD/pages/1233125400/Redesigning+pbs+snapshot+--obfuscate](https://pbspro.atlassian.net/wiki/spaces/PD/pages/1233125400/Redesigning+pbs+snapshot+--obfuscate)

Motivation:

- pbs\_snapshot --obfuscate has many issues: it doesn’t obfuscate everything, there are bugs with obfuscating special attributes (like it only obfuscates the first entry in managers, acl attributes etc.), the obfuscated string has the same length as the original string, which could be decrypted back to the original, etc.
- pbs\_snapshot uses a PTL utility called pbs\_anonutils.py which contains code that is somewhat complicated to develop. It’s designed to have separate routines to obfuscate specific kinds of outputs (tabular, long format, resourcedef, accounting logs, etc.), and was not written for obfuscating snapshots as a whole.
- To use the existing architecture of pbs\_anonutils to obfuscate new outputs like json would have required either writing specialized routines for those outputs, or re-writing existing routines to be more generic, which would have meant essentially re-writing pbs\_anonutils.

Please review the document and provide feedback. Thanks!
