cfme.utils.auth package

Module contents

class cfme.utils.auth.ActiveDirectoryAuthProvider(key, host1, bind_password, host2=None, host3=None, ports=None, user_types=None, domain_prefix=None, base_dn=None, bind_dn=None, get_groups=False, get_roles=False, follow_referrals=False, domain_name=None, cert_filename=None, cert_filepath=None, ipaddress=None, ldap_conf=None, sssd_conf=None)[source]

Bases: cfme.utils.auth.MIQAuthProvider

openldap auth provider, WITH SSL

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

auth_type = 'ad'
view_class

alias of LdapAuthenticationView

class cfme.utils.auth.AmazonAuthProvider(key, username, password, get_groups=False)[source]

Bases: cfme.utils.auth.BaseAuthProvider

AWS IAM auth provider

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

as_fill_value(**kwargs)[source]

Amazon auth only has 3 UI values

auth_type = 'amazon'
view_class

alias of AmazonAuthenticationView

class cfme.utils.auth.BaseAuthProvider(key)[source]

Bases: object

Base class for authentication provider objects

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

as_fill_external_value()[source]

openLDAP and FreeIPA providers can be configured for external auth Same view for all auth provider types

as_fill_value(user_type=None, auth_mode=None)[source]

Basic implementation matches instance attributes to view form attributes

auth_type = None
data
classmethod from_config(prov_config, prov_key)[source]

Returns an object using the passed yaml config Sets defaults for yaml configured objects separate from attr.ib definitions

user_data

Pull users from auth_data if provider key is in items providers list

view_class = None
class cfme.utils.auth.FreeIPAAuthProvider(key, host1, bind_password, host2=None, host3=None, ports=None, user_types=None, domain_prefix=None, base_dn=None, bind_dn=None, get_groups=False, get_roles=False, follow_referrals=False, domain_name=None, cert_filename=None, cert_filepath=None, ipaddress=None, ldap_conf=None, sssd_conf=None, ipaprincipal=None, iparealm=None, ipadomain=None)[source]

Bases: cfme.utils.auth.MIQAuthProvider

freeipa can be used with ldap auth config or external

For ldap config:

  • 3 hosts can be configured
  • bind_dn is used for admin user validation
  • ipa realm and ipadomain are not part of config
  • user_type will use the cfme.utils.auth.USER_TYPES dict

For external config:

  • 1 host is configured as –ipaserver
  • realm and domain are optional params
  • all user type, suffix, base/bind_dn, get_groups/roles/referrals args are not used
__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

as_external_value()[source]

return a dictionary that can be used with appliance_console_cli.configure_ipa

auth_type = 'freeipa'
view_class

alias of LdapAuthenticationView

class cfme.utils.auth.MIQAuthProvider(key, host1, bind_password, host2=None, host3=None, ports=None, user_types=None, domain_prefix=None, base_dn=None, bind_dn=None, get_groups=False, get_roles=False, follow_referrals=False, domain_name=None, cert_filename=None, cert_filepath=None, ipaddress=None, ldap_conf=None, sssd_conf=None)[source]

Bases: cfme.utils.auth.BaseAuthProvider

base class for miq auth providers (ldap/ldaps modes in UI) Intended to be used for freeipa, AD, openldap and openldaps type providers

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

as_fill_value(user_type='upn', auth_mode='ldap')[source]

miqldap config can have multiple settings per-provider based on user_type and auth_mode

Parameters:
  • user_type – key for USER_TYPES, used to lookup user_suffix
  • auth_mode – key for AUTH_MODES, used to lookup port
class cfme.utils.auth.OpenLDAPAuthProvider(key, host1, bind_password, host2=None, host3=None, ports=None, user_types=None, domain_prefix=None, base_dn=None, bind_dn=None, get_groups=False, get_roles=False, follow_referrals=False, domain_name=None, cert_filename=None, cert_filepath=None, ipaddress=None, ldap_conf=None, sssd_conf=None)[source]

Bases: cfme.utils.auth.MIQAuthProvider

openldap auth provider, NO SSL No attributes beyond MIQAuthProvider

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

auth_type = 'openldap'
view_class

alias of LdapAuthenticationView

class cfme.utils.auth.OpenLDAPSAuthProvider(key, host1, bind_password, host2=None, host3=None, ports=None, user_types=None, domain_prefix=None, base_dn=None, bind_dn=None, get_groups=False, get_roles=False, follow_referrals=False, domain_name=None, cert_filename=None, cert_filepath=None, ipaddress=None, ldap_conf=None, sssd_conf=None)[source]

Bases: cfme.utils.auth.MIQAuthProvider

openldap auth provider, WITH SSL

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

auth_type = 'openldaps'
view_class

alias of LdapsAuthenticationView

cfme.utils.auth.auth_class_from_type(auth_prov_type)[source]

Using the registered auth provider classes, fetch a class by its type key

Parameters:auth_prov_type – string key matching a registered type in entry_points
Raises:UnknownProviderType when the given type isn’t registered in entry_points
cfme.utils.auth.auth_provider_types()[source]

Fetch the registered classes from entry_points manageiq.auth_provider_categories

cfme.utils.auth.get_auth_crud(auth_prov_key)[source]

Get a BaseAuthProvider derived class with the auth_data.yaml configuration for the key

Parameters:auth_prov_key – string key matching one in conf/auth_data.yaml ‘auth_providers’ dict
Raises:ValueError if the yaml type for given key doesn’t match auth_type on fetched class