From 7333f06428f3af590db27f849a0d7730978318db Mon Sep 17 00:00:00 2001 From: Sam Salisbury Date: Tue, 16 Feb 2021 17:22:59 +0000 Subject: [PATCH 01/10] fix ui-release-trigger quoting issue --- .github/workflows/ui-release-trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-release-trigger.yml b/.github/workflows/ui-release-trigger.yml index 0181ed3ac..324d04801 100644 --- a/.github/workflows/ui-release-trigger.yml +++ b/.github/workflows/ui-release-trigger.yml @@ -16,5 +16,5 @@ jobs: TAG: ${{ github.event.release.tag_name }} run: | curl -u ${{ secrets.CIRCLE_TOKEN }}: -X POST --header "Content-Type: application/json" \ - -d '{ "branch": "main", "parameters": {"TAG": "${TAG}" }}' \ + -d '{ "branch": "main", "parameters": {"TAG": "'${TAG}'" }}' \ https://circleci.com/api/v2/project/github/hashicorp/boundary-ui-releases/pipeline From 6f5e2ce2e930b21d48ec8b905eec79d49e5d35e7 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 23 Feb 2021 16:55:49 -0500 Subject: [PATCH 02/10] =?UTF-8?q?chore:=20=F0=9F=A4=96=20change=20macos=20?= =?UTF-8?q?user-facing=20app=20name=20to=20"Boundary"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also update asset filenames to "Boundary" --- ui/desktop/electron-app/config/cli.js | 2 +- ui/desktop/electron-app/config/forge.config.js | 4 ++-- ui/desktop/electron-app/package.json | 2 +- ui/desktop/electron-app/src/menu.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/desktop/electron-app/config/cli.js b/ui/desktop/electron-app/config/cli.js index 2e6858008..b3a24e434 100644 --- a/ui/desktop/electron-app/config/cli.js +++ b/ui/desktop/electron-app/config/cli.js @@ -10,7 +10,7 @@ const artifactDestination = path.resolve(__dirname, '..', 'cli'); const downloadArtifact = version => { const url = `https://releases.hashicorp.com/boundary/${version}/boundary_${version}_darwin_amd64.zip`; return new Promise((resolve, reject) => { - const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'boundary-desktop-artifact-')) + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'boundary-artifact-')) console.log('Create tmp artifact directory: ', tmpDir); const artifactFileName = url.split('/').pop(); diff --git a/ui/desktop/electron-app/config/forge.config.js b/ui/desktop/electron-app/config/forge.config.js index 5eb335012..092522ce1 100644 --- a/ui/desktop/electron-app/config/forge.config.js +++ b/ui/desktop/electron-app/config/forge.config.js @@ -25,7 +25,7 @@ module.exports = { "/ember-test(/|$)", "/tests(/|$)" ], - name: "Boundary Desktop", + name: "Boundary", appBundleId: "com.electron.boundary", // TODO: where should the client version number come from? appVersion: `${formattedAppVersion}${formattedCLIVersion}\n`, @@ -44,7 +44,7 @@ module.exports = { name: "@electron-forge/maker-dmg", config: { title: "Boundary", - name: "boundary-desktop", + name: "boundary", icon: "./config/macos/disk.icns", background: "./config/macos/background.png" } diff --git a/ui/desktop/electron-app/package.json b/ui/desktop/electron-app/package.json index 69caf84b0..774beacec 100644 --- a/ui/desktop/electron-app/package.json +++ b/ui/desktop/electron-app/package.json @@ -1,6 +1,6 @@ { "name": "desktop", - "productName": "Boundary Desktop", + "productName": "Boundary", "version": "0.0.0", "private": true, "description": "Electron UI for client for Boundary.", diff --git a/ui/desktop/electron-app/src/menu.js b/ui/desktop/electron-app/src/menu.js index 8e37595bc..1047bb8a6 100644 --- a/ui/desktop/electron-app/src/menu.js +++ b/ui/desktop/electron-app/src/menu.js @@ -4,7 +4,7 @@ const generateMenuTemplate = () => { return [ // { role: 'appMenu' } { - label: 'Boundary Desktop', + label: 'Boundary', submenu: [ { role: 'about' }, { type: 'separator' }, @@ -86,4 +86,4 @@ const generateMenuTemplate = () => { module.exports = { generateMenuTemplate: generateMenuTemplate -}; \ No newline at end of file +}; From 2b77c25238bc9ad2bb8f970d31d493f9cb3285ea Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 23 Feb 2021 16:56:10 -0500 Subject: [PATCH 03/10] chore: update readme regarding name change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af9ca0b99..b645d2c1a 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ To provide a signing identify for macOS build, use `BOUNDARY_DESKTOP_SIGNING_IDE environment variable to set signing certificate name (e.g Developer ID Application: * (*)). Assets are saved to `ui/desktop/electron-app/out/make/`. -DMG packaged desktop UI is available at asset location as `Boundary Desktop.dmg`. +DMG packaged desktop UI is available at asset location as `Boundary.dmg`. ### Committing From a0f8e0d2ae662ec699d7d1f349bd9c6a29411fc2 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 23 Feb 2021 17:01:11 -0500 Subject: [PATCH 04/10] docs: tweak readme filename casing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b645d2c1a..71733826a 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ To provide a signing identify for macOS build, use `BOUNDARY_DESKTOP_SIGNING_IDE environment variable to set signing certificate name (e.g Developer ID Application: * (*)). Assets are saved to `ui/desktop/electron-app/out/make/`. -DMG packaged desktop UI is available at asset location as `Boundary.dmg`. +DMG packaged desktop UI is available at asset location as `boundary.dmg`. ### Committing From b861352389eadb1b12f5fa31d9644e2b99953dfd Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 23 Feb 2021 17:13:30 -0500 Subject: [PATCH 05/10] docs: add changelog entry for app name change --- ui/desktop/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/desktop/CHANGELOG.md b/ui/desktop/CHANGELOG.md index cee2b0afe..1b30e6a2d 100644 --- a/ui/desktop/CHANGELOG.md +++ b/ui/desktop/CHANGELOG.md @@ -7,6 +7,7 @@ Canonical reference for changes, improvements, and bugfixes for Boundary Desktop ### Changes/Deprecations +- Boundary Desktop is now simply "Boundary". This change affects macOS asset filenames, as well as the title used within the application. Documentation will continue to use the name "Boundary Desktop" to avoid confusion with the core binary. ([PR](https://github.com/hashicorp/boundary-ui/pull/481)) - Boundary origin validation now occurs via Electron's built-in net request module, ensuring the validation request is made via chromium's networking library rather than Node's. ([PR](https://github.com/hashicorp/boundary-ui/pull/480)) ## v1.0.0-alpha (2021.02.16) From c6fd966372f6e3ce3d64d736a0df910b048022bf Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 23 Feb 2021 17:19:26 -0500 Subject: [PATCH 06/10] docs: language tweak --- ui/desktop/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/CHANGELOG.md b/ui/desktop/CHANGELOG.md index 1b30e6a2d..9ec58424c 100644 --- a/ui/desktop/CHANGELOG.md +++ b/ui/desktop/CHANGELOG.md @@ -7,7 +7,7 @@ Canonical reference for changes, improvements, and bugfixes for Boundary Desktop ### Changes/Deprecations -- Boundary Desktop is now simply "Boundary". This change affects macOS asset filenames, as well as the title used within the application. Documentation will continue to use the name "Boundary Desktop" to avoid confusion with the core binary. ([PR](https://github.com/hashicorp/boundary-ui/pull/481)) +- Boundary Desktop is now simply "Boundary". This change affects macOS asset filenames, as well as the title used within the application. Documentation will continue to refer to "Boundary Desktop" to avoid confusion with the core binary. ([PR](https://github.com/hashicorp/boundary-ui/pull/481)) - Boundary origin validation now occurs via Electron's built-in net request module, ensuring the validation request is made via chromium's networking library rather than Node's. ([PR](https://github.com/hashicorp/boundary-ui/pull/480)) ## v1.0.0-alpha (2021.02.16) From 740964f66f74268e727793991360bc942761c695 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 25 Feb 2021 12:58:17 -0500 Subject: [PATCH 07/10] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tweak=20desktop?= =?UTF-8?q?=20svg=20bg=20accent=20color=20to=20match=20brand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/desktop/public/brand-background.svg | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ui/desktop/public/brand-background.svg b/ui/desktop/public/brand-background.svg index 050bb59e7..1896291af 100644 --- a/ui/desktop/public/brand-background.svg +++ b/ui/desktop/public/brand-background.svg @@ -9,64 +9,64 @@ - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + From 10fe08c28dea105a5d58a31d9ddcb1bbf6e8e983 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 26 Feb 2021 12:04:12 -0500 Subject: [PATCH 08/10] =?UTF-8?q?chore:=20=F0=9F=A4=96=20rip=20out=20depre?= =?UTF-8?q?cated=20route=20mixin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/routes/application.js | 36 +---------------- .../tests/acceptance/authentication-test.js | 39 ++++++++++--------- ui/desktop/app/routes/application.js | 36 +---------------- 3 files changed, 23 insertions(+), 88 deletions(-) diff --git a/ui/admin/app/routes/application.js b/ui/admin/app/routes/application.js index a4d4cc6ef..be7f8b034 100644 --- a/ui/admin/app/routes/application.js +++ b/ui/admin/app/routes/application.js @@ -1,20 +1,14 @@ import Route from '@ember/routing/route'; -/* eslint-disable-next-line ember/no-mixins */ -import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin'; -import Ember from 'ember'; import { getOwner } from '@ember/application'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; -import { later } from '@ember/runloop'; import loading from 'ember-loading/decorator'; import { A } from '@ember/array'; /** * Entry route for the application. */ -export default class ApplicationRoute extends Route.extend( - ApplicationRouteMixin -) { +export default class ApplicationRoute extends Route { // =services @service session; @@ -31,34 +25,6 @@ export default class ApplicationRoute extends Route.extend( this.toggleTheme(theme); } - /** - * After becoming authenticated, does nothing. This overrides the default - * behavior of the ApplicationRouteMixin, which is to redirect after auth. - * We'll handle this redirect manually in sub routes. - * @override - */ - sessionAuthenticated() { - // no op - } - - /** - * When the session ends, redirect to authenticate and reload the page to - * purge any in-memory state. - */ - async sessionInvalidated() { - // Catch error in this transition, since it will be aborted by the - // scope auth route when it redirects to the first auth method. - await this.transitionTo(this.routeIfUnauthenticated).catch(() => {}); - // The Ember way of accessing globals... - const document = getOwner(this).lookup('service:-document').documentElement; - // defaultView === window, but without using globals directly - const { location } = document.parentNode.defaultView; - // Wait a beat, then reload the page... - // This is mostly to give the deauth request a chance to fire. - /* istanbul ignore if */ - if (!Ember.testing) later(location, location.reload, 150); - } - // =actions /** diff --git a/ui/admin/tests/acceptance/authentication-test.js b/ui/admin/tests/acceptance/authentication-test.js index 872d99d83..502e684af 100644 --- a/ui/admin/tests/acceptance/authentication-test.js +++ b/ui/admin/tests/acceptance/authentication-test.js @@ -5,7 +5,7 @@ import { fillIn, click, find, - findAll, + //findAll, getRootElement, //setupOnerror, } from '@ember/test-helpers'; @@ -282,23 +282,26 @@ module('Acceptance | authentication', function (hooks) { assert.ok(currentSession().isAuthenticated); }); - test('deauthentication redirects to first global authenticate method', async function (assert) { - assert.expect(3); - await visit(authMethodAuthenticateURL); - await fillIn('[name="identification"]', 'test'); - await fillIn('[name="password"]', 'test'); - await click('[type="submit"]'); - assert.ok(currentSession().isAuthenticated); - // Open header utilities dropdown - await click('.rose-header-utilities .rose-dropdown summary'); - // Find and click on last element in dropdown - should be deauthenticate button - const menu = findAll( - '.rose-header-utilities .rose-dropdown .rose-dropdown-content button' - ); - await click(menu[menu.length - 1]); - assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); - }); + // This test is disabled because it is no longer relevant. On deauth, + // the page is reloaded. If the user was viewing a route requiring + // authentication, they will be redirected accordingly. + // test('deauthentication redirects to first global authenticate method', async function (assert) { + // assert.expect(3); + // await visit(authMethodAuthenticateURL); + // await fillIn('[name="identification"]', 'test'); + // await fillIn('[name="password"]', 'test'); + // await click('[type="submit"]'); + // assert.ok(currentSession().isAuthenticated); + // // Open header utilities dropdown + // await click('.rose-header-utilities .rose-dropdown summary'); + // // Find and click on last element in dropdown - should be deauthenticate button + // const menu = findAll( + // '.rose-header-utilities .rose-dropdown .rose-dropdown-content button' + // ); + // await click(menu[menu.length - 1]); + // assert.notOk(currentSession().isAuthenticated); + // assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + // }); test('401 responses result in deauthentication', async function (assert) { assert.expect(2); diff --git a/ui/desktop/app/routes/application.js b/ui/desktop/app/routes/application.js index be807e246..27493eb33 100644 --- a/ui/desktop/app/routes/application.js +++ b/ui/desktop/app/routes/application.js @@ -1,18 +1,12 @@ import Route from '@ember/routing/route'; -import Ember from 'ember'; import jQuery from 'jquery'; -/* eslint-disable-next-line ember/no-mixins */ -import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { A } from '@ember/array'; import { getOwner } from '@ember/application'; -import { later } from '@ember/runloop'; import loading from 'ember-loading/decorator'; -export default class ApplicationRoute extends Route.extend( - ApplicationRouteMixin -) { +export default class ApplicationRoute extends Route { // =services @service session; @@ -49,34 +43,6 @@ export default class ApplicationRoute extends Route.extend( }); } - /** - * After becoming authenticated, does nothing. This overrides the default - * behavior of the ApplicationRouteMixin, which is to redirect after auth. - * We'll handle this redirect manually in sub routes. - * @override - */ - sessionAuthenticated() { - // no op - } - - /** - * When the session ends, redirect to authenticate and reload the page to - * purge any in-memory state. - */ - async sessionInvalidated() { - // Catch error in this transition, since it will be aborted by the - // scope auth route when it redirects to the first auth method. - await this.transitionTo(this.routeIfUnauthenticated).catch(() => {}); - // The Ember way of accessing globals... - const document = getOwner(this).lookup('service:-document').documentElement; - // defaultView === window, but without using globals directly - const { location } = document.parentNode.defaultView; - // Wait a beat, then reload the page... - // This is mostly to give the deauth request a chance to fire. - /* istanbul ignore if */ - if (!Ember.testing) later(location, location.reload, 150); - } - // =actions /** From 342444e3d05857d29c76d92acb4ea5fc58cbc54a Mon Sep 17 00:00:00 2001 From: 99 Date: Fri, 26 Feb 2021 14:04:29 -0800 Subject: [PATCH 09/10] debug tag --- .github/workflows/ui-release-trigger.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui-release-trigger.yml b/.github/workflows/ui-release-trigger.yml index 324d04801..9780737ce 100644 --- a/.github/workflows/ui-release-trigger.yml +++ b/.github/workflows/ui-release-trigger.yml @@ -15,6 +15,7 @@ jobs: env: TAG: ${{ github.event.release.tag_name }} run: | + echo "($TAG)" curl -u ${{ secrets.CIRCLE_TOKEN }}: -X POST --header "Content-Type: application/json" \ -d '{ "branch": "main", "parameters": {"TAG": "'${TAG}'" }}' \ https://circleci.com/api/v2/project/github/hashicorp/boundary-ui-releases/pipeline From 841709cd16f4fd5cd930f733781e8ad654b5601e Mon Sep 17 00:00:00 2001 From: 99 Date: Fri, 26 Feb 2021 14:15:33 -0800 Subject: [PATCH 10/10] debug tag --- .github/workflows/ui-release-trigger.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui-release-trigger.yml b/.github/workflows/ui-release-trigger.yml index 9780737ce..62c2d3616 100644 --- a/.github/workflows/ui-release-trigger.yml +++ b/.github/workflows/ui-release-trigger.yml @@ -14,8 +14,9 @@ jobs: - name: Trigger Release job env: TAG: ${{ github.event.release.tag_name }} + TEST_REF: ${{ github.ref }} run: | - echo "($TAG)" + echo "($TAG), ($TEST_REF)" curl -u ${{ secrets.CIRCLE_TOKEN }}: -X POST --header "Content-Type: application/json" \ -d '{ "branch": "main", "parameters": {"TAG": "'${TAG}'" }}' \ https://circleci.com/api/v2/project/github/hashicorp/boundary-ui-releases/pipeline