Skip to content

Commit

Permalink
Merge branch 'main' of github.com:panva/node-openid-client
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee committed Nov 7, 2023
2 parents 856666c + a84d022 commit b42aa01
Show file tree
Hide file tree
Showing 40 changed files with 2,950 additions and 1,000 deletions.
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ contact_links:
about:
Are you asking your nth question? Relying on openid-client for critical operations? Consider
supporting the project so that it may continue being maintained.
- name: Report a security vulnerability
url: https://en.wikipedia.org/wiki/Responsible_disclosure
about:
Do not disclose vulnerabilities via issues or discussions. Reach out to the project team
via e.g. email, we'll work together on patching the vulnerability and follow some form of
Responsible disclosure once fixed. Thank you.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
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"
52 changes: 0 additions & 52 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '20 11 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# 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@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
139 changes: 139 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Conformance Checks

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '20 11 * * 1'
workflow_dispatch:

jobs:
build:
uses: panva/.github/.github/workflows/build-conformance-suite.yml@main

run:
runs-on: ubuntu-latest
needs:
- build
env:
NODE_TLS_REJECT_UNAUTHORIZED: 0
DEBUG: runner,moduleId*
SUITE_BASE_URL: https://localhost.emobix.co.uk:8443
PLAN_NAME: ${{ matrix.setup.plan }}
VARIANT: ${{ toJSON(matrix.setup) }}
strategy:
fail-fast: false
matrix:
setup:
# OIDC BASIC
- plan: oidcc-client-basic-certification-test-plan

# OIDC IMPLICIT
- plan: oidcc-client-implicit-certification-test-plan

# OIDC HYBRID
- plan: oidcc-client-hybrid-certification-test-plan

# OIDC CONFIG
- plan: oidcc-client-config-certification-test-plan

# OIDC DYNAMIC
# TODO: work around the request_uri lodging service EOL
# - plan: oidcc-client-dynamic-certification-test-plan

# FAPI 1.0 ID-2
- plan: fapi-rw-id2-client-test-plan
client_auth_type: mtls
- plan: fapi-rw-id2-client-test-plan
client_auth_type: private_key_jwt

# FAPI 1.0 Advanced Final
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
fapi_auth_request_method: pushed
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
fapi_auth_request_method: pushed
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
fapi_response_mode: jarm
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
fapi_response_mode: jarm
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
fapi_auth_request_method: pushed
fapi_response_mode: jarm
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
fapi_auth_request_method: pushed
fapi_response_mode: jarm
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
fapi_auth_request_method: pushed
fapi_response_mode: jarm
fapi_client_type: plain_oauth
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: mtls
fapi_response_mode: jarm
fapi_client_type: plain_oauth
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
fapi_auth_request_method: pushed
fapi_response_mode: jarm
fapi_client_type: plain_oauth
- plan: fapi1-advanced-final-client-test-plan
client_auth_type: private_key_jwt
fapi_response_mode: jarm
fapi_client_type: plain_oauth

steps:
- name: Checkout
uses: actions/checkout@v4
- 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
- run: git clone --depth 1 --single-branch --branch main https://github.com/panva/openid-client-certification-suite.git runner
- uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
working-directory: ./runner
- run: npm install ${{ github.repository }}#${{ github.sha }}
working-directory: ./runner
- run: npm run test
working-directory: ./runner
- name: Upload test artifacts
uses: actions/upload-artifact@v3
with:
path: runner/export-*.zip
name: ${{ matrix.setup.plan }} failed html results
if-no-files-found: ignore
if: ${{ failure() }}
- name: Upload test logs
uses: actions/upload-artifact@v3
with:
if-no-files-found: warn
name: ${{ matrix.setup.plan }} runner logs
path: runner/logs/*.log
if: ${{ failure() }}
9 changes: 5 additions & 4 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ name: 'Lock threads'

on:
schedule:
- cron: '0 9 * * *'
- cron: '20 11 * * 1'

jobs:
lock:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4.0.1
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '90'
issue-inactive-days: '90'
issue-lock-reason: ''
pr-lock-inactive-days: '90'
pr-inactive-days: '90'
pr-lock-reason: ''
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+']

jobs:
npm:
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:v5.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 }}
17 changes: 17 additions & 0 deletions .github/workflows/retry.yml
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 }}
Loading

0 comments on commit b42aa01

Please sign in to comment.