@coffre/conformance 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -2
- package/bin/coffre-conformance.js +13 -0
- package/dist/idp-DJlqS-JW.js +1122 -0
- package/dist/idp.d.ts +146 -0
- package/dist/idp.js +2 -0
- package/dist/main.js +2652 -0
- package/package.json +45 -3
- package/src/browser.ts +67 -0
- package/src/checks/access.ts +141 -0
- package/src/checks/audit.ts +267 -0
- package/src/checks/canaries.ts +121 -0
- package/src/checks/checkpoints.ts +64 -0
- package/src/checks/live.ts +321 -0
- package/src/checks/logins.ts +107 -0
- package/src/checks/members.ts +167 -0
- package/src/checks/people.ts +186 -0
- package/src/checks/readiness.ts +93 -0
- package/src/checks/signin.ts +130 -0
- package/src/checks/storage.ts +142 -0
- package/src/checks/surface.ts +74 -0
- package/src/database.ts +47 -0
- package/src/fixtures.ts +7 -0
- package/src/harness.ts +275 -0
- package/src/idp/authorize.ts +325 -0
- package/src/idp/github.ts +207 -0
- package/src/idp/http.ts +97 -0
- package/src/idp/idp.ts +331 -0
- package/src/idp/index.ts +5 -0
- package/src/idp/oidc.ts +209 -0
- package/src/idp/pages.ts +107 -0
- package/src/idp/people.ts +105 -0
- package/src/main.ts +123 -0
- package/src/report.ts +106 -0
- package/src/routes.ts +112 -0
- package/src/suite.ts +84 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Erwin Kuhn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @coffre/conformance
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Checks a coffre deployment from outside: what it must never do, whatever
|
|
4
|
+
code it runs. `coffre-conformance workers|node [<dir>]` boots the deployment
|
|
5
|
+
in `<dir>` on its own keys and a scratch database, takes a handful of people
|
|
6
|
+
through it, and checks, among others, that no value leaks into any page,
|
|
7
|
+
table or log, that every read has the vault's entry in the shared log, every stored
|
|
8
|
+
version has the app's entry naming its vault wrap, and that
|
|
9
|
+
tampering with either author's entries is caught. Workers takes
|
|
10
|
+
`--postgres <owner URL>`, `--runtime <coffre_runtime URL>` and
|
|
11
|
+
`--vault-runtime <coffre_vault_runtime URL>` on a local Postgres server;
|
|
12
|
+
it creates and drops its own database. Node uses one temporary SQLite file
|
|
13
|
+
for both processes. Neither run uses the deployment's real database or keys. `coffre-conformance probe <url>` checks a running
|
|
14
|
+
instance from outside, without changing it: as no one, and with a service
|
|
15
|
+
token that reads one canary (`--token`, `--canary`); see
|
|
16
|
+
[Against a running instance](https://github.com/erwinkn/coffre/blob/main/docs/conformance.md#against-a-running-instance).
|
|
17
|
+
|
|
18
|
+
`@coffre/conformance/idp` is the stand-in identity provider it signs in
|
|
19
|
+
with, which plays GitHub, an OIDC provider and Cloudflare Access.
|
|
20
|
+
|
|
21
|
+
Part of [coffre](https://github.com/erwinkn/coffre), a secrets manager you
|
|
22
|
+
deploy as a small project of your own. Its eight `@coffre/*` packages are
|
|
23
|
+
released together, at one version. MIT licensed.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `coffre-conformance`, as pnpm links it. A committed file rather than
|
|
3
|
+
// dist/main.js itself, so that a fresh checkout links the command at install,
|
|
4
|
+
// before `pnpm build` has written dist/, instead of skipping it until the next
|
|
5
|
+
// install.
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
|
|
8
|
+
const main = new URL('../dist/main.js', import.meta.url);
|
|
9
|
+
if (!existsSync(main)) {
|
|
10
|
+
console.error('coffre-conformance: @coffre/conformance is not built; run `pnpm build` at the root of the coffre repository');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
await import(main.href);
|