Skip to content

Latest commit

 

History

History
401 lines (175 loc) · 4.72 KB

core.client.md

File metadata and controls

401 lines (175 loc) · 4.72 KB

Home > @cerbos/core > Client

Client class

Base implementation of a client for interacting with the Cerbos policy decision point server.

Signature:

export declare abstract class Client 

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Client class.

Methods

Method

Modifiers

Description

addOrUpdatePolicies(request, options)

Add policies, or update existing policies.

addOrUpdateSchemas(request, options)

Add schemas to be used for validating principal or resource attributes, or update existing schemas.

checkResource(request, options)

Check a principal's permissions on a resource.

checkResources(request, options)

Check a principal's permissions on a set of resources.

deleteSchema(id, options)

Delete a schema.

deleteSchemas(request, options)

Delete multiple schemas.

disablePolicies(request, options)

Disable multiple policies.

disablePolicy(id, options)

Disable a policy.

enablePolicies(request, options)

Enable multiple policies.

enablePolicy(id, options)

Enable a policy.

getAccessLogEntry(callId, options)

Fetch an access log entry by call ID from the policy decision point server's audit log.

getDecisionLogEntry(callId, options)

Fetch a decision log entry by call ID from the policy decision point server's audit log.

getPolicies(request, options)

Fetch multiple policies by ID.

getPolicy(id, options)

Fetch a policy by ID.

getSchema(id, options)

Fetch a schema by ID.

getSchemas(request, options)

Fetch multiple schemas by ID.

inspectPolicies(request, options)

Inspect policies in the store.

isAllowed(request, options)

Check if a principal is allowed to perform an action on a resource.

listAccessLogEntries(request, options)

List access log entries from the policy decision point server's audit log.

listDecisionLogEntries(request, options)

List decision log entries from the policy decision point server's audit log.

listPolicies(request, options)

List policies.

listSchemas(options)

List schemas.

planResources(request, options)

Produce a query plan that can be used to obtain a list of resources on which a principal is allowed to perform a particular action.

reloadStore(request, options)

Reload the store.

serverInfo(options)

Retrieve information about the Cerbos policy decision point server.

withPrincipal(principal, auxData)

Create a client instance with a pre-specified principal.