trireme-lib: go.aporeto.io/trireme-lib/controller/internal/enforcer/metadata Index | Files

package metadata

import "go.aporeto.io/trireme-lib/controller/internal/enforcer/metadata"

Index

Package Files

metadata.go

type Client Uses

type Client struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

Client is a metadata client.

func NewClient Uses

func NewClient(puContext string, r *serviceregistry.Registry, t common.ServiceTokenIssuer) *Client

NewClient returns a new metadata client

func (*Client) Authorize Uses

func (c *Client) Authorize(request *apiauth.Request) error

Authorize request will use the enforcerd databases and context to authorize an http request given the provided credentials.

func (*Client) GetCertificate Uses

func (c *Client) GetCertificate() []byte

GetCertificate returns back the certificate.

func (*Client) GetCurrentPolicy Uses

func (c *Client) GetCurrentPolicy() ([]byte, *policy.PUPolicyPublic, error)

GetCurrentPolicy returns the current policy of the datapath. It returns the marshalled policy as well as the original object for any farther processing.

func (*Client) GetPrivateKey Uses

func (c *Client) GetPrivateKey() []byte

GetPrivateKey returns the private key associated with this service.

func (*Client) IssueToken Uses

func (c *Client) IssueToken(ctx context.Context, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)

IssueToken issues an OAUTH token for this PU for the desired audience and validity. The request will use the token issuer to contact the OIDC provider and issue the token.

func (*Client) UpdateSecrets Uses

func (c *Client) UpdateSecrets(cert, key []byte)

UpdateSecrets updates the secrets of the client.

Package metadata imports 8 packages (graph) and is imported by 2 packages. Updated 2019-09-15. Refresh now. Tools for package owners.