asapauthextension

package module
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 14 Imported by: 3

README

ASAP Client Authentication Extension

Status
Stability beta
Distributions contrib
Issues Open issues Closed issues
Code Owners @jamesmoessis, @MovieStoreGuy

This extension provides Atlassian Service Authentication Protocol (ASAP) client credentials for HTTP or gRPC based exporters.

Example Configuration

extensions:
  asapclient:
    # The `kid` as specified by the asap specification.
    key_id: somekeyid
    # The `iss` as specified by the asap specification.
    issuer: someissuer
    # The `aud` as specified by the asap specification.
    audience:
      - someservice
      - someotherservice
    # The private key of the client, used to sign the token. For an example, see `testdata/config.yaml`.
    private_key: ${env:ASAP_PRIVATE_KEY}
    # The time until expiry of each given token. The token will be cached and then re-provisioned upon expiry. 
    # For more info see the "exp" claim in the asap specification: https://s2sauth.bitbucket.io/spec/#access-token-generation
    ttl: 60s
    
exporters:
  otlphttp/withauth:
    endpoint: http://localhost:9000
    auth:
      authenticator: asapclient

  otlp/withauth:
    endpoint: 0.0.0.0:5000
    ca_file: /tmp/certs/ca.pem
    auth:
      authenticator: asapclient    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for asapauthextension.

Types

type Config

type Config struct {
	KeyID string `mapstructure:"key_id"`

	TTL time.Duration `mapstructure:"ttl"`

	Issuer string `mapstructure:"issuer"`

	Audience []string `mapstructure:"audience"`

	PrivateKey configopaque.String `mapstructure:"private_key"`
}

func (*Config) Validate

func (c *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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