securityx

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package securityx groups external configuration for authn, authz and auditx.

It intentionally does not hide the underlying implementations. Apps can scan a unified YAML tree into Config, then construct authn/casdoor, authz/spicedb and auditx stores explicitly during boot.

Package securityx provides a small shared configuration shape for Kernel security components.

Recommended responsibility split:

  • authn/casdoor verifies users and provisions the identity-side projection of organizations, applications and groups.
  • authz/spicedb owns ReBAC relationships and permission checks.
  • auditx records security-relevant decisions.

Keep business facts in Kernel IAM DB. Sync Casdoor and SpiceDB as projections.

Index

Constants

View Source
const DefaultConfigKey = "security"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditConfig

type AuditConfig struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	Backend string `json:"backend" yaml:"backend"`
	DSN     string `json:"dsn" yaml:"dsn"`
}

type AuthnConfig

type AuthnConfig struct {
	Provider string         `json:"provider" yaml:"provider"`
	Casdoor  casdoor.Config `json:"casdoor" yaml:"casdoor"`
}

type AuthzConfig

type AuthzConfig struct {
	Provider string         `json:"provider" yaml:"provider"`
	SpiceDB  spicedb.Config `json:"spicedb" yaml:"spicedb"`
}

type Config

type Config struct {
	Authn AuthnConfig `json:"authn" yaml:"authn"`
	Authz AuthzConfig `json:"authz" yaml:"authz"`
	Audit AuditConfig `json:"audit" yaml:"audit"`
}

func Scan

func Scan(cfg configx.Config) (Config, error)

func ScanKey

func ScanKey(cfg configx.Config, key string) (Config, error)

func (Config) Normalized

func (c Config) Normalized() Config

Jump to

Keyboard shortcuts

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