Skip to content

MJCZone.DapperMatic.AspNetCore.Security ​

Assembly: MJCZone.DapperMatic.AspNetCore

Classes ​

NameDescription
CryptoUtilsUtility methods for encryption and decryption using AES-GCM. Supports both raw 256-bit keys (Base64) and passphrase-derived keys (PBKDF2). Encrypted payloads include necessary metadata (mode, salt, nonce, tag).
DapperMaticAccessBuilds callers' sessions (DapperMaticCallerSession): who is calling, for which tenant, with which values, from a request and the tenancy settings; and holds an operation to the caller's tenant.
DapperMaticCallerSessionOne caller's session with DapperMatic: who is calling, for which tenant, with which values. An HTTP request has one, built before its endpoint runs; so does a stream for as long as it is open, and a socket once its caller has signed in on it. Built by DapperMaticAccess.
DapperMaticPolicySetThe policies in force: those of Policies, given in code or configuration, with RequireRole and ReadOnlyRole as policies of their own. Every policy is validated when the set is built, at startup.
DapperMaticStoredAccessThe policies and tenants kept by DapperMatic, as last read from IDapperMaticAccessRepository: read again when AccessRefreshInterval has passed, so that every instance of the application sees another's changes, and at once after this instance's own.
DefaultDapperMaticPermissionsAuthorizes operations by the policies: nothing is allowed unless a policy grants it. Reading and writing rows is decided table by table, with each table's columns, as the rows are read or written; this lets those operations through to that.
OperationTagsUtility class for identifying DapperMatic operation tags.

Interfaces ​

NameDescription
IDapperMaticPermissionsInterface for implementing custom authorization logic for DapperMatic operations.