Permalink
Browse files

Remove kerberos dependency. Relates to #5

kerberos is not used by everyone so drop it from the required
dependencies. However add a documentation section how to configure
it in case someone wants to use it!
  • Loading branch information...
atodorov committed Jun 6, 2017
1 parent 81bec26 commit 13473305aad4a10ea3ca63193a5daf9692eaae8a
View
@@ -2,7 +2,7 @@ FROM centos/httpd
# install virtualenv and libraries needed to build the python dependencies
RUN yum -y --setopt=tsflags=nodocs install python-virtualenv gcc mariadb-devel \
krb5-devel libxml2-devel libxslt-devel git mod_wsgi
libxml2-devel libxslt-devel git mod_wsgi
# enable when you want to update RPM packages
# this will be used for testing building a Docker image with the
# latest possible versions from CentOS!
@@ -33,7 +33,7 @@ COPY ./requirements/ /Kiwi/requirements/
RUN pip install -r /Kiwi/requirements/mysql.txt
# now remove -devel RPMs used to build Python dependencies
RUN yum -y remove gcc mariadb-devel krb5-devel libxml2-devel libxslt-devel git
RUN yum -y remove gcc mariadb-devel libxml2-devel libxslt-devel git
# remove other -devel RPMs pulled in from base images
RUN rpm -qa | grep "\-devel" | grep -v python-devel | xargs yum -y remove
@@ -2,8 +2,46 @@ KiwiTestPad configuration settings
==================================
All sensible settings are defined in ``tcms/settings/common.py``. You will have
to update some of them for your particular production environment. Do so in
``tcms/settings/product.py``.
to update some of them for your particular production environment.
.. literalinclude:: ../../tcms/settings/common.py
:language: python
.. note::
Information how to override the default settings and Docker image are
available at `<https://github.com/MrSenko/kiwi-docker>`_!
Kerberos authentication
-----------------------
KiwiTestPad supports passwordless authentication with Kerberos. This is
turned off by default because most organization do not use it. To enable
configure the following settings::
MIDDLEWARE_CLASSES += (
'django.contrib.auth.middleware.RemoteUserMiddleware',
)
AUTHENTICATION_BACKENDS += (
'tcms.core.contrib.auth.backends.ModAuthKerbBackend',
)
KRB5_REALM='YOUR-DOMAIN.COM'
Also modify the Docker image to include the following lines::
RUN yum -y install krb5-devel mod_auth_kerb
RUN pip install kerberos
COPY ./auth_kerb.conf /etc/httpd/conf.d/
Where ``auth_kerb.conf`` is your Kerberos configuration file for Apache!
More information about it can be found
`here <https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Web_Server/2/html/HTTP_Connectors_Load_Balancing_Guide/ch10s02s03.html>`_.
.. warning::
Unless Kerberos authentication is configured and fully-operational the
XML-RPC method `Auth.login_krbv()` will not work!
@@ -13,7 +13,7 @@ Setup virtualenv
Install devel packages which are needed to compile some of the Python dependencies::
sudo yum install gcc python-devel mysql-devel krb5-devel libxml2-devel libxslt-devel
sudo yum install gcc python-devel mysql-devel libxml2-devel libxslt-devel
Create a virtual environment for KiwiTestPad::
View
@@ -1,5 +1,4 @@
Django==1.8.14
kerberos==1.1.1
django-uuslug==1.1.8
odfpy>=0.9.6
python-bugzilla
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
import xmlrpclib
import kerberos
from django.conf import settings
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
@@ -124,6 +122,8 @@ class KerberosBackend(ModelBackend):
# )
def authenticate(self, username=None, password=None):
import kerberos
try:
kerberos.checkPassword(
username, password, '',
View
@@ -188,8 +188,6 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'pagination.middleware.PaginationMiddleware',
# enable for kerberos authentication
# 'django.contrib.auth.middleware.RemoteUserMiddleware',
)
ROOT_URLCONF = 'tcms.urls'
@@ -260,8 +258,6 @@
# NOTE: we only support the internal auth backends.
AUTHENTICATION_BACKENDS = (
'tcms.core.contrib.auth.backends.DBModelBackend',
# enable for Kerberos authentication
# 'tcms.core.contrib.auth.backends.ModAuthKerbBackend',
)
@@ -283,10 +279,6 @@
# Turn on/off listening signals sent by models.
LISTENING_MODEL_SIGNAL = True
# Kerberos settings
# Required by kerberos authentication backend
KRB5_REALM = 'EXAMPLE.COM'
# Default page size when paginating queries
DEFAULT_PAGE_SIZE = 100

0 comments on commit 1347330

Please sign in to comment.