Documentation
¶
Index ¶
- func LoadSecurityProvider(args ...interface{}) (ifs.ISecurityProvider, error)
- func SeekResource(path string, filename string) string
- type ShallowSecurityProvider
- func (this *ShallowSecurityProvider) Authenticate(user string, pass string) (string, bool, bool, error)
- func (this *ShallowSecurityProvider) CanAccept(conn net.Conn) error
- func (this *ShallowSecurityProvider) CanDial(host string, port uint32) (net.Conn, error)
- func (this *ShallowSecurityProvider) CanDoAction(action ifs.Action, o ifs.IElements, uuid string, token string, salts ...string) error
- func (this *ShallowSecurityProvider) Captcha() []byte
- func (this *ShallowSecurityProvider) Credential(crId, cId string, r ifs.IResources) (string, string, string, string, error)
- func (this *ShallowSecurityProvider) Decrypt(data string) ([]byte, error)
- func (this *ShallowSecurityProvider) Encrypt(data []byte) (string, error)
- func (this *ShallowSecurityProvider) Message(string) (*ifs.Message, error)
- func (this *ShallowSecurityProvider) Register(userId, password, captcha string, vnic ifs.IVNic) error
- func (this *ShallowSecurityProvider) ScopeView(o ifs.IElements, uuid string, token string, salts ...string) ifs.IElements
- func (this *ShallowSecurityProvider) TFASetup(userid string, nic ifs.IVNic) (string, []byte, error)
- func (this *ShallowSecurityProvider) TFAVerify(userid string, code string, bearer string, nic ifs.IVNic) error
- func (this *ShallowSecurityProvider) ValidateConnection(conn net.Conn, config *l8sysconfig.L8SysConfig) error
- func (this *ShallowSecurityProvider) ValidateToken(token string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSecurityProvider ¶
func LoadSecurityProvider(args ...interface{}) (ifs.ISecurityProvider, error)
LoadSecurityProvider loads the security provider plugin from /var/loader.so. This function uses Go's plugin system to dynamically load the security implementation.
func SeekResource ¶
Types ¶
type ShallowSecurityProvider ¶
type ShallowSecurityProvider struct {
// contains filtered or unexported fields
}
ShallowSecurityProvider implements ISecurityProvider with basic AES encryption. Uses a hardcoded secret for key derivation - suitable for testing only.
func NewShallowSecurityProvider ¶
func NewShallowSecurityProvider() *ShallowSecurityProvider
NewShallowSecurityProvider creates a new provider with a hardcoded secret.
func (*ShallowSecurityProvider) Authenticate ¶
func (this *ShallowSecurityProvider) Authenticate(user string, pass string) (string, bool, bool, error)
Authenticate always succeeds with a dummy bearer token (testing only).
func (*ShallowSecurityProvider) CanAccept ¶
func (this *ShallowSecurityProvider) CanAccept(conn net.Conn) error
CanAccept always allows incoming connections (permissive).
func (*ShallowSecurityProvider) CanDial ¶
CanDial establishes a TCP connection to the specified host and port.
func (*ShallowSecurityProvider) CanDoAction ¶
func (this *ShallowSecurityProvider) CanDoAction(action ifs.Action, o ifs.IElements, uuid string, token string, salts ...string) error
CanDoAction always permits any action (permissive authorization).
func (*ShallowSecurityProvider) Captcha ¶
func (this *ShallowSecurityProvider) Captcha() []byte
func (*ShallowSecurityProvider) Credential ¶
func (this *ShallowSecurityProvider) Credential(crId, cId string, r ifs.IResources) (string, string, string, string, error)
func (*ShallowSecurityProvider) Decrypt ¶
func (this *ShallowSecurityProvider) Decrypt(data string) ([]byte, error)
Decrypt decrypts AES-encrypted data using the derived key.
func (*ShallowSecurityProvider) Encrypt ¶
func (this *ShallowSecurityProvider) Encrypt(data []byte) (string, error)
Encrypt encrypts data using AES with the derived key.
func (*ShallowSecurityProvider) Message ¶
func (this *ShallowSecurityProvider) Message(string) (*ifs.Message, error)
func (*ShallowSecurityProvider) Register ¶
func (this *ShallowSecurityProvider) Register(userId, password, captcha string, vnic ifs.IVNic) error
func (*ShallowSecurityProvider) ScopeView ¶
func (this *ShallowSecurityProvider) ScopeView(o ifs.IElements, uuid string, token string, salts ...string) ifs.IElements
ScopeView returns the original elements without filtering (permissive).
func (*ShallowSecurityProvider) ValidateConnection ¶
func (this *ShallowSecurityProvider) ValidateConnection(conn net.Conn, config *l8sysconfig.L8SysConfig) error
ValidateConnection verifies the connection by exchanging encrypted secrets.
func (*ShallowSecurityProvider) ValidateToken ¶
func (this *ShallowSecurityProvider) ValidateToken(token string) (string, bool)
ValidateToken always validates tokens successfully (permissive).