Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMFstore: encrypted model persistence?
EMFstore: encrypted model persistence? [message #1441816] Fri, 10 October 2014 08:15 Go to next message
Christian Reuter is currently offline Christian ReuterFriend
Messages: 34
Registered: October 2010
Member
Hi,

I want to save passwords in an emf model which is persisted by an emfstore server. However the "projectstate-XXX.ups" - files which are saved by the server to persist the model are unencrypted xml-files which is not very good when saving passwords.

Is there any hidden option which I can set in the properties.es file to have emfstore save encrypted model persistence files instead?

If not: can you put this on the desirable feature list?

As it is quite easy to define a custom resourceFactory which encrypts the files like in the following code this should not be a big deal to implement:
public class MyXMIFactoryImpl extends XMIResourceFactoryImpl {

  @Override
  public Resource createResource(URI uri) {
    XMIResourceFactoryImpl resFactory = new XMIResourceFactoryImpl();
    XMIResource resource = (XMIResource) resFactory.createResource(uri);
    try {
      resource.getDefaultLoadOptions().put(Resource.OPTION_CIPHER,
          new AESCipherImpl("12345"));
      resource.getDefaultSaveOptions().put(Resource.OPTION_CIPHER,
          new AESCipherImpl("12345"));
    } catch (Exception e) {
      e.printStackTrace();
    }
    return resource;
  }
} 


Thx,

chris
Re: EMFstore: encrypted model persistence? [message #1441873 is a reply to message #1441816] Fri, 10 October 2014 09:48 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

IMHO, the model does not sound like a perfect place to save password. If
required, I would only encrypt the password field itself, not the
complete model. The password for the encyrption would have to come from
the user to be secure.
However, why don't you just replace the resource factory, used by EMFStore?

best regards

Jonas

Am 10.10.2014 10:15, schrieb Christian Reuter:
> Hi,
>
> I want to save passwords in an emf model which is persisted by an
> emfstore server. However the "projectstate-XXX.ups" - files which are
> saved by the server to persist the model are unencrypted xml-files which
> is not very good when saving passwords.
>
> Is there any hidden option which I can set in the properties.es file to
> have emfstore save encrypted model persistence files instead?
>
> If not: can you put this on the desirable feature list?
>
> As it is quite easy to define a custom resourceFactory which encrypts
> the files like in the following code this should not be a big deal to
> implement:
>
> public class MyXMIFactoryImpl extends XMIResourceFactoryImpl {
>
> @Override
> public Resource createResource(URI uri) {
> XMIResourceFactoryImpl resFactory = new XMIResourceFactoryImpl();
> XMIResource resource = (XMIResource) resFactory.createResource(uri);
> try {
> resource.getDefaultLoadOptions().put(Resource.OPTION_CIPHER,
> new AESCipherImpl("12345"));
> resource.getDefaultSaveOptions().put(Resource.OPTION_CIPHER,
> new AESCipherImpl("12345"));
> } catch (Exception e) {
> e.printStackTrace();
> }
> return resource;
> }
> }
>
> Thx,
>
> chris
Previous Topic:[EMF Forms] Show Rule not working if condition is an Enum Feature
Next Topic:[EMF Forms] Stable version for experiment
Goto Forum:
  


Current Time: Fri Apr 19 11:05:06 GMT 2024

Powered by FUDForum. Page generated in 0.02430 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top