Skip to content

Commit

Permalink
Apply BSD-3-Clause to all code.
Browse files Browse the repository at this point in the history
The license is applied throughout following the REUSE v3.0 specification:
https://reuse.software/spec/
  • Loading branch information
BigBlueHat authored and mattcollier committed Mar 1, 2024
1 parent af3807c commit ca36d10
Showing 65 changed files with 445 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

module.exports = {
root: true,
parserOptions: {
5 changes: 5 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

name: Lint

on: [push]
5 changes: 5 additions & 0 deletions .github/workflows/packaging.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

name: Packaging

on:
5 changes: 5 additions & 0 deletions .github/workflows/sca.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

name: Veracode SCA

on:
14 changes: 14 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Contact: Digital Bazaar, Inc. <[email protected]>

Files: *.md .dockerignore .editorconfig .gitignore .nvmrc package.json
patches/credential-handler-polyfill+3.2.0.patch
patches/web-request-rpc+2.0.3.patch test/fixtures/exchange.json
test/fixtures/expired.badssl.com.cer test/fixtures/oid4vp_di.json
test/fixtures/oid4vp_jwt.json test/fixtures/revoked-cert/intermediate.cer
test/fixtures/revoked-cert/leaf.cer test/fixtures/revoked-cert/root.cer
test/fixtures/signingKeys.js test/fixtures/submission.json
test/fixtures/vc_jwt.json web/manifest.json web/styles.pcss
Copyright: 2023-2024 California Department of Motor Vehicles
2023-2024 Digital Bazaar, Inc.
License: BSD-3-Clause
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

FROM node:20-alpine AS base
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app
WORKDIR /home/node/app
26 changes: 26 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 changes: 5 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

steps:
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build',
7 changes: 7 additions & 0 deletions common/documentLoader.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as DidJwk from '@digitalbazaar/did-method-jwk';
import * as DidKey from '@digitalbazaar/did-method-key';
import * as DidWeb from '@digitalbazaar/did-method-web';
7 changes: 7 additions & 0 deletions common/generatePrime256v1Key.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import crypto from 'node:crypto';
import {pathToFileURL} from 'node:url';

7 changes: 7 additions & 0 deletions common/generateRSA256Key.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import crypto from 'node:crypto';
import {pathToFileURL} from 'node:url';

7 changes: 7 additions & 0 deletions common/jwt.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as JWT from '@digitalbazaar/minimal-jwt';
import {config} from '@bedrock/core';
import crypto from 'node:crypto';
7 changes: 7 additions & 0 deletions common/suites.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {DataIntegrityProof} from '@digitalbazaar/data-integrity';
import {
cryptosuite as ecdsa2019CryptoSuite
7 changes: 7 additions & 0 deletions common/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {verify, verifyCredential} from '@digitalbazaar/vc';
import {
verifyCredential as verifyCredentialJWT,
7 changes: 7 additions & 0 deletions common/x509.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as x509 from '@peculiar/x509';
// import {Certificate, CertificateRevocationList} from 'pkijs';
import {createPublicKey, X509Certificate} from 'node:crypto';
7 changes: 7 additions & 0 deletions common/zcap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as didMethodKey from '@digitalbazaar/did-method-key';
import {decodeSecretKeySeed} from 'bnid';
import {Ed25519Signature2020} from '@digitalbazaar/ed25519-signature-2020';
5 changes: 5 additions & 0 deletions configs/config.example.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2023 - 2024 California Department of Motor Vehicles
# Copyright 2023 - 2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

app:
# server:
# baseUri: https://evil-cows-return.loca.lt
7 changes: 7 additions & 0 deletions configs/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as bedrock from '@bedrock/core';
import {fileURLToPath} from 'node:url';
import path from 'node:path';
7 changes: 7 additions & 0 deletions configs/configUtils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

export const applyRpDefaults = (allRps, rp, refs = []) => {
if(rp.configFrom) {
if(typeof rp.configFrom !== 'string') {
6 changes: 5 additions & 1 deletion configs/core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';

// core configuration
6 changes: 5 additions & 1 deletion configs/database.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2023-2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';
import '@bedrock/mongodb';

6 changes: 5 additions & 1 deletion configs/express.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import '@bedrock/express';
6 changes: 5 additions & 1 deletion configs/https-agent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2023-2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';

// allow self-signed certificates in dev
6 changes: 5 additions & 1 deletion configs/paths.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';
import {fileURLToPath} from 'node:url';
import os from 'node:os';
6 changes: 5 additions & 1 deletion configs/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';
import '@bedrock/server';

7 changes: 7 additions & 0 deletions configs/translation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

export const defaultTranslations = {
en: {
translate: 'Translate',
6 changes: 5 additions & 1 deletion dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc.
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as bedrock from '@bedrock/core';
import {fileURLToPath} from 'node:url';
import path from 'node:path';
7 changes: 7 additions & 0 deletions lib/api.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import QRCode from 'qrcode';

/**
7 changes: 7 additions & 0 deletions lib/auth.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {config} from '@bedrock/core';
import {getExchange} from './exchanges/native.js';

7 changes: 7 additions & 0 deletions lib/database.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as bedrock from '@bedrock/core';
import * as database from '@bedrock/mongodb';
import {logger} from './logger.js';
7 changes: 7 additions & 0 deletions lib/didWeb.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {exportJWK, importSPKI} from 'jose';
import {config} from '@bedrock/core';

7 changes: 7 additions & 0 deletions lib/exchanges/microsoft-entra-verified-id.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {
convertJwtVpTokenToLdpVp,
createId
7 changes: 7 additions & 0 deletions lib/exchanges/native.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {
convertJwtVpTokenToLdpVp,
createId,
7 changes: 7 additions & 0 deletions lib/exchanges/vc-api.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import {createId} from '../../common/utils.js';
import {database} from '../database.js';
import {logger} from '../logger.js';
7 changes: 7 additions & 0 deletions lib/http.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* Copyright 2023 - 2024 California Department of Motor Vehicles
* Copyright 2023 - 2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

import * as bedrock from '@bedrock/core';
import {express} from '@bedrock/express';

Loading

0 comments on commit ca36d10

Please sign in to comment.