Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA/ModelObfuscator"

(Created page with "''Obfuscate: To deliberately make more confusing in order to conceal the truth (http://en.wiktionary.org/wiki/obfuscate)'' The VIATRA Model Obfuscator is a small utility for...")
 
Line 1: Line 1:
 
''Obfuscate: To deliberately make more confusing in order to conceal the truth (http://en.wiktionary.org/wiki/obfuscate)''
 
''Obfuscate: To deliberately make more confusing in order to conceal the truth (http://en.wiktionary.org/wiki/obfuscate)''
  
The VIATRA Model Obfuscator is a small utility for obfuscating structured graph-like models (e.g. XML documents, EMF models) by altering all data values (such as names, identifiers or other strings) in a way that the structure of the model remains the same. Two data values that were identical before the obfuscation will also be identical after it, but the obfuscated value computed based on an input obfuscation string will be completely different (e.g. "Info1" may become "oA3DD43CF5").
+
The VIATRA Model Obfuscator is a small utility for obfuscating structured graph-like models (e.g. XML documents, EMF based models) by altering all data values (such as names, identifiers or other strings) in a way that the structure of the model remains the same. Two data values that were identical before the obfuscation will also be identical after it, but the obfuscated value computed based on an input obfuscation string will be completely different (e.g. "Info1" may become "oA3DD43CF5").
  
 
For more details, read this [http://modeling-languages.com/model-obfuscator/ blog post].
 
For more details, read this [http://modeling-languages.com/model-obfuscator/ blog post].
Line 19: Line 19:
 
Initially requested in {{bug|467999}} by Ronan Barrett.
 
Initially requested in {{bug|467999}} by Ronan Barrett.
  
There are some special considerations when working with EMF-UML models and profiles. The model obfuscator has a separate feature for dealing with such issues. While you can invoke the regular obfuscation on a UML model loaded into the supported editors mentioned above, the result may not be usable later (for example in Papyrus). Instead, the specific obfuscation can be executed from the UML tree editor and the Papyrus editor.
+
There are some special considerations when working with EMF based UML models and profiles. The model obfuscator has a separate feature for dealing with such models. It is not advisable to attempt to obfuscate a UML model/profile using the Sample Ecore Model Editor or Sample Reflective Model Editor. Instead, the specific obfuscation can be executed from the UML tree editor or the Papyrus graphical editor. In Papyrus to obfuscate the model perform the following:
 +
 
 +
# Open the model to be obfuscated
 +
# Right click on a graphical editor related to the model i.e. a diagram
 +
# Select the option "Obfuscate the model/profile" from the context menu
 +
# Save the model (if you like)
  
 
=== Obfuscating UML profiles ===
 
=== Obfuscating UML profiles ===
Line 25: Line 30:
 
To perform an obfuscation you must follow this procedure carefully:
 
To perform an obfuscation you must follow this procedure carefully:
  
# Obfuscate the profile.
+
# Obfuscate the profile to be obfuscated
 +
## Open the profile to be obfuscated
 +
## Right click on a graphical editor related to the profile i.e. a diagram
 +
## Select the option "Obfuscate the model/profile" from the context menu
 
## Record the seed used. It shows in a popup and in the Error Log. In addition, the seed and the mapping between the strings of the original profile and the obfuscated profile are saved next to the profile file.
 
## Record the seed used. It shows in a popup and in the Error Log. In addition, the seed and the mapping between the strings of the original profile and the obfuscated profile are saved next to the profile file.
## Save the profile to a different file and define the profile. Note: The file name must be a different file from the original profile to allow migration.
+
## Save the profile to a different file and define the profile (if prompted). Note: The file name must be a different file from the original profile to allow migration.
 
# Migrating models to the obfuscated profile.
 
# Migrating models to the obfuscated profile.
 
## Open your model. Papyrus will use the original profile.
 
## Open your model. Papyrus will use the original profile.
 
## On the opened model select “Change profile to the obfuscated pair”. Select the obfuscated profile and the used seed. This results in the model being migrated to the obfuscated profile.
 
## On the opened model select “Change profile to the obfuscated pair”. Select the obfuscated profile and the used seed. This results in the model being migrated to the obfuscated profile.
 
# Obfuscate the model if you want. This is a completely independent operation.
 
# Obfuscate the model if you want. This is a completely independent operation.
 +
 +
=== Notes ===
 +
# Read only stereotype property values will not be obfuscated as they cannot be reset. Be sure you don't store anything sensitive in them.

Revision as of 08:44, 3 July 2015

Obfuscate: To deliberately make more confusing in order to conceal the truth (http://en.wiktionary.org/wiki/obfuscate)

The VIATRA Model Obfuscator is a small utility for obfuscating structured graph-like models (e.g. XML documents, EMF based models) by altering all data values (such as names, identifiers or other strings) in a way that the structure of the model remains the same. Two data values that were identical before the obfuscation will also be identical after it, but the obfuscated value computed based on an input obfuscation string will be completely different (e.g. "Info1" may become "oA3DD43CF5").

For more details, read this blog post.

Overview

See http://git.eclipse.org/c/viatra/org.eclipse.viatra.modelobfuscator.git/about/

Basic usage for EMF models

Simply open your model in one of the supported editors (Sample Ecore Model Editor, Sample Reflective Model Editor) and right click to access the local menu. Here you can find the "Obfuscate model" action. Note that the obfuscation is done in a command, so you can undo and redo it if you want. The obfuscation will also avoid changing read-only resources and will not save the model. The seed used for the obfuscation is shown in the dialog before the obfuscation is performed and also logged (visible in the Error Log view). If you know the seed, you can restore the model to its original form anytime (although you will need to do it from code).

UML support

Obfuscating UML models

Initially requested in bug 467999 by Ronan Barrett.

There are some special considerations when working with EMF based UML models and profiles. The model obfuscator has a separate feature for dealing with such models. It is not advisable to attempt to obfuscate a UML model/profile using the Sample Ecore Model Editor or Sample Reflective Model Editor. Instead, the specific obfuscation can be executed from the UML tree editor or the Papyrus graphical editor. In Papyrus to obfuscate the model perform the following:

  1. Open the model to be obfuscated
  2. Right click on a graphical editor related to the model i.e. a diagram
  3. Select the option "Obfuscate the model/profile" from the context menu
  4. Save the model (if you like)

Obfuscating UML profiles

To perform an obfuscation you must follow this procedure carefully:

  1. Obfuscate the profile to be obfuscated
    1. Open the profile to be obfuscated
    2. Right click on a graphical editor related to the profile i.e. a diagram
    3. Select the option "Obfuscate the model/profile" from the context menu
    4. Record the seed used. It shows in a popup and in the Error Log. In addition, the seed and the mapping between the strings of the original profile and the obfuscated profile are saved next to the profile file.
    5. Save the profile to a different file and define the profile (if prompted). Note: The file name must be a different file from the original profile to allow migration.
  2. Migrating models to the obfuscated profile.
    1. Open your model. Papyrus will use the original profile.
    2. On the opened model select “Change profile to the obfuscated pair”. Select the obfuscated profile and the used seed. This results in the model being migrated to the obfuscated profile.
  3. Obfuscate the model if you want. This is a completely independent operation.

Notes

  1. Read only stereotype property values will not be obfuscated as they cannot be reset. Be sure you don't store anything sensitive in them.

Back to the top