diff --git a/HISTORY.rst b/HISTORY.rst
index cb2a27c..60dc499 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,6 +2,11 @@
 History
 =======
 
+0.1.2 (2016-12-26)
+------------------
+
+* Config command will now encrypt password field
+
 0.1.0 (2016-12-14)
 ------------------
 
diff --git a/setup.cfg b/setup.cfg
index 28bb902..1f55f25 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 0.1.1
+current_version = 0.1.2
 commit = True
 tag = False
 
diff --git a/shellfoundry/exceptions.py b/shellfoundry/exceptions.py
index 58bc158..95f9fab 100644
--- a/shellfoundry/exceptions.py
+++ b/shellfoundry/exceptions.py
@@ -20,3 +20,8 @@ class NoVersionsHaveBeenFoundException(ShellFoundryBaseException):
 class VersionRequestException(ShellFoundryBaseException):
     def __init__(self, message):
         super(VersionRequestException, self).__init__(message)
+
+class PlatformNameIsEmptyException(ShellFoundryBaseException):
+    def __init__(self, message='Machine name is empty'):
+        super(PlatformNameIsEmptyException, self).__init__(message)
+
diff --git a/shellfoundry/models/install_config.py b/shellfoundry/models/install_config.py
index b33d9d3..28e6d01 100644
--- a/shellfoundry/models/install_config.py
+++ b/shellfoundry/models/install_config.py
@@ -8,7 +8,7 @@ DEFAULT_DOMAIN = 'Global'
 class InstallConfig(object):
     def __init__(self, host, port, username, password, domain):
         self.domain = domain
-        self.password = password
+        self.password = self._decode_password(password)
         self.username = username
         self.port = port
         self.host = host
@@ -30,3 +30,7 @@ class InstallConfig(object):
     def get_default():
         return InstallConfig(DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USERNAME, DEFAULT_PASSWORD, DEFAULT_DOMAIN)
 
+    def _decode_password(self, password):
+        from shellfoundry.utilities.modifiers.configuration.password_modification import PasswordModification
+        pass_mod = PasswordModification()
+        return pass_mod.normalize(password)
diff --git a/shellfoundry/utilities/config/config_context.py b/shellfoundry/utilities/config/config_context.py
index 7ed76d1..1232aeb 100644
--- a/shellfoundry/utilities/config/config_context.py
+++ b/shellfoundry/utilities/config/config_context.py
@@ -1,22 +1,24 @@
 import yaml
 
 from shellfoundry.utilities.config_reader import INSTALL
+from shellfoundry.utilities.modifiers.configuration.aggregated_modifiers import AggregatedModifiers
 
 
 class ConfigContext(object):
     def __init__(self, config_file_path):
         self.config_file_path = config_file_path
+        self.modifier = AggregatedModifiers()
 
     def try_save(self, key, value):
         try:
             with open(self.config_file_path, mode='r+') as stream:
                 data = yaml.load(stream) or {INSTALL: dict()}
-                data[INSTALL][key] = value
+                data[INSTALL][key] = self._modify(key, value)
                 stream.seek(0)
                 stream.truncate()
                 yaml.safe_dump(data, stream=stream, default_flow_style=False)
             return True
-        except:
+        except Exception as e:
             return False
 
     def try_delete(self, key):
@@ -31,3 +33,6 @@ class ConfigContext(object):
         except:
             return False
 
+
+    def _modify(self, key, value):
+        return self.modifier.modify(key, value)
diff --git a/shellfoundry/utilities/modifiers/__init__.py b/shellfoundry/utilities/modifiers/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/shellfoundry/utilities/modifiers/configuration/__init__.py b/shellfoundry/utilities/modifiers/configuration/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/shellfoundry/utilities/modifiers/configuration/aggregated_modifiers.py b/shellfoundry/utilities/modifiers/configuration/aggregated_modifiers.py
new file mode 100644
index 0000000..cb9c2f8
--- /dev/null
+++ b/shellfoundry/utilities/modifiers/configuration/aggregated_modifiers.py
@@ -0,0 +1,19 @@
+from .password_modification import PasswordModification
+
+DEFAULT_MODIFIER = (lambda x: x) # Default modifier returns the passed value unchanged
+
+class AggregatedModifiers(object):
+    def __init__(self, modifiers=None, default=None):
+        self.modifiers = modifiers or {
+            PasswordModification.HANDLING_KEY: PasswordModification().modify
+        }
+        self.default_modifier = default or AggregatedModifiers._default_modifier
+
+    def modify(self, key, value):
+        if key in self.modifiers:
+            return self.modifiers[key](value)
+        return self.default_modifier(value)
+
+    @staticmethod
+    def _default_modifier(value): # Default modifier returns the passed value unchanged
+        return value
diff --git a/shellfoundry/utilities/modifiers/configuration/password_modification.py b/shellfoundry/utilities/modifiers/configuration/password_modification.py
new file mode 100644
index 0000000..ba19be7
--- /dev/null
+++ b/shellfoundry/utilities/modifiers/configuration/password_modification.py
@@ -0,0 +1,29 @@
+import base64
+import shellfoundry.exceptions as exceptions
+
+class PasswordModification(object):
+    HANDLING_KEY = 'password'
+
+    def modify(self, value):
+        encryption_key = self._get_encryption_key()
+        encoded = self._decode_encode(value, encryption_key)
+        return base64.b64encode(encoded)
+
+    def normalize(self, value):
+        import binascii
+        try:
+            encryption_key = self._get_encryption_key()
+            decoded = self._decode_encode(base64.decodestring(value), encryption_key)
+            return decoded
+        except binascii.Error:
+            return value
+
+    def _get_encryption_key(self):
+        from platform import node
+        machine_name = node()
+        if not machine_name:
+            raise exceptions.PlatformNameIsEmptyException()
+        return machine_name
+
+    def _decode_encode(self, value, key):
+        return ''.join(chr(ord(source) ^ ord(key)) for source, key in zip(value, key * 100))
diff --git a/shellfoundry/version.py b/shellfoundry/version.py
index 748f812..831fd7f 100644
--- a/shellfoundry/version.py
+++ b/shellfoundry/version.py
@@ -1,2 +1,2 @@
-__version__ = '0.1.1'
+__version__ = '0.1.2'
 

Password field should be encrypted
### Issue details
As a user I want the be able to configure a password via config command (#99) and that shellfoundry will encrypt the password.

* encryption should be very simple
* password should be encrypted when viewing config,yml (both local and global) in text editor



diff --git a/tests/test_commands/test_config_command.py b/tests/test_commands/test_config_command.py
index 768cec8..45e2140 100644
--- a/tests/test_commands/test_config_command.py
+++ b/tests/test_commands/test_config_command.py
@@ -1,6 +1,6 @@
 import os
 
-from mock import patch, call
+from mock import patch, call, Mock
 from pyfakefs import fake_filesystem_unittest
 
 from shellfoundry.commands.config_command import ConfigCommandExecutor
@@ -207,3 +207,25 @@ install:
 
         # Assert
         echo_mock.assert_called_with("Local config does not exists")
+
+    @patch('shellfoundry.utilities.config.config_providers.click.get_app_dir')
+    @patch('platform.node', Mock(return_value='machine-name-here'))
+    def test_set_password_config_password_should_appear_encrypted(self, get_app_dir_mock):
+        # Arrange
+        self.fs.CreateFile('/quali/shellfoundry/global_config.yml', contents="""
+install:
+  key: value
+""")
+        get_app_dir_mock.return_value = '/quali/shellfoundry'
+
+        # Act
+        ConfigCommandExecutor(True).config(('password', 'admin'))
+
+        # Assert
+        desired_result = """install:
+  key: value
+  password: DAUOAQc=
+"""
+        file_content = self.fs.GetObject('/quali/shellfoundry/global_config.yml').contents
+        self.assertTrue(file_content == desired_result, 'Expected: {}{}Actual: {}'
+                        .format(desired_result, os.linesep, file_content))
diff --git a/tests/test_models/test_install_config.py b/tests/test_models/test_install_config.py
index 9560fea..c6ddbe1 100644
--- a/tests/test_models/test_install_config.py
+++ b/tests/test_models/test_install_config.py
@@ -1,4 +1,6 @@
 import unittest
+
+from mock import Mock, patch
 from shellfoundry.models.install_config import InstallConfig
 
 
@@ -14,3 +16,14 @@ class TestInstallConfig(unittest.TestCase):
         config2 = InstallConfig('remote', 1, 'U', 'P', 'Local')
 
         self.assertNotEqual(config1, config2)
+
+    @patch('platform.node', Mock(return_value='machine-name-here'))
+    def test_encrypted_password_field_becomes_decrypted(self):
+        config = InstallConfig('localhost', 9000, 'YOUR_USERNAME', 'DAUOAQc=', 'Global')
+        self.assertEqual("admin", config.password)
+
+    @patch('platform.node', Mock(return_value='machine-name-here'))
+    def test_non_encrypted_password_field_stays_regular(self):
+        config = InstallConfig('localhost', 9000, 'YOUR_USERNAME', 'admin', 'Global')
+        self.assertEqual("admin", config.password)
+
diff --git a/tests/test_utilities/modifiers/__init__.py b/tests/test_utilities/modifiers/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_utilities/modifiers/configuration/__init__.py b/tests/test_utilities/modifiers/configuration/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_utilities/modifiers/configuration/test_password_modification.py b/tests/test_utilities/modifiers/configuration/test_password_modification.py
new file mode 100644
index 0000000..9b54cb2
--- /dev/null
+++ b/tests/test_utilities/modifiers/configuration/test_password_modification.py
@@ -0,0 +1,13 @@
+import unittest
+
+from mock import patch, Mock
+from shellfoundry.utilities.modifiers.configuration.password_modification import  PasswordModification
+from shellfoundry.exceptions import PlatformNameIsEmptyException
+
+class TestPasswordModification(unittest.TestCase):
+    @patch('platform.node', Mock(return_value=''))
+    def test_platform_node_returns_empty_error_is_raise(self):
+        pass_mod = PasswordModification()
+        with self.assertRaises(PlatformNameIsEmptyException):
+            pass_mod.modify('some_value')
+

pip install -e .
parse_log_pytest
requirements.txt
mock pyfakefs httpretty quali-testing-helpers freezegun flake8 pytest
2.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
arrow==1.2.3
attrs==22.2.0
binaryornot==0.4.4
certifi==2021.5.30
chardet==5.0.0
charset-normalizer==2.0.12
click==8.0.4
cloudshell-automation-api==7.1.0.519
cloudshell-rest-api==8.2.4.0
cookiecutter==1.7.3
flake8==5.0.4
freezegun==1.2.2
giturlparse.py==0.0.5
httpretty==1.1.4
idna==3.10
importlib-metadata==4.2.0
iniconfig==1.1.1
Jinja2==3.0.3
jinja2-time==0.2.0
MarkupSafe==2.0.1
mccabe==0.7.0
mock==5.2.0
packaging==21.3
pluggy==1.0.0
poyo==0.5.0
py==1.11.0
pycodestyle==2.9.1
pyfakefs==4.6.3
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
python-slugify==6.1.2
PyYAML==6.0.1
qpm==1.21
quali-testing-helpers==1.0.0
requests==2.27.1
-e git+https://github.com/QualiSystems/shellfoundry.git@c3b1f951ad3eac897864adaf40c907fb4a04be3d#egg=shellfoundry
six==1.17.0
terminaltables==3.1.10
text-unidecode==1.3
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: shellfoundry
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - arrow==1.2.3
      - attrs==22.2.0
      - binaryornot==0.4.4
      - chardet==5.0.0
      - charset-normalizer==2.0.12
      - click==8.0.4
      - cloudshell-automation-api==7.1.0.519
      - cloudshell-rest-api==8.2.4.0
      - cookiecutter==1.7.3
      - flake8==5.0.4
      - freezegun==1.2.2
      - giturlparse-py==0.0.5
      - httpretty==1.1.4
      - idna==3.10
      - importlib-metadata==4.2.0
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - jinja2-time==0.2.0
      - markupsafe==2.0.1
      - mccabe==0.7.0
      - mock==5.2.0
      - packaging==21.3
      - pluggy==1.0.0
      - poyo==0.5.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pyfakefs==4.6.3
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - python-slugify==6.1.2
      - pyyaml==6.0.1
      - qpm==1.21
      - quali-testing-helpers==1.0.0
      - requests==2.27.1
      - six==1.17.0
      - terminaltables==3.1.10
      - text-unidecode==1.3
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/shellfoundry

tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_echo_config_data_when_global_config_does_not_exists tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_echo_config_data_when_local_config_does_not_exists tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_remove_key_from_global_where_global_config_file_does_not_exists tests/test_utilities/modifiers/configuration/test_password_modification.py::TestPasswordModification::test_platform_node_returns_empty_error_is_raise
tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_adding_key_to_global_config_that_hasnt_been_created_yet tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_get_all_config_keys tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_get_all_config_keys_that_has_password_param tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_invalid_global_config_should_echo_no_install_section tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_remove_key_is_allowed tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_set_global_config_key tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_set_local_config_key tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_set_password_config_password_should_appear_encrypted tests/test_commands/test_config_command.py::TestConfigCommandExecutor::test_update_existing_key tests/test_models/test_install_config.py::TestInstallConfig::test_encrypted_password_field_becomes_decrypted tests/test_models/test_install_config.py::TestInstallConfig::test_non_encrypted_password_field_stays_regular tests/test_models/test_install_config.py::TestInstallConfig::test_two_instances_should_be_equal tests/test_models/test_install_config.py::TestInstallConfig::test_two_instances_should_not_be_equal
shellfoundry/models/install_config.py HISTORY.rst shellfoundry/utilities/modifiers/configuration/__init__.py shellfoundry/utilities/modifiers/configuration/password_modification.py shellfoundry/utilities/config/config_context.py setup.cfg shellfoundry/utilities/modifiers/configuration/aggregated_modifiers.py shellfoundry/version.py shellfoundry/utilities/modifiers/__init__.py shellfoundry/exceptions.py
shellfoundry/models/install_config.py HISTORY.rst shellfoundry/utilities/modifiers/configuration/__init__.py shellfoundry/utilities/modifiers/configuration/password_modification.py shellfoundry/utilities/config/config_context.py setup.cfg shellfoundry/utilities/modifiers/configuration/aggregated_modifiers.py shellfoundry/version.py shellfoundry/utilities/modifiers/__init__.py shellfoundry/exceptions.py