Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGP encryption with beanio #9

Open
pkumarappan opened this issue May 5, 2016 · 2 comments
Open

PGP encryption with beanio #9

pkumarappan opened this issue May 5, 2016 · 2 comments

Comments

@pkumarappan
Copy link

BeanIO is used to generate the formatted files in one of our projects @ our org.
It is well-versed and helped to generate the all type of specifications such as .csv, delimited, fixed-length..etc

As a payment company, we have to stick with PCI compliance, the files should not be readable by anyone immediately, because it may contain Personal Identifiable Information. BeanIO is enhanced to generate the encrypted file. Encryption is based on PGP; bouncy-castle Open Source APIs are used to generated the PGP encrypted content.

We would like to contribute this commits into BeanIO framework. So that it will be available to public, if anyone wants to generated the PGP content, then it will be quite useful.

As part of this we have added few new classes and modified few classes. We would like to know if we can commit our changes and if yes, please let us know if there is any process to be followed

@nicoschl
Copy link
Collaborator

Hi,

This sounds like a great idea. The easiest would be to create a pull request and referencing this issue.

Disclaimer: I'm not aware of any formal process at the moment nor can I guarantee that the pull request will be accepted. We can take it from here.

Nico

@bjansen
Copy link

bjansen commented Mar 12, 2021

Hi,

It turns out I'm in the exact same scenario. In my current project we have to generate flat files, and to be PCI-compliant we encrypt those with PGP, with the help of Bouncy GPG (which is a fancy API around Bouncy Castle).

IMO, generating a file and encrypting it are two separate concerns. I'm not sure it would a good idea to integrate this directly into BeanIO. What happens when someone needs to use another encryption mechanism? What happens when people are not interested in PGP encryption, and BeanIO pulls Bouncy Castle deps automatically in their project?

The Bouncy GPG API is used to create an OutputStream. BeanIO's writer accepts a Writer. It's very simple to plug those two together with an OutputStreamWriter, no need to support it out of the box.

We could mention how to encrypt files in the docs though, or perhaps provide a sample project somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants