iya-sts
    Preparing search index...

    A FAPI 1.0 Advanced federation relationship's TLS client certificate: issued from the realm's TLS Client Issuing CA, sealed, renewed by a scheduler job, presented to the partner's token and UserInfo endpoints, and published for the partner to register. A static utility class.

    Index
    RENEW_JOB: "federation.client-certificate-renew" = RENEW_JOB

    The id of the scheduler job that issues and renews the certificates.

    ROW_VERSION: 1 = ROW_VERSION

    The row format version; a row of any other is not used.

    SEAL_LABEL: "federation-client-certificate" = SEAL_LABEL

    The keystore label the sealed private keys are counted under.

    • The relationship's usable row: this format, a certificate, and not past its notAfter. Null otherwise.

      Parameters

      • record: any

        the relationship

      • OptionalnowMs: number

        the time to judge against; now by default

      Returns any

      the row, or null

    • Whether a row is due a renewal: none, unusable, or within federation.clientCertificateRenewDays of its notAfter.

      Parameters

      • record: any

        the relationship

      • OptionalnowMs: number

        the time to judge against; now by default

      Returns boolean

      whether it is due

    • Issues a new certificate for a relationship and writes it, sealed. The one it replaces is overwritten: a token already bound to the old certificate stops working at the partner, which is a renewal's ordinary cost and why the job renews well before the end.

      Parameters

      • id: string

        the relationship id

      • Optionalwhy: string

        the audit sentence

      Returns Promise<any>

      a promise of { ok, row, message } or { ok: false, errors } marked STS-FED-0252

    • issue(), but one at a time per relationship in this process: two sign-ins that both find no certificate share one issue rather than each minting one, the second overwriting the certificate the first one's token was just bound to. (Two PROCESSES can still race; the loser's sign-in is refused at UserInfo by the partner, and the next one works.)

      Parameters

      • id: string

        the relationship id

      • why: string

        the audit sentence

      Returns Promise<any>

      a promise of issue()'s answer

    • The PEMs node's TLS client presents for a relationship: the leaf with its chain, and the private key, opened. Issues one first where the relationship holds none that is usable (a relationship that became 1-advanced before this existed, or one whose job has not run).

      Parameters

      • record: any

        the relationship

      Returns Promise<any>

      a promise of { ok: true, cert, key, x5tS256 } or { ok: false, errorCode: 'STS-FED-0252', why }; never rejects

    • Whether a relationship presents a client certificate: an OpenID Connect one held to FAPI 1.0 Advanced, and nothing else.

      Parameters

      • record: any

        the relationship

      Returns boolean

      whether it does

    • Issues or renews, in the current realm, every certificate a 1-advanced relationship lacks or is due to renew; the scheduler job's body.

      Parameters

      • OptionalnowMs: number

        the time to judge against; now by default

      Returns Promise<any>

      a promise of { issued, failed }

    • What the relationship page and GET /admin-api/federation show of the client certificate: the certificate and its chain as PEM, the subject DN a partner registers as tls_client_auth_subject_dn, the x5t#S256 a bound token carries, the validity and when it renews. Never the private key.

      Parameters

      • record: any

        the relationship

      Returns any

      the view, or null for a relationship that presents none