Expand description
GitHub App authentication: the RS256 App JWT.
The App’s private key signs a short JWT; the JWT buys an installation
access token; the installation token does the work. Only the first step
touches the key, and it goes through AppKeySigner so the key can live
in an enclave signer that will sign (and log) but never export it (§5.7).
InProcessKey is the in-memory implementation for deployments without
one.
Structs§
- AppClaims
- The JWT claims, for tests and logs.
issis the App’s client id — GitHub accepts the numeric App id too, but recommends the client id. - InProcess
Key - The App private key held in this process.
Constants§
- JWT_
BACKDATE_ SECS - How far
iatis backdated. GitHub’s documented allowance for clock drift between the bridge and GitHub. - JWT_
LIFETIME_ SECS - How long an App JWT is valid from now. GitHub refuses more than ten minutes; nine leaves room for our clock running slightly slow.
Traits§
- AppKey
Signer - Signs App JWTs with the App’s private key (RSASSA-PKCS1-v1_5, SHA-256).
Functions§
- app_jwt
- Mint an App JWT now.
- app_
jwt_ at - Mint an App JWT for
issueratnow.