Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
gen
|
|
|
migrate
|
|
|
cmd/sneakers-migrate
command
Command sneakers-migrate moves an install of the original system to Sneakers-PAM: keygen, export, import and verify.
|
Command sneakers-migrate moves an install of the original system to Sneakers-PAM: keygen, export, import and verify. |
|
internal/bundle
Package bundle is the migration bundle: a manifest plus one newline-delimited JSON stream per table, packed as a gzipped tar and encrypted with age (X25519) to the target's import key.
|
Package bundle is the migration bundle: a manifest plus one newline-delimited JSON stream per table, packed as a gzipped tar and encrypted with age (X25519) to the target's import key. |
|
internal/chain
Package chain recomputes and checks the audit service's hash chain.
|
Package chain recomputes and checks the audit service's hash chain. |
|
internal/codes
Package codes holds sneakers-migrate's error codes.
|
Package codes holds sneakers-migrate's error codes. |
|
internal/commands
Package commands holds the sneakers-migrate command line.
|
Package commands holds the sneakers-migrate command line. |
|
internal/config
Package config reads sneakers-migrate's connection settings and keys from the environment.
|
Package config reads sneakers-migrate's connection settings and keys from the environment. |
|
internal/connect
Package connect makes sneakers-migrate's first connection to each service it talks to (a database, a gRPC service, Kratos) wait until the service is reachable, for up to a minute.
|
Package connect makes sneakers-migrate's first connection to each service it talks to (a database, a gRPC service, Kratos) wait until the service is reachable, for up to a minute. |
|
internal/envelope
Package envelope reads and writes the original vault's sealed records: each field sealed with AES-256-GCM under a per-record data key (DEK), with the field name as additional data, and the DEK wrapped by a working key named by the record's KeyRef.
|
Package envelope reads and writes the original vault's sealed records: each field sealed with AES-256-GCM under a per-record data key (DEK), with the field name as additional data, and the DEK wrapped by a working key named by the record's KeyRef. |
|
internal/kratos
Package kratos is a small client for the Ory Kratos admin API: listing identities with their password hashes, creating identities from those hashes, and the few calls import and verify need.
|
Package kratos is a small client for the Ory Kratos admin API: listing identities with their password hashes, creating identities from those hashes, and the few calls import and verify need. |
|
internal/kratos/kratostest
Package kratostest is an in-memory stand-in for the Kratos admin API, for tests: list (paged, with password hashes on request), create (from a hash or a password), get, replace, delete, lookup by identifier and version.
|
Package kratostest is an in-memory stand-in for the Kratos admin API, for tests: list (paged, with password hashes on request), create (from a hash or a password), get, replace, delete, lookup by identifier and version. |
|
internal/mapping
Package mapping turns bundle rows (the source layout) into rows for the target baselines, and closes what can't carry over: in-flight approvals, check-outs, uses and rotation claims end "by migration", each with an event for the audit trail.
|
Package mapping turns bundle rows (the source layout) into rows for the target baselines, and closes what can't carry over: in-flight approvals, check-outs, uses and rotation claims end "by migration", each with an event for the audit trail. |
|
internal/report
Package report is the record of an import or a verify run: ids, counts and results only.
|
Package report is the record of an import or a verify run: ids, counts and results only. |
|
internal/rpc
Package rpc holds the gRPC clients import and verify use: the target vault (seal for import, reveal, targets) and the target audit service (record an event, verify the chain).
|
Package rpc holds the gRPC clients import and verify use: the target vault (seal for import, reveal, targets) and the target audit service (record an event, verify the chain). |
|
internal/schema
Package schema names the tables sneakers-migrate moves: the source profile it knows how to read, the order tables are written in, and what each table needs on the way (sealed values, seed rows, transient rows left behind).
|
Package schema names the tables sneakers-migrate moves: the source profile it knows how to read, the order tables are written in, and what each table needs on the way (sealed values, seed rows, transient rows left behind). |
|
internal/settings
Package settings reviews the imported security settings against the target vault's defaults.
|
Package settings reviews the imported security settings against the target vault's defaults. |
|
internal/source
Package source exports the original system: it reads each service database in one read-only snapshot, opens sealed values with the original key ring in memory, reads the Kratos identities with their password hashes, checks the audit chain, and builds the bundle.
|
Package source exports the original system: it reads each service database in one read-only snapshot, opens sealed values with the original key ring in memory, reads the Kratos identities with their password hashes, checks the audit chain, and builds the bundle. |
|
internal/synth
Package synth lays down an invented dataset in the original system's schema: users with passwords and TOTP, groups, folders and rules, secrets with several versions sealed under an invented key ring, targets, schedules, open approvals and check-outs, and a valid audit chain.
|
Package synth lays down an invented dataset in the original system's schema: users with passwords and TOTP, groups, folders and rules, secrets with several versions sealed under an invented key ring, targets, schedules, open approvals and check-outs, and a valid audit chain. |
|
internal/target
Package target imports a bundle into a fresh Sneakers-PAM install: Kratos identities through the admin API, every service database through its own baseline layout in one transaction per service, secret values re-sealed by the target vault, the audit chain inserted raw, then the migration's own audit entries appended through the audit service.
|
Package target imports a bundle into a fresh Sneakers-PAM install: Kratos identities through the admin API, every service database through its own baseline layout in one transaction per service, secret values re-sealed by the target vault, the audit chain inserted raw, then the migration's own audit entries appended through the audit service. |
|
internal/testenv
Package testenv builds the databases the integration tests run against: a synthetic source in the source profile's schema, and an empty target in the layout of the Sneakers-PAM baselines.
|
Package testenv builds the databases the integration tests run against: a synthetic source in the source profile's schema, and an empty target in the layout of the Sneakers-PAM baselines. |
|
internal/testpg
Package testpg gives integration tests throwaway Postgres databases on the server named by MIGRATE_TEST_PG (an admin DSN).
|
Package testpg gives integration tests throwaway Postgres databases on the server named by MIGRATE_TEST_PG (an admin DSN). |
|
internal/totpcipher
Package totpcipher reads and writes the identity service's at-rest form of a TOTP shared secret: base64(nonce || AES-256-GCM) under TOTP_ENC_KEY, a 32-byte key given as hex or standard base64.
|
Package totpcipher reads and writes the identity service's at-rest form of a TOTP shared secret: base64(nonce || AES-256-GCM) under TOTP_ENC_KEY, a 32-byte key given as hex or standard base64. |
|
internal/verify
Package verify checks a target against the bundle it was imported from: per-table counts, the audit chain from genesis to head, sample reveals of current values matched by keyed hash (never printed), every secret's older versions by number, timestamp and sealed fields (never revealed), and that every target resolves to a connection and its secrets, the dry run of a connection test.
|
Package verify checks a target against the bundle it was imported from: per-table counts, the audit chain from genesis to head, sample reveals of current values matched by keyed hash (never printed), every secret's older versions by number, timestamp and sealed fields (never revealed), and that every target resolves to a connection and its secrets, the dry run of a connection test. |
|
internal/wait
Package wait blocks until sneakers-migrate's dependencies answer: a DNS name resolves, then each TCP target accepts a connection, in the order given.
|
Package wait blocks until sneakers-migrate's dependencies answer: a DNS name resolves, then each TCP target accepts a connection, in the order given. |
|
test/synth
command
Command synth stands up the synthetic source for a rehearsal: it applies the source schema to four empty databases and seeds them, and the source Kratos, with an invented dataset sealed under freshly generated keys.
|
Command synth stands up the synthetic source for a rehearsal: it applies the source schema to four empty databases and seeds them, and the source Kratos, with an invented dataset sealed under freshly generated keys. |
Click to show internal directories.
Click to hide internal directories.