cinder/doc/source/install
Gorka Eguileor 6df1839bdf Reject unsafe delete attachment calls
Due to how the Linux SCSI kernel driver works there are some storage
systems, such as iSCSI with shared targets, where a normal user can
access other projects' volume data connected to the same compute host
using the attachments REST API.

This affects both single and multi-pathed connections.

To prevent users from doing this, unintentionally or maliciously,
cinder-api will now reject some delete attachment requests that are
deemed unsafe.

Cinder will process the delete attachment request normally in the
following cases:

- The request comes from an OpenStack service that is sending the
  service token that has one of the roles in `service_token_roles`.
- Attachment doesn't have an instance_uuid value
- The instance for the attachment doesn't exist in Nova
- According to Nova the volume is not connected to the instance
- Nova is not using this attachment record

There are 3 operations in the actions REST API endpoint that can be used
for an attack:

- `os-terminate_connection`: Terminate volume attachment
- `os-detach`: Detach a volume
- `os-force_detach`: Force detach a volume

In this endpoint we just won't allow most requests not coming from a
service. The rules we apply are the same as for attachment delete
explained earlier, but in this case we may not have the attachment id
and be more restrictive.  This should not be a problem for normal
operations because:

- Cinder backup doesn't use the REST API but RPC calls via RabbitMQ
- Glance doesn't use this interface anymore

Checking whether it's a service or not is done at the cinder-api level
by checking that the service user that made the call has at least one of
the roles in the `service_token_roles` configuration. These roles are
retrieved from keystone by the keystone middleware using the value of
the "X-Service-Token" header.

If Cinder is configured with `service_token_roles_required = true` and
an attacker provides non-service valid credentials the service will
return a 401 error, otherwise it'll return 409 as if a normal user had
made the call without the service token.

Closes-Bug: #2004555
Change-Id: I612905a1bf4a1706cce913c0d8a6df7a240d599a
2023-05-10 19:51:33 +02:00
..
figures [DOC BLD FIX] Fix missing references in documentation 2017-08-07 17:16:20 -05:00
cinder-backup-install-obs.rst [DOCFIX] Correct Cinder Backup Driver Option Value 2019-07-21 22:20:35 +08:00
cinder-backup-install-rdo.rst [DOCFIX] Correct Cinder Backup Driver Option Value 2019-07-21 22:20:35 +08:00
cinder-backup-install-ubuntu.rst [DOCFIX] Correct Cinder Backup Driver Option Value 2019-07-21 22:20:35 +08:00
cinder-controller-install-obs.rst Remove Block Storage API v2 2021-06-04 17:21:28 -04:00
cinder-controller-install-rdo.rst Remove Block Storage API v2 2021-06-04 17:21:28 -04:00
cinder-controller-install-ubuntu.rst Remove Block Storage API v2 2021-06-04 17:21:28 -04:00
cinder-storage-install-obs.rst Use new target_* options in documentation 2019-03-01 09:52:41 +00:00
cinder-storage-install-rdo.rst Storage node configuration 2022-12-22 10:26:52 +00:00
cinder-storage-install-ubuntu.rst Configure a storage node in cinder 2023-03-07 23:05:12 +05:30
cinder-storage-install-windows.rst Update Windows docs 2018-01-30 20:15:23 +02:00
cinder-verify.rst Fix doc output examples 2018-10-09 11:23:35 +00:00
get-started-block-storage.rst Add info about __DEFAULT__ in install docs 2021-11-18 02:57:48 -05:00
index-obs.rst Change order of installation to match previous 2018-02-21 14:05:29 -06:00
index-rdo.rst Change order of installation to match previous 2018-02-21 14:05:29 -06:00
index-ubuntu.rst Change order of installation to match previous 2018-02-21 14:05:29 -06:00
index-windows.rst Update Windows docs 2018-01-30 20:15:23 +02:00
index.rst Reject unsafe delete attachment calls 2023-05-10 19:51:33 +02:00
README.rst [Docs] Add documentation contribution docs 2017-08-10 15:52:46 -05:00

Cinder Installation Documentation (source/install)

Introduction:

This directory is intended to hold any installation documentation for Cinder. Documentation that explains how to bring Cinder up to the point that it is ready to use in an OpenStack or standalone environment should be put in this directory.

The full spec for organization of documentation may be seen in the OS Manuals Migration Spec <https://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html>.