When using webroot set to "/" the AUTH_LOGIN AUTH_LOGOUT URLS are incorrect

Bug #1311234 reported by Darryl Weaver
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
openstack-dashboard (Juju Charms Collection)
Fix Released
Low
Liam Young

Bug Description

When setting webroot to "/", in /etc/openstack-dashboard/local_settings.py the following options are set:

LOGIN_URL='//auth/login/'
LOGOUT_URL='//auth/logout/'
LOGIN_REDIRECT_URL='/'

This results in the browser trying to go to:
http:///auth/logout
which causes an error.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: openstack-dashboard 1:2014.1-0ubuntu1~cloud0 [origin: Canonical]
ProcVersionSignature: User Name 3.2.0-54.82-generic 3.2.50
Uname: Linux 3.2.0-54-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
CrashDB: cloud_archive
Date: Tue Apr 22 17:05:51 2014
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: horizon
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.apache2.conf.available.openstack.dashboard.conf: 2014-04-22T12:14:30.181143
mtime.conffile..etc.openstack.dashboard.local.settings.py: 2014-04-22T12:15:51.409143

Related branches

Revision history for this message
Darryl Weaver (dweaver) wrote :
Revision history for this message
Darryl Weaver (dweaver) wrote :

I've submitted this bug from the wrong version of openstack-dashboard I was running, so the attachments are not correct.

Revision history for this message
Darryl Weaver (dweaver) wrote :
Download full text (14.6 KiB)

import os

from django.utils.translation import ugettext_lazy as _

from openstack_dashboard import exceptions

DEBUG = True
TEMPLATE_DEBUG = DEBUG

# Required for Django 1.5.
# If horizon is running in production (DEBUG is False), set this
# with the list of host/domain names that the application can serve.
# For more information see:
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
#ALLOWED_HOSTS = ['horizon.example.com', ]

# Set SSL proxy settings:
# For Django 1.4+ pass this header from the proxy after terminating the SSL,
# and don't forget to strip it from the client's request.
# For more information see:
# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')

# If Horizon is being served through SSL, then uncomment the following two
# settings to better secure the cookies from security exploits
#CSRF_COOKIE_SECURE = True
#SESSION_COOKIE_SECURE = True

# Overrides for OpenStack API versions. Use this setting to force the
# OpenStack dashboard to use a specfic API version for a given service API.
# NOTE: The version should be formatted as it appears in the URL for the
# service API. For example, The identity service APIs have inconsistent
# use of the decimal point, so valid options would be "2.0" or "3".
# OPENSTACK_API_VERSIONS = {
# "identity": 3
# }

# Set this to True if running on multi-domain model. When this is enabled, it
# will require user to enter the Domain name in addition to username for login.
# OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False

# Overrides the default domain used when running on single-domain model
# with Keystone V3. All entities will be created in the default domain.
# OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'

# Set Console type:
# valid options would be "AUTO", "VNC" or "SPICE"
# CONSOLE_TYPE = "AUTO"

# Default OpenStack Dashboard configuration.
HORIZON_CONFIG = {
    'dashboards': ('project', 'admin', 'settings',),
    'default_dashboard': 'project',
    'user_home': 'openstack_dashboard.views.get_user_home',
    'ajax_queue_limit': 10,
    'auto_fade_alerts': {
        'delay': 3000,
        'fade_duration': 1500,
        'types': ['alert-success', 'alert-info']
    },
    'help_url': "http://docs.openstack.org",
    'exceptions': {'recoverable': exceptions.RECOVERABLE,
                   'not_found': exceptions.NOT_FOUND,
                   'unauthorized': exceptions.UNAUTHORIZED},
}

# Specify a regular expression to validate user passwords.
# HORIZON_CONFIG["password_validator"] = {
# "regex": '.*',
# "help_text": _("Your password does not meet the requirements.")
# }

# Disable simplified floating IP address management for deployments with
# multiple floating IP pools or complex network requirements.
# HORIZON_CONFIG["simple_ip_management"] = False

# Turn off browser autocompletion for the login form if so desired.
# HORIZON_CONFIG["password_autocomplete"] = "off"

LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))

# Set custom secret key:
# You can either set it to a specific value or you can let horizion generate a
# default secret key that is unique on this mach...

Revision history for this message
James Page (james-page) wrote :

Needs some tweaks in the templates to make this work properly.

Changed in cloud-archive:
status: New → Invalid
Changed in openstack-dashboard (Juju Charms Collection):
status: New → Triaged
importance: Undecided → Low
tags: added: landscape
Liam Young (gnuoy)
Changed in openstack-dashboard (Juju Charms Collection):
assignee: nobody → Liam Young (gnuoy)
Revision history for this message
James Page (james-page) wrote :

Pushed to stable branches.

Changed in openstack-dashboard (Juju Charms Collection):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.