PlatformSecretsImportEnvCommand
extends Command
in package
FinalYes
Copy legacy KMP_SECRET_* values into the database store without overwrites.
Table of Contents
Methods
- defaultName() : string
- execute() : int
- candidateNames() : array<int, string>
- Build exact names from platform metadata. This avoids guessing the punctuation that EnvVarSecretStore normalizes in KMP_SECRET_* names.
- collectSecretReferences() : void
- Collect portable secret references from the validated tenant config.
- import() : array{int, int, int}
- storageKey() : string
- Match EnvVarSecretStore's logical-name normalization without exposing a secret value or relying on its lossy list() inverse mapping.
Methods
defaultName()
public
static defaultName() : string
Tags
Return values
stringexecute()
public
execute(Arguments $args, ConsoleIo $io) : int
Parameters
- $args : Arguments
- $io : ConsoleIo
Tags
Return values
intcandidateNames()
Build exact names from platform metadata. This avoids guessing the punctuation that EnvVarSecretStore normalizes in KMP_SECRET_* names.
private
candidateNames(Connection $platform, string $masterKeyName) : array<int, string>
Parameters
- $platform : Connection
- $masterKeyName : string
Return values
array<int, string>collectSecretReferences()
Collect portable secret references from the validated tenant config.
private
collectSecretReferences(array<string, mixed> $config, array<int, string> &$names) : void
Parameters
- $config : array<string, mixed>
- $names : array<int, string>
import()
private
import(SecretStoreInterface $source, DatabaseSecretStore $target, array<int, string> $names) : array{int, int, int}
Parameters
- $source : SecretStoreInterface
- $target : DatabaseSecretStore
- $names : array<int, string>
Return values
array{int, int, int}storageKey()
Match EnvVarSecretStore's logical-name normalization without exposing a secret value or relying on its lossy list() inverse mapping.
private
storageKey(string $name) : string
Parameters
- $name : string