Skip to content

feat(fly-io): MachineIdentity protocol for PetSem over /.fly/api - #477

Open
sam-goodwin wants to merge 1 commit into
mainfrom
feat/fly-machine-identity
Open

feat(fly-io): MachineIdentity protocol for PetSem over /.fly/api#477
sam-goodwin wants to merge 1 commit into
mainfrom
feat/fly-machine-identity

Conversation

@sam-goodwin

Copy link
Copy Markdown
Collaborator

FlyIoProtocol still sends Authorization: Bearer by default. A per-call MachineIdentity service drops that header and sets Connection: close so PetSem encrypt/sign/decrypt/verify work as the machine over /.fly/api.

GetSecret in the same process keeps the org token. The protocol does not sniff an empty API key.

export class MachineIdentity extends Context.Service<
  MachineIdentity,
  true
>()("FlyIoMachineIdentity") {}

Generated machines ops are unchanged. Callers provide MachineIdentity plus an HttpClient with socketPath: "/.fly/api".

FlyIoProtocol still sends Bearer by default. When MachineIdentity is
provided on the calling fiber, encode drops Authorization and sets
Connection: close so encrypt/sign/decrypt/verify work as the machine
over the unix socket without sniffing an empty token.
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

Distilled

@distilled.cloud/core

bun add https://pkg.ing/@distilled.cloud/core/b768390

@distilled.cloud/fly-io

bun add https://pkg.ing/@distilled.cloud/fly-io/b768390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant