portainer/portainer · error

the device has not been trusted yet

Error message

the device has not been trusted yet

What it means

Error "the device has not been trusted yet" thrown in portainer/portainer.

Source

Thrown at api/http/security/bouncer.go:214

	}

	return nil
}

// TrustedEdgeEnvironmentAccess defines a security check for Edge environments, checks if
// the request is coming from a trusted Edge environment
func (bouncer *RequestBouncer) TrustedEdgeEnvironmentAccess(tx dataservices.DataStoreTx, endpoint *portainer.Endpoint) error {
	if endpoint.UserTrusted {
		return nil
	}

	settings, err := tx.Settings().Settings()
	if err != nil {
		return errors.WithMessage(err, "could not retrieve the settings")
	}

	if !settings.TrustOnFirstConnect {
		return errors.New("the device has not been trusted yet")
	}

	return nil
}

// mwAuthenticatedUser authenticates a request by
// - adding a secure handlers to the response
// - authenticating the request with a valid token
func (bouncer *RequestBouncer) mwAuthenticatedUser(h http.Handler) http.Handler {
	h = bouncer.mwAuthenticateFirst([]tokenLookup{
		bouncer.apiKeyLookup,
		bouncer.CookieAuthLookup,
		bouncer.JWTAuthLookup,
	}, h)
	h = MWSecureHeaders(h, bouncer.hsts, bouncer.csp)

	return h
}

View on GitHub (pinned to 17e74456ff)

When it happens

Trigger: Thrown at api/http/security/bouncer.go:214 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26). Data as JSON: /api/errors/d7aae4e58093b8c4. Report an issue: GitHub.