Esempio n. 1
0
    def select_encryption_type(cls, encryption):
        # Allowed encryption types
        Page.check(cls.xpaths["user_choose_encryption"])

        # Choose encryption type
        if encryption.upper() == "KMIP":
            cls.set_kmip()

        elif encryption.upper() == "DEFAULT":
            Page.uncheck(cls.xpaths["user_choose_random"])
            Page.uncheck(cls.xpaths["user_choose_pkey"])
            Page.check(cls.xpaths["user_choose_default"])
            # Page.delayed_click((cls.xpaths["user_choose_default"]), sleep_time=2)
        elif encryption.upper() == "RANDOM":
            Page.uncheck(cls.xpaths["user_choose_default"])
            Page.uncheck(cls.xpaths["user_choose_pkey"])
            Page.check(cls.xpaths["user_choose_random"])
            # Page.delayed_click((cls.xpaths["user_choose_random"]), sleep_time=2)
            Page.delayed_click((cls.xpaths["allow_export_both"]), sleep_time=2)
        elif encryption.upper() == "PKEY":
            Page.uncheck(cls.xpaths["user_choose_default"])
            Page.uncheck(cls.xpaths["user_choose_random"])
            Page.check(cls.xpaths["user_choose_pkey"])
            # Page.delayed_click((cls.xpaths["user_choose_pkey"]), sleep_time=2)
            Page.delayed_click((cls.xpaths["allow_export_pkey"]), sleep_time=2)
        elif encryption.upper() == "CKEY":
            ckey = GLOBAL_CONFIG.get('CKEY')
            Page.delayed_click((cls.xpaths["user_choose_ckey"]), sleep_time=2)
            Page.clear(cls.xpaths['ckey_url'])
            Page.locate_element(cls.xpaths['ckey_url']).send_keys(ckey)
        else:
            assert "ERROR: Please check if you use the correct encryption type in [default, pkey, random, ckey, kmip]."
Esempio n. 2
0
 def enforce_encryption(cls):
     Page.check(cls.xpaths["enforce_encryption"])
     Page.check(cls.xpaths["enforce_encryption_cascade"])