Skip to content

Commit 72a0ece

Browse files
Merge branch 'ICU-17231-bug-fix-oidc-authentications-not-properly-showing-username' of https://github.com/hashicorp/boundary-ui into ICU-17231-bug-fix-oidc-authentications-not-properly-showing-username
2 parents 6e2adb5 + c6cca0e commit 72a0ece

File tree

68 files changed

+683
-682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+683
-682
lines changed

.github/workflows/a11y-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ${{ fromJSON(vars.RUNNER) }}
1414
timeout-minutes: 40
1515
steps:
16-
- uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce # v1.7.3
16+
- uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # v2.1.0
1717
with:
1818
install-dependencies: true
19-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2020
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
2121
with:
2222
run_install: false
23-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
23+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2424
with:
2525
node-version: 20
2626
cache: 'pnpm'

.github/workflows/build-admin-ui.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
name: Install dependencies
1212
runs-on: ${{ fromJSON(vars.RUNNER) }}
1313
steps:
14-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1515
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
1616
with:
1717
run_install: false
18-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
18+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
1919
with:
2020
node-version: 20
2121
cache: 'pnpm'
@@ -26,12 +26,12 @@ jobs:
2626
needs: [dependencies]
2727
runs-on: ${{ fromJSON(vars.RUNNER) }}
2828
steps:
29-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3030
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
3131
with:
3232
run_install: false
3333
- name: Build
34-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
34+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3535
with:
3636
node-version: 20
3737
cache: 'pnpm'
@@ -53,12 +53,12 @@ jobs:
5353
needs: [dependencies]
5454
runs-on: ${{ fromJSON(vars.RUNNER) }}
5555
steps:
56-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5757
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
5858
with:
5959
run_install: false
6060
- name: Build
61-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
61+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6262
with:
6363
node-version: 20
6464
cache: 'pnpm'
@@ -75,12 +75,12 @@ jobs:
7575
needs: [dependencies]
7676
runs-on: ${{ fromJSON(vars.RUNNER) }}
7777
steps:
78-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
78+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7979
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
8080
with:
8181
run_install: false
8282
- name: Build
83-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
83+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
8484
with:
8585
node-version: 20
8686
cache: 'pnpm'

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3434

3535
# Initializes the CodeQL tools for scanning.
3636
- name: Initialize CodeQL

.github/workflows/copyright-validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
permissions:
77
contents: write
88
steps:
9-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1010
# Ref and repository aren't normally needed, this is a workaround for a bug in auto commit
1111
with:
1212
ref: ${{ github.event.pull_request.head.ref }}

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ jobs:
66
triage:
77
runs-on: ${{ fromJSON(vars.RUNNER) }}
88
steps:
9-
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
9+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1010
with:
1111
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/monorepo-validate.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
name: Install dependencies
77
runs-on: ${{ fromJSON(vars.RUNNER) }}
88
steps:
9-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1010
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
1111
with:
1212
run_install: false
13-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
13+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
1414
with:
1515
node-version: 20
1616
cache: 'pnpm'
@@ -22,11 +22,11 @@ jobs:
2222
needs: [dependencies]
2323
runs-on: ${{ fromJSON(vars.RUNNER) }}
2424
steps:
25-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2626
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
2727
with:
2828
run_install: false
29-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
29+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3030
with:
3131
node-version: 20
3232
cache: 'pnpm'
@@ -40,11 +40,11 @@ jobs:
4040
runs-on: ${{ fromJSON(vars.RUNNER) }}
4141
timeout-minutes: 5
4242
steps:
43-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4444
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
4545
with:
4646
run_install: false
47-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
47+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
4848
with:
4949
node-version: 20
5050
cache: 'pnpm'
@@ -61,11 +61,11 @@ jobs:
6161
- uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # v2.1.0
6262
with:
6363
install-dependencies: true
64-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6565
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
6666
with:
6767
run_install: false
68-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
68+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6969
with:
7070
node-version: 20
7171
cache: 'pnpm'

.github/workflows/oss-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ fromJSON(vars.RUNNER) }}
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
10+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1111
with:
1212
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
1313
- run: |
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
name: Test E2E Admin UI
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened, synchronize, reopened]
6+
workflow_dispatch:
7+
inputs:
8+
boundary-enterprise-branch:
9+
description: 'Branch of boundary-enterprise to test against (default to main)'
10+
required: true
11+
default: 'main'
12+
type: string
13+
boundary-branch:
14+
description: 'Branch of boundary to test against (default to main)'
15+
required: true
16+
default: 'main'
17+
type: string
18+
19+
jobs:
20+
test:
21+
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'admin') }}
22+
name: Test
23+
runs-on: ${{ fromJSON(vars.RUNNER_UBUNTU_22) }}
24+
strategy:
25+
matrix:
26+
include:
27+
- boundary_edition: community
28+
github_repo: hashicorp/boundary
29+
folder_name: boundary
30+
boundary_edition_short: oss
31+
enos_scenario: e2e_ui_docker
32+
test_command: admin:ce:docker
33+
boundary_branch: ${{ github.event.inputs.boundary-branch || 'main' }}
34+
- boundary_edition: enterprise
35+
github_repo: hashicorp/boundary-enterprise
36+
folder_name: boundary-enterprise
37+
boundary_edition_short: ent
38+
enos_scenario: e2e_ui_docker_ent
39+
test_command: admin:ent:docker
40+
boundary_branch: ${{ github.event.inputs.boundary-enterprise-branch || 'main' }}
41+
fail-fast: false
42+
env:
43+
ENOS_VAR_e2e_debug_no_run: true
44+
steps:
45+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
46+
with:
47+
fetch-depth: 0
48+
49+
- name: Set up pnpm
50+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
51+
with:
52+
run_install: false
53+
54+
- name: Set up Node
55+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
56+
with:
57+
node-version: 20
58+
cache: "pnpm"
59+
cache-dependency-path: |
60+
pnpm-lock.yaml
61+
ui/desktop/electron-app/pnpm-lock.yaml
62+
63+
- name: Set up Terraform
64+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
65+
66+
- name: Set up Enos
67+
uses: hashicorp/action-setup-enos@b9fa53484a1e8fdcc7b02a118bcf01d65b9414c9
68+
with:
69+
github-token: ${{ secrets.GITHUB_TOKEN }}
70+
71+
- name: Install Vault CLI
72+
run: |
73+
wget https://releases.hashicorp.com/vault/1.12.2/vault_1.12.2_linux_amd64.zip -O /tmp/vault.zip
74+
unzip /tmp/vault.zip -d /usr/local/bin
75+
76+
- name: GPG setup
77+
run: |
78+
# Create a GPG key
79+
export KEY_PW=boundary
80+
gpg --generate-key --batch <<eoGpgConf
81+
%echo Started!
82+
Key-Type: RSA
83+
Key-Length: default
84+
Subkey-Type: RSA
85+
Name-Real: boundary
86+
Name-Comment: default
87+
Name-Email: default
88+
Expire-Date: 0
89+
Passphrase: $KEY_PW
90+
%commit
91+
%echo Done.
92+
eoGpgConf
93+
94+
# Enable gpg-preset-passphrase so that key passwords can be saved
95+
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
96+
gpg-connect-agent reloadagent /bye &>/dev/null
97+
98+
# Get information about the created keys
99+
export lines=$(gpg --list-secret-keys --with-colons --with-keygrip)
100+
export KEY_ID=""
101+
while read -r line
102+
do
103+
# Save the first key id to be used later
104+
if [[ $line =~ "fpr"* ]]; then
105+
if [[ $KEY_ID == "" ]]; then
106+
KEY_ID="$(echo "$line" | sed -r 's/fpr|://g')"
107+
fi
108+
fi
109+
110+
# Cache the passphrases for the keys so passwords do not need to be entered
111+
if [[ $line =~ "grp"* ]]; then
112+
export KEYGRIP_ID="$(echo "$line" | sed -r 's/grp|://g')"
113+
/usr/lib/gnupg/gpg-preset-passphrase --preset -P $KEY_PW $KEYGRIP_ID
114+
fi
115+
done <<< $lines
116+
117+
# Trust the key
118+
touch /tmp/test.txt
119+
gpg -a --encrypt -r $KEY_ID --trust-model always --batch --yes /tmp/test.txt
120+
echo "trusted-key $KEY_ID" >> ~/.gnupg/gpg.conf
121+
122+
# Initialize the password store
123+
pass init $KEY_ID &>/dev/null
124+
125+
- name: Checkout ${{ matrix.folder_name }} repo
126+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
127+
with:
128+
repository: ${{ matrix.github_repo }}
129+
path: support/src/${{ matrix.folder_name }}
130+
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
131+
ref: ${{ matrix.boundary_branch }}
132+
133+
- name: GH fix for localhost resolution
134+
run: |
135+
cat /etc/hosts && echo "-----------"
136+
sudo sed -i 's/::1 *localhost ip6-localhost ip6-loopback/::1 ip6 -localhost ip6-loopback/g' /etc/hosts
137+
cat /etc/hosts
138+
ssh -V
139+
140+
echo "127.0.0.1 localhost boundary" | sudo tee -a /etc/hosts
141+
echo "127.0.0.1 localhost worker" | sudo tee -a /etc/hosts
142+
echo "127.0.0.1 localhost vault" | sudo tee -a /etc/hosts
143+
144+
- name: Set git config
145+
run: |
146+
git config --global url."https://oauth2:${{ secrets.ELEVATED_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
147+
148+
- name: Install node dependencies
149+
run: |
150+
pnpm install --frozen-lockfile
151+
cd e2e-tests
152+
pnpm playwright install --with-deps
153+
154+
- name: Set up test infra
155+
id: infra
156+
run: |
157+
ssh-keygen -N '' -t ed25519 -f ~/.ssh/github_enos
158+
mkdir -p ./enos/terraform-plugin-cache
159+
echo ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} > ./support/src/${{matrix.folder_name}}/internal/ui/VERSION
160+
export ENOS_VAR_ui_build_override="oss" && \
161+
export ENOS_VAR_boundary_edition=${{ matrix.boundary_edition_short }} && \
162+
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
163+
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
164+
export ENOS_VAR_boundary_license="${{ secrets.BOUNDARY_ENT_LICENSE }}" && \
165+
enos scenario launch --timeout 60m0s --chdir ./support/src/${{matrix.folder_name}}/enos ${{matrix.enos_scenario}} builder:local
166+
167+
- name: Move boundary binary
168+
run: |
169+
mv ./support/src/${{matrix.folder_name}}/bin/boundary /usr/local/bin/
170+
boundary version
171+
172+
- name: Run Tests
173+
run: |
174+
source <(bash ./support/src/${{matrix.folder_name}}/enos/scripts/test_e2e_env.sh)
175+
cd e2e-tests
176+
pnpm run ${{ matrix.test_command }} --reporter=html
177+
178+
- name: Upload Playwright report
179+
if: ${{ failure() }}
180+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
181+
with:
182+
name: playwright-report-${{ matrix.boundary_edition }}
183+
path: e2e-tests/playwright-report
184+
185+
- name: Clean up test infra
186+
if: ${{ always() }}
187+
run: |
188+
export ENOS_VAR_boundary_edition=${{ matrix.boundary_edition_short }} && \
189+
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
190+
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
191+
enos scenario destroy --timeout 60m0s --chdir ./support/src/${{matrix.folder_name}}/enos ${{matrix.enos_scenario}} builder:local

0 commit comments

Comments
 (0)