handlers

package
v0.32.65 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeAnonymous string = "anonymous"
	AuthTypeAPIKey    string = "apiKey"
)
View Source
const AuthZENConfiguration string = `/.well-known/authzen-configuration`

Variables

View Source
var (
	AuthEnabled       = header.CtxKey("AuthEnabled")
	AuthenticatedUser = header.CtxKey("AuthenticatedUser")
)

Functions

func AuthorizersHandler

func AuthorizersHandler(confServices *TopazCfg) func(w http.ResponseWriter, r *http.Request)

func ConfigHandler

func ConfigHandler(confServices *TopazCfg) func(w http.ResponseWriter, r *http.Request)

func ConfigHandlerV2

func ConfigHandlerV2(confServices *TopazCfg) http.Handler

func SetWellKnownConfigHandler added in v0.32.60

func SetWellKnownConfigHandler(cfg *builder.API, mux *http.ServeMux) error

func UIHandler

func UIHandler(consoleFS http.FileSystem) http.Handler

func WellKnownConfigHandler added in v0.32.60

func WellKnownConfigHandler(endpoint *url.URL) func(w http.ResponseWriter, r *http.Request)

Types

type CfgV2Response

type CfgV2Response struct {
	ReadOnly           bool          `json:"readOnly"`
	AuthenticationType string        `json:"authenticationType"`
	Configs            []*TopazCfgV2 `json:"configs"`
}

type TopazCfg

type TopazCfg struct {
	AuthorizerServiceURL        string `json:"authorizerServiceUrl"`
	AuthorizerAPIKey            string `json:"authorizerApiKey"`
	DirectoryServiceURL         string `json:"directoryServiceUrl"`
	DirectoryAPIKey             string `json:"directoryApiKey"`
	DirectoryTenantID           string `json:"directoryTenantId"`
	DirectoryReaderServiceURL   string `json:"directoryReaderServiceUrl,omitempty"`
	DirectoryWriterServiceURL   string `json:"directoryWriterServiceUrl,omitempty"`
	DirectoryImporterServiceURL string `json:"directoryImporterServiceUrl,omitempty"`
	DirectoryExporterServiceURL string `json:"directoryExporterServiceUrl,omitempty"`
	DirectoryModelServiceURL    string `json:"directoryModelServiceUrl,omitempty"`
	ConsoleURL                  string `json:"-"`
}

type TopazCfgV1

type TopazCfgV1 struct {
	AsertoDirectoryURL       string `json:"asertoDirectoryUrl"`
	AuthorizerServiceURL     string `json:"authorizerServiceUrl"`
	AuthorizerAPIKey         string `json:"authorizerApiKey"`
	DirectoryAPIKey          string `json:"directoryApiKey"`
	DirectoryTenantID        string `json:"directoryTenantId"`
	AsertoDirectoryReaderURL string `json:"asertoDirectoryReaderUrl,omitempty"`
	AsertoDirectoryWriterURL string `json:"asertoDirectoryWriterUrl,omitempty"`
	AsertoDirectoryModelURL  string `json:"asertoDirectoryModelUrl,omitempty"`
}

type TopazCfgV2

type TopazCfgV2 struct {
	Type    string `json:"configType"`
	Name    string `json:"name"`
	Address string `json:"address"`
	*TopazCfg
}

type WellKnownConfig added in v0.32.60

type WellKnownConfig struct {
	PolicyDecisionPoint       string `json:"policy_decision_point"`       //nolint: tagliatelle
	AccessEvaluationEndpoint  string `json:"access_evaluation_endpoint"`  //nolint: tagliatelle
	AccessEvaluationsEndpoint string `json:"access_evaluations_endpoint"` //nolint: tagliatelle
	SearchSubjectEndpoint     string `json:"search_subject_endpoint"`     //nolint: tagliatelle
	SearchResourceEndpoint    string `json:"search_resource_endpoint"`    //nolint: tagliatelle
	SearchActionEndpoint      string `json:"search_action_endpoint"`      //nolint: tagliatelle
}

Jump to

Keyboard shortcuts

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