コード例 #1
0
def test_group_roles(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

    """

    # 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 "%s"' % iam_group_name)

    login(username, password)
    assert set(menu.visible_pages()) == set(group_data)
コード例 #2
0
def test_group_roles(configure_ldap_auth_mode, group_name, group_data):
    """Basic default LDAP group role RBAC test

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

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

    login(username, password)
    assert set(menu.visible_pages()) == set(group_data)
コード例 #3
0
def test_group_roles(configure_aws_iam_auth_mode, group_name, group_data):
    """Basic default AWS_IAM group role RBAC test

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

    """
    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 "%s"' % iam_group_name)

    force_login_user(username, password)
    assert menu.visible_pages() == group_data
コード例 #4
0
def test_group_roles(configure_aws_iam_auth_mode, group_name, group_data):
    """Basic default AWS_IAM group role RBAC test

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

    """
    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 "%s"' %
                    iam_group_name)

    login(username, password)
    assert set(menu.visible_pages()) == set(group_data)