Project

General

Profile

Actions

Feature #73702

closed
FA

rgw: add Keystone scope and application credential info to ops logging

Feature #73702: rgw: add Keystone scope and application credential info to ops logging

Added by Filipp Akinfiev about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Due date:
% Done:

0%

Source:
Backport:
squid, tentacle
Reviewed:
Affected Versions:
Pull request ID:
Tags (freeform):
keystone
Fixed In:
v20.3.0-5739-g5d6d51eb55
Released In:
v21.2.0~1129
Upkeep Timestamp:
2026-10-24T02:19:10+00:00

Description

Summary
Extend RGW ops logging to include detailed Keystone authentication context — project, user, domain, roles, and application credential info — for better auditing and compliance in OpenStack-integrated deployments.

Motivation
Currently, RGW logs only basic authentication info (user/access key).
When using Keystone, operators need to see:
  • Which project/tenant the request was scoped to
  • The roles granted in that context
  • Whether an application credential was used (and its restrictions)
  • The domain for both user and project

This enables full audit trails for security investigations, compliance, and multi-tenant visibility in OpenStack environments.

Proposed Change
1. New ScopeInfo structure
  • Captures Keystone scope: project, user, domain, roles, and app credential.
  • Implemented in rgw_keystone_scope.h/.cc.
2. Application Credential support
  • Extend TokenEnvelope to parse and log id, name, and restricted flags.
3. Ops Log Extension
  • Add optional keystone_scope field (log entry v16).
  • JSON output for file/socket backends, binary encode/decode for RADOS.
  • Backward compatible.

4. Configuration options

rgw_keystone_scope_enabled = false
rgw_keystone_scope_include_user = false
rgw_keystone_scope_include_roles = true

5. Modified Components
  • rgw_keystone.[h|cc]: Application credential parsing
  • rgw_keystone_scope.[h|cc]: ScopeInfo implementation
  • rgw_log.[h|cc]: Log entry v16, JSON encoding
  • rgw_auth.[h|cc]: AuthInfo scope propagation
  • rgw_auth_keystone.cc: Token/EC2 engine scope population
  • CMakeLists.txt, rgw.yaml.in: integration and config

Example Log Output

"keystone_scope": {
  "project": {"id": "a1b2c3", "name": "demo"},
  "user": {"id": "u7v8w9", "name": "alice"},
  "roles": ["member", "admin"],
  "application_credential": {
    "id": "app-cred-123",
    "name": "backup-service",
    "restricted": true
  }
}

Related issues 2 (0 open — 2 closed)

Copied to rgw - Backport #76067: squid: rgw: add Keystone scope and application credential info to ops loggingResolved

Actions
Copied to rgw - Backport #80318: tentacle: rgw: add Keystone scope and application credential info to ops loggingResolvedTatjana Dehler

Actions

CB Updated by Casey Bodley about 1 year ago Actions #2

  • Status changed from New to Fix Under Review
  • Pull request ID set to 66111
  • Tags (freeform) set to keystone

UB Updated by Upkeep Bot 9 months ago Actions #3

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to 5d6d51eb55648b2c8c563534de4837c90edad78e
  • Fixed In set to v20.3.0-5739-g5d6d51eb55
  • Upkeep Timestamp set to 2026-03-02T15:15:24+00:00

DU Updated by Deepika Upadhyay 8 months ago Actions #4

  • Status changed from Resolved to Pending Backport
  • Target version set to v19.2.4

UB Updated by Upkeep Bot 8 months ago Actions #5

  • Tags (freeform) changed from keystone to keystone backport_processed

DU Updated by Deepika Upadhyay 8 months ago Actions #6

  • Target version changed from v19.2.4 to v20.2.0
  • Backport set to tentacle squid

DU Updated by Deepika Upadhyay 8 months ago Actions #7

  • Copied to Backport #76067: squid: rgw: add Keystone scope and application credential info to ops logging added

DU Updated by Deepika Upadhyay 8 months ago Actions #8

  • Backport changed from tentacle squid to squid

DU Updated by Deepika Upadhyay 8 months ago Actions #9

  • Backport changed from squid to tentacle squid

DU Updated by Deepika Upadhyay 8 months ago Actions #10

  • Backport changed from tentacle squid to squid

UB Updated by Upkeep Bot 3 months ago Actions #11

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-03-02T15:15:24+00:00 to 2026-08-27T18:27:14+00:00

UB Updated by Upkeep Bot 3 months ago Actions #12

  • Tags (freeform) changed from keystone backport_processed to keystone
  • Upkeep Timestamp changed from 2026-08-27T18:27:14+00:00 to 2026-08-28T01:51:32+00:00

TD Updated by Tatjana Dehler 3 months ago Actions #13

  • Backport changed from squid to squid, tentacle

TD Updated by Tatjana Dehler 3 months ago Actions #14

  • Status changed from Backporting to Pending Backport

TD Updated by Tatjana Dehler 3 months ago Actions #15

  • Copied to Backport #80318: tentacle: rgw: add Keystone scope and application credential info to ops logging added

UB Updated by Upkeep Bot 3 months ago Actions #16

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-08-28T01:51:32+00:00 to 2026-09-07T12:26:41+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #17

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-09-07T12:26:41+00:00 to 2026-10-21T01:40:16+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #18

  • Released In set to v21.2.0~1129
  • Upkeep Timestamp changed from 2026-10-21T01:40:16+00:00 to 2026-10-24T02:19:10+00:00
Actions

Also available in: PDF Atom