Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpHandlers = []interface{}{
nodeHandlers,
gwHandlers,
userHandlers,
networkHandlers,
dnsHandlers,
fileHandlers,
serverHandlers,
extClientHandlers,
ipHandlers,
loggerHandlers,
hostHandlers,
enrollmentKeyHandlers,
tagHandlers,
aclHandlers,
legacyHandlers,
}
HttpHandlers - handler functions for REST interactions
View Source
var HttpMiddlewares = []mux.MiddlewareFunc{
userMiddleWare,
}
HttpMiddlewares - middleware functions for REST interactions
View Source
var ListRoles = listRoles
Functions ¶
func Authorize ¶
func Authorize( hostAllowed, networkCheck bool, authNetwork string, next http.Handler, ) http.HandlerFunc
The middleware for most requests to the API They all pass through here first This will validate the JWT (or check for master token) This will also check against the authNetwork and make sure the node should be accessing that endpoint, even if it's technically ok This is kind of a poor man's RBAC. There's probably a better/smarter way. TODO: Consider better RBAC implementations
func GetDNSEntry ¶
GetDNSEntry - gets a DNS entry
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.