Merge branch 'main' into chore-update-ember-test-helpers
This commit is contained in:
9 files changed
+490
-353
No files matched your search
@@ -3,7 +3,6 @@ import { computed } from '@ember/object';
|
||||
import { equal } from '@ember/object/computed';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { A } from '@ember/array';
|
||||
import { typeOf } from '@ember/utils';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -44,20 +43,29 @@ class SessionCredential {
|
||||
// =attributes
|
||||
rawCredential;
|
||||
library;
|
||||
#rawSecretValue;
|
||||
#payloadSecret;
|
||||
|
||||
/**
|
||||
* The incoming payload may contain a JSON object under the `decoded` key only
|
||||
* if it can be JSON-decoded. Some credential stores may not provide JSON,
|
||||
* however, in which case we may have only the raw base64-encoded secret
|
||||
* string. In the former case, we convert the key/value pairs of the JSON to
|
||||
* an array of `SecretItem` instances. In the latter case, we return an
|
||||
* array containing a single `SecretItem` instance with key `secret` and a
|
||||
* string value equal to the base64-decoded raw secret.
|
||||
* The credential secret as an array of key/value objects.
|
||||
* @type {SessionCredential.SecretItem[]}
|
||||
*/
|
||||
get secrets() {
|
||||
if (typeOf(this.#rawSecretValue) === 'object') {
|
||||
return Object.keys(this.#rawSecretValue).map(
|
||||
(key) =>
|
||||
new SessionCredential.SecretItem(key, this.#rawSecretValue[key])
|
||||
if (this.#payloadSecret?.decoded) {
|
||||
const secretJSON = this.#payloadSecret.decoded;
|
||||
return Object.keys(secretJSON).map(
|
||||
(key) => new SessionCredential.SecretItem(key, secretJSON[key])
|
||||
);
|
||||
} else {
|
||||
return [new SessionCredential.SecretItem('secret', this.#rawSecretValue)];
|
||||
// decode from base64
|
||||
const decodedString = atob(this.#payloadSecret.raw);
|
||||
return [new SessionCredential.SecretItem('secret', decodedString)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +74,7 @@ class SessionCredential {
|
||||
constructor(cred) {
|
||||
const { id, name, description, type } = cred.credential_library;
|
||||
this.library = new SessionCredential.Library(id, name, description, type);
|
||||
this.#rawSecretValue = cred.secret;
|
||||
this.#payloadSecret = cred.secret;
|
||||
this.rawCredential = cred;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,12 @@ export default function initializeMockIPC(server) {
|
||||
type,
|
||||
created_time: new Date().toISOString(),
|
||||
});
|
||||
const decoded = {
|
||||
key1: 'value 1',
|
||||
key2: true,
|
||||
key3: 'test',
|
||||
};
|
||||
const raw = btoa(JSON.stringify(decoded));
|
||||
return {
|
||||
address: window.location.hostname,
|
||||
port: datatype.number(),
|
||||
@@ -67,7 +73,9 @@ export default function initializeMockIPC(server) {
|
||||
credential_store_id: 'csvlt_Q1HFGt7Jpm',
|
||||
type: 'vault',
|
||||
},
|
||||
secret: 'just-a-random-string',
|
||||
secret: {
|
||||
raw: btoa('just-a-random-string'),
|
||||
},
|
||||
},
|
||||
{
|
||||
credential_library: {
|
||||
@@ -78,21 +86,10 @@ export default function initializeMockIPC(server) {
|
||||
type: 'vault',
|
||||
},
|
||||
secret: {
|
||||
key1: 'value 1',
|
||||
key2: true,
|
||||
key3: 'test',
|
||||
raw,
|
||||
decoded,
|
||||
},
|
||||
},
|
||||
{
|
||||
credential_library: {
|
||||
id: 'clvlt_9KWscxpcY7',
|
||||
name: 'Library Name',
|
||||
description: 'Library Description',
|
||||
credential_store_id: 'csvlt_Q1HFGt7Jpm',
|
||||
type: 'vault',
|
||||
},
|
||||
secret: 'just-a-random-string',
|
||||
},
|
||||
{
|
||||
credential_library: {
|
||||
id: 'clvlt_9KWscxpcY7',
|
||||
@@ -102,9 +99,20 @@ export default function initializeMockIPC(server) {
|
||||
type: 'vault',
|
||||
},
|
||||
secret: {
|
||||
key1: 'value 1',
|
||||
key2: true,
|
||||
key3: 'test',
|
||||
raw: btoa('just-a-random-string'),
|
||||
},
|
||||
},
|
||||
{
|
||||
credential_library: {
|
||||
id: 'clvlt_9KWscxpcY7',
|
||||
name: 'Library Name',
|
||||
description: 'Library Description',
|
||||
credential_store_id: 'csvlt_Q1HFGt7Jpm',
|
||||
type: 'vault',
|
||||
},
|
||||
secret: {
|
||||
raw,
|
||||
decoded,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
"@glimmer/component": "^1.0.3",
|
||||
"@glimmer/tracking": "^1.0.3",
|
||||
"@hashicorp/structure-icons": "^1.9.0-0",
|
||||
"@storybook/addon-actions": "^6.0.26",
|
||||
"@storybook/addon-docs": "^6.0.26",
|
||||
"@storybook/addon-knobs": "^6.0.26",
|
||||
"@storybook/ember": "^6.0.26",
|
||||
"@storybook/addon-actions": "^6.3.1",
|
||||
"@storybook/addon-docs": "^6.3.1",
|
||||
"@storybook/addon-knobs": "^6.3.0",
|
||||
"@storybook/ember": "^6.3.1",
|
||||
"@storybook/ember-cli-storybook": "^0.4.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
|
||||
+6
-2
@@ -52,7 +52,7 @@
|
||||
"request": "~2.68.0",
|
||||
"tunnel-agent": "~0.6.0",
|
||||
"cryptiles": "~4.1.2",
|
||||
"prismjs": "~1.23.0",
|
||||
"prismjs": "^1.24.0",
|
||||
"npm-user-validate": "^1.0.1",
|
||||
"caniuse-lite": "^1.0.30001157",
|
||||
"immer": "^8.0.1",
|
||||
@@ -71,7 +71,11 @@
|
||||
"ws": "^7.4.6",
|
||||
"css-what": "^5.0.1",
|
||||
"trim-newlines": "^3.0.1",
|
||||
"clean-css": "^4.1.11"
|
||||
"clean-css": "^4.1.11",
|
||||
"mem": "^4.0.0",
|
||||
"minimist": "^1.2.3",
|
||||
"normalize-url": "^4.5.1",
|
||||
"glob-parent": "^5.1.2"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
||||
@@ -180,7 +180,11 @@
|
||||
@style='warning'
|
||||
@iconOnly='trash'
|
||||
title={{t 'actions.remove'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @removeItemByIndex 'attributes.signing_algorithms' i)
|
||||
@@ -215,7 +219,11 @@
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
title={{t 'actions.add'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn
|
||||
@@ -273,7 +281,11 @@
|
||||
@style='warning'
|
||||
@iconOnly='trash'
|
||||
title={{t 'actions.remove'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @removeItemByIndex 'attributes.allowed_audiences' i)
|
||||
@@ -297,7 +309,11 @@
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
title={{t 'actions.add'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn
|
||||
@@ -355,7 +371,11 @@
|
||||
@style='warning'
|
||||
@iconOnly='trash'
|
||||
title={{t 'actions.remove'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @removeItemByIndex 'attributes.claims_scopes' i)
|
||||
@@ -379,7 +399,11 @@
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
title={{t 'actions.add'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn
|
||||
@@ -456,7 +480,11 @@
|
||||
@style='warning'
|
||||
@iconOnly='trash'
|
||||
title={{t 'actions.remove'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @removeItemByIndex 'attributes.account_claim_maps' i)
|
||||
@@ -496,7 +524,11 @@
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
title={{t 'actions.add'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @addAccountClaimMapItem this.newFromClaim this.newToClaim)
|
||||
@@ -549,7 +581,11 @@
|
||||
@style='warning'
|
||||
@iconOnly='trash'
|
||||
title={{t 'actions.remove'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn @removeItemByIndex 'attributes.idp_ca_certs' i)
|
||||
@@ -572,7 +608,11 @@
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
title={{t 'actions.add'}}
|
||||
@disabled={{if form.isEditable false true}}
|
||||
@disabled={{if
|
||||
@model.isNew
|
||||
false
|
||||
(if form.isEditable false true)
|
||||
}}
|
||||
{{on
|
||||
'click'
|
||||
(fn
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
Canonical reference for changes, improvements, and bugfixes for Boundary Desktop.
|
||||
|
||||
## Next
|
||||
## v1.2.0 [CLI 0.4.0] (2021.06.29)
|
||||
|
||||
### New
|
||||
|
||||
- Add vault credential support. ([PR](https://github.com/hashicorp/boundary-ui/pull/619))
|
||||
- Add Vault credential support. ([PR](https://github.com/hashicorp/boundary-ui/pull/619))
|
||||
|
||||
## v1.1.0 [CLI 0.3.0] (2021.06.09)
|
||||
|
||||
|
||||
@@ -328,9 +328,12 @@
|
||||
|
||||
// Dialog Detail
|
||||
// These styles are a Work In Progress. Expect changes (lots of them)
|
||||
.rose-dialog,
|
||||
.dialog-detail {
|
||||
z-index: 6000;
|
||||
}
|
||||
|
||||
.dialog-detail {
|
||||
.rose-notification {
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
|
||||
@@ -5,7 +5,7 @@ const https = require('https');
|
||||
const decompress = require('decompress');
|
||||
const { isMac, isWindows } = require('../src/helpers/platform.js');
|
||||
|
||||
const artifactVersion = '0.3.0';
|
||||
const artifactVersion = '0.4.0';
|
||||
const artifactDestination = path.resolve(__dirname, '..', 'cli');
|
||||
|
||||
const downloadArtifact = (version) => {
|
||||
|
||||
Reference in new issue
Block a user