mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
- Login tokens name their identity provider in the `provider` claim;
SelectOrg and GetUserToken read it with pb.IDPFromString, which also
takes the number older tokens carry, and AuthenticateAPIKey answers
Provider Undefined.
- A login that fails after the callback decodes its state lands on the
redirect URI of the client, in its response mode, with `error` and
`error_description` (RFC 6749 section 4.1.2.1); a server-side failure
is described by its status text only. The calls to an IdP take the
request context and a client with a timeout, and the answer of the IdP
stays in the server log.
- The platform bootstrap reads its ca-config with ca.LoadBootstrapConfig,
which refuses an issuer URL template with `${ISSUER_ID}` or
`$ISSUER_ID`: the loader expands them to an empty string. The proto,
README and CLI help name `:ISSUER_ID`.
- CaDb.RegisterIssuer takes the trust anchor of a root issuer and writes
both in one transaction; the backend service and the bootstrap pass it,
and an anchor registered in another scope is AlreadyExists.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
18 lines
755 B
Go
18 lines
755 B
Go
// Package pgsql implements the database interfaces of internal/db on
|
|
// PostgreSQL.
|
|
//
|
|
// Provider wraps an xdb.Provider; every method builds its SQL through the
|
|
// query package, measures the query and maps a missing row to
|
|
// xdb.ErrorNotFound. A method that writes more than one row (AcceptInvite,
|
|
// RegisterCertificate with an event, RegisterIssuer with an anchor,
|
|
// RevokeCertificate, PublishCrl) opens a transaction with BeginTx and runs
|
|
// every statement on the provider it returns:
|
|
//
|
|
// tx, err := p.BeginTx(ctx, nil)
|
|
// defer tx.Close() // rolls back unless committed
|
|
// txProvider := tx.(*Provider)
|
|
//
|
|
// Lists page by offset or by a keyset cursor on id (listRows). The tests
|
|
// need the configured local PostgreSQL database.
|
|
package pgsql
|