auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

common auth functions for services, servers, and clients in Altid. Includes support for interacting with a local factotum

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getkey added in v0.1.0

func Getkey(params string, args ...interface{})

Get a private key. params i.e. proto=rsa service=ssh role=client

func Listkeys

func Listkeys() ([]rsa.PublicKey, error)

find our rsa public keys

func OpenRPC

func OpenRPC() (io.ReadWriteCloser, error)

func RsaSign

func RsaSign(sha1 []byte) (signed []byte, err error)

Types

type AuthInfo added in v0.1.0

type AuthInfo struct {
	Cuid   string
	Suid   string
	Cap    string
	Secret []byte
}

func Proxy

func Proxy(rw io.ReadWriter, format string, a ...interface{}) (*AuthInfo, error)

type AuthRet added in v0.1.0

type AuthRet int
const (
	ARok AuthRet = iota /* rpc return values */
	ARdone
	ARerror
	ARneedkey
	ARbadkey
	ARwritenext
	ARtoosmall
	ARtoobig
	ARrpcfailure
	ARphase

	AuthRpcMax = 4096
)

type AuthRpc added in v0.1.0

type AuthRpc struct {
	F   io.ReadWriteCloser
	Arg []byte
	Ai  *AuthInfo
}

func (*AuthRpc) GetInfo added in v0.1.0

func (rpc *AuthRpc) GetInfo() error

func (*AuthRpc) Rpc added in v0.1.0

func (rpc *AuthRpc) Rpc(overb string, arg string) (AuthRet, string)

type UserPasswd

type UserPasswd struct {
	User, Password string
}

func Getuserpasswd

func Getuserpasswd(params string, args ...interface{}) (*UserPasswd, error)

Get a password. params i.e. proto=pass service=ssh role=client server=%s user=%s

Jump to

Keyboard shortcuts

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