]> git.proxmox.com Git - ceph.git/blame - ceph/doc/radosgw/keystone.rst
update sources to 12.2.7
[ceph.git] / ceph / doc / radosgw / keystone.rst
CommitLineData
7c673cae
FG
1=====================================
2 Integrating with OpenStack Keystone
3=====================================
4
5It is possible to integrate the Ceph Object Gateway with Keystone, the OpenStack
6identity service. This sets up the gateway to accept Keystone as the users
7authority. A user that Keystone authorizes to access the gateway will also be
8automatically created on the Ceph Object Gateway (if didn't exist beforehand). A
9token that Keystone validates will be considered as valid by the gateway.
10
11The following configuration options are available for Keystone integration::
12
13 [client.radosgw.gateway]
14 rgw keystone api version = {keystone api version}
15 rgw keystone url = {keystone server url:keystone server admin port}
16 rgw keystone admin token = {keystone admin token}
17 rgw keystone accepted roles = {accepted user roles}
18 rgw keystone token cache size = {number of tokens to cache}
19 rgw keystone revocation interval = {number of seconds before checking revoked tickets}
20 rgw keystone implicit tenants = {true for private tenant for each new user}
21 rgw s3 auth use keystone = true
22 nss db path = {path to nss db}
23
24It is also possible to configure a Keystone service tenant, user & password for
25keystone (for v2.0 version of the OpenStack Identity API), similar to the way
26OpenStack services tend to be configured, this avoids the need for setting the
27shared secret ``rgw keystone admin token`` in the configuration file, which is
28recommended to be disabled in production environments. The service tenant
29credentials should have admin privileges, for more details refer the `Openstack
30keystone documentation`_, which explains the process in detail. The requisite
31configuration options for are::
32
33 rgw keystone admin user = {keystone service tenant user name}
34 rgw keystone admin password = {keystone service tenant user password}
35 rgw keystone admin tenant = {keystone service tenant name}
36
37
38A Ceph Object Gateway user is mapped into a Keystone ``tenant``. A Keystone user
39has different roles assigned to it on possibly more than a single tenant. When
40the Ceph Object Gateway gets the ticket, it looks at the tenant, and the user
41roles that are assigned to that ticket, and accepts/rejects the request
42according to the ``rgw keystone accepted roles`` configurable.
43
44For a v3 version of the OpenStack Identity API you should replace
45``rgw keystone admin tenant`` with::
46
47 rgw keystone admin domain = {keystone admin domain name}
48 rgw keystone admin project = {keystone admin project name}
49
28e407b8
AA
50For compatibility with previous versions of ceph, it is also
51possible to set ``rgw keystone implicit tenants`` to either
52``s3`` or ``swift``. This has the effect of splitting
53the identity space such that the indicated protocol will
54only use implicit tenants, and the other protocol will
55never use implicit tenants. Some older versions of ceph
56only supported implicit tenants with swift.
7c673cae
FG
57
58Prior to Kilo
59-------------
60
61Keystone itself needs to be configured to point to the Ceph Object Gateway as an
62object-storage endpoint::
63
64 keystone service-create --name swift --type object-store
65 keystone endpoint-create --service-id <id> --publicurl http://radosgw.example.com/swift/v1 \
66 --internalurl http://radosgw.example.com/swift/v1 --adminurl http://radosgw.example.com/swift/v1
67
68
69As of Kilo
70----------
71
72Keystone itself needs to be configured to point to the Ceph Object Gateway as an
73object-storage endpoint::
74
75 openstack service create --name=swift \
76 --description="Swift Service" \
77 object-store
78 +-------------+----------------------------------+
79 | Field | Value |
80 +-------------+----------------------------------+
81 | description | Swift Service |
82 | enabled | True |
83 | id | 37c4c0e79571404cb4644201a4a6e5ee |
84 | name | swift |
85 | type | object-store |
86 +-------------+----------------------------------+
87
88 openstack endpoint create --region RegionOne \
89 --publicurl "http://radosgw.example.com:8080/swift/v1" \
90 --adminurl "http://radosgw.example.com:8080/swift/v1" \
91 --internalurl "http://radosgw.example.com:8080/swift/v1" \
92 swift
93 +--------------+------------------------------------------+
94 | Field | Value |
95 +--------------+------------------------------------------+
96 | adminurl | http://radosgw.example.com:8080/swift/v1 |
97 | id | e4249d2b60e44743a67b5e5b38c18dd3 |
98 | internalurl | http://radosgw.example.com:8080/swift/v1 |
99 | publicurl | http://radosgw.example.com:8080/swift/v1 |
100 | region | RegionOne |
101 | service_id | 37c4c0e79571404cb4644201a4a6e5ee |
102 | service_name | swift |
103 | service_type | object-store |
104 +--------------+------------------------------------------+
105
106 $ openstack endpoint show object-store
107 +--------------+------------------------------------------+
108 | Field | Value |
109 +--------------+------------------------------------------+
110 | adminurl | http://radosgw.example.com:8080/swift/v1 |
111 | enabled | True |
112 | id | e4249d2b60e44743a67b5e5b38c18dd3 |
113 | internalurl | http://radosgw.example.com:8080/swift/v1 |
114 | publicurl | http://radosgw.example.com:8080/swift/v1 |
115 | region | RegionOne |
116 | service_id | 37c4c0e79571404cb4644201a4a6e5ee |
117 | service_name | swift |
118 | service_type | object-store |
119 +--------------+------------------------------------------+
120
121
122The keystone URL is the Keystone admin RESTful API URL. The admin token is the
123token that is configured internally in Keystone for admin requests.
124
125The Ceph Object Gateway will query Keystone periodically for a list of revoked
126tokens. These requests are encoded and signed. Also, Keystone may be configured
127to provide self-signed tokens, which are also encoded and signed. The gateway
128needs to be able to decode and verify these signed messages, and the process
129requires that the gateway be set up appropriately. Currently, the Ceph Object
130Gateway will only be able to perform the procedure if it was compiled with
131``--with-nss``. Configuring the Ceph Object Gateway to work with Keystone also
132requires converting the OpenSSL certificates that Keystone uses for creating the
133requests to the nss db format, for example::
134
135 mkdir /var/ceph/nss
136
137 openssl x509 -in /etc/keystone/ssl/certs/ca.pem -pubkey | \
138 certutil -d /var/ceph/nss -A -n ca -t "TCu,Cu,Tuw"
139 openssl x509 -in /etc/keystone/ssl/certs/signing_cert.pem -pubkey | \
140 certutil -A -d /var/ceph/nss -n signing_cert -t "P,P,P"
141
142
143
144Openstack keystone may also be terminated with a self signed ssl certificate, in
145order for radosgw to interact with keystone in such a case, you could either
146install keystone's ssl certificate in the node running radosgw. Alternatively
147radosgw could be made to not verify the ssl certificate at all (similar to
148openstack clients with a ``--insecure`` switch) by setting the value of the
149configurable ``rgw keystone verify ssl`` to false.
150
151
152.. _Openstack keystone documentation: http://docs.openstack.org/developer/keystone/configuringservices.html#setting-up-projects-users-and-roles