forked from panva/node-oidc-provider
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/v8.x' into yanndanthu/update-t…
…o-v8.4.6
- Loading branch information
Showing
432 changed files
with
12,008 additions
and
11,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
{ | ||
"extends": "airbnb-base", | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-underscore-dangle": ["error", { "allow": ["_claim_names", "_claim_sources", "_matchedRouteName"] }], | ||
"no-underscore-dangle": ["error", { "allow": ["_claim_names", "_claim_sources", "_matchedRouteName", "__dirname"] }], | ||
"import/order": ["error", { "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], "newlines-between": "always" }], | ||
"symbol-description": ["off"] | ||
"symbol-description": ["off"], | ||
"import/extensions": ["error", "ignorePackages"], | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
"selector": "LabeledStatement", | ||
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." | ||
}, | ||
{ | ||
"selector": "WithStatement", | ||
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
100, | ||
2, | ||
{ | ||
"ignoreUrls": true, | ||
"ignoreComments": true, | ||
"ignoreRegExpLiterals": true, | ||
"ignoreStrings": true, | ||
"ignoreTemplateLiterals": true | ||
} | ||
] | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
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 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 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/iron # 20 | ||
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@v4 | ||
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@v4 | ||
with: | ||
path: export-*.zip | ||
name: certification html results idx(${{ strategy.job-index }}) | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: ['v[0-9]+.[0-9]+.[0-9]+'] | ||
|
||
jobs: | ||
npm: | ||
if: ${{ github.repository == 'panva/node-oidc-provider' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/iron # 20 | ||
registry-url: https://registry.npmjs.org | ||
always-auth: true | ||
- run: npm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
cleanup: | ||
needs: | ||
- npm | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git push origin $GITHUB_SHA:v8.x | ||
- run: git push origin HEAD:main | ||
|
||
github: | ||
needs: | ||
- npm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/iron # 20 | ||
cache: 'npm' | ||
- run: node .release-notes.cjs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Retry | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Conformance Checks | ||
types: | ||
- completed | ||
|
||
jobs: | ||
retry: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }} | ||
steps: | ||
- run: gh api -XPOST ${{ github.event.workflow_run.rerun_url }}-failed-jobs | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
Oops, something went wrong.