-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrgw-keystone-auth.html
216 lines (198 loc) · 8.55 KB
/
rgw-keystone-auth.html
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bye bye Keystone admin token | gpocentek's webspace</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="keywords" content="" />
<meta name="author" content="Gauvain Pocentek" />
<meta name="kittycheck_rumble" content="true" />
<meta name="kittycheck_position" content="top=60,right=60" />
<!-- Le styles -->
<link rel="stylesheet" href="./theme/css/bootstrap.min.css" type="text/css" />
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
.tag-1 {
font-size: 13pt;
}
.tag-2 {
font-size: 10pt;
}
.tag-2 {
font-size: 8pt;
}
.tag-4 {
font-size: 6pt;
}
</style>
<link href="./theme/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="./theme/css/font-awesome.css" rel="stylesheet">
<link href="./theme/css/pygments.css" rel="stylesheet">
<link href="./theme/css/local.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="./theme/img/favicon.ico">
<link rel="apple-touch-icon" href="./theme/img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="./theme/img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="./theme/img/apple-touch-icon-114x114.png">
<link href="./" type="application/atom+xml" rel="alternate" title="gpocentek's webspace ATOM Feed" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="./index.html"><strong>gpocentek's webspace</strong> – Random dev & ops notes</a>
<div class="nav-collapse">
<ul class="nav">
</ul>
<!--<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>-->
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span8" id="content">
<div class="row">
<div class="span8">
<section id="content" class="well">
<article>
<header>
<h1>
<a href=""
rel="bookmark"
title="Permalink to Bye bye Keystone admin token">
Bye bye Keystone admin token
</a>
</h1>
<a href="./tag/keystone.html" class="label"><i class="icon-tag"></i> keystone</a>
<a href="./tag/ceph.html" class="label"><i class="icon-tag"></i> ceph</a>
<a href="./tag/radosgw.html" class="label"><i class="icon-tag"></i> radosgw</a>
<abbr class="published pull-right" title="2016-10-23T11:30:00+02:00">
<i class="icon-calendar"></i> sön 23 oktober 2016
</abbr>
</header>
<div class="entry-content">
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This blog assumes that you have already setup a Ceph RadosGW with Keystone
authentication.</p>
</div>
<p>The keystone admin token is the old, unsecure and deprecated method to
authenticate against an OpenStack Identity server. It's been used to bootstrap
OpenStack users and projects creation, and a good practice was to disable this
feature completely to avoid bad security surprises.</p>
<p>But the Ceph RadosGW documentation for the stable releases - jewel as of this
writing - clearly states that you need to use this admin token, and that
there's no other way to connect with Keystone:</p>
<ul class="simple">
<li><a class="reference external" href="http://docs.ceph.com/docs/jewel/radosgw/keystone/">http://docs.ceph.com/docs/jewel/radosgw/keystone/</a></li>
<li><a class="reference external" href="http://docs.ceph.com/docs/jewel/radosgw/config-ref/#keystone-settings">http://docs.ceph.com/docs/jewel/radosgw/config-ref/#keystone-settings</a></li>
</ul>
<p>Well that's not true.</p>
<p>Support for authentication using a service account has been supported in quite
a while, but never documented. Keystone v3 is also supported since the jewel
release. The master docs have nice updates:</p>
<ul class="simple">
<li><a class="reference external" href="http://docs.ceph.com/docs/master/radosgw/keystone/">http://docs.ceph.com/docs/master/radosgw/keystone/</a></li>
<li><a class="reference external" href="http://docs.ceph.com/docs/master/radosgw/config-ref/#keystone-settings">http://docs.ceph.com/docs/master/radosgw/config-ref/#keystone-settings</a></li>
</ul>
<p>For keystone v3 you can use something like this in your <tt class="docutils literal">ceph.conf</tt>:</p>
<div class="highlight"><pre><span></span><span class="k">[client.rgw.HOSTNAME]</span>
<span class="na">rgw keystone url</span> <span class="o">=</span> <span class="s">http://keystone.host:35357</span>
<span class="na">rgw keystone admin user</span> <span class="o">=</span> <span class="s">ceph</span>
<span class="na">rgw keystone admin password</span> <span class="o">=</span> <span class="s">S3Cr3t</span>
<span class="na">rgw keystone admin project</span> <span class="o">=</span> <span class="s">admin</span>
<span class="na">rgw keystone admin domain</span> <span class="o">=</span> <span class="s">default</span>
<span class="na">rgw keystone api version</span> <span class="o">=</span> <span class="s">3</span>
<span class="na">...</span>
</pre></div>
<p>You need to create a <tt class="docutils literal">ceph</tt> service account and give it the <tt class="docutils literal">admin</tt> role:</p>
<div class="highlight"><pre><span></span><span class="gp">$</span> openstack user create ceph --password-prompt
<span class="gp">$</span> openstack role add --user ceph --project admin admin
</pre></div>
<p>Don't forget to disable the <tt class="docutils literal">admin_token_auth</tt> filter from your paste-deploy
pipeline in <tt class="docutils literal"><span class="pre">/etc/keystone/keystone-paste.ini</span></tt>.</p>
</div><!-- /.entry-content -->
</article>
</section>
</div>
</div>
</div><!--/span-->
<div class="span3 well sidebar-nav" id="sidebar">
<ul class="nav nav-list">
<li class="nav-header"><h4><i class="icon-home icon-large"></i> social</h4></li>
<li><a href="https://www.linkedin.com/in/gauvainpocentek"><i class="icon-linkedin-sign icon-large"></i>linkedin</a></li>
<li><a href="https://github.com/gpocentek"><i class="icon-github-sign icon-large"></i>github</a></li>
<li class="nav-header"><h4><i class="icon-folder-close icon-large"></i>Categories</h4></li>
<li>
<a href="./category/ansible.html">
<i class="icon-folder-open icon-large"></i>ansible
</a>
</li>
<li>
<a href="./category/containers.html">
<i class="icon-folder-open icon-large"></i>containers
</a>
</li>
<li>
<a href="./category/lxc.html">
<i class="icon-folder-open icon-large"></i>lxc
</a>
</li>
<li>
<a href="./category/lxd.html">
<i class="icon-folder-open icon-large"></i>lxd
</a>
</li>
<li>
<a href="./category/medibuntu.html">
<i class="icon-folder-open icon-large"></i>medibuntu
</a>
</li>
<li>
<a href="./category/misc.html">
<i class="icon-folder-open icon-large"></i>misc
</a>
</li>
<li>
<a href="./category/openstack.html">
<i class="icon-folder-open icon-large"></i>openstack
</a>
</li>
<li>
<a href="./category/python-gitlab.html">
<i class="icon-folder-open icon-large"></i>python-gitlab
</a>
</li>
<li class="nav-header"><h4><i class="icon-th-list icon-large"></i>Archives</h4></li>
<li><a href="./archives.html"><i class="icon-edit icon-large"></i>articles</a></li>
<li class="nav-header"><h4><i class="icon-inbox icon-large"></i>Contact</h4></li>
<li><a href="mailto:[email protected]">
<i class="icon-envelope icon-large"></i>email</a></li>
</li>
<li></li>
</ul> </div><!--/.well -->
</div><!--/row-->
<hr>
</div><!--/.fluid-container-->
<!-- Le javascript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="./theme/js/jquery-1.7.2.min.js"></script>
<script src="./theme/js/bootstrap.min.js"></script>
</body>
</html>