Language: Go
Label: safe
CWE: CWE-862 \u2014 Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.

Code:
func AddV1Route(app iris.Party) {

	v1Party := app.Party("/v1")

	session.Install(v1Party)
	mfa.Install(v1Party)
	authParty := v1Party.Party("")
	v1Party.Use(langHandler())
	v1Party.Use(pageHandler())

	authParty.Use(WarpedJwtHandler())
	authParty.Use(authHandler())
	authParty.Use(resourceExtractHandler())
	authParty.Use(roleHandler())
	authParty.Use(roleAccessHandler())
	authParty.Use(resourceNameInvalidHandler())
	authParty.Use(logHandler())
	authParty.Get("/", apiResourceHandler(authParty))
	user.Install(authParty)
	cluster.Install(authParty)
	role.Install(authParty)
	system.Install(authParty)
	proxy.Install(authParty)
	ws.Install(authParty)
	chart.Install(authParty)
	webkubectl.Install(authParty, v1Party)
	ldap.Install(authParty)
	imagerepo.Install(authParty)
	file.Install(authParty)
}