aaa

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package aaa provides Carrier WiFi related services

Index

Constants

View Source
const (
	MinimalSessionTimeout = time.Millisecond * 10
	DefaultSessionTimeout = time.Hour * 6
)

Variables

This section is empty.

Functions

func CreateSessionId

func CreateSessionId() string

CreateSessionId creates & returns unique session ID string

Types

type Session

type Session interface {
	// Lock - locks the Session's mutex
	Lock()
	// Unlock - unlocks the Session's mutex
	Unlock()
	// GetCtx returns AAA Session Context
	GetCtx() *protos.Context
	// SetCtx sets AAA Session Context - must be called on a Locked session
	SetCtx(ctx *protos.Context)
	// StopTimeout - stops the session's timeout if possible, returns if the timeout was successfully stopped
	StopTimeout() bool
}

Session - struct to save an authenticated session state

type SessionTable

type SessionTable interface {
	// AddSession - adds a new session to the table & returns the newly created session pointer.
	// If a session with the same ID already is in the table - returns "Session with SID: XYZ already exist" as well as the
	// existing session.
	AddSession(pc *protos.Context, tout time.Duration, cb TimeoutNotifier, overwrite ...bool) (s Session, err error)
	// GetSession returns session corresponding to the given sid or nil if not found
	GetSession(sid string) (session Session)
	// FindSession returns session ID corresponding to the given IMSI (empty string if not found)
	FindSession(imsi string) (sessionId string)
	// GetSessionByImsi returns session corresponding to the given IMSI or nil if not found
	GetSessionByImsi(imsi string) (session Session)
	// RemoveSession - removes the session with the given SID and returns it, returns nil if not found
	RemoveSession(sid string) Session
	// SetTimeout - [Re]sets the session's cleanup timeout to fire after tout duration
	SetTimeout(sid string, tout time.Duration, callback TimeoutNotifier) bool
}

SessionTable - synchronized map of authenticated sessions

type TimeoutNotifier

type TimeoutNotifier func(Session) error

TimeoutNotifier is a callback function to be called on session timeout

Directories

Path Synopsis
Package main Package main implements WiFi AAA server
Package main Package main implements WiFi AAA server
Package client provides a thin API client for communicating with AAA Server.
Package client provides a thin API client for communicating with AAA Server.
package radius implements AAA server's radius interface for accounting & authentication package radius implements AAA server's radius interface for accounting & authentication Copyright 2020 The Magma Authors.
package radius implements AAA server's radius interface for accounting & authentication package radius implements AAA server's radius interface for accounting & authentication Copyright 2020 The Magma Authors.
dae
package dae implements Radius Dynamic Authorization Extensions API (https://tools.ietf.org/html/rfc5176) package dae implements Radius Dynamic Authorization Extensions API (https://tools.ietf.org/html/rfc5176)
package dae implements Radius Dynamic Authorization Extensions API (https://tools.ietf.org/html/rfc5176) package dae implements Radius Dynamic Authorization Extensions API (https://tools.ietf.org/html/rfc5176)
package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services
package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services package servcers implements WiFi AAA GRPC services
session_manager package defines local session manager client API
session_manager package defines local session manager client API
Package store provides an implementation for AAA Session and SessionTable interfaces
Package store provides an implementation for AAA Session and SessionTable interfaces
test
mock_sessiond
Package test provides common definitions and function for eap related tests
Package test provides common definitions and function for eap related tests

Jump to

Keyboard shortcuts

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