Merge branch 'main' into chore-update-resolution-glob-parent

This commit is contained in:
Susmitha Girumala authored and GitHub committed 2021-07-06 10:58:21 -04:00
commit 58f46e9334
6 files changed
+97 -38

No files matched your search

+16 -8
View File
@@ -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;
}
}
+25 -17
View File
@@ -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,
},
},
],
@@ -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 -2
View File
@@ -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)
+3
View File
@@ -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;
+1 -1
View File
@@ -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) => {