Update on Device Serial Validation Rules

Hello everyone,

When the gadget snap was first introduced, we aimed to provide developers with the flexibility to define custom serial values for their devices. This process involves SnapD requesting a recommendation from the gadget snap during the first-boot serial request, which is then processed by the appropriate store service (currently Serial Vault, with an upcoming migration to Model Service).

While this approach has been largely successful, we have observed instances of inconsistent or malformed serials, such as those containing unexpected quoted strings. To ensure the long-term health of the ecosystem and maintain robust parsing of device identifiers across all services, we are planning to introduce server-side validation for this field.

These validation rules will be implemented alongside the roll out of the new Model Service by the store team. Once deployed, requests for serials to this service that do not meet these criteria will be declined. Although there are no immediate plans to apply these rules to the existing Serial Vault, certain upcoming SnapD features, such as remote confdb, will rely on these standardized serial formats.

New Validation Criteria

To support common formats like, MAC addresses, and other structured IDs, serials should now adhere to the following:

  • Use only alphanumeric characters (a-z, A-Z, 0-9) and the separators :, +, or -.

  • Begin and end with an alphanumeric character.

  • Not use consecutive separators.

  • Contain at least one alphanumeric character (cannot be empty).

The corresponding regular expression for these rules is: ^[a-zA-Z0-9](?:[:±]?[a-zA-Z0-9])*$

Please note that validation for brands and models remains unchanged.

Recommended Actions

If you maintain any gadget snaps, we kindly ask you to review your serial generation logic to ensure compatibility with these upcoming changes.

Should you have any questions or require further clarification, please feel free to reach out via this thread.

Best regards,

Michael Croft-White

2 Likes

Thanks @mikecw

Is there any more info about this new Models Service, and what it means for Brand Store users that use the current central/partner Serial Vault ?

Cheers,

Just

Hi Just,

I’ve asked the store team to reply with their plans. They’ll post here shortly.

Thanks.

1 Like

Hello Just,

Thanks for your patience. We are currently refining our process to migrate all existing Brand store users (who are on Serial Vault) over to model service within the next 4-5 months. We will be doing the migration in waves, and there will not be any action required from the users, your existing devices will still work just fine. (if you would like to create new models, it will simply be through the new UI for model service, which we will provide to you upon migration)

Our team will be sure to notify you (and all SV users) and keep you appraised of the current status when it is time for your Serial Vault to be migrated, but there will be no downtime or any such requirement.

For now you can wait for our field/support team to reach out to you when we begin. Feel free to ask any clarifying questions, here I will be happy to help where I can,

Best, Barrett

1 Like