Documentation ¶
Overview ¶
Package file implements filesystem-based storage for MDM services
Index ¶
- Constants
- type FileStorage
- func (s *FileStorage) AssociateCertHash(r *mdm.Request, hash string) error
- func (s *FileStorage) ClearQueue(r *mdm.Request) error
- func (s *FileStorage) Disable(r *mdm.Request) error
- func (s *FileStorage) EnqueueCommand(_ context.Context, ids []string, command *mdm.Command) (map[string]error, error)
- func (s *FileStorage) EnrollmentFromHash(_ context.Context, hash string) (string, error)
- func (s *FileStorage) EnrollmentHasCertHash(r *mdm.Request, _ string) (bool, error)
- func (s *FileStorage) HasCertHash(r *mdm.Request, hash string) (bool, error)
- func (s *FileStorage) IsCertHashAssociated(r *mdm.Request, hash string) (bool, error)
- func (s *FileStorage) IsPushCertStale(ctx context.Context, topic, providedStaleToken string) (bool, error)
- func (s *FileStorage) RetrieveBootstrapToken(r *mdm.Request, _ *mdm.GetBootstrapToken) (*mdm.BootstrapToken, error)
- func (s *FileStorage) RetrieveMigrationCheckins(_ context.Context, c chan<- interface{}) error
- func (s *FileStorage) RetrieveNextCommand(r *mdm.Request, skipNotNow bool) (*mdm.Command, error)
- func (s *FileStorage) RetrievePushCert(ctx context.Context, topic string) (*tls.Certificate, string, error)
- func (s *FileStorage) RetrievePushInfo(_ context.Context, ids []string) (map[string]*mdm.Push, error)
- func (s *FileStorage) RetrieveTokenUpdateTally(_ context.Context, id string) (int, error)
- func (s *FileStorage) StoreAuthenticate(r *mdm.Request, msg *mdm.Authenticate) error
- func (s *FileStorage) StoreBootstrapToken(r *mdm.Request, msg *mdm.SetBootstrapToken) error
- func (s *FileStorage) StoreCommandReport(r *mdm.Request, report *mdm.CommandResults) error
- func (s *FileStorage) StorePushCert(ctx context.Context, pemCert, pemKey []byte) error
- func (s *FileStorage) StoreTokenUpdate(r *mdm.Request, msg *mdm.TokenUpdate) error
- func (s *FileStorage) StoreUserAuthenticate(r *mdm.Request, msg *mdm.UserAuthenticate) error
- type PushCertFileStorage
- func (s *PushCertFileStorage) IsPushCertStale(_ context.Context, topic, providedStaleToken string) (bool, error)
- func (s *PushCertFileStorage) RetrievePushCert(_ context.Context, topic string) (*tls.Certificate, string, error)
- func (s *PushCertFileStorage) StorePushCert(_ context.Context, pemCert, pemKey []byte) error
Constants ¶
const ( AuthenticateFilename = "Authenticate.plist" TokenUpdateFilename = "TokenUpdate.plist" UnlockTokenFilename = "UnlockToken.dat" SerialNumberFilename = "SerialNumber.txt" IdentityCertFilename = "Identity.pem" DisabledFilename = "Disabled" BootstrapTokenFile = "BootstrapToken.dat" TokenUpdateTallyFilename = "TokenUpdate.tally.txt" UserAuthFilename = "UserAuthenticate.plist" UserAuthDigestFilename = "UserAuthenticate.Digest.plist" CertAuthFilename = "CertAuth.sha256.txt" CertAuthAssociationsFilename = "CertAuth.txt" // The associations for "sub"-enrollments (that is: user-channel // enrollments to device-channel enrollments) are stored in this // directory under the device's directory. SubEnrollmentPathname = "SubEnrollments" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
FileStorage implements filesystem-based storage for MDM services
func (*FileStorage) AssociateCertHash ¶
func (s *FileStorage) AssociateCertHash(r *mdm.Request, hash string) error
func (*FileStorage) ClearQueue ¶
func (s *FileStorage) ClearQueue(r *mdm.Request) error
func (*FileStorage) EnqueueCommand ¶
func (s *FileStorage) EnqueueCommand(_ context.Context, ids []string, command *mdm.Command) (map[string]error, error)
EnqueueCommand writes the command to disk in the queue directory
func (*FileStorage) EnrollmentFromHash ¶ added in v0.6.0
func (*FileStorage) EnrollmentHasCertHash ¶
func (*FileStorage) HasCertHash ¶
func (*FileStorage) IsCertHashAssociated ¶
func (*FileStorage) IsPushCertStale ¶
func (s *FileStorage) IsPushCertStale(ctx context.Context, topic, providedStaleToken string) (bool, error)
IsPushCertStale is passed through to a new PushCertFileStorage
func (*FileStorage) RetrieveBootstrapToken ¶
func (s *FileStorage) RetrieveBootstrapToken(r *mdm.Request, _ *mdm.GetBootstrapToken) (*mdm.BootstrapToken, error)
func (*FileStorage) RetrieveMigrationCheckins ¶
func (s *FileStorage) RetrieveMigrationCheckins(_ context.Context, c chan<- interface{}) error
func (*FileStorage) RetrieveNextCommand ¶
RetrieveNextCommand gets the next command from the queue while minding NotNow status
func (*FileStorage) RetrievePushCert ¶
func (s *FileStorage) RetrievePushCert(ctx context.Context, topic string) (*tls.Certificate, string, error)
RetrievePushCert is passed through to a new PushCertFileStorage
func (*FileStorage) RetrievePushInfo ¶
func (s *FileStorage) RetrievePushInfo(_ context.Context, ids []string) (map[string]*mdm.Push, error)
RetrievePushInfo retrieves APNs-related data for push notifications
func (*FileStorage) RetrieveTokenUpdateTally ¶
func (*FileStorage) StoreAuthenticate ¶
func (s *FileStorage) StoreAuthenticate(r *mdm.Request, msg *mdm.Authenticate) error
StoreAuthenticate stores the Authenticate message
func (*FileStorage) StoreBootstrapToken ¶
func (s *FileStorage) StoreBootstrapToken(r *mdm.Request, msg *mdm.SetBootstrapToken) error
func (*FileStorage) StoreCommandReport ¶
func (s *FileStorage) StoreCommandReport(r *mdm.Request, report *mdm.CommandResults) error
StoreCommandReport moves commands to different queues (like NotNow)
func (*FileStorage) StorePushCert ¶
func (s *FileStorage) StorePushCert(ctx context.Context, pemCert, pemKey []byte) error
StorePushCert is passed through to a new PushCertFileStorage
func (*FileStorage) StoreTokenUpdate ¶
func (s *FileStorage) StoreTokenUpdate(r *mdm.Request, msg *mdm.TokenUpdate) error
StoreTokenUpdate stores the TokenUpdate message
func (*FileStorage) StoreUserAuthenticate ¶
func (s *FileStorage) StoreUserAuthenticate(r *mdm.Request, msg *mdm.UserAuthenticate) error
type PushCertFileStorage ¶
type PushCertFileStorage struct {
// contains filtered or unexported fields
}
PushCertFileStorage is a filesystem-based PushCertStore
func NewPushCertFileStorage ¶
func NewPushCertFileStorage(certPath, keyPath string) *PushCertFileStorage
func (*PushCertFileStorage) IsPushCertStale ¶
func (s *PushCertFileStorage) IsPushCertStale(_ context.Context, topic, providedStaleToken string) (bool, error)
IsPushCertStale inspects staleToken to tell if our push certs are stale
func (*PushCertFileStorage) RetrievePushCert ¶
func (s *PushCertFileStorage) RetrievePushCert(_ context.Context, topic string) (*tls.Certificate, string, error)
RetrievePushCert reads the Push Certificate from disk
func (*PushCertFileStorage) StorePushCert ¶
func (s *PushCertFileStorage) StorePushCert(_ context.Context, pemCert, pemKey []byte) error
StorePushCert writes the push cert to disk