Enabling trusted authentication

You must enable trusted authentication to allow embedded Cloudera Data Visualization services to authenticate users without requiring a separate login.

  1. Add the following settings to the advanced site settings.
          
    AUTHENTICATION_BACKENDS = (
          'django.contrib.auth.backends.ModelBackend',
          'trustedauth.backends.TrustedAuthBackend'
    )
          
    TRUSTED_AUTH = {
          'trusted_ips': ['127.0.0.1'],
          'trusted_users': ['tadmin'],
          'timeout': 120,
          'single_use': True,
          'session_expiry': 0,
          'allow_superuser': True
    }
    

    Settings explanation:

    trusted_ips:

    A list of trusted IPs. Ticket requests from these IP addresses are validated. You can specify a list of trusted_ips, a list of trusted_users, or both.

    trusted_users:

    A list of trusted ticket-granting usernames. You can specify a list of trusted_users, a list of trusted_ips, or both.

    timeout:

    The time that the ticket remains valid, in seconds.

    single_use:

    Specifies whether the ticket can be used only one time.

    session_expiry:

    The duration time of the user session, in seconds. A setting of 0 ends the user session when the browser closes.

    allow_superuser:

    Allows authentication of a user with admin privileges using a ticket. Set this to False to disable this feature.

  2. Restart the application to apply the new configuration.