Commit Graph

5376 Commits

Author SHA1 Message Date
Mike Salvatore 78af0d86aa island: Move IslandConfigOptions validation to separate module 2021-06-07 19:28:03 -04:00
Mike Salvatore c19dc9dcad island: Add config validation to IslandConfigOptions 2021-06-07 14:41:05 -04:00
Mike Salvatore a45848ce0c island: Move file_has_expected_permissions() to file_utils.py
Rename to `has_expected_permissions()` as
`file_has_expected_permissions()` is now reduntant.

Add unit tests
2021-06-07 14:12:48 -04:00
Mike Salvatore 36314f09ae island: Use certificate provided in config, not environment variables 2021-06-07 13:24:31 -04:00
Mike Salvatore 4e1b4fbf6b island: Replace calls to os.{expandpath,expandusers} with expand_path() 2021-06-07 13:21:16 -04:00
Mike Salvatore bf0fe10ea9 island: Add unit tests for expand_path() 2021-06-07 13:18:04 -04:00
Mike Salvatore 8744011297 island: move set_home_env() to conftest.py so it can be reused 2021-06-07 13:17:22 -04:00
Mike Salvatore 0519153aaf island: Move _expand_path() to file_utils.py so it can be reused 2021-06-07 13:04:38 -04:00
Mike Salvatore e4866b1286 island: Change _expand_path() from a static to regular function
_expand_path() is a utility function used by IslandConfigOptions. It
doesn't need to be part of the class. It can potentially be reused by
other modules that require the same functionality.
2021-06-07 12:57:42 -04:00
Mike Salvatore f0a109a145 island: Add tests for ssl_certificate_key_file 2021-06-07 12:53:32 -04:00
Mike Salvatore 4231f316db island: Add tests for ssl_certificate_file 2021-06-07 12:41:11 -04:00
Mike Salvatore f2a2efc2a7 island: Remove redundant "test_island_config_options" from tests
The file is named "test_island_config_options.py". Including
"island_config_options" in every test/function name is reduntant.
2021-06-07 12:30:03 -04:00
Mike Salvatore ea0d6f0141 island: Add a generalized testing function to test_island_config_options 2021-06-07 12:20:32 -04:00
Mike Salvatore eb044207da docs: Small change to docker setup to keep consistent with linux.md 2021-06-07 11:10:41 -04:00
Mike Salvatore 871fce1549 docs: Add setup instructions for linux AppImage package 2021-06-07 11:10:36 -04:00
Mike Salvatore a42040343b docs: Add a skeleton setup page for Linux AppImage package 2021-06-07 11:08:00 -04:00
Shreya 4f601ca5dc Pass file paths to setup_certificate() instead of IslandConfigOptions 2021-06-07 20:12:29 +05:30
Shreya 42a9a79800 Modify server_config.json ssl cert fields 2021-06-07 20:12:29 +05:30
Shreya 2b73ec75c8 Move monkey_island/cc/setup/certificate/certificate_setup.py to monkey/monkey_island/cc/setup/certificate_setup.py 2021-06-07 20:12:29 +05:30
Shreya 227039f30c Add `_expand_path()` to wrap `os.path.expandvars()\' and `os.path.expanduser()\' 2021-06-07 20:12:27 +05:30
Mike Salvatore 82c3273e69 docs: Fix minor capitalization issue in docker setup 2021-06-07 10:39:44 -04:00
Mike Salvatore 6c04124303 docs: Add `--volume` workaround to docker troubleshooting
Resolves #1032
2021-06-07 10:14:24 -04:00
Mike Salvatore 16ed2e59e8 docs: Add steps for user-provided certificate for docker container 2021-06-07 10:10:27 -04:00
Mike Salvatore 8c1e76ffbe docs: Reword docker supported operating systems 2021-06-07 10:09:59 -04:00
Mike Salvatore a815850c9e Merge branch 'default-data-dir-bug' into develop 2021-06-07 06:41:38 -04:00
Mike Salvatore 2b1af17433
island: Add typehint to create_default_server_config_file()
Co-authored-by: Shreya Malviya <shreya.malviya@gmail.com>
2021-06-07 06:39:05 -04:00
VakarisZ abaeafcb6b Split one unit test test_encrypt_decrypt_config__malformed into two, one for too short configuration, another one for corrupted file. 2021-06-07 11:43:44 +03:00
VakarisZ 04a35a1e36 Improved wording in configuration export related logs and UI 2021-06-07 11:41:28 +03:00
VakarisZ 1125b0fe4b Added pyAesEncrypt to the Pipfile 2021-06-07 11:31:46 +03:00
VakarisZ e918ae1d2c Renamed a unit test to be more specific: test_decrypt_config__no_password -> test_encrypt_decrypt_config__decrypt_no_password 2021-06-07 11:30:49 +03:00
VakarisZ c487a278fe Fixed a type-hint for a config decryption method 2021-06-07 11:30:10 +03:00
Shreya 5ba8effe1a Use octal representation for permissions 2021-06-07 13:26:14 +05:30
Shreya 4ad49d19c7 Rename "required" permissions to "expected" permissions 2021-06-07 13:22:44 +05:30
Shreya 53a126482f Extract file checking activities 2021-06-07 13:22:38 +05:30
Mike Salvatore b0ac07553a island: Assert isdir() in test_monkey_island_abs_path() 2021-06-06 19:01:16 -04:00
Shreya d740173f79 Post-rebase fixes 2021-06-04 13:20:01 +05:30
Shreya 88ae762618 Expand cert and key path in IslandConfigOptions 2021-06-04 12:23:04 +05:30
Shreya a2bd59c377 Move `has_sufficient_permissions` to a separate file in utils/ 2021-06-04 12:23:03 +05:30
Shreya 6f1154f911 Add log message for which certificate is being used 2021-06-04 12:23:03 +05:30
Shreya c1463b4a18 Implement `has_sufficient_permissions` function for checking certificate files 2021-06-04 12:23:03 +05:30
Shreya c9a53833e2 Add support for custom certificate (partially) 2021-06-04 12:23:03 +05:30
Mike Salvatore 0cd9709b82 island: Remove server_config.json.develop
Since Monkey Island no longer writes to server_config.json in the source
code directory, and each package will overwrite server_config.json with
its own server config (until we separate the deployment from the config
in issue #1205), we no longer need server_config.json.develop and we
don't need to worry about accidentally committing credentials to git.
2021-06-03 20:38:13 -04:00
Mike Salvatore e57e28a97f island: Consolidate tests for consts.py 2021-06-03 20:25:07 -04:00
Mike Salvatore 5ecc02d553 island: Use the data_dir specified in the default server config 2021-06-03 20:25:05 -04:00
Mike Salvatore 00434b9a25 Only search tests/unit_tests for monkey unit tests 2021-06-03 16:09:57 -04:00
Mike Salvatore 4e888b00b1 Merge branch 'refactor-island-start' into develop 2021-06-03 16:07:08 -04:00
Mike Salvatore 19e47583e9 island: Use `os.getcwd()` for MONKEY_ISLAND_ABS_PATH on Windows
See issue #1207 for more details.
2021-06-03 15:51:36 -04:00
Mike Salvatore 03b543f7f6 island: Move setup/island_config_options.py -> cc/setup/ 2021-06-03 12:20:55 -04:00
Mike Salvatore 623d551c6c island: Move setup/config_setup.py -> cc/setup/config_setup.py 2021-06-03 11:12:39 -04:00
Mike Salvatore ac407bf48a island: Remove unused mongo_url from BootloaderHttpServer constructor 2021-06-03 11:09:07 -04:00