Esempio n. 1
0
    def wrong_cert_type_error(self, client):
        '''
        Test that tries to import a wrong type of certificate to the server. This certificate should not be imported.
        :param self: MainController object
        :param client: client data
        :return: None
        '''

        # TEST PLAN 2.1.3.1-2 certificate is not a signing certificate

        self.log('2.1.3.1-2 test importing a certificate that is not a signing certificate')
        remote_csr_path = 'temp.der'
        cert_path = 'temp.pem'

        # Set local path for certificate
        local_cert_path = self.get_download_path(cert_path)

        server_name = ssh_server_actions.get_server_name(self)

        # Remove temporary files
        for fpath in glob.glob(self.get_download_path('*')):
            os.remove(fpath)

        # Generate CSR for the client
        self.log('2.1.3.1-2 generate CSR for the client')
        generate_csr(self, client['code'], client['class'], ssh_server_actions.get_server_name(self))
        file_path = \
            glob.glob(self.get_download_path('_'.join(['*', server_name, client['class'], client['code']]) + '.der'))[0]

        # Create SSH connection to CA
        sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                         self.config.get('ca.ssh_pass'))

        # Get an authentication certificate instead of signing certificate.
        self.log('2.1.3.1-2 get the authentication certificate')
        get_cert(sshclient, 'sign-auth', file_path, local_cert_path, cert_path, remote_csr_path)
        time.sleep(6)
        file_cert_path = glob.glob(local_cert_path)[0]

        # Try to import certificate
        self.log('2.1.3.1-2 trying to import authentication certificate as signing certificate. Should fail.')
        import_cert(self, file_cert_path)
        self.wait_jquery()
        time.sleep(3)
        assert messages.get_error_message(
            self) == messages.CERTIFICATE_NOT_SIGNING_KEY
        self.log('2.1.3.1-2 certificate not accepted, test succeeded')

        self.log('2.1.3.1-2 remove test data')
        popups.close_all_open_dialogs(self)
        remove_certificate(self, client)
Esempio n. 2
0
    def no_key_error(self, client):
        '''
        Try to import certificate that does not have a corresponding key in the server. Should fail.
        :param self: MainController object
        :param client: client data
        :return: None
        '''

        # TEST PLAN 2.1.3.1-3 key used for requesting the certificate is not found
        self.log('2.1.3.1-3 test importing a certificate that does not have a corresponding key')
        remote_csr_path = 'temp.der'
        cert_path = 'temp.pem'

        # Get local certificate path
        local_cert_path = self.get_download_path(cert_path)

        server_name = ssh_server_actions.get_server_name(self)

        # Remove temporary files
        for fpath in glob.glob(self.get_download_path('*')):
            os.remove(fpath)

        # Generate CSR
        self.log('2.1.3.1-3 generate CSR for the client')
        generate_csr(self, client['code'], client['class'], ssh_server_actions.get_server_name(self))
        file_path = \
            glob.glob(self.get_download_path('_'.join(['*', server_name, client['class'], client['code']]) + '.der'))[0]
        sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                         self.config.get('ca.ssh_pass'))

        # Get the signing certificate from CA
        self.log('2.1.3.1-3 getting signing certificate from the CA')
        get_cert(sshclient, 'sign-sign', file_path, local_cert_path, cert_path, remote_csr_path)
        time.sleep(6)
        file_cert_path = glob.glob(local_cert_path)[0]

        # Remove the certificate and key from the server
        self.log('2.1.3.1-3 remove the key from the server')
        remove_certificate(self, client)

        # Try to import the certificate that does not have a key any more
        self.log('2.1.3.1-3 try to import the certificate. Should fail.')
        import_cert(self, file_cert_path)
        self.wait_jquery()
        time.sleep(3)

        assert messages.get_error_message(self) == messages.NO_KEY_FOR_CERTIFICATE
        self.log('2.1.3.1-3 got an error message, test succeeded')
Esempio n. 3
0
    def test_case(self):
        '''
        Test 2.1.3 success scenarios. Failure scenarios are tested in another function.
        :param self: MainController object
        :return: None
        '''

        # TEST PLAN 2.1.3 security server client certification
        # Failure scenarios (2.1.3.1) are tested under failing_tests()
        self.log('*** 2.1.3 / XT-457')

        # Set certificate filenames
        remote_csr_path = 'temp.der'
        cert_path = 'temp.pem'

        server_name = ssh_server_actions.get_server_name(self)

        # Get files to be removed (some may be left from previous runs)
        path_wildcard = self.get_download_path('*')

        # Loop over the files and remove them
        for fpath in glob.glob(path_wildcard):
            try:
                os.remove(fpath)
            except:
                pass

        # TEST PLAN 2.1.3-1 generate key for authentication device, and
        # TEST PLAN 2.1.3-2 generate certificate request for the key and save it to local system
        self.log('2.1.3-1, 2.1.3-2 generate key and certificate request using that key')
        generate_csr(self, client_code, client_class, server_name)

        # Get the certificate request path
        file_path = glob.glob(self.get_download_path('_'.join(['*', server_name, client_class, client_code]) + '.der'))[
            0]

        # Create an SSH connection to CA
        client = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                      self.config.get('ca.ssh_pass'))

        # Get the certificate local path
        local_cert_path = self.get_download_path(cert_path)

        # TEST PLAN 2.1.3-3 upload certificate request to CA and get the signing certificate from CA
        self.log('2.1.3-3 upload certificate request to CA and get the siging certificate')
        get_cert(client, 'sign-sign', file_path, local_cert_path, cert_path, remote_csr_path)
        time.sleep(6)

        file_cert_path = glob.glob(local_cert_path)[0]

        # TEST PLAN 2.1.3-4 import the certificate to security server
        self.log('2.1.3-4 import certificate to security server')
        import_cert(self, file_cert_path)

        # Check if import succeeded
        self.log('2.1.3-4 check if import succeeded')
        check_import(self, client_class, client_code)
def user_1_actions(self, user, client):
    '''
    Executes actions with user1.
    :param self: MainController object
    :param user: dict - user data
    :param client: dict - client data
    :return: None
    '''
    # TEST PLAN 2.10.1-3 log in with user1
    self.log('2.10.1-3 log in with user1')

    self.driver.get(self.url)
    self.login(username=user[USERNAME], password=user[PASSWORD])

    # TEST PLAN 2.10.1-4 add new client
    self.log('2.10.1-4 add new client')

    # Click on "ADD CLIENT BUTTON"
    self.wait_until_visible(
        type=By.ID, element=clients_table_vm.ADD_CLIENT_BTN_ID).click()
    # wait until visible 'Member Code' textarea
    member_code_area = self.wait_until_visible(
        type=By.ID, element=popups.ADD_CLIENT_POPUP_MEMBER_CODE_AREA_ID)
    # wait until visible 'subsystem area' textarea
    subsystem_code_area = self.wait_until_visible(
        type=By.ID, element=popups.ADD_CLIENT_POPUP_SUBSYSTEM_CODE_AREA_ID)
    self.log('Write {0} to MEMBER CODE area'.format(client['code']))

    self.input(member_code_area, client['code'])
    self.log('Write {0} to SUBSYTEM CODE area'.format(client['subsystem']))

    self.input(subsystem_code_area, client['subsystem'])
    self.log('Click on OK')
    self.wait_until_visible(
        type=By.XPATH, element=popups.ADD_CLIENT_POPUP_OK_BTN_XPATH).click()
    self.wait_jquery()
    time.sleep(5)

    self.log('Warning message: {0}'.format(messages.get_warning_message(self)))
    self.log('Ignore warning and click continue')
    self.wait_until_visible(
        type=By.XPATH, element=popups.WARNING_POPUP_CONTINUE_XPATH).click()
    self.log('Client created')

    self.log('Cancel client registration')
    self.wait_jquery()
    time.sleep(2)
    self.wait_until_visible(
        type=By.XPATH, element=popups.CONFIRM_POPUP_CANCEL_BTN_XPATH).click()
    self.wait_jquery()
    # Save client id as variable
    self.added_client_id = ' : '.join([
        client['type'],
        ssh_server_actions.get_server_name(self), client['class'],
        client['code'], client['subsystem']
    ])
Esempio n. 5
0
def added_client_row(self, client):
    '''
    Get the added client row from the table.
    :param self: MainController object
    :param client: client data
    :return: WebDriverElement - client row
    '''
    self.log('Finding added client')

    self.added_client_id = ' : '.join(
        ['SUBSYSTEM', ssh_server_actions.get_server_name(self), client['class'], client['code'],
         client['subsystem_code']])
    table_rows = self.by_css(clients_table_vm.CLIENT_ROW_CSS, multiple=True)
    client_row_index = clients_table_vm.find_row_by_client(table_rows, client_id=self.added_client_id)
    return table_rows[client_row_index]
def added_client_row(self, client):
    '''
    Finds client row from table and returns it.
    :param self: MainController object
    :param client: dict - client data
    :return: WebDriverElement - client row
    '''
    self.log('Finding added client')
    self.wait_jquery()
    self.added_client_id = ' : '.join([
        client['type'],
        ssh_server_actions.get_server_name(self), client['class'],
        client['code'], client['subsystem']
    ])
    table_rows = self.by_css(clients_table_vm.CLIENT_ROW_CSS, multiple=True)
    client_row_index = clients_table_vm.find_row_by_client(
        table_rows, client_id=self.added_client_id)
    return table_rows[client_row_index]
def register_subsystem_to_security_server(self, ssh_client, user, member,
                                          server_id):
    '''
    Registers a subsystem to security server and checks if it was logged.
    :param self: MainController object
    :param ssh_client: SSHClient object
    :param user: dict - user data
    :param member: dict - member and subsystem data
    :param server_id: str - server identifier
    :return: None
    '''
    # Go to UI main page
    self.driver.get(self.url)
    self.wait_jquery()

    # Open security server details
    self.log('Open Security server details popup')
    self.wait_until_visible(type=By.CSS_SELECTOR,
                            element=sidebar.SECURITY_SERVERS_CSS).click()
    self.wait_jquery()
    self.wait_until_visible(
        type=By.XPATH,
        element=members_table.get_row_by_td_text(server_id)).click()
    self.wait_jquery()
    self.wait_until_visible(type=By.ID,
                            element=cs_security_servers.
                            SECURITY_SERVER_CLIENT_DETAILS_BTN_ID).click()
    self.wait_jquery()
    self.wait_until_visible(
        type=By.XPATH, element=cs_security_servers.SERVER_CLIENT_TAB).click()
    self.wait_jquery()
    self.wait_until_visible(type=By.ID,
                            element=cs_security_servers.
                            ADD_CLIENT_TO_SECURITYSERVER_BTN_ID).click()
    self.wait_jquery()
    self.wait_until_visible(type=By.ID,
                            element=cs_security_servers.SEARCH_BTN_ID).click()
    self.wait_jquery()

    # Open clients tab
    self.log('Open security servers clients tab')
    table = self.wait_until_visible(
        type=By.ID, element=cs_security_servers.MEMBERS_TABLE_ID)
    self.wait_jquery()

    # Find the member from the table and click the row
    members_table.get_row_by_columns(table, [
        member['name'], member['code'], member['class'], member['subsystem'],
        ssh_server_actions.get_server_name(self), 'SUBSYSTEM'
    ]).click()
    self.wait_jquery()
    time.sleep(1)
    self.wait_until_visible(
        type=By.XPATH,
        element=cs_security_servers.SELECT_MEMBER_BTN_XPATH).click()
    self.wait_jquery()

    # Register the client
    self.log('Register client to security server')
    self.wait_until_visible(
        type=By.ID,
        element=cs_security_servers.
        SECURITYSERVER_CLIENT_REGISTER_SUBMIT_BTN_ID).click()
    self.wait_jquery()

    # TEST PLAN 2.11.1-14 check if registering client to security server was logged
    bool_value, data, date_time = check_logs_for(
        ssh_client, REGISTER_MEMBER_AS_SEC_SERVER_CLIENT, user[USERNAME])
    self.is_true(
        bool_value,
        test_name,
        '2.11.1-10/2.11.1-14 log check for registering client to security server - check failed',
        '2.11.1-10/2.11.1-14 log check for registering client to security server',
    )
Esempio n. 8
0
    def already_existing_error(self, client):
        '''
        Test importing a certificate that already exists. Should not be added as a duplicate.
        :param self: MainController object
        :param client: client data
        :return: None
        '''

        # TEST PLAN 2.1.3.1-6 try to import a certificate that has already been added.
        self.log('2.1.3.1-6 try to import a certificate that has already been added.')

        self.driver.get(self.url)
        self.wait_jquery()

        remote_csr_path = 'temp.der'
        cert_path = 'temp.pem'

        # Get local certificate path
        local_cert_path = self.get_download_path(cert_path)

        server_name = ssh_server_actions.get_server_name(self)

        for fpath in glob.glob(self.get_download_path('*')):
            os.remove(fpath)

        # Generate CSR for the client
        self.log('2.1.3.1-6 generate CSR for the client')
        generate_csr(self, client['code'], client['class'], ssh_server_actions.get_server_name(self))
        file_path = \
            glob.glob(self.get_download_path('_'.join(['*', server_name, client['class'], client['code']]) + '.der'))[0]

        # Open an SSH connection to CA
        sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                         self.config.get('ca.ssh_pass'))

        # Get the signing certificate from CA
        self.log('2.1.3.1-6 get signing certificate from CA')
        get_cert(sshclient, 'sign-sign', file_path, local_cert_path, cert_path, remote_csr_path)
        time.sleep(6)
        file_cert_path = glob.glob(local_cert_path)[0]

        # Import the signing certificate. Should succeed.
        self.log('2.1.3.1-6 import the signing certificate.')
        import_cert(self, file_cert_path)
        self.wait_jquery()
        time.sleep(3)

        # Import the same signing certificate. Should fail.
        self.log('2.1.3.1-6 import the same signing certificate. Should fail.')
        import_cert(self, file_cert_path)
        self.wait_jquery()
        time.sleep(3)

        assert messages.CERTIFICATE_ALREADY_EXISTS in messages.get_error_message(self)
        self.log('2.1.3.1-6 got an error for duplicate certificate, test succeeded')

        popups.close_all_open_dialogs(self)

        # Remove the certificate
        self.log('2.1.3.1-6 removing the test certificate')
        remove_certificate(self, client)
Esempio n. 9
0
    def no_client_for_certificate_error(self, client):
        '''
        Try to import a certificate that is issued to a non-existing client. Should fail.
        :param self: MainController object
        :param client: client data
        :return: None
        '''

        # TEST PLAN 2.1.3.1-4 client set in the certificate is not in the system
        self.log('2.1.3.1-4 import a certificate that is issued to a non-existing client.')

        self.driver.get(self.url)
        self.wait_jquery()

        remote_csr_path = 'temp.der'
        cert_path = 'temp.pem'

        # Get the local path of the certificate
        local_cert_path = self.get_download_path(cert_path)

        server_name = ssh_server_actions.get_server_name(self)

        # Remove temporary files
        for fpath in glob.glob(self.get_download_path('*')):
            os.remove(fpath)

        # Generate CSR for the client
        self.log('2.1.3.1-4 generate CSR for the client')
        generate_csr(self, client['code'], client['class'], ssh_server_actions.get_server_name(self))
        file_path = \
            glob.glob(self.get_download_path('_'.join(['*', server_name, client['class'], client['code']]) + '.der'))[0]

        # Create an SSH connection to CA
        sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                         self.config.get('ca.ssh_pass'))

        # Get the signing certificate from CA
        self.log('2.1.3.1-4 get the signing certificate from CA')
        get_cert(sshclient, 'sign-sign', file_path, local_cert_path, cert_path, remote_csr_path)
        time.sleep(6)
        file_cert_path = glob.glob(local_cert_path)[0]

        # Remove the test client.
        self.log('2.1.3.1-4 removing test client.')
        remove_client(self, client)

        # Try to import the certificate. Should fail.
        self.log('2.1.3.1-4 import a certificate that is issued to the client that was just removed. Should fail.')
        import_cert(self, file_cert_path)
        self.wait_jquery()
        time.sleep(3)

        assert messages.NO_CLIENT_FOR_CERTIFICATE in messages.get_error_message(self)
        self.log('2.1.3.1-4 got an error, test succeeded.')

        popups.close_all_open_dialogs(self)

        # Remove the certificate from the server
        self.log('2.1.3.1-4 removing the certificate.')
        remove_certificate(self, client)

        self.driver.get(self.url)
        self.wait_jquery()

        # Restore the client
        self.log('2.1.3.1-4 restoring the client.')
        add_client(self, client)

        # Wait until data updated
        time.sleep(60)
Esempio n. 10
0
    def not_valid_ca_error(self, client):
        '''
        Test for trying to add a certificate that was not issued by a valid certification authority (2.1.3.1-1)
        Expectation: certificate not added.
        :param self: MainController object
        :param client: client data
        :return: None
        '''

        # TEST PLAN 2.1.3.1-1 certificate is issued by a certification authority that is not in the allow list
        self.log('2.1.3.1-1 certificate is issued by a certification authority that is not in the allow list')
        error = False
        try:
            remote_csr_path = 'temp.der'
            cert_path = 'temp.pem'

            # Get local certificate path
            local_cert_path = self.get_download_path(cert_path)

            server_name = ssh_server_actions.get_server_name(self)

            # Remove temporary files
            for fpath in glob.glob(self.get_download_path('*')):
                os.remove(fpath)

            # Generate CSR for the client
            self.log('2.1.3.1-1 Generate CSR for the client')
            generate_csr(self, client['code'], client['class'], ssh_server_actions.get_server_name(self))
            file_path = \
                glob.glob(
                    self.get_download_path('_'.join(['*', server_name, client['class'], client['code']]) + '.der'))[0]

            # Create a new SSH connection to CA
            sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'), self.config.get('ca.ssh_user'),
                                             self.config.get('ca.ssh_pass'))

            # Get the signing certificate from our CSR
            self.log('2.1.3.1-1 Get the signing certificate from the certificate request')
            get_cert(sshclient, 'sign-sign', file_path, local_cert_path, cert_path, remote_csr_path)
            time.sleep(6)
            file_cert_path = glob.glob(local_cert_path)[0]

            # Remove CA from central server
            self.log('2.1.3.1-1 Removing ca from central server')

            # Relogin
            self.logout(self.config.get('cs.host'))
            self.login(self.config.get('cs.user'), self.config.get('cs.pass'))

            # Go to certification services in the UI
            self.wait_until_visible(type=By.CSS_SELECTOR, element=sidebar_constants.CERTIFICATION_SERVICES_CSS).click()

            table = self.wait_until_visible(type=By.ID, element=certification_services.CERTIFICATION_SERVICES_TABLE_ID)
            rows = table.find_element_by_tag_name('tbody').find_elements_by_tag_name('tr')

            # Find our CA and remove it
            for row in rows:
                if self.config.get('ca.ssh_host') in row.text:
                    row.click()
                    self.wait_until_visible(type=By.ID, element=certification_services.DELETE_BTN_ID).click()
                    popups.confirm_dialog_click(self)

            self.log('Wait 240 seconds for changes')
            time.sleep(240)
            self.log('Reloading page after changes')

            # Reload page and wait until additional data is loaded using jQuery
            self.driver.refresh()
            self.wait_jquery()

            # Try to import the certificate
            self.log('2.1.3.1-1 Trying to import certificate')
            import_cert(self, file_cert_path)
            self.wait_jquery()
            time.sleep(2)

            # Check if we got an error message
            assert messages.get_error_message(self) == messages.CA_NOT_VALID_AS_SERVICE
            self.log('2.1.3.1-1 got correct error message')
        except:
            # Test failed

            self.log('2.1.3.1-1 failed')
            # Print traceback
            traceback.print_exc()
            error = True
        finally:
            # After testing, re-add the CA and restore the state the server was in
            self.log('2.1.3.1-1-del restoring previous state')

            # Login to Central Server
            self.driver.get(self.config.get('cs.host'))

            if not login.check_login(self, self.config.get('cs.user')):
                self.login(self.config.get('cs.user'), self.config.get('cs.pass'))

            # Create SSH connection to CA
            sshclient = ssh_client.SSHClient(self.config.get('ca.ssh_host'),
                                             self.config.get('ca.ssh_user'),
                                             self.config.get('ca.ssh_pass'))

            target_ca_cert_path = self.get_download_path("ca.pem")
            target_ocsp_cert_path = self.get_download_path("ocsp.pem")

            # Get CA certificates using SSH
            self.log('2.1.3.1-1-del Getting CA certificates')
            get_ca_certificate(sshclient, 'ca.cert.pem', target_ca_cert_path)
            get_ca_certificate(sshclient, 'ocsp.cert.pem', target_ocsp_cert_path)
            sshclient.close()

            # Go to Central Server UI main page
            self.driver.get(self.config.get('cs.host'))

            self.wait_until_visible(type=By.CSS_SELECTOR, element=sidebar_constants.CERTIFICATION_SERVICES_CSS).click()
            self.wait_jquery()
            time.sleep(3)

            table = self.wait_until_visible(type=By.ID, element=certification_services.CERTIFICATION_SERVICES_TABLE_ID)
            rows = table.find_element_by_tag_name('tbody').find_elements_by_tag_name('tr')

            # If CA server is not listed, re-add it
            if self.config.get('ca.ssh_host') not in map(lambda x: x.text, rows):
                self.log('2.1.3.1-1-del CA not found, re-adding')
                self.wait_until_visible(type=By.ID, element=certification_services.ADD_BTN_ID).click()
                import_cert_btn = self.wait_until_visible(type=By.ID,
                                                          element=certification_services.IMPORT_CA_CERT_BTN_ID)

                # Upload CA certificate and submit the form
                xroad.fill_upload_input(self, import_cert_btn, target_ca_cert_path)

                self.wait_until_visible(type=By.ID, element=certification_services.SUBMIT_CA_CERT_BTN_ID).click()

                # Set CA additional information
                profile_info_area = self.wait_until_visible(type=By.CSS_SELECTOR,
                                                            element=certification_services.CETIFICATE_PROFILE_INFO_AREA_CSS)

                self.input(profile_info_area,
                           'ee.ria.xroad.common.certificateprofile.impl.EjbcaCertificateProfileInfoProvider')

                # Save the settings
                self.wait_until_visible(type=By.ID, element=certification_services.SUBMIT_CA_SETTINGS_BTN_ID).click()
                self.wait_jquery()

                # Open OCSP tab
                self.wait_until_visible(type=By.XPATH, element=certification_services.OCSP_RESPONSE_TAB).click()

                self.log('2.1.3.1-1-del Add OCSP responder')
                self.wait_until_visible(type=By.ID, element=certification_services.OCSP_RESONDER_ADD_BTN_ID).click()

                # Import OCSP certificate
                import_cert_btn = self.wait_until_visible(type=By.ID,
                                                          element=certification_services.IMPORT_OCSP_CERT_BTN_ID)

                xroad.fill_upload_input(self, import_cert_btn, target_ocsp_cert_path)

                url_area = self.wait_until_visible(type=By.ID, element=certification_services.OCS_RESPONSE_URL_AREA_ID)

                self.input(url_area, self.config.get('ca.ocs_host'))

                # Save OCSP information
                self.wait_until_visible(type=By.ID,
                                        element=certification_services.SUBMIT_OCSP_CERT_AND_URL_BTN_ID).click()

            # Reload CS main page
            self.driver.get(self.url)

            # Open keys and certificates
            self.wait_until_visible(type=By.CSS_SELECTOR, element=sidebar_constants.KEYSANDCERTIFICATES_BTN_CSS).click()

            # Remove the testing certificate
            remove_certificate(self, client)

            self.log('Wait 120 seconds for changes')
            time.sleep(120)
            if error:
                # If, at some point, we got an error, fail the test now
                assert False, '2.1.3.1-1 test failed'
Esempio n. 11
0
def add_services_to_client(self, ssh_host, ssh_username, ssh_password,
                           sec_host, sec_username, sec_password, users, client,
                           wsdl_url):
    # TEST PLAN 2.11.2-8 logout user2 and login as user3
    self.log('2.11.2-8 logout user2 and login as user3')
    self.logout(sec_host)
    # TEST PLAN 2.11.2-14 logout logging check
    bool_value, log_data, date_time = check_logs_for(self, ssh_host,
                                                     ssh_username,
                                                     ssh_password, LOGOUT,
                                                     users['user2'][USERNAME])
    self.is_true(bool_value, test_name,
                 '2.11.2-8/2.11.2-14 logout logging check - check failed',
                 '2.11.2-8/2.11.2-14 logout logging check')

    # Login as user3
    self.login(username=sec_username, password=sec_password)
    # TEST PLAN 2.11.2-14 login logging check
    bool_value, log_data, date_time = check_logs_for(self, ssh_host,
                                                     ssh_username,
                                                     ssh_password, LOGIN,
                                                     sec_username)
    self.is_true(bool_value, test_name,
                 '2.11.2-8/2.11.2-14 login logging check - check failed',
                 '2.11.2-8/2.11.2-14 login logging check')
    # TEST PLAN 2.11.2-9 trying to add invalid WSDL to client
    self.log('2.11.2-9 trying to add invalid WSDL to client')
    self.wait_jquery()
    added_client_row(self=self, client=client).find_element_by_css_selector(
        clients_table.SERVICES_TAB_CSS).click()
    self.wait_until_visible(
        type=By.ID,
        element=popups.CLIENT_DETAILS_POPUP_ADD_WSDL_BTN_ID).click()
    wsdl_area = self.wait_until_visible(type=By.ID,
                                        element=popups.ADD_WSDL_POPUP_URL_ID)
    self.input(wsdl_area,
               self.config.get('wsdl.remote_path').format(
                   ''))  # URL that does not return a WSDL file
    self.wait_until_visible(
        type=By.XPATH, element=popups.ADD_WSDL_POPUP_OK_BTN_XPATH).click()
    self.wait_jquery()

    # TEST PLAN 2.11.2-14 log check for trying to add invalid WSDL
    bool_value, log_data, date_time = check_logs_for(self, ssh_host,
                                                     ssh_username,
                                                     ssh_password,
                                                     ADD_WSDL_FAILED,
                                                     sec_username)
    self.is_true(
        bool_value, test_name,
        '2.11.2-9/2.11.2-14 log check for trying to add invalid WSDL - check failed',
        '2.11.2-9/2.11.2-14 log check for trying to add invalid WSDL')

    # TEST PLAN 2.11.2-10 trying to add correct WSDL to client
    self.log('2.11.2-10 trying to add correct WSDL to client')
    wsdl_area.clear()
    self.input(wsdl_area, wsdl_url)
    self.wait_until_visible(
        type=By.XPATH, element=popups.ADD_WSDL_POPUP_OK_BTN_XPATH).click()
    self.log('Waiting 60 seconds for changes')
    time.sleep(60)
    # TEST PLAN 2.11.2-14 log check for adding correct WSDL
    bool_value, log_data, date_time = check_logs_for(self, ssh_host,
                                                     ssh_username,
                                                     ssh_password, ADD_WSDL,
                                                     sec_username)
    self.is_true(
        bool_value, test_name,
        '2.11.2-10/2.11.2-14 log check for adding correct WSDL - check failed',
        '2.11.2-10/2.11.2-14 log check for adding correct WSDL')

    # TEST PLAN 2.11.2-11 edit service parameters
    self.log('2.11.2-11 edit service parameters')
    services_list = clients_table.client_services_popup_get_services_rows(
        self=self, wsdl_url=wsdl_url)
    services_list[0].click()
    self.log('Open edit wsdl service popup')
    self.wait_until_visible(
        type=By.ID,
        element=popups.CLIENT_DETAILS_POPUP_EDIT_WSDL_BTN_ID).click()
    self.log('Editing service parameters')
    timeout_area = self.wait_until_visible(
        type=By.ID, element=popups.EDIT_SERVICE_POPUP_TIMEOUT_ID)
    self.input(timeout_area, '55')
    self.wait_until_visible(
        type=By.XPATH, element=popups.EDIT_SERVICE_POPUP_OK_BTN_XPATH).click()
    # TEST PLAN 2.11.2-14 log check for editing service parameters
    bool_value, log_data, date_time = check_logs_for(self, ssh_host,
                                                     ssh_username,
                                                     ssh_password,
                                                     EDIT_SERVICE_PARAMS,
                                                     sec_username)
    self.is_true(
        bool_value, test_name,
        '2.11.2-11/2.11.2-14 log check for editing service parameters - check failed',
        '2.11.2-11/2.11.2-14 log check for editing service parameters')

    # TEST PLAN 2.11.2-12 set service access rights
    self.log('2.11.2-12 set service access rights')
    self.driver.get(sec_host)

    client_to_add = {
        'instance': ssh_server_actions.get_server_name(self),
        'class': client['class'],
        'code': client['code'],
        'subsystem': client['subsystem']
    }
    subject = xroad.split_xroad_subsystem(self.config.get('ss1.client_id'))
    acl_subject = ' : '.join([
        subject['type'], subject['instance'], subject['class'],
        subject['code'], client['subsystem']
    ])

    add_to_acl_2_1_8.test_add_subjects(client=client_to_add,
                                       wsdl_index=0,
                                       service_index=0,
                                       service_subjects=[acl_subject],
                                       remove_data=False,
                                       allow_remove_all=True,
                                       case=self)