From 1f328e54ee0a6741a817dc34bfdfa24cc65bc1cf Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 23 Jun 2021 22:12:20 -0400 Subject: [PATCH 1/7] feat: Update connect dialog with credentials api response --- addons/api/mirage/scenarios/ipc.js | 46 ++--- addons/core/translations/form/en-us.yaml | 6 + addons/core/translations/resources/en-us.yaml | 5 + ui/desktop/app/styles/app.scss | 6 + .../scopes/scope/projects/targets.hbs | 176 +++++++++++------- 5 files changed, 147 insertions(+), 92 deletions(-) diff --git a/addons/api/mirage/scenarios/ipc.js b/addons/api/mirage/scenarios/ipc.js index 0920fd963..729b9fa25 100644 --- a/addons/api/mirage/scenarios/ipc.js +++ b/addons/api/mirage/scenarios/ipc.js @@ -65,10 +65,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -76,16 +76,18 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'ingress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, { credential_library: { @@ -93,10 +95,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -104,18 +106,20 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'egress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, - ] + ], }; } diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 5d2a58567..9442c73fc 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -62,6 +62,8 @@ client_secret: help: The client secret is set-only and may not be unset. client_secret_hmac: label: Client Secret HMAC +secret: + label: Secret max_age: label: Maximum Age help: The OIDC "max_age" parameter sent to the Authorization Server indicating a maximum acceptable time in seconds since the user's last authentication before requiring the user to reauthenticate. 0 indicates an immediate need to reauthenticate. @@ -108,3 +110,7 @@ email: label: Email full_name: label: Full Name +key: + label: Key +value: + label: Value diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index fc4fa2c65..2a8bb2b67 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -150,8 +150,13 @@ session: credential: title: Credential title_plural: Credentials + secret: + label: Secret actions: detail: Credential library details + raw-api: + show: View raw API output + hide: Hide raw API output org: title: Org title_plural: Orgs diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 4abf9c368..a58be8b4d 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -451,4 +451,10 @@ $chevron-down: url("data:image/svg+xml;utf-8, <:body> -

{{t 'resources.target.messages.proxy_url.title'}} - {{!-- ({{t 'resources.target.types.tcp'}})

--}} - ({{t 'resources.target.types.tcp'}}) +

+ {{t 'resources.target.messages.proxy_url.title'}} + ({{t 'resources.target.types.tcp'}}) +

- {{session.proxy_address}}:{{session.proxy_port}} + {{session.proxy}}

- + {{#if session.credentials}} + - {{! TODO: Conditional for when credentials aren't available - older versions of cli }} -

{{t 'resources.session.credential.title_plural'}}

- {{!-- - <:header> - {{t 'resources.session.credential.title_plural'}} + + {{#each session.credentials as |credential|}} + - - <:key>{{t 'form.id.label'}} - <:value>cl_nbv9375hLHs - - - <:key>{{t 'form.name.label'}} - <:value>Key/Value - - - <:key>{{t 'form.description.label'}} - <:value>Lorem ipsum dolor, sit amet consectetur adipisicing - elit. Ut nobis, nemo cum omnis saepe reprehenderit eaque - non odit iste magni quod voluptatem soluta dolor beatae - libero consequatur, perferendis rem molestias. - - - - <:body> - {{! TODO: Iterate through all credentials }} - - - - Key - Value - - - - - foo - Value - - - ttl - Test - - - - - <:footer> - -
-                    
-                      { "auth": null, "lease_duration": 3600, "lease_id": "",
-                      "renewable": false }
-                    
-                  
-
- -
--}} + <:header> + + + <:key>{{t 'form.id.label'}} + <:value> + + {{credential.credential_library_id}} + + + + + <:key>{{t 'form.type.label'}} + <:value>{{credential.credential_library_type}} + + + <:key>{{t 'form.name.label'}} + <:value>{{credential.credential_library_name}} + + + <:key>{{t 'form.description.label'}} + <:value + >{{credential.credential_library_description}} + + + + <:body> + + + + {{t + 'form.key.label' + }} + {{t + 'form.value.label' + }} + + + + {{#if credential.secret}} + + {{t + 'form.secret.label' + }} + + + {{credential.secret}} + + + + {{/if}} + + + + <:footer> + +
+                        
+                          {{credential.rawCredential}}
+                        
+                      
+
+ + + {{/each}} + {{/if}} <:footer>
@@ -116,4 +150,4 @@ {{/each}} {{/each}} -{{outlet}} +{{outlet}} \ No newline at end of file From db4964c985e22ef028911096618a347e35939918 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 24 Jun 2021 10:59:11 -0400 Subject: [PATCH 2/7] chore: tweak cred card styles --- ui/desktop/app/styles/app.scss | 2 +- ui/desktop/app/templates/scopes/scope/projects/targets.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index a58be8b4d..a8cd2be48 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -429,7 +429,7 @@ $chevron-down: url("data:image/svg+xml;utf-8, <:header> Date: Thu, 24 Jun 2021 13:40:54 -0400 Subject: [PATCH 3/7] fix: Show raw json when viewing raw api output in connect dia --- ui/desktop/app/helpers/raw-json.js | 8 ++++ ui/desktop/app/styles/app.scss | 5 +++ .../scopes/scope/projects/targets.hbs | 8 +--- .../integration/helpers/raw-json-test.js | 19 +++++++++ yarn.lock | 39 ++++++++++++------- 5 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 ui/desktop/app/helpers/raw-json.js create mode 100644 ui/desktop/tests/integration/helpers/raw-json-test.js diff --git a/ui/desktop/app/helpers/raw-json.js b/ui/desktop/app/helpers/raw-json.js new file mode 100644 index 000000000..e457ebfd1 --- /dev/null +++ b/ui/desktop/app/helpers/raw-json.js @@ -0,0 +1,8 @@ +import { helper } from '@ember/component/helper'; + +/** + * Helper to convert json object to string for display purposes. + */ +export default helper(function rawJson([json]) { + return JSON.stringify(json, null, ' '); +}); diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index a8cd2be48..93cd35719 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -414,6 +414,11 @@ $chevron-down: url("data:image/svg+xml;utf-8, -
-                        
-                          {{credential.rawCredential}}
-                        
-                      
+
{{raw-json credential.rawCredential}}
@@ -150,4 +146,4 @@ {{/each}} {{/each}} -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/tests/integration/helpers/raw-json-test.js b/ui/desktop/tests/integration/helpers/raw-json-test.js new file mode 100644 index 000000000..34574a8a5 --- /dev/null +++ b/ui/desktop/tests/integration/helpers/raw-json-test.js @@ -0,0 +1,19 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Helper | raw-json', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + this.set('inputValue', {}); + await render(hbs`{{raw-json inputValue}}`); + assert.equal(this.element.textContent.trim(), '{}'); + this.set('inputValue', { key: 'value', nestedKey: { key: 'value' } }); + assert.equal( + this.element.textContent.trim(), + `{\n "key": "value",\n "nestedKey": {\n "key": "value"\n }\n}` + ); + }); +}); diff --git a/yarn.lock b/yarn.lock index ac5c10ef8..2c78436b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3671,7 +3671,7 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -agent-base@6: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -6360,9 +6360,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157, caniuse-lite@^1.0.30001219: - version "1.0.30001235" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001235.tgz#ad5ca75bc5a1f7b12df79ad806d715a43a5ac4ed" - integrity sha512-zWEwIVqnzPkSAXOUlQnPW2oKoYb2aLQ4Q5ejdjBcnH63rfypaW34CxaeBn1VMya2XaEU3P/R2qHpWyj+l0BT1A== + version "1.0.30001239" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz#66e8669985bb2cb84ccb10f68c25ce6dd3e4d2b8" + integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ== capture-exit@^2.0.0: version "2.0.0" @@ -15671,7 +15671,16 @@ npm-package-arg@^7.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-package-arg@^8.0.0, npm-package-arg@^8.1.0: +npm-package-arg@^8.0.0: + version "8.1.5" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.5.tgz#3369b2d5fe8fdc674baa7f1786514ddc15466e44" + integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== + dependencies: + hosted-git-info "^4.0.1" + semver "^7.3.4" + validate-npm-package-name "^3.0.0" + +npm-package-arg@^8.1.0: version "8.1.4" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.4.tgz#8001cdbc4363997b8ef6c6cf7aaf543c5805879d" integrity sha512-xLokoCFqj/rPdr3LvcdDL6Kj6ipXGEDHD/QGpzwU6/pibYUOXmp5DBmg76yukFyx4ZDbrXNOTn+BPyd8TD4Jlw== @@ -19098,11 +19107,11 @@ socks-proxy-agent@^4.0.0: socks "~2.3.2" socks-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" - integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" + integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== dependencies: - agent-base "6" + agent-base "^6.0.2" debug "4" socks "^2.3.3" @@ -21634,9 +21643,9 @@ write@^0.2.1: mkdirp "^0.5.1" ws@^7.4.5, ws@^7.4.6, ws@~7.4.2: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + version "7.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" + integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw== x-is-string@^0.1.0: version "0.1.0" @@ -21744,9 +21753,9 @@ yaml@^1.10.0, yaml@^1.7.2: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@20.2.4, yargs-parser@^15.0.1, yargs-parser@^18.1.2, yargs-parser@^20.0.0, yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^7.0.0, yargs-parser@^9.0.2, yargs-parser@~20.2.7: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-unparser@2.0.0: version "2.0.0" From 14f9635af44e322ab99c9e3c271ff58d58e94ef2 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Date: Thu, 24 Jun 2021 12:06:25 -0700 Subject: [PATCH 4/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Add=20hidden=20secr?= =?UTF-8?q?et=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add first iteration of hidden secret component. --- addons/api/mirage/scenarios/ipc.js | 46 ++++++++++--------- addons/core/translations/resources/en-us.yaml | 1 + .../app/components/hidden-secret/index.hbs | 11 +++++ ui/desktop/app/styles/app.scss | 11 +++++ .../scopes/scope/projects/targets.hbs | 6 ++- .../components/hidden-secret-test.js | 21 +++++++++ 6 files changed, 73 insertions(+), 23 deletions(-) create mode 100644 ui/desktop/app/components/hidden-secret/index.hbs create mode 100644 ui/desktop/tests/integration/components/hidden-secret-test.js diff --git a/addons/api/mirage/scenarios/ipc.js b/addons/api/mirage/scenarios/ipc.js index 0920fd963..729b9fa25 100644 --- a/addons/api/mirage/scenarios/ipc.js +++ b/addons/api/mirage/scenarios/ipc.js @@ -65,10 +65,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -76,16 +76,18 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'ingress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, { credential_library: { @@ -93,10 +95,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -104,18 +106,20 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'egress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, - ] + ], }; } diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index fc4fa2c65..c5f48f0c8 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -261,3 +261,4 @@ target: add: title: Add Host Sets description: Select host sets to assign to this target. + secret: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ diff --git a/ui/desktop/app/components/hidden-secret/index.hbs b/ui/desktop/app/components/hidden-secret/index.hbs new file mode 100644 index 000000000..6bdd9972e --- /dev/null +++ b/ui/desktop/app/components/hidden-secret/index.hbs @@ -0,0 +1,11 @@ +
+ {{! TODO: The span wrap within a div because later we will add the toggle secret icon/button}} +
+ {{t 'resources.target.host-set.secret'}} +
+ +
\ No newline at end of file diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 4abf9c368..a35ab2cb9 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -452,3 +452,14 @@ $chevron-down: url("data:image/svg+xml;utf-8, + ttl @@ -116,4 +118,4 @@ {{/each}} {{/each}} -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/tests/integration/components/hidden-secret-test.js b/ui/desktop/tests/integration/components/hidden-secret-test.js new file mode 100644 index 000000000..87e33a329 --- /dev/null +++ b/ui/desktop/tests/integration/components/hidden-secret-test.js @@ -0,0 +1,21 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render, find } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | hidden-secret', function (hooks) { + setupRenderingTest(hooks); + + test('it renders with a secret', async function (assert) { + assert.expect(2); + await render(hbs` + + `); + + assert.ok(find('.hidden-secret')); + assert.equal( + find('.hidden-secret > div > span').textContent.trim(), + '■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■' + ); + }); +}); From 4daa09ca7b496a7dd5a76fcbf2187c8f5d466739 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Date: Thu, 24 Jun 2021 12:15:34 -0700 Subject: [PATCH 5/7] Revert "Comment code with plain strings" This reverts commit a83e6af6de52e6e87e304a3e96ba69be2d1e87f8. --- ui/desktop/app/templates/scopes/scope/projects/targets.hbs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index d62990141..6f146c374 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -1,3 +1,5 @@ +{{! template-lint-disable no-bare-strings }} + {{page-title (t 'resources.target.title_plural')}} {{#each @model as |target|}} @@ -36,7 +38,7 @@ {{! TODO: Conditional for when credentials aren't available older versions of cli }}

{{t 'resources.session.credential.title_plural'}}

- {{!-- @@ -100,7 +102,7 @@ - --}} + <:footer>
From a5359911745f9ec93fad5b34cb2b56dfeb1f0614 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 24 Jun 2021 18:09:53 -0400 Subject: [PATCH 6/7] fix: Use library and secret objects in connect dialog --- addons/core/translations/form/en-us.yaml | 2 - .../scopes/scope/projects/targets.hbs | 67 +++++++++---------- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 9442c73fc..ba8252614 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -62,8 +62,6 @@ client_secret: help: The client secret is set-only and may not be unset. client_secret_hmac: label: Client Secret HMAC -secret: - label: Secret max_age: label: Maximum Age help: The OIDC "max_age" parameter sent to the Authorization Server indicating a maximum acceptable time in seconds since the user's last authentication before requiring the user to reauthenticate. 0 indicates an immediate need to reauthenticate. diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index 65f577345..b4c0f1a7e 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -61,60 +61,59 @@ <:key>{{t 'form.id.label'}} <:value> - {{credential.credential_library_id}} + {{credential.library.id}} <:key>{{t 'form.type.label'}} - <:value>{{credential.credential_library_type}} + <:value>{{credential.library.type}} <:key>{{t 'form.name.label'}} - <:value>{{credential.credential_library_name}} + <:value>{{credential.library.name}} <:key>{{t 'form.description.label'}} - <:value - >{{credential.credential_library_description}} + <:value>{{credential.library.description}} <:body> - - - - {{t - 'form.key.label' - }} - {{t - 'form.value.label' - }} - - - - {{#if credential.secret}} - + {{#if credential.secrets}} + + + {{t - 'form.secret.label' + 'form.key.label' }} - - - {{credential.secret}} - - - - {{/if}} - - + {{t + 'form.value.label' + }} + + + + {{#each credential.secrets as |secret|}} + + {{secret.key}} + + + {{secret.value}} + + + + {{/each}} + + + {{/if}} <:footer> Date: Fri, 25 Jun 2021 10:12:56 -0400 Subject: [PATCH 7/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Conditionally=20show?= =?UTF-8?q?=20credential=20library=20name=20and=20desc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 3 ++- .../scopes/scope/projects/targets.hbs | 26 +++++++++++-------- ui/desktop/electron-app/config/cli.js | 4 +++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index a23b80821..dd7ea9359 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -152,8 +152,9 @@ session: title_plural: Credentials secret: label: Secret + credential_library: + title: Credential Library actions: - detail: Credential library details raw-api: show: View raw API output hide: Hide raw API output diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index b4c0f1a7e..e26742ea1 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -1,5 +1,3 @@ -{{! template-lint-disable no-bare-strings }} - {{page-title (t 'resources.target.title_plural')}} {{#each @model as |target|}} @@ -51,7 +49,9 @@ > <:header> {{t 'form.type.label'}} <:value>{{credential.library.type}} - - <:key>{{t 'form.name.label'}} - <:value>{{credential.library.name}} - - - <:key>{{t 'form.description.label'}} - <:value>{{credential.library.description}} - + {{#if credential.library.name}} + + <:key>{{t 'form.name.label'}} + <:value>{{credential.library.name}} + + {{/if}} + {{#if credential.library.description}} + + <:key>{{t 'form.description.label'}} + <:value>{{credential.library.description}} + + {{/if}} <:body> diff --git a/ui/desktop/electron-app/config/cli.js b/ui/desktop/electron-app/config/cli.js index 22092de64..9af356e9e 100644 --- a/ui/desktop/electron-app/config/cli.js +++ b/ui/desktop/electron-app/config/cli.js @@ -48,6 +48,10 @@ const extract = (artifactPath, destination) => { module.exports = { setup: async () => { + if (process.env.BYPASS_CLI_SETUP) { + console.warn('WARNING: Bypassing cli setup'); + return; + } const artifactPath = await downloadArtifact(artifactVersion); await extract(artifactPath, artifactDestination); }