mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
* fix(orcad): keep the integration credential key only in the owner-only key file Managed servers no longer create, read or wait on the macOS login Keychain or a Secret Service keyring for their credential master key. A record an hourly build pointed at the keyring is migrated once: the key is copied into the key file when it reads back without UI within 5s, otherwise a new key file is started and old credentials show the usual reconnect error. Removes the locked-Keychain status fields, retry, the integrationCredentials.moveKeyToFile RPC and the Settings notice. * fix(orcad): serialize the keyring-record migration so concurrent starts agree on one key * docs(orcad): note the migration lock * fix(orcad): publish the migration lock with its PID and bound every wait * refactor(orcad): reuse the file transaction lock for the keyring-record migration
17 lines
783 B
TypeScript
17 lines
783 B
TypeScript
export type IntegrationCredentialService = 'Linear' | 'Jira' | 'Bitbucket'
|
|
|
|
export function credentialDecryptionMessage(service: IntegrationCredentialService): string {
|
|
return `Could not decrypt saved ${service} credential. Approve Keychain access or reconnect ${service}.`
|
|
}
|
|
|
|
// Why: decrypt errors cross IPC/RPC boundaries where only the message
|
|
// survives serialization, so detection matches on the canonical message.
|
|
export function isIntegrationCredentialDecryptionError(error: unknown): boolean {
|
|
const message = error instanceof Error ? error.message : String(error)
|
|
return (
|
|
message.includes(credentialDecryptionMessage('Linear')) ||
|
|
message.includes(credentialDecryptionMessage('Jira')) ||
|
|
message.includes(credentialDecryptionMessage('Bitbucket'))
|
|
)
|
|
}
|