summaryrefslogtreecommitdiffstats
path: root/swiftkerbauth/swiftkerbauth.spec
blob: f01dc8d7b3c418f8ee76531da09cdabc9c8b3efa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Name:		swiftkerbauth
Version:    	1.0
Release:    	1
Summary:    	Kerberos authentication filter for Swift

Group:	    	System Environment/Base
License:    	GPL
Source:	    	%{name}.tar.gz
BuildRoot:  	%{_tmppath}/%{name}-root

Requires:	gluster-swift >= 1.4.8
Requires:	python-webob1.0 >= 1.0.8

%description
Python script which implements an authentication filter for Swift, the
object-level access layer of Red Hat Storage.

Relies on an external authentication server, which comes with the
apachekerbauth package.

%prep
%setup -q -n %{name}

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p \
  $RPM_BUILD_ROOT/usr/lib/python2.6/site-packages

install swiftkerbauth.py \
  $RPM_BUILD_ROOT/usr/lib/python2.6/site-packages

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/lib/python2.6/site-packages/swiftkerbauth.py

%post
if ! grep -q "filter:kerbauth" /etc/swift/proxy-server.conf; then
cat >>/etc/swift/proxy-server.conf <<EOF

[filter:kerbauth]
paste.filter_factory = swiftkerbauth:filter_factory
ext_authentication_url = http://AUTHENTICATION_SERVER/cgi-bin/swift-auth
EOF
fi

%changelog
* Fri Apr  5 2013 Carsten Clasohm <clasohm@redhat.com> - 1.0-1
- initial build