slots-per-plug should be sufficient with "allow-auto-connection"

Bug #1873282 reported by Jamie Strandboge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
High
Unassigned

Bug Description

https://forum.snapcraft.io/t/plug-slot-declaration-rules-greedy-plugs/12438 describes support for 'slots-per-plug' and 'plugs-per-slot' for allow-connection and allow-auto-connection (though today, snapd only honors 'slots-per-plug: *' with allow-auto-connection).

When I tried to use this in plugs:
{
  "serial-port": {
    "allow-auto-connection": {
      "slots-per-plug": "*"
    }
  }
}

The store errored and said: "could not sign assertion (assertion snap-declaration: allow-auto-connection in plug rule for interface "serial-port" must specify at least one of plug-attributes, slot-attributes, slot-snap-type, slot-publisher-id, slot-snap-id, on-classic, on-store, on-brand, on-model)".

I was able to workaround this be using this instead:

{
  "serial-port": {
    "allow-auto-connection": {
     "slot-snap-type": [
       "app"
      ],
      "slots-per-plug": "*"
    }
  }
}

At a minimum, the store should allow specifying my first try, above. It is less clear if the store should error for deny*, *-installation, allow-connection or plugs-per-slot. My inclination would be to enforce "slots-per-plug": "*" with allow-auto-connection, erroring on everything else, but I'll defer to you.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi,

The "could not sign assertion" message comes from the snap assertion service, we probably need to update that service to allow for what you described.

Changed in snapstore:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Samuele Pedroni (pedronis) wrote :

Because of other work SAS should now be up-to-date, Jamie could you try again?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is resolved now.

Changed in snapstore-server:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.