Documentation
¶
Index ¶
- Variables
- func Authorize(hostAllowed, networkCheck bool, authNetwork string, next http.Handler) http.HandlerFunc
- func GetDNSEntry(domain string, network string) (models.DNSEntry, error)
- func HandleRESTRequests(wg *sync.WaitGroup, ctx context.Context)
- func OldNetworkACLStatus(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
var HttpHandlers = []interface{}{
nodeHandlers,
gwHandlers,
userHandlers,
networkHandlers,
dnsHandlers,
fileHandlers,
serverHandlers,
extClientHandlers,
ipHandlers,
loggerHandlers,
hostHandlers,
enrollmentKeyHandlers,
aclHandlers,
egressHandlers,
legacyHandlers,
}
HttpHandlers - handler functions for REST interactions
var HttpMiddlewares = []mux.MiddlewareFunc{ db.Middleware, userMiddleWare, }
HttpMiddlewares - middleware functions for REST interactions
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
func OldNetworkACLStatus ¶ added in v1.2.0
func OldNetworkACLStatus(w http.ResponseWriter, r *http.Request)
@Summary Check a Old ACL Status (Access Control List) @Router /api/networks/{networkname}/old_acl_status [get] @Tags Networks @Security oauth @Param networkname path string true "Network name" @Produce json @Success 200 {object} acls.ACLContainer @Failure 500 {object} models.ErrorResponse
Types ¶
This section is empty.