Ejemplo n.º 1
0
def test_group_roles(configure_ldap_auth_mode, group_name, group_data,
                     setup_first_provider):
    """Basic default LDAP group role RBAC test

    Validates expected menu and submenu names are present for default
    LDAP group roles

    """

    # This should be removed but currently these roles are subject to a bug
    if version.current_version() >= '5.4' and group_name in [
            'evmgroup-administrator', 'evmgroup-approver', 'evmgroup-auditor',
            'evmgroup-operator', 'evmgroup-security', 'evmgroup-support',
            'evmgroup-user'
    ]:
        pytest.skip("This role currently fails this test")

    try:
        username = credentials[group_name]['username']
        password = credentials[group_name]['password']
    except KeyError:
        pytest.fail(
            'No match in credentials file for group "{}"'.format(group_name))

    login(simple_user(username, password))
    assert set(menu.nav.visible_pages()) == set(group_data)
Ejemplo n.º 2
0
def test_group_roles(configure_ldap_auth_mode, group_name, group_data, setup_first_provider):
    """Basic default LDAP group role RBAC test

    Validates expected menu and submenu names are present for default
    LDAP group roles

    """

    # This should be removed but currently these roles are subject to a bug
    if version.current_version() >= '5.4' and group_name in ['evmgroup-administrator',
                                                             'evmgroup-approver',
                                                             'evmgroup-auditor',
                                                             'evmgroup-operator',
                                                             'evmgroup-security',
                                                             'evmgroup-support',
                                                             'evmgroup-user']:
        pytest.skip("This role currently fails this test")

    try:
        username = credentials[group_name]['username']
        password = credentials[group_name]['password']
    except KeyError:
        pytest.fail('No match in credentials file for group "{}"'.format(group_name))

    login(simple_user(username, password))
    assert set(menu.nav.visible_pages()) == set(group_data)
Ejemplo n.º 3
0
def test_group_roles(
        request, configure_aws_iam_auth_mode, group_name, group_data, setup_first_provider):
    """Basic default AWS_IAM group role RBAC test

    Validates expected menu and submenu names are present for default
    AWS IAM groups

    """
    request.addfinalizer(login_admin)

    # This should be removed but currently these roles are subject to a bug
    if version.current_version() >= '5.4' and group_name in ['evmgroup-administrator',
                                                             'evmgroup-approver',
                                                             'evmgroup-auditor',
                                                             'evmgroup-operator',
                                                             'evmgroup-security',
                                                             'evmgroup-support',
                                                             'evmgroup-user']:
        pytest.skip("This role currently fails this test")

    try:
        iam_group_name = group_name + '_aws_iam'
        username = credentials[iam_group_name]['username']
        password = credentials[iam_group_name]['password']
    except KeyError:
        pytest.fail('No match in credentials file for group "{}"'.format(iam_group_name))

    login(simple_user(username, password))
Ejemplo n.º 4
0
def test_group_roles(request, appliance, configure_aws_iam_auth_mode,
                     group_name, group_data, infra_provider):
    """Basic default AWS_IAM group role RBAC test

    Validates expected menu and submenu names are present for default
    AWS IAM groups

    """
    request.addfinalizer(appliance.server.login_admin)

    # This should be removed but currently these roles are subject to a bug
    if version.current_version() >= '5.4' and group_name in [
            'evmgroup-administrator', 'evmgroup-approver', 'evmgroup-auditor',
            'evmgroup-operator', 'evmgroup-security', 'evmgroup-support',
            'evmgroup-user'
    ]:
        pytest.skip("This role currently fails this test")

    try:
        iam_group_name = group_name + '_aws_iam'
        username = credentials[iam_group_name]['username']
        password = credentials[iam_group_name]['password']
    except KeyError:
        pytest.fail('No match in credentials file for group "{}"'.format(
            iam_group_name))

    appliance.server.login(simple_user(username, password))