diff --git a/changelog/28629.txt b/changelog/28629.txt
new file mode 100644
index 000000000000..7d10d6da64e6
--- /dev/null
+++ b/changelog/28629.txt
@@ -0,0 +1,3 @@
+```release-note:improvement
+ui: Add button to copy secret path in kv v1 and v2 secrets engines
+```
diff --git a/ui/app/templates/components/secret-edit.hbs b/ui/app/templates/components/secret-edit.hbs
index 8c875103809c..f93325545f29 100644
--- a/ui/app/templates/components/secret-edit.hbs
+++ b/ui/app/templates/components/secret-edit.hbs
@@ -22,6 +22,7 @@
Edit Secret
{{else}}
{{@key.id}}
+
{{/if}}
diff --git a/ui/lib/kv/addon/components/kv-page-header.hbs b/ui/lib/kv/addon/components/kv-page-header.hbs
index fc62e70abce2..2a089f904244 100644
--- a/ui/lib/kv/addon/components/kv-page-header.hbs
+++ b/ui/lib/kv/addon/components/kv-page-header.hbs
@@ -13,6 +13,9 @@
{{@mountName}}
version 2
+ {{else if @secretPath}}
+ {{@secretPath}}
+
{{else}}
{{@pageTitle}}
{{/if}}
@@ -35,7 +38,7 @@
{{/if}}
{{#if (or (has-block "toolbarFilters") (has-block "toolbarActions"))}}
-
+
{{yield to="toolbarFilters"}}
diff --git a/ui/lib/kv/addon/components/page/secret/details.hbs b/ui/lib/kv/addon/components/page/secret/details.hbs
index 496eda16d4e1..e7e9f1de5b9c 100644
--- a/ui/lib/kv/addon/components/page/secret/details.hbs
+++ b/ui/lib/kv/addon/components/page/secret/details.hbs
@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
+
<:syncDetails>
{{#if this.syncStatus}}
diff --git a/ui/lib/kv/addon/components/page/secret/metadata/details.hbs b/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
index 1dff3801d665..c55ae3ce89d3 100644
--- a/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
+++ b/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
+
<:tabLinks>
Overview
diff --git a/ui/lib/kv/addon/components/page/secret/metadata/version-history.hbs b/ui/lib/kv/addon/components/page/secret/metadata/version-history.hbs
index db914d3345d4..93359dfada56 100644
--- a/ui/lib/kv/addon/components/page/secret/metadata/version-history.hbs
+++ b/ui/lib/kv/addon/components/page/secret/metadata/version-history.hbs
@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
+
<:tabLinks>
Overview
diff --git a/ui/lib/kv/addon/components/page/secret/overview.hbs b/ui/lib/kv/addon/components/page/secret/overview.hbs
index 685165888175..3fe1edec20a1 100644
--- a/ui/lib/kv/addon/components/page/secret/overview.hbs
+++ b/ui/lib/kv/addon/components/page/secret/overview.hbs
@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
+
<:tabLinks>
Overview
diff --git a/ui/lib/kv/addon/components/page/secret/paths.hbs b/ui/lib/kv/addon/components/page/secret/paths.hbs
index bb866b498555..e613a709a361 100644
--- a/ui/lib/kv/addon/components/page/secret/paths.hbs
+++ b/ui/lib/kv/addon/components/page/secret/paths.hbs
@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
+
<:tabLinks>
Overview
diff --git a/ui/tests/integration/components/kv/kv-page-header-test.js b/ui/tests/integration/components/kv/kv-page-header-test.js
index 2933d4490d36..687b9dc9df8b 100644
--- a/ui/tests/integration/components/kv/kv-page-header-test.js
+++ b/ui/tests/integration/components/kv/kv-page-header-test.js
@@ -54,7 +54,7 @@ module('Integration | Component | kv | kv-page-header', function (hooks) {
.exists('final breadcrumb renders and it is not a link.');
});
- test('it renders a custom title for a non engine view', async function (assert) {
+ test('it renders a custom title for @pageTitle', async function (assert) {
assert.expect(2);
await render(hbs``, {
owner: this.engine,
@@ -63,6 +63,15 @@ module('Integration | Component | kv | kv-page-header', function (hooks) {
assert.dom('[data-test-header-title] svg').doesNotExist('Does not show icon if not at engine level.');
});
+ test('it renders a title and copy button for @secretPath', async function (assert) {
+ await render(hbs``, {
+ owner: this.engine,
+ });
+ assert.dom('[data-test-header-title]').hasText('my/secret/path', 'displays path');
+ assert.dom('[data-test-header-title] button').exists('renders copy button for path');
+ assert.dom('[data-test-icon="clipboard-copy"]').exists('renders copy icon');
+ });
+
test('it renders a title, icon and tag if engine view', async function (assert) {
assert.expect(2);
await render(hbs``, {