access

package
v0.0.0-...-1ac4089 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: BSD-3-Clause-Clear Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrPolicyDissemInvalid     = Error("policy dissem invalid")
	ErrDecisionUnexpected      = Error("authorization decision unexpected")
	ErrDecisionCountUnexpected = Error("authorization decision count unexpected")
)
View Source
const (
	ErrHSM    = Error("hsm unexpected")
	ErrConfig = Error("invalid port")
)
View Source
const (
	ErrCertificateEncode = Error("certificate encode error")
	ErrPublicKeyMarshal  = Error("public key marshal error")
)
View Source
const (
	ErrUser     = Error("request error")
	ErrInternal = Error("internal error")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	URI           string           `json:"attribute"` // attribute
	PublicKey     crypto.PublicKey `json:"pubKey"`    // pubKey
	ProviderURI   string           `json:"kasUrl"`    // kasUrl
	SchemaVersion string           `json:"tdf_spec_version,omitempty"`
	Name          string           `json:"displayName"` // displayName
}

type ClaimsObject

type ClaimsObject struct {
	PublicKey              string        `json:"public_key"`
	ClientPublicSigningKey string        `json:"client_public_signing_key"`
	SchemaVersion          string        `json:"tdf_spec_version,omitempty"`
	Entitlements           []Entitlement `json:"entitlements"`
}

type Entitlement

type Entitlement struct {
	EntityID         string      `json:"entity_identifier"`
	EntityAttributes []Attribute `json:"entity_attributes"`
}

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Policy

type Policy struct {
	UUID uuid.UUID  `json:"uuid"`
	Body PolicyBody `json:"body"`
}

type PolicyBody

type PolicyBody struct {
	DataAttributes []Attribute `json:"dataAttributes"`
	Dissem         []string    `json:"dissem"`
}

type Provider

type Provider struct {
	kaspb.AccessServiceServer
	URI            url.URL `json:"uri"`
	SDK            *otdf.SDK
	AttributeSvc   *url.URL
	CryptoProvider security.CryptoProvider
	OIDCVerifier   *oidc.IDTokenVerifier
}

func (*Provider) LegacyPublicKey

func (*Provider) PublicKey

func (*Provider) Rewrap

type RequestBody

type RequestBody struct {
	AuthToken       string         `json:"authToken"`
	KeyAccess       tdf3.KeyAccess `json:"keyAccess"`
	Policy          string         `json:"policy,omitempty"`
	Algorithm       string         `json:"algorithm,omitempty"`
	ClientPublicKey string         `json:"clientPublicKey"`
	PublicKey       interface{}    `json:"-"`
	SchemaVersion   string         `json:"schemaVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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