Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMFstore: encrypted model persistence?
EMFstore: encrypted model persistence? [message #1441816] Fri, 10 October 2014 04:15 Go to next message
Eclipse UserFriend
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 05:48 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 07:37:54 EDT 2025

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

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

Back to the top