Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 1x 1x 1x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x | import {realm} from '@feasibleone/blong';
export default realm(() => ({
url: import.meta.url,
config: {
default: {
// Carried in-process by the processes that need it *and* published as an admin API, so
// `both` — declared by the realm itself rather than by the suite that deploys it (D-433).
//
// And what it needs in those processes: the realm's own writes keep the resource graph —
// a role, a capability, an action is a `core` resource — and `super.coreResourceEnsure`
// is a call to a realm in the same process, so a process that carries this one has to
// carry `core` too (@@D-871).
k8s: {k8sRealmRole: 'both', k8sNeeds: ['core']},
// Fallback credential-function parameters for newly created
// credentials. The active `access.policy` for the credential
// type overrides these; these defaults only apply when no
// policy provides them. `function` names the algorithm used
// to derive the credential secret (currently `hash`).
//
// `iterations` is deliberately *not* pinned by the shipped policy
// (`meta/db/accessAuthorizationMerge.yaml`), so the environment decides
// how expensive a derivation is: production keeps the 100000 below,
// while `dev` and `ci` drop to a single iteration. A suite signs in
// hundreds of times and pays the derivation on every login, where a
// dev or CI password protects nothing. The resolved parameters travel
// with the credential (`credentialParamsJSON`), so fixtures seeded in
// those environments verify cheaply while production stays hard.
db: {
password: {
function: 'hash',
algorithm: 'pbkdf2',
iterations: 100000,
keyLength: 64,
digest: 'sha512',
},
},
},
dev: {
db: {
// Local Google OAuth mock for dev/integration testing. Production
// suites override this (or omit it) to use the real Google
// endpoints (see accessIdentityCheck).
//
// The port is the *package's* own, because the mock is started by the
// process that loads the `sim` layer and a suite that merely consumes
// the party realm starts it too: `blong-dev test` and
// `blong-dev playwright` export `GOOGLE_MOCK_PORT` from the package's
// `rush.json` index, and `realm/blong-party/sim/google` binds the same
// variable (@@D-694). 9082 is the standalone default, which is what a
// hand-started `blong` and the browser's static fallback use.
google: {
baseUrl: `http://localhost:${process.env.GOOGLE_MOCK_PORT ?? 9082}`,
clientId: 'mock-client',
clientSecret: 'mock-secret',
redirectUri: 'http://localhost:9101/oauth/callback',
},
// One PBKDF2 iteration — see the `default` comment above. A local
// login is not a security boundary the way a deployed one is.
password: {iterations: 1},
},
},
ci: {
db: {
// `ci` is a platform intent the loader adds when the process runs
// on CI, so this covers every suite's integration run there. One
// iteration, as in `dev`: the suites' own logins are the load.
password: {iterations: 1},
},
},
},
}));
|