-
-
Notifications
You must be signed in to change notification settings - Fork 767
267 lines (254 loc) · 9.83 KB
/
conformance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
name: Conformance Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '55 11 * * 1'
workflow_dispatch:
jobs:
build:
if: ${{ github.repository == 'panva/node-oidc-provider' || github.event_name == 'workflow_dispatch' }}
uses: panva/.github/.github/workflows/build-conformance-suite.yml@main
run:
runs-on: ubuntu-latest
needs:
- build
env:
SUITE_BASE_URL: https://localhost.emobix.co.uk:8443
SETUP: ${{ toJSON(matrix.setup) }}
continue-on-error: ${{ startsWith(matrix.setup.plan, 'fapi2') }}
strategy:
fail-fast: false
matrix:
setup:
# OP Basic
- plan: oidcc-basic-certification-test-plan
# OP Hybrid
- plan: oidcc-hybrid-certification-test-plan
# OP Implicit
- plan: oidcc-implicit-certification-test-plan
# OP Dynamic
- plan: oidcc-dynamic-certification-test-plan
response_type: code
- plan: oidcc-dynamic-certification-test-plan
response_type: id_token
- plan: oidcc-dynamic-certification-test-plan
response_type: id_token token
- plan: oidcc-dynamic-certification-test-plan
response_type: code id_token
- plan: oidcc-dynamic-certification-test-plan
response_type: code token
- plan: oidcc-dynamic-certification-test-plan
response_type: code id_token token
# RP-Initiated OP
- plan: oidcc-rp-initiated-logout-certification-test-plan
# Back-Channel OP
- plan: oidcc-backchannel-rp-initiated-logout-certification-test-plan
# FAPI 1.0 R/W (ID2)
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: by_value
client_auth_type: private_key_jwt
fapi_response_mode: plain_response
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: pushed
client_auth_type: private_key_jwt
fapi_response_mode: plain_response
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: by_value
client_auth_type: private_key_jwt
fapi_response_mode: jarm
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: pushed
client_auth_type: private_key_jwt
fapi_response_mode: jarm
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: by_value
client_auth_type: mtls
fapi_response_mode: plain_response
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: pushed
client_auth_type: mtls
fapi_response_mode: plain_response
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: by_value
client_auth_type: mtls
fapi_response_mode: jarm
- plan: fapi-rw-id2-test-plan
fapi_auth_request_method: pushed
client_auth_type: mtls
fapi_response_mode: jarm
# FAPI 1.0 Advanced (Final)
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: by_value
client_auth_type: private_key_jwt
fapi_response_mode: plain_response
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: pushed
client_auth_type: private_key_jwt
fapi_response_mode: plain_response
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: by_value
client_auth_type: private_key_jwt
fapi_response_mode: jarm
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: pushed
client_auth_type: private_key_jwt
fapi_response_mode: jarm
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: by_value
client_auth_type: mtls
fapi_response_mode: plain_response
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: pushed
client_auth_type: mtls
fapi_response_mode: plain_response
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: by_value
client_auth_type: mtls
fapi_response_mode: jarm
- plan: fapi1-advanced-final-test-plan
fapi_auth_request_method: pushed
client_auth_type: mtls
fapi_response_mode: jarm
# FAPI RW-CIBA-ID1
- plan: fapi-ciba-id1-test-plan
client_auth_type: private_key_jwt
ciba_mode: poll
- plan: fapi-ciba-id1-test-plan
client_auth_type: private_key_jwt
ciba_mode: ping
- plan: fapi-ciba-id1-test-plan
client_auth_type: mtls
ciba_mode: poll
- plan: fapi-ciba-id1-test-plan
client_auth_type: mtls
ciba_mode: ping
# Extensive
- plan: oidcc-test-plan
response_type: code
client_auth_type: client_secret_basic
- plan: oidcc-test-plan
response_type: code id_token
client_auth_type: client_secret_basic
- plan: oidcc-test-plan
response_type: code id_token token
client_auth_type: client_secret_basic
- plan: oidcc-test-plan
response_type: code token
client_auth_type: client_secret_basic
- plan: oidcc-test-plan
response_type: code
client_auth_type: client_secret_post
- plan: oidcc-test-plan
response_type: code id_token
client_auth_type: client_secret_post
- plan: oidcc-test-plan
response_type: code id_token token
client_auth_type: client_secret_post
- plan: oidcc-test-plan
response_type: code token
client_auth_type: client_secret_post
- plan: oidcc-test-plan
response_type: code
client_auth_type: client_secret_jwt
- plan: oidcc-test-plan
response_type: code id_token
client_auth_type: client_secret_jwt
- plan: oidcc-test-plan
response_type: code id_token token
client_auth_type: client_secret_jwt
- plan: oidcc-test-plan
response_type: code token
client_auth_type: client_secret_jwt
- plan: oidcc-test-plan
response_type: code
client_auth_type: private_key_jwt
- plan: oidcc-test-plan
response_type: code id_token
client_auth_type: private_key_jwt
- plan: oidcc-test-plan
response_type: code id_token token
client_auth_type: private_key_jwt
- plan: oidcc-test-plan
response_type: code token
client_auth_type: private_key_jwt
- plan: oidcc-test-plan
response_type: id_token
client_auth_type: none
- plan: oidcc-test-plan
response_type: id_token token
client_auth_type: none
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: lts/hydrogen # 18
cache: 'npm'
- run: npm clean-install
- name: Run oidc-provider (OIDC)
run: |
set -o pipefail
node certification/oidc/docker |& tee server.log &
if: ${{ startsWith(matrix.setup.plan, 'oidcc') }}
env:
PORT: 3000
DEBUG: oidc-provider:*
ISSUER: https://172.17.0.1:3000
NODE_TLS_REJECT_UNAUTHORIZED: 0
- name: Run oidc-provider (FAPI)
run: |
set -o pipefail
node certification/fapi |& tee server.log &
if: ${{ startsWith(matrix.setup.plan, 'fapi') }}
env:
ISSUER: https://172.17.0.1:3000
PORT: 3000
DEBUG: oidc-provider:*
NODE_OPTIONS: --tls-cipher-list="DHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384"
NODE_TLS_REJECT_UNAUTHORIZED: 0
- name: Set Conformance Suite Version
run: |
export VERSION=($(curl --silent "https://gitlab.com/api/v4/projects/4175605/releases" | jq -r '.[0].tag_name'))
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Load Cached Conformance Suite Build
uses: actions/cache@v3
id: cache
with:
path: ./conformance-suite
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Run Conformance Suite
working-directory: ./conformance-suite
run: |
docker-compose -f docker-compose-dev.yml up -d
while ! curl -skfail https://localhost.emobix.co.uk:8443/api/runner/available >/dev/null; do sleep 2; done
- name: Adjust configuration files for CI
run: |
sed -i -e 's/op.panva.cz/172.17.0.1:3000/g' certification/oidc/plan.json
sed -i -e 's/mtls.fapi.panva.cz/172.17.0.1:3000/g' certification/fapi/plan.json
sed -i -e 's/fapi.panva.cz/172.17.0.1:3000/g' certification/fapi/plan.json
- name: Run the plan
run: npx mocha --timeout 0 --retries 1 certification/runner
env:
NODE_TLS_REJECT_UNAUTHORIZED: 0
- name: Add server log to artifact
if: ${{ failure() }}
run: |
zip -ur ${{ env.EXPORT_FILE }} server.log
- name: Upload test artifacts
uses: actions/upload-artifact@v3
with:
path: export-*.zip
name: certification html results
if-no-files-found: ignore
if: ${{ always() }}
- name: Stop Conformance Suite
working-directory: ./conformance-suite
run: |
killall -SIGINT node
docker-compose -f docker-compose-dev.yml down
sudo rm -rf mongo