Documentation
¶
Overview ¶
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.
This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package radius implements AAA server's radius interface for accounting & authentication
package radius implements AAA server's radius interface for accounting & authentication
Index ¶
- Constants
- Variables
- func AddMessageAuthenticatorAttr(p *radius.Packet) error
- func GenSessionID(calling string, called string) string
- func GenerateMPPEAttribute(key []byte, s []byte, r []byte, a []byte, t radius.Type) ([]byte, error)
- func GenerateMPPEKey(key []byte, s []byte, r []byte, a []byte) []byte
- func GetKeyingAttributes(msk []byte, secret []byte, authenticator []byte) (rcv, snd radius.Attribute, err error)
- func ToRadiusCode(eapCode uint8) radius.Code
- func ValidateConfigs(cfg *mconfig.RadiusConfig) *mconfig.RadiusConfig
- type AcctServer
- type AuthServer
- type Server
Constants ¶
const ( MSMPPESendKey_Type radius.Type = 16 MSMPPERecvKey_Type radius.Type = 17 )
Variables ¶
var MicrosoftVendor = []byte{0x00, 0x00, 0x01, 0x37}
MicrosoftVendor bytes depicting Microsoft vendor for RADIUS Vendor-Specific attributes
Functions ¶
func AddMessageAuthenticatorAttr ¶
AddMessageAuthenticatorAttr generates and adds MessageAuthenticator AVP to the packet
func GenSessionID ¶
GenSessionID creates syntetic radius session ID if none is supplied by the client
func GenerateMPPEAttribute ¶
GenerateMPPEAttribute Wraps the MPPE key with RADIUS attributes as indicated in rfc2866 (Vendor-Specific attribute)
func GenerateMPPEKey ¶
GenerateMPPEKey follows RFC2548 section 2.4.3 and 2.4.4 to generate MPPE keying material. all parameter names are taken from the RFC so it's easier to follow the code
func GetKeyingAttributes ¶
func GetKeyingAttributes(msk []byte, secret []byte, authenticator []byte) (rcv, snd radius.Attribute, err error)
GetKeyingAttributes Generates RADIUS keying materials
func ToRadiusCode ¶
ToRadiusCode returs the RADIUS packet code which, as per RFCxxxx should carry the EAP payload of the given EAP Code
func ValidateConfigs ¶
func ValidateConfigs(cfg *mconfig.RadiusConfig) *mconfig.RadiusConfig
Types ¶
type AcctServer ¶
type AcctServer struct {
// contains filtered or unexported fields
}
AcctServer - radius accounting server implementation
func (*AcctServer) ServeRADIUS ¶
func (s *AcctServer) ServeRADIUS(w radius.ResponseWriter, r *radius.Request)
ServeRADIUS - radius handler interface implementation for EAP server
type AuthServer ¶
type AuthServer struct {
// contains filtered or unexported fields
}
AuthServer - radius EAP server implementation
func (*AuthServer) ServeRADIUS ¶
func (s *AuthServer) ServeRADIUS(w radius.ResponseWriter, r *radius.Request)
ServeRADIUS - radius handler interface implementation for EAP server
type Server ¶
type Server struct { AuthServer AcctServer // contains filtered or unexported fields }
Server - radius server implementation
func New ¶
func New(cfg *mconfig.RadiusConfig, authRPC protos.AuthenticatorServer, acctRpc protos.AccountingServer) *Server
New returns new radius server
func (*Server) GetConfig ¶
func (s *Server) GetConfig() *mconfig.RadiusConfig
GetConfig returns server configs
Directories
¶
Path | Synopsis |
---|---|
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) |