store

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package store contains a datastore for authorization policy evaluation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	storage.Store
	// contains filtered or unexported fields
}

A Store stores data for the OPA rego policy evaluation.

func New

func New() *Store

New creates a new Store.

func NewFromProtos

func NewFromProtos(serverVersion uint64, msgs ...proto.Message) *Store

NewFromProtos creates a new Store from an existing set of protobuf messages.

func (*Store) ClearRecords

func (s *Store) ClearRecords()

ClearRecords removes all the records from the store.

func (*Store) GetDataBrokerRecordOption

func (s *Store) GetDataBrokerRecordOption() func(*rego.Rego)

GetDataBrokerRecordOption returns a function option that can retrieve databroker data.

func (*Store) GetDataBrokerVersions

func (s *Store) GetDataBrokerVersions() (serverVersion, recordVersion uint64)

GetDataBrokerVersions gets the databroker versions.

func (*Store) GetRecordData

func (s *Store) GetRecordData(typeURL, idOrValue string) proto.Message

GetRecordData gets a record's data from the store. `nil` is returned if no record exists for the given type and id.

func (*Store) UpdateGoogleCloudServerlessAuthenticationServiceAccount

func (s *Store) UpdateGoogleCloudServerlessAuthenticationServiceAccount(serviceAccount string)

UpdateGoogleCloudServerlessAuthenticationServiceAccount updates the google cloud serverless authentication service account in the store.

func (*Store) UpdateIssuer

func (s *Store) UpdateIssuer(issuer string)

UpdateIssuer updates the issuer in the store. The issuer is used as part of JWT construction.

func (*Store) UpdateJWTClaimHeaders

func (s *Store) UpdateJWTClaimHeaders(jwtClaimHeaders map[string]string)

UpdateJWTClaimHeaders updates the jwt claim headers in the store.

func (*Store) UpdateRecord

func (s *Store) UpdateRecord(serverVersion uint64, record *databroker.Record)

UpdateRecord updates a record in the store.

func (*Store) UpdateRoutePolicies

func (s *Store) UpdateRoutePolicies(routePolicies []config.Policy)

UpdateRoutePolicies updates the route policies in the store.

func (*Store) UpdateSigningKey

func (s *Store) UpdateSigningKey(signingKey *jose.JSONWebKey)

UpdateSigningKey updates the signing key stored in the database. Signing operations in rego use JWKs, so we take in that format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL