From b5bcfe619b23c96175cb8e2a20c8bac1f5e226d2 Mon Sep 17 00:00:00 2001 From: Hridoy Roy Date: Mon, 8 Nov 2021 15:38:35 -0800 Subject: [PATCH] Port: Allow Routing to Partial Monthly Client Count From Namespaces (#13086) * add function for routing activity log client counts to ent namespaces * changelog --- changelog/13086.txt | 3 +++ vault/logical_system_activity.go | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog/13086.txt diff --git a/changelog/13086.txt b/changelog/13086.txt new file mode 100644 index 0000000000000..d8c92ba353cbc --- /dev/null +++ b/changelog/13086.txt @@ -0,0 +1,3 @@ +```release-note:bug +activity log (enterprise): allow partial monthly client count to be accessed from namespaces +``` \ No newline at end of file diff --git a/vault/logical_system_activity.go b/vault/logical_system_activity.go index 550aa5400795d..8068a942ae806 100644 --- a/vault/logical_system_activity.go +++ b/vault/logical_system_activity.go @@ -41,7 +41,7 @@ func (b *SystemBackend) activityQueryPath() *framework.Path { // monthlyActivityCountPath is available in every namespace func (b *SystemBackend) monthlyActivityCountPath() *framework.Path { return &framework.Path{ - Pattern: "internal/counters/activity/monthly", + Pattern: "internal/counters/activity/monthly$", HelpSynopsis: strings.TrimSpace(sysHelp["activity-monthly"][0]), HelpDescription: strings.TrimSpace(sysHelp["activity-monthly"][1]), Operations: map[logical.Operation]framework.OperationHandler{ @@ -53,6 +53,13 @@ func (b *SystemBackend) monthlyActivityCountPath() *framework.Path { } } +func (b *SystemBackend) activityPaths() []*framework.Path { + return []*framework.Path{ + b.monthlyActivityCountPath(), + b.activityQueryPath(), + } +} + // rootActivityPaths are available only in the root namespace func (b *SystemBackend) rootActivityPaths() []*framework.Path { return []*framework.Path{