KERIA Core API

keria.core.authing

KERIA keria.core.authing module

class keria.core.authing.SignatureValidationComponent(agency, authn: Authenticater, allowed=None)[source]

Validate Signature and Signature-Input header signatures

process_request(req, resp)[source]

Process request to ensure has a valid signature from caid

Parameters:
  • req – Http request object

  • resp – Http response object

process_response(req, rep, resource, req_succeeded)[source]

Process every falcon response by adding signature headers signed by the Agent AID.

Parameters:
  • req (Request) – Falcon request object

  • rep (Response) – Falcon response object

  • resource (End) – endpoint object the request was routed to

  • req_succeeded (boot) – True means the request was successfully handled

keria.core.httping

KERIA keria.core.httping module

keria.core.httping.parseRangeHeader(header, name, start=0, end=9)[source]

Parse the start and end requested range values, defaults are 0, 9

Parameters:
  • header (str) – HTTP Range header value

  • name (str) – range name to look for

  • start (int) – default start index

  • end (int) – default end index

Returns:

tuple of start index and end index

Return type:

(start, end)

keria.core.keeping

KERI keria.core.keeping module

class keria.core.keeping.Prefix(pidx: int = 0, algo: str = 'salty')[source]
class keria.core.keeping.RemoteKeeper(headDirPath=None, perm=None, reopen=False, **kwa)[source]

RemoteKeeper stores data for Salty or Randy Encrypted edge key generation.

reopen(**kwa)[source]

Open sub databases

class keria.core.keeping.SaltyPrm(sxlt: str = '', pidx: int = 0, kidx: int = 0, stem: str = '', tier: str = '', dcode: str = '', icodes: list = <factory>, ncodes: list = <factory>, transferable: bool = False)[source]

Salty prefix’s parameters for creating new key pairs

keria.core.longrunning

KERIA keria.core.longrunning module

class keria.core.longrunning.Monitor(hby, swain, counselor=None, registrar=None, exchanger=None, credentialer=None, opr=None, temp=False)[source]

Monitoring and garbage collecting long running operations

hby

identifier database environment

Type:

Habery

opr

long running operations database

Type:

Operator

swain

Delegation processes tracker

Type:

Sealer

getOperations(type=None)[source]

Return list of long running opterations, optionally filtered by type

rem(name)[source]

Remove tracking of the long running operation represented by name

status(op)[source]

Calculate the status of an operation.

Base on the type of an operation, determine the current status of the operation, including loading any availabie error messages if the operation failed of the sucessful result of the operation which will be the same that would be returned by the original endpoint if the operation were not long running

Parameters:

op (Op) – database storage for long running operation

Returns:

The status of the operation, including any errors or results as appropriate.

Return type:

Operation

submit(oid, typ, metadata=None)[source]

Submit a new long running operation to track

Parameters:
  • oid (str) – opaque identifier of the target of the long running operation (type specific)

  • typ (Typeage) – long running operation type

  • metadata (dict) – additional metadata for the long running operation (type specific)

Returns:

the initial long running operation status object

Return type:

Operation

class keria.core.longrunning.Op(oid: str, type: str, start: str, metadata: dict)[source]
class keria.core.longrunning.Operation(name: str, metadata: dict, done: bool = False, error: keria.core.longrunning.Status = None, response: dict = None)[source]
class keria.core.longrunning.OperationResourceEnd[source]

Single Resource REST endpoint for long running operations

static on_delete(req, rep, name)[source]

DELETE single resource REST endpoint

Parameters:
  • req (Request) – Falcon HTTP Request object

  • rep (Response) – Falcon HTTP Response object

  • name (str) – Long running operation resource name to load

static on_get(req, rep, name)[source]

GET single resource REST endpoint

Parameters:
  • req (Request) – Falcon HTTP Request object

  • rep (Response) – Falcon HTTP Response object

  • name (str) – Long running operation resource name to load

class keria.core.longrunning.Operator(name='opr', headDirPath=None, reopen=True, **kwa)[source]
reopen(**kwa)[source]

Reopen database and initialize sub-dbs

class keria.core.longrunning.Status(code: int, message: str, details: dict = None)[source]
keria.core.longrunning.Typeage

alias of Tierage