access

package
v0.0.0-...-ab689eb Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrPolicyDissemInvalid = Error("policy dissem invalid")
	ErrDecisionUnexpected  = Error("access policy decision unexpected")
)
View Source
const (
	ErrAttributeDefinitionsUnmarshal   = Error("attribute definitions unmarshal")
	ErrAttributeDefinitionsServiceCall = Error("attribute definitions service call 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")
)
View Source
const (
	ErrPolicyDataAttributeParse = Error("policy data attribute invalid")
)

Variables

This section is empty.

Functions

func ResolveAttributeAuthority

func ResolveAttributeAuthority(s string) (*url.URL, error)

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"`
	AttributeSvc *url.URL
	Session      security.HSMSession
	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"`
	SchemaVersion   string         `json:"schemaVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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