Compare commits

..
70 Commits
Author SHA1 Message Date
Zhihe Li 2680301f98 chore: 🤖 Update changelog and version for desktop (#1712) 2023-06-12 16:29:50 -07:00
Dharini Jeeva edf623adf0 fix: 🐛 worker form navigation (#1711)
* fix: 🐛 Show done only when a worker is registered successfully, otherwise show cancel and navigate to the workers list
2023-06-12 08:38:55 -07:00
Dharini Jeeva 37c0c55a60 fix: 🐛 add margin for button sets (#1709) 2023-06-08 16:31:07 -07:00
Randall Morey 863c080196 Optimise Desktop API queries (#1707)
* fix: 🐛 increase auth form width, which was too narrow

* chore: 🤖 optimize targets route queries

* chore: 🤖 optimize sessions route queries

* chore: 🤖 disable polling in sessions route

* chore: 🤖 disable polling in targets route

* refactor: 💡 update tests for new queries and removing timing
2023-06-07 18:28:33 -07:00
Randall Morey 547d44f1bd fix: 🐛 increase auth form width, which was too narrow (#1703) 2023-06-06 18:15:58 -07:00
lisbet-alvarezandRandall Morey 6e96676beb Icu 9412 refactor rose form actions to use hds buttons (#1697)
* refactor: 💡 use hds buttons in rose form actions

✅ Closes: ICU-9412

* test: 💍 fix form actions tests

* docs: ✏️ add new hds button attribute to storybook

* refactor: 💡 add ...attributes back in

* Update addons/rose/addon/components/rose/form/actions/edit-toggle/index.hbs

Co-authored-by: Randall Morey <randall@randallmorey.com>

* Update addons/rose/addon/components/rose/form/actions/index.hbs

Co-authored-by: Randall Morey <randall@randallmorey.com>

* refactor: 💡 remove @submitIsFullWidth option & add css instead

---------

Co-authored-by: Randall Morey <randall@randallmorey.com>
2023-06-05 13:38:41 -07:00
Zhihe Li de10b275d3 chore: 🤖 Update worker binary name to just boundary (#1704)
✅ Closes: ICU-9570
2023-06-02 13:33:51 -04:00
Carlos Alcaide Corvo b94f3d164e style: 💄 Delete old comment code (#1699)
Delete old comment code, seems isn't used for a couple of years
2023-06-01 10:13:03 -07:00
Cameron Perera 80748b28fb refactor: 💡 remove type column from Workers table in Admin UI (#1702)
✅ Closes: ICU-9539
2023-06-01 11:07:57 -05:00
Zhihe Li 963b5d465d feat: 🎸 Add default client port to targets (#1700)
* feat: 🎸 Add default client port to targets

✅ Closes: ICU-9299
2023-05-31 18:33:27 -04:00
Dharini Jeeva 9d7a23fcc4 fix: 🐛 radio card group name (#1701) 2023-05-31 10:00:28 -07:00
Zhihe Li 2a11d75ccf fix: 🐛 Fix serializing client secrets in oidc auth methods (#1698) 2023-05-26 14:14:58 -04:00
dependabot[bot] 59183b9b20 chore(deps): bump socket.io-parser from 4.2.1 to 4.2.3 (#1696)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 14:21:00 -04:00
lisbet-alvarez fde4ec4e05 Refactor type to use const values (#1695)
* refactor: 💡 use auth-method type consts
2023-05-23 12:37:35 -07:00
lisbet-alvarez 8d77bc60b3 Icu 9226 disable all actions for ldap accounts within users (#1688)
* refactor: 💡 disable all actions for ldap accounts within users

✅ Closes: ICU-9226
2023-05-22 15:46:13 -07:00
lisbet-alvarez 379f317d8b Refactor account and user abilities (#1694)
* refactor: 💡 add abilities to user and remove from account
2023-05-22 11:16:48 -07:00
Carlos Alcaide Corvo fe81a626fa Chore icu 9071 audit resolutions (#1693)
* Delete cryptiles from resolutions

* Delete prismjs from global resolutions and add a specific resolution

* Delete npm-user-validate from global resolutions
2023-05-22 08:38:01 -07:00
a2cc33d405 e2e Test documentation for FE onboarding (#1681)
* Add e2e documentation to faciltiate FE devs onboarding

Co-authored-by: Michael Li <michael.li@hashicorp.com>
Co-authored-by: lisbet-alvarez <107949262+lisbet-alvarez@users.noreply.github.com>

---------

Co-authored-by: Michael Li <michael.li@hashicorp.com>
Co-authored-by: lisbet-alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2023-05-19 16:10:55 -07:00
Devon Anderson e6664b882f fix: 🐛 fix descriptions for targets list for desktop (#1692)
Target descriptions where not displaying due to some previous
refactoring.  Corrected `description` and `isActive` references.

✅ Closes: ICU-9375
2023-05-19 15:59:49 -04:00
lisbet-alvarez 6dd0423923 refactor: 💡 account and auth-method abilities (#1691)
* refactor: 💡 account and auth-method abilities

* refactor: 💡 add update & delete abilities & unit tests
2023-05-17 14:31:12 -07:00
lisbet-alvarez e8a10b3131 feat: 🎸 add ldap-auth-methods feature flag (#1690) 2023-05-16 16:10:38 -07:00
Dharini Jeeva 7d909551ac chore: Use HDS components in auth methods list view (#1686)
* chore: 🤖 use hds table and dropdown
2023-05-16 09:37:53 -07:00
lisbet-alvarez 3b3d6ab50f Icu 9202 disable all actions for ldap auth method (#1683)
* refactor: 💡 disable all actions for ldap auth-method

✅ Closes: ICU-9202
2023-05-11 15:15:31 -07:00
Randall Morey 4c80f8d8ff feat: 🎸 initial LDAP authentication support (#1645)
* feat: 🎸 initial LDAP authentication support
2023-05-11 13:55:27 -07:00
lisbet-alvarez b344c5fc18 chore: 🤖 upgrade engine.io version to fix security alert (#1685) 2023-05-10 15:07:33 -07:00
lisbet-alvarez fd72b414e0 chore: 🤖 update yaml version to fix security alert (#1684) 2023-05-10 14:13:30 -07:00
Randall Morey 5723d8efb5 fix: 🐛 support metadata access on another API host (#1682) 2023-05-09 15:06:32 -07:00
041990322f docs: ✏️ Add i18n documentation (#1679)
* docs: ✏️ Add i18n documentation

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
Co-authored-by: lisbet-alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2023-05-05 11:27:05 -07:00
Zhihe Li 3d1ac0a4e0 feat: 🎸 Download latest HCP binary for worker config commands (#1680)
✅ Closes: ICU-7265
2023-05-04 15:14:00 -04:00
Carlos Alcaide Corvo ffd36003e0 Chore update embroider test setup (#1678)
* Update embroider/test-setup within addons/rose

* Update embroider/test-setup within addons/api, auth and core
2023-05-01 11:16:20 -07:00
f6a9c4c526 Result of tsccr-helper -pin-all-workflows . (#1677)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2023-04-27 12:24:39 -07:00
Carlos Alcaide Corvo 9bd356e9d1 ICU-8810: Audit 3 resolutions (#1676)
* Delete npm-registry-fetch from resolutions

* Delete tunnel-agent from resolutions
2023-04-27 11:06:53 -07:00
Devon Anderson 46d8758fba refactor: 💡 refactored whitespace from layout (#1675)
* refactor: 💡 refactored whitespace from layout

Removed whitespace html formatting from layout in add-principals view.

✅ Closes: ICU-5987

* refactor: 💡 removed lint ignore

Removed lint ignore for whitespace formating.
2023-04-26 15:37:56 -04:00
Devon AndersonandRandall Morey a05d07919a refactor: 💡 removed whitespace from layout in add-members view (#1673)
* refactor: 💡 removed whitespace from layout in add-members view

Removed whitespace from layout in `add-members` view by replacing
`Rose::Table` with `Hds::Table`.

✅ Closes: ICU-5986

* refactor: 💡 refactor table

Added custom styling to remove margin bottom from radio card field. That
is causing 1st column to not be valign center.

✅ Closes: ICU-5986

* refactor: 💡 refactor stylings to override.scss

Moved Hds custom syles to `overrides.scss`

✅ Closes: ICU-5986

* Update addons/rose/addon/styles/hds/overrides.scss

Co-authored-by: Randall Morey <randall@randallmorey.com>

* Update addons/rose/addon/styles/hds/overrides.scss

Co-authored-by: Randall Morey <randall@randallmorey.com>

* refactor: 💡 refactored app.scss for admin

Removed custom css for `.key-value-list` selector that is now being
served in `overrides.scss` globally.

* refactor: 💡 patched overrides

Ported Hds overrides from other repository.

---------

Co-authored-by: Randall Morey <randall@randallmorey.com>
2023-04-26 13:38:00 -04:00
Carlos Alcaide Corvo d0e00c9ea7 Chore audit 3 resolutions desktop (#1674)
* chore: 🤖 Audit 3 Desktop client resolution deps

✅ Closes: ICU-8811
2023-04-26 09:21:22 -07:00
lisbet-alvarez 61269f901a chore: 🤖 upgrade @storybook/ember-cli-storybook to 0.6.0 (#1669)
* chore: 🤖 update @storybook/ember-cli-storybook to 0.6.0

✅ Closes: ICU-6588

* chore: 🤖 remove css-what from resolutions
2023-04-24 10:05:15 -07:00
lisbet-alvarez 6cb9c2ab1b chore: 🤖 add json5 to resolutions per dependabot alerts (#1672)
* chore: 🤖 add json5 to resolutions per dependabot alerts

* fix: 🐛 remove unecessary resolutions
2023-04-20 15:37:45 -07:00
Stan Ryzhov 3ea8ade828 test: 💍 (admin-e2e): Add test to create different credentials (#1670) 2023-04-20 14:07:20 -04:00
Stan Ryzhov 1c392f72b9 test(admin/e2e): Define expected private key for vault credential store test (#1671) 2023-04-19 11:09:14 -04:00
Dharini Jeeva ec0b610f8b chore: 🤖 update design system package (#1668) 2023-04-18 14:41:18 -07:00
Stan Ryzhov 9795353545 test(admin/e2e): Add create target with address test (#1667) 2023-04-17 16:14:59 -04:00
Zhihe Li 054881dc4e feat: 🎸 Add support to display external name for dynamic hosts (#1664)
* feat: 🎸 Add support to display external name for dynamic hosts

✅ Closes: ICU-8795
2023-04-17 13:22:32 -04:00
Carlos Alcaide Corvo a4395b85a6 chore: 🤖 Update electron-forge/* packages (#1666)
Update electron-forge/* packages
2023-04-17 08:43:39 -07:00
dependabot[bot] 509925ff10 chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#1665)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-06 09:29:17 -07:00
Carlos Alcaide Corvo d5c8389ae2 Resolutions audit: Delete 3 oldest resolutions (#1663)
* Delete bl from resolutions

* Delete tough-cookie from resolutions

* Delete npm from resolutions
2023-04-05 18:04:14 -07:00
Carlos Alcaide Corvo 9fa816757b fix: 🐛 Fix missing translation (#1662)
Fix missing translation on the toggle color theme selector
2023-04-03 10:33:40 -07:00
Randall MoreyandZhihe Li 7350c0e08c Feature metadata (#1661)
* feat: 🎸 load edition from controller-metadata.json

* refactor: 💡 rename edition and add licensed features support

* chore: 🤖 support dev toggling of licensed features

* chore: 🤖 rename ent edition

* Update ui/admin/app/services/feature-edition.js

* Update ui/admin/app/instance-initializers/feature-edition.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* chore: 🤖 cleanup

* chore: 🤖 feature edition disabled in tests / fix test cases

* test: 💍 remove feature disable calls in tests

* test: 💍 fix broken tests

* fix: 🐛 fix config bug

* fix: 🐛 fix broken test due to feature flags

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2023-03-31 17:38:17 -07:00
ee1cd4100c chore(deps-dev): bump webpack from 5.59.1 to 5.76.0 (#1654)
Bumps [webpack](https://github.com/webpack/webpack) from 5.59.1 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.59.1...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Randall Morey <randall@randallmorey.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2023-03-31 15:12:07 -07:00
hashicorp-copywrite[bot]andCarlos Alcaide Corvo f17b7d54d8 [COMPLIANCE] Add Copyright and License Headers (#1660)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2023-03-28 12:50:34 -05:00
lisbet-alvarez 087898c15a fix: 🐛 add model hook to host route for dynamic host catalogs (#1659)
* fix: 🐛 add model hook to host route for dynamic host catalogs

✅ Closes: ICU-8594

* refactor: 💡 remove page formatting for host route
2023-03-28 10:14:31 -07:00
Randall Morey ee2fa6df7d refactor: 💡 remove explicit byow-pki-upstream, as it is default (#1658)
* refactor: 💡 consolidate ssh features into ssh-target flag

✅ Closes: ICU-8383

* refactor: 💡 factor out base edition

* feat: 🎸 dynamic feature edition enablement and toggling

* refactor: 💡 remove explicit byow-pki-upstream, as it is default

✅ Closes: ICU-8551

* refactor: 💡 extract feature flag config into separate file
2023-03-21 15:41:27 -07:00
Randall Morey acd719140d Refactor edition enablement (#1657)
* refactor: 💡 consolidate ssh features into ssh-target flag

✅ Closes: ICU-8383

* refactor: 💡 factor out base edition

* feat: 🎸 dynamic feature edition enablement and toggling
2023-03-17 14:34:37 -07:00
Devon Anderson bd6eee8eb3 refactor: 💡 refactored dark-mode styling for HDS (#1655)
Refactored boundary custom colors to be included in root instead of
unused mixin.
2023-03-16 10:19:20 -04:00
Devon Anderson 3ba53dfc2e chore: 🤖 deprecate window object service (#1652)
* chore: 🤖 deprecate window object service

Deprecate `browser-object` service in favor of `ember-browser-services`

✅ Closes: ICU-7152

* refactor: 💡 cluster-url test fail

commit with cluster-url test failing

✅ Closes: ICU-7152

* refactor: 💡 refactor test to reflect changes

Refactor test to reflect `browser/window` service in `cluster-url` route

✅ Closes: ICU-7152

* refactor: 💡 refactor cluster url test

change logic of mockIPC to a function call

✅ Closes: ICU-7152
2023-03-07 16:55:24 -05:00
Carlos Alcaide Corvo 0a76111944 chore: 🤖 Upgrade Stylelint within desktop client (#1653)
Upgrade Stylelint within desktop client to be consistent with the same
version we use in Admin UI.

✅ Closes: ICU-3276
2023-03-02 11:07:41 -08:00
Zhihe Li c7546af207 fix: 🐛 Fix vault worker filter description (#1651)
✅ Closes: ICU-8192
2023-03-02 10:25:37 -05:00
Michael Li 7eb6a101a2 chore: Add missing compliance headers (#1649) 2023-03-01 11:29:33 -05:00
hashicorp-copywrite[bot]andCameron Perera 3d610427d0 [COMPLIANCE] Add Copyright and License Headers (#1617)
* [COMPLIANCE] Add Copyright and License Headers

* chore: 🤖 update Copyright headers to satisfy our lint rules

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-03-01 09:39:41 -06:00
Michael Li a0fe6c86f6 test(admin/e2e): Update DHC test to catch host issue (#1648) 2023-02-28 15:55:41 -05:00
Michael Li f5cb07248d test(admin/e2e): Add login tests (#1647) 2023-02-28 10:14:22 -05:00
Michael Li 2dc50570b7 test(admin/e2e): Add tests for Credential Stores (#1643) 2023-02-27 13:54:12 -05:00
Michael Li 1f3a8ef135 test(admin/e2e): Add test for AWS Dynamic Host Catalogs (#1641) 2023-02-24 13:59:30 -05:00
Zhihe Li a8bbf91a0a fix: 🐛 Fix generic-vault getting extra null fields when saving (#1640)
* fix: 🐛 Fix generic-vault getting extra null fields when saving

✅ Closes: ICU-8141
2023-02-24 13:11:17 -05:00
Michael Li 7816772ef2 test(admin/e2e): Add first playwright test (#1637)
Adds an end-to-end test for the Admin UI using Playwright. This test uses the Admin UI to create the necessary resources to connect to a target. The test then uses the CLI to start a session and checks in the Admin UI that a session is created
2023-02-23 18:30:51 -05:00
Carlos Alcaide Corvo 7fbdefba59 fix: 🐛 Update yarn.lock (#1642) 2023-02-23 12:21:40 -08:00
Carlos Alcaide Corvo 0b992bb011 fix: 🐛 Fix failure in GH Actions Workflows (#1639) 2023-02-22 12:14:04 -08:00
Carlos Alcaide Corvo 5efc1af76d test: 💍 Swap playwright to @playwright/test package (#1635)
Playwright documentation recommends to use @playwright/test now as the
only playwright package
2023-02-21 11:50:59 -08:00
Dharini Jeeva 7db1edda1c chore: use structuredClone instead of ember-copy addon (#1634) 2023-02-16 14:06:37 -08:00
Zhihe Li 76147af357 chore: 🤖 Pin storybook docs addon to a minor version (#1631)
The storybook docs addon is broken in 6.5.x currently. Pinning it to
6.3.x lets us to continue using storybook. See this github issue:
https://github.com/storybookjs/storybook/issues/17527

✅ Closes: ICU-7791
2023-02-15 14:41:53 -05:00
Cameron PereraandRandall Morey 2d1ed7b8bd refactor: 💡 rename div around ordered-series-diagram (#1633)
* refactor: 💡 rename div around ordered-series-diagram

* refactor: 💡 remove margin top and add to min-height

* refactor: 💡 simplify diagrams

---------

Co-authored-by: Randall Morey <randall@randallmorey.com>
2023-02-14 15:32:19 -06:00
1717 changed files with 14332 additions and 4007 deletions

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
contact_links:
- name: Ask a question
url: https://discuss.hashicorp.com/c/boundary
+3
View File
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
addons:
- addons/**/*
+20 -23
View File
@@ -9,25 +9,25 @@ jobs:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
node-version: 16
- run: yarn install
build-admin-ui-oss:
name: Build Admin UI OSS
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
@@ -35,18 +35,17 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@v3
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn run build:ui:admin:oss
- name: Upload artifact admin-ui
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: admin-ui
path: ./ui/admin/dist/
- name: Upload artifact OSS admin UI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: admin-ui-oss
path: ./ui/admin/dist/
@@ -55,8 +54,8 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
@@ -64,13 +63,12 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@v3
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn run build:ui:admin:enterprise
- name: Upload artifact enterprise admin UI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: admin-ui-ent
path: ./ui/admin/dist/
@@ -79,8 +77,8 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
@@ -88,13 +86,12 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@v3
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn run build:ui:admin:hcp
- name: Upload artifact HCP admin UI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: admin-ui-hcp
path: ./ui/admin/dist/
+4 -4
View File
@@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -43,7 +43,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418
+6 -6
View File
@@ -30,7 +30,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
- name: Login
uses: atlassian/gajira-login@v2.0.0
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
@@ -48,7 +48,7 @@ jobs:
- name: Create ticket
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
uses: tomhjp/gh-action-jira-create@v0.1.0
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1
with:
project: ICU
issuetype: "GH Issue"
@@ -61,28 +61,28 @@ jobs:
- name: Search
if: github.event.action != 'opened'
id: search
uses: tomhjp/gh-action-jira-search@v0.2.1
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
with:
# cf[10089] is Issue Link custom field
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
- name: Sync comment
if: github.event.action == 'created' && steps.search.outputs.issue
uses: atlassian/gajira-comment@v2.0.2
uses: atlassian/gajira-comment@v2.0.2 # TSCCR: no entry for repository "atlassian/gajira-comment"
with:
issue: ${{ steps.search.outputs.issue }}
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
- name: Close ticket
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
uses: atlassian/gajira-transition@v2.0.1
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: Done
- name: Reopen ticket
if: github.event.action == 'reopened' && steps.search.outputs.issue
uses: atlassian/gajira-transition@v2.0.1
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: "To Do"
+1 -1
View File
@@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
- uses: actions/labeler@ba790c862c380240c6d5e7427be5ace9a05c754b # v4.0.3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+16 -19
View File
@@ -6,17 +6,17 @@ jobs:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
node-version: 16
- run: yarn install
compliance:
@@ -24,18 +24,17 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn run compliance:licenses
lint:
@@ -44,18 +43,17 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn lint
test:
@@ -64,14 +62,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
if: steps.node-modules-cache.outputs.cache-hit != 'true'
node-version: 16
- run: yarn test
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
trigger-gha-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Release description
run: |
echo "Triggering release with a TAG ${GITHUB_REF#refs/tags/}"
+3
View File
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
url_license = "https://github.com/hashicorp/boundary-ui/blob/main/LICENSE"
url_project_website = "https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app"
url_source_repository = "https://github.com/hashicorp/boundary-ui"
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
'use strict';
module.exports = {
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
module.exports = {
singleQuote: true,
};
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
'use strict';
module.exports = {
+29
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
@@ -6,6 +11,30 @@ import ModelAbility from './model';
export default class AccountAbility extends ModelAbility {
// =permissions
/**
* Only "known" account types may be read.
* @type {boolean}
*/
get canRead() {
return !this.model.isUnknown && this.hasAuthorizedAction('read');
}
/**
* Only "known" account types may be updated.
* @type {boolean}
*/
get canUpdate() {
return !this.model.isUnknown && this.hasAuthorizedAction('update');
}
/**
* Only "known" account types may be deleted.
* @type {boolean}
*/
get canDelete() {
return !this.model.isUnknown && this.hasAuthorizedAction('delete');
}
/**
* @type {boolean}
*/
+34
View File
@@ -0,0 +1,34 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
* Provides abilities for auth method.
*/
export default class AuthMethodAbility extends ModelAbility {
// =permissions
/**
* Only "known" auth method types may be read.
* @type {boolean}
*/
get canRead() {
return !this.model.isUnknown && this.hasAuthorizedAction('read');
}
/**
* Only "known" auth method types may be updated.
*/
get canUpdate() {
return !this.model.isUnknown && this.hasAuthorizedAction('update');
}
/**
* Only "known" auth method types may be deleted.
*/
get canDelete() {
return !this.model.isUnknown && this.hasAuthorizedAction('delete');
}
}
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
* Provides abilities for credential.
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
import { inject as service } from '@ember/service';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
* Provides abilities for credential.
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { Ability } from 'ember-can';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
import { inject as service } from '@ember/service';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
+21
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
@@ -19,4 +24,20 @@ export default class UserAbility extends ModelAbility {
get canRemoveAccounts() {
return this.hasAuthorizedAction('remove-accounts');
}
/**
* @type {boolean}
*/
get canAddAccount() {
const { account, canAddAccounts } = this;
return canAddAccounts && !account.isUnknown;
}
/**
* @type {boolean}
*/
get canRemoveAccount() {
const { account, canRemoveAccounts } = this;
return canRemoveAccounts && !account.isUnknown;
}
}
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import RESTAdapter from '@ember-data/adapter/rest';
import { serializeIntoHash } from '@ember-data/adapter/-private';
/* eslint-disable-next-line ember/no-mixins */
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationAdapter from './application';
export default class HostCatalogAdapter extends ApplicationAdapter {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -56,7 +61,7 @@ export default class GeneratedAuthMethodModel extends BaseModel {
@attr('string', { isNestedAttribute: true }) client_id;
@attr('string', { isNestedAttribute: true }) client_secret;
@attr('string', { isNestedAttribute: true, isSecret: true }) client_secret;
@attr('string', { readOnly: true, isNestedAttribute: true })
client_secret_hmac;
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
/**
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -48,6 +53,7 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
//= attributes (vault)
@attr('string', {
for: 'vault-generic',
isNestedAttribute: true,
description:
'The HTTP method the library uses when requesting credentials from Vault.',
@@ -56,6 +62,7 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
http_method;
@attr('string', {
for: 'vault-generic',
isNestedAttribute: true,
description:
'The body of the HTTP request the library sends to Vault when requesting credentials. Only valid if `http_method` is set to `POST`.',
@@ -69,18 +76,21 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
path;
@attr('string', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description: 'The username to use when making an SSH connection.',
})
username;
@attr('string', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description: 'The desired key type to use when generating a private key.',
})
key_type;
@attr('number', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description:
'Specifies the number of bits used when generating the private key. Not used if key type is ed25519',
@@ -88,12 +98,14 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
key_bits;
@attr('string', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description: 'Specifies the requested time to live for the certificate.',
})
ttl;
@attr('string', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description:
'Specifies the key id that the created certificate should have.',
@@ -101,6 +113,7 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
key_id;
@attr('object-as-array', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description:
'Specifies a map of the critical options that the certificate should be signed for.',
@@ -108,6 +121,7 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
critical_options;
@attr('object-as-array', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
description:
'Specifies a map of the extensions that the certificate should be signed for.',
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -78,4 +83,17 @@ export default class GeneratedTargetModel extends BaseModel {
'An IP address or DNS name for the session to connect to. Cannot be used in conjunction with host sources.',
})
address;
@attr('number', {
isNestedAttribute: true,
description: 'The default port a target should use if present.',
})
default_port;
@attr('number', {
isNestedAttribute: true,
description:
"The default port that will be listened on by the client's local proxy.",
})
default_client_port;
}
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Mixin from '@ember/object/mixin';
/**
+31 -5
View File
@@ -1,6 +1,15 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedAccountModel from '../generated/models/account';
import { computed } from '@ember/object';
import { equal } from '@ember/object/computed';
import {
TYPE_AUTH_METHOD_PASSWORD,
TYPE_AUTH_METHOD_OIDC,
TYPE_AUTH_METHOD_LDAP,
TYPES_AUTH_METHOD,
} from './auth-method';
export default class AccountModel extends GeneratedAccountModel {
// =attributes
@@ -8,18 +17,35 @@ export default class AccountModel extends GeneratedAccountModel {
/**
* @type {boolean}
*/
@equal('type', 'password') isPassword;
get isPassword() {
return this.type === TYPE_AUTH_METHOD_PASSWORD;
}
/**
* @type {boolean}
*/
@equal('type', 'oidc') isOIDC;
get isOIDC() {
return this.type === TYPE_AUTH_METHOD_OIDC;
}
/**
* @type {boolean}
*/
get isLDAP() {
return this.type === TYPE_AUTH_METHOD_LDAP;
}
/**
* @type {boolean}
*/
get isUnknown() {
return !TYPES_AUTH_METHOD.includes(this.type);
}
/**
* Convenience for getting username in account.
* @type {string}
*/
@computed('{email,full_name,login_name}')
get accountName() {
const { email, full_name, login_name } = this;
return email || full_name || login_name;
+31 -2
View File
@@ -1,6 +1,21 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedAuthMethodModel from '../generated/models/auth-method';
import { equal } from '@ember/object/computed';
export const TYPE_AUTH_METHOD_PASSWORD = 'password';
export const TYPE_AUTH_METHOD_OIDC = 'oidc';
export const TYPE_AUTH_METHOD_LDAP = 'ldap';
export const TYPES_AUTH_METHOD = Object.freeze([
TYPE_AUTH_METHOD_PASSWORD,
TYPE_AUTH_METHOD_OIDC,
TYPE_AUTH_METHOD_LDAP,
]);
/**
* Enum options per auth method type and field.
*/
@@ -39,14 +54,28 @@ export default class AuthMethodModel extends GeneratedAuthMethodModel {
* @type {boolean}
*/
get isPassword() {
return this.type === 'password';
return this.type === TYPE_AUTH_METHOD_PASSWORD;
}
/**
* @type {boolean}
*/
get isOIDC() {
return this.type === 'oidc';
return this.type === TYPE_AUTH_METHOD_OIDC;
}
/**
* @type {boolean}
*/
get isLDAP() {
return this.type === TYPE_AUTH_METHOD_LDAP;
}
/**
* @type {boolean}
*/
get isUnknown() {
return !TYPES_AUTH_METHOD.includes(this.type);
}
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedAuthTokenModel from '../generated/models/auth-token';
export default class AuthTokenModel extends GeneratedAuthTokenModel {}
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Model from '@ember-data/model';
import { attr } from '@ember-data/model';
import { computed } from '@ember/object';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedCredentialLibraryModel from '../generated/models/credential-library';
/**
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedCredentialStoreModel from '../generated/models/credential-store';
import { equal } from '@ember/object/computed';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedCredentialModel from '../generated/models/credential';
/**
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedGroupModel from '../generated/models/group';
import { attr } from '@ember-data/model';
import { computed } from '@ember/object';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedHostCatalogModel from '../generated/models/host-catalog';
export const types = ['static', 'plugin'];
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedHostSetModel from '../generated/models/host-set';
import { pluginTypes } from './host-catalog';
+16
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedHostModel from '../generated/models/host';
import { attr } from '@ember-data/model';
@@ -24,6 +29,12 @@ export default class HostModel extends GeneratedHostModel {
})
external_id;
@attr('string', {
description: 'The external facing name for the plugin based host.',
readOnly: true,
})
external_name;
// Aws specific
@attr({
readOnly: true,
@@ -84,4 +95,9 @@ export default class HostModel extends GeneratedHostModel {
this.plugin = { name: type };
}
}
// Plugin hosts can support an external name
get displayName() {
return this.name || this.external_name || this.id;
}
}
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedManagedGroupModel from '../generated/models/managed-group';
import { attr } from '@ember-data/model';
import { A } from '@ember/array';
+7 -1
View File
@@ -1,7 +1,13 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedRoleModel from '../generated/models/role';
import { attr } from '@ember-data/model';
import { inject as service } from '@ember/service';
import { all, resolve } from 'rsvp';
import { TYPE_AUTH_METHOD_OIDC } from 'api/models/auth-method';
export default class RoleModel extends GeneratedRoleModel {
// =services
@@ -128,7 +134,7 @@ export default class RoleModel extends GeneratedRoleModel {
// Collect all auth methods.
const authMethods = this.resourceFilterStore.queryBy(
'auth-method',
{ type: 'oidc' },
{ type: TYPE_AUTH_METHOD_OIDC },
{ scope_id: 'global', recursive: true }
);
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedScopeModel from '../generated/models/scope';
import { computed } from '@ember/object';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedSessionModel from '../generated/models/session';
import { computed } from '@ember/object';
import { equal } from '@ember/object/computed';
+5 -6
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedTargetModel from '../generated/models/target';
import { attr } from '@ember-data/model';
import { inject as service } from '@ember/service';
@@ -13,12 +18,6 @@ export default class TargetModel extends GeneratedTargetModel {
// =attributes
@attr('number', {
isNestedAttribute: true,
description: 'The default port a target should use if present.',
})
default_port;
/**
* @type Array
*/
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedUserModel from '../generated/models/user';
import { attr } from '@ember-data/model';
import { computed } from '@ember/object';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import GeneratedWorkerModel from '../generated/models/worker';
import { attr } from '@ember-data/model';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class AccountSerializer extends ApplicationSerializer {
+9 -5
View File
@@ -1,7 +1,11 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import RESTSerializer from '@ember-data/serializer/rest';
import { underscore } from '@ember/string';
import { get } from '@ember/object';
import { copy } from 'ember-copy';
/**
* Manages serialization/normalization of data to/from the API.
@@ -129,7 +133,7 @@ export default class ApplicationSerializer extends RESTSerializer {
);
// Copy the data rooted under `items` in the existing payload into the new
// payload under the expected root key name.
transformedPayload[payloadKey] = copy(payload.items, true);
transformedPayload[payloadKey] = structuredClone(payload.items);
// Return the result of normalizing the transformed payload.
return super.normalizeArrayResponse(
store,
@@ -156,7 +160,7 @@ export default class ApplicationSerializer extends RESTSerializer {
*/
normalizeSingleResponse(store, primaryModelClass, payload, id, requestType) {
// Copy payload (mostly to prevent mocking issues)
payload = copy(payload, true);
payload = structuredClone(payload);
// Check for and normalize missing arrays
payload = this.normalizeMissingArrays(store, primaryModelClass, payload);
// Setup a new payload data structure.
@@ -211,7 +215,7 @@ export default class ApplicationSerializer extends RESTSerializer {
* @return {Object}
*/
normalize(typeClass, hash) {
let normalizedHash = copy(hash, true);
let normalizedHash = structuredClone(hash);
const scopeID = get(normalizedHash, 'scope.id');
const scopeType = get(normalizedHash, 'scope.type');
if (scopeID) normalizedHash.scope.scope_id = scopeID;
@@ -300,7 +304,7 @@ export default class ApplicationSerializer extends RESTSerializer {
id,
requestType
) {
const newPayload = copy(payload, true);
const newPayload = structuredClone(payload);
primaryModelClass.attributes.forEach((attribute) => {
const {
+8 -3
View File
@@ -1,5 +1,10 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
import { copy } from 'ember-copy';
import { TYPE_AUTH_METHOD_OIDC } from 'api/models/auth-method';
export default class AuthMethodSerializer extends ApplicationSerializer {
// =methods
@@ -12,7 +17,7 @@ export default class AuthMethodSerializer extends ApplicationSerializer {
*/
serialize(snapshot) {
switch (snapshot.record.type) {
case 'oidc':
case TYPE_AUTH_METHOD_OIDC:
return this.serializeOIDC(...arguments);
default:
return this.serializeDefault(...arguments);
@@ -86,7 +91,7 @@ export default class AuthMethodSerializer extends ApplicationSerializer {
* @return {Object}
*/
normalize(typeClass, hash, ...rest) {
let normalizedHash = copy(hash, true);
let normalizedHash = structuredClone(hash);
// switch (normalizedHash.type) {
// case 'oidc':
// normalizedHash = this.normalizeOIDC(normalizedHash);
@@ -1,5 +1,13 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
import { TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC } from '../models/credential-library';
import {
TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC,
TYPE_CREDENTIAL_LIBRARY_VAULT_SSH_CERTIFICATE,
} from '../models/credential-library';
export default class CredentialLibrarySerializer extends ApplicationSerializer {
// =properties
@@ -14,16 +22,41 @@ export default class CredentialLibrarySerializer extends ApplicationSerializer {
* @method serialize
* @param {Snapshot} snapshot
*/
serialize() {
serialize(snapshot) {
switch (snapshot.record.type) {
case TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC:
return this.serializeVaultGeneric(...arguments);
case TYPE_CREDENTIAL_LIBRARY_VAULT_SSH_CERTIFICATE:
default:
return super.serialize(...arguments);
}
}
serializeAttribute(snapshot, json, key, attribute) {
super.serializeAttribute(...arguments);
const { options } = attribute;
const { type } = snapshot.record;
// If an attribute has a `for` option, it must match the
// record's `type`, else the attribute is excluded
// from serialization.
if (options?.for && options.for !== type) {
if (options.isNestedAttribute) {
delete json.attributes[key];
} else {
delete json[key];
}
}
}
serializeVaultGeneric() {
const serialized = super.serialize(...arguments);
if (serialized.attributes) {
if (serialized.type !== TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC) {
delete serialized.attributes.http_method;
// Set `http_request_body` only if `http_method` is POST
// otherwise set to null to have the field removed
if (!serialized.attributes?.http_method?.match(/post/i)) {
serialized.attributes.http_request_body = null;
}
// Serialize `http_request_body` only if `http_method` is POST
if (!serialized.attributes?.http_method?.match(/post/i))
delete serialized.attributes.http_request_body;
}
return serialized;
}
@@ -1,6 +1,9 @@
import ApplicationSerializer from './application';
import { copy } from 'ember-copy';
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class CredentialStoreSerializer extends ApplicationSerializer {
/**
* @override
@@ -39,7 +42,7 @@ export default class CredentialStoreSerializer extends ApplicationSerializer {
}
normalize(typeClass, hash, ...rest) {
const normalizedHash = copy(hash, true);
const normalizedHash = structuredClone(hash);
const normalized = super.normalize(typeClass, normalizedHash, ...rest);
// Remove secret fields as we don't track them after being created/updated
normalized.data.attributes.token = '';
+6 -3
View File
@@ -1,6 +1,9 @@
import ApplicationSerializer from './application';
import { copy } from 'ember-copy';
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class CredentialSerializer extends ApplicationSerializer {
/**
* @override
@@ -33,7 +36,7 @@ export default class CredentialSerializer extends ApplicationSerializer {
}
normalize(typeClass, hash, ...rest) {
const normalizedHash = copy(hash, true);
const normalizedHash = structuredClone(hash);
const normalized = super.normalize(typeClass, normalizedHash, ...rest);
// Remove secret fields as we don't track them after being created/updated
normalized.data.attributes.password = '';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class GroupSerializer extends ApplicationSerializer {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
const fieldsByType = {
+6 -2
View File
@@ -1,5 +1,9 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
import { copy } from 'ember-copy';
const fieldByType = {
aws: ['preferred_endpoints', 'filters', 'sync_interval_seconds'],
@@ -88,7 +92,7 @@ export default class HostSetSerializer extends ApplicationSerializer {
* TODO: remove once API consistently returns arrays.
*/
normalize(typeClass, hash, ...rest) {
const normalizedHash = copy(hash, true);
const normalizedHash = structuredClone(hash);
if (typeof normalizedHash?.attributes?.filters === 'string') {
normalizedHash.attributes.filters = [normalizedHash.attributes.filters];
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class HostSerializer extends ApplicationSerializer {
@@ -1,6 +1,9 @@
import ApplicationSerializer from './application';
import { copy } from 'ember-copy';
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class ManagedGroupSerializer extends ApplicationSerializer {
// =properties
@@ -21,7 +24,7 @@ export default class ManagedGroupSerializer extends ApplicationSerializer {
}
normalize(typeClass, hash, ...rest) {
const normalizedHash = copy(hash, true);
const normalizedHash = structuredClone(hash);
if (normalizedHash?.attributes?.filter) {
normalizedHash.attributes.filter_string =
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
import { get } from '@ember/object';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class SessionSerializer extends ApplicationSerializer {
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class TargetSerializer extends ApplicationSerializer {
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class UserSerializer extends ApplicationSerializer {
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
export default class WorkerSerializer extends ApplicationSerializer {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Service from '@ember/service';
import { inject as service } from '@ember/service';
+5
View File
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Service from '@ember/service';
import { getOwner } from '@ember/application';
import { get } from '@ember/object';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Transform from '@ember-data/serializer/transform';
export default class AccountClaimMapArrayTransform extends Transform {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Transform from '@ember-data/serializer/transform';
export default class HostSourceIdArrayTransform extends Transform {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Transform from '@ember-data/serializer/transform';
export default class ObjectAsArrayTransform extends Transform {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Transform from '@ember-data/serializer/transform';
export default class PrincipalArrayTransform extends Transform {
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Transform from '@ember-data/serializer/transform';
export default class StringArrayTransform extends Transform {
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/account';
+6
View File
@@ -0,0 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/auth-method';
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/credential-library';
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/credential-store';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/credential';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/group';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/host-catalog';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/host-set';
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/managed-group';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/model';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/role';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/target';
+5
View File
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
export { default } from 'api/abilities/user';
Loaded 100 of 1717 files, more files were not shown because too many files have changed in this diff. Show more