mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
#21955 <div> <a href="https://www.loom.com/share/ba40b440502845d2861fd3ec7611bade"> <p>[Demo] Deploy SCEP certificates from Network Device Enrollment Service (NDES) #21955 - Watch Video</p> </a> <a href="https://www.loom.com/share/ba40b440502845d2861fd3ec7611bade"> <img style="max-width:300px;" src="https://cdn.loom.com/sessions/thumbnails/ba40b440502845d2861fd3ec7611bade-84f2d88c9f5106c2-full-play.gif"> </a> </div> Note: A few remaining subtasks will be done in a follow-up PR. See #22123 for a detailed list. # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
43 lines
844 B
Go
43 lines
844 B
Go
package service
|
|
|
|
import (
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
type notFoundError struct {
|
|
fleet.ErrorWithUUID
|
|
}
|
|
|
|
func (e notFoundError) Error() string {
|
|
return "not found"
|
|
}
|
|
|
|
// IsNotFound implements the service.IsNotFound interface (from the non-premium
|
|
// service package) so that the handler returns 404 for this error.
|
|
func (e notFoundError) IsNotFound() bool {
|
|
return true
|
|
}
|
|
|
|
type NDESInvalidError struct {
|
|
msg string
|
|
}
|
|
|
|
func (e NDESInvalidError) Error() string {
|
|
return e.msg
|
|
}
|
|
|
|
func NewNDESInvalidError(msg string) NDESInvalidError {
|
|
return NDESInvalidError{msg: msg}
|
|
}
|
|
|
|
type NDESPasswordCacheFullError struct {
|
|
msg string
|
|
}
|
|
|
|
func (e NDESPasswordCacheFullError) Error() string {
|
|
return e.msg
|
|
}
|
|
|
|
func NewNDESPasswordCacheFullError(msg string) NDESPasswordCacheFullError {
|
|
return NDESPasswordCacheFullError{msg: msg}
|
|
}
|