/srv/irclogs.ubuntu.com/2021/04/28/#snappy.txt

amurraybandali: no, it just needs to be reviewed by the reviewers - I'll take a look this morning and cast my vote at least to keep it ticking along00:18
mupPR snapd#10202 closed: tests: new buckets for snapd-spread project on gce <Simple 😃> <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/10202>00:40
mupPR snapd#10204 opened: o/servicestate/quota_control.go: introduce basic group manipulation methods <quota> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/10204>02:01
bandaliamurray, gotcha, and thank you :-)02:48
jameshamurray: when you've got some time, could you give some feedback on https://forum.snapcraft.io/t/proposal-add-polkit-and-polkit-agent-interfaces-to-snapd/23876?u=jamesh ?03:34
jameshamurray: this is a proposal for a pair of interfaces to allow snaps to use polkit03:35
amurrayjamesh: I'm just looking now :)04:09
jameshthanks!04:10
amurrayre the unix process subject type - as you said the base policy already allows `@{PROC}/@{pid}/stat r,` so this grants any snap the ability to read the start time of any other process on the system (assuming traditional DAC checks allow it) - so I think that this would be good to try and cover this use-case as well04:28
jameshThat allows a process to read its own information (i.e. through the /proc/self symlink)04:30
jameshFor servers using the unix process subject type, they would need to read that data for arbitrary processes04:30
amurrayyes it does - there is no owner restriction on that rule and @{pid} is just a clumsy regex to match against any pid - so it should allow to read any processes start time04:32
jameshhmm.  I thought it was a special token to match the current pid04:32
amurrayunfortunately not - that would be nice if it was though - much more principle-of-least-privilege if it were04:34
jameshokay, that makes things a bit simpler04:34
jameshso a lot of the AppArmor rules in system_observe duplicate the base template04:35
amurrayhmm I wonder if perhaps the base template has grown over time...04:36
jameshbut you're right: I can e.g. read /proc/1/stat from "snap run --shell chromium"04:37
amurrayhow do polkit rules files differ from policy? where/how is one used over the other?04:38
jameshthe XML .policy files can specify one of 6 default canned policies.  Anything more complicated than those policies needs to be specified via pkla files (Ubuntu/Debian) or Javascript rules files (most other distros)04:40
jameshThe implication of using the "yes" default policy (always allow) is that polkitd will always tell the server application that the client is authorised.04:42
jameshIf the actions are provided by the same package as the server, then this doesn't meaningfully reduce security: the server could just as easily have not used polkit04:43
amurrayok, so I am wondering whether either pkla files or rules allow to express anything more (in terms of authority) than the default policy? I am guessing this is "no" which means we are more worried about the js rules as an attack surface for the js parser itself etc rather than them allowing to specify outcomes that grant more authority than would otherwise be authorised - is that a fair characterisation?04:47
jameshyes.  I can create a pkla file saying that only users who are members of a particular group are allowed to invoke a particular set of actions04:50
jameshyou've got a limited version of that in .policy files via "auth_admin" (where polkit is configured to consider some users to be administrators).  But if you wanted to use different group membership to gate different actions, you'd need to use pkla files or JS04:51
jameshIn general, it wasn't common for packages to provide pkla policy files.04:52
jameshThere's been more use of shipping default JavaScript policy files (look in /usr/share/polkit-1/rules.d on your system)04:53
jameshBut I don't even want to consider allowing snaps to be able to provide JS to be run by an unconfined system daemon04:54
jamesh(even if it wouldn't ever run on current Ubuntu releases)04:54
amurrayyeah I noticed that - but I assume this is ignored as we don't ship the js backend in policykit04:55
amurraygiven we don't allow snaps to install man pages due to fears over untrusted input (personally I think the usability benefits outweigh any perceived security risk here) then it would be crazy to let them ship js policy04:56
amurrayi'd be all for man pages in snaps being symlinked out to /usr/share/man or similar... lots of snaps ship them but they are not readily available...04:57
jameshright.  That's why I thought it'd be better to ignore these more advanced policy configuration options: they won't work consistently across all distros, and it's harder to convince ourselves that they are safe04:59
amurrayyep, that can be a problem for another day :)05:05
jameshamurray: reading over /etc/apparmor.d/tunables/kernelvars, it sounds like @{pid} is intended to represent the current process but covers all processes now due to kernel limitations05:20
jameshthat kind of explains why we might have the /@{pid}/ vs. /*/ distinction in the base template and system-observe05:21
amurrayjamesh: hmm I wonder if/when that were to change how many things would break due to the semantic difference... ok I'll keep that in mind.. we may want to add a rule then just for this to the polkit plug to allow this (/proc/*/stat r,)05:22
jameshyep.  It's quite possible that if they were to implement kernel support, it would need to have a different name in the policy language05:23
jameshor have some way to declare a version of the policy language05:24
mvogood morning!07:01
pstolowskimorning07:04
mvogood morning pstolowski07:04
mborzeckipstolowski: mvo: morning07:07
mvohey mborzecki !07:11
mupPR snapd#10199 closed: o/servicestate/quotas: add functions for getting and setting quotas in state <quota> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10199>07:22
mupPR snapd#10205 opened: cmd/snap, client: snap remove-quota command <quota> <Created by stolowski> <https://github.com/snapcore/snapd/pull/10205>07:57
pedronisdegville: hi, could you look at the help text in https://github.com/snapcore/snapd/pull/10196 when you have a moment07:57
mupPR #10196: o/devicestate,o/hookstate/ctlcmd: introduce SystemModeInfo methods and snapctl system-mode <Created by pedronis> <https://github.com/snapcore/snapd/pull/10196>07:57
degvillepedronis: hello! Yes, of course.08:20
pedronismvo: seems there's an order issue in the servicestate/quotas tests, that's why I got unit tests failures in my PR09:08
pedronismvo: they are on master09:08
pedronismvo: https://github.com/snapcore/snapd/pull/10196/checks?check_run_id=245549142609:08
mupPR #10196: o/devicestate,o/hookstate/ctlcmd: introduce SystemModeInfo methods and snapctl system-mode <Created by pedronis> <https://github.com/snapcore/snapd/pull/10196>09:08
mvopedronis: oh no! sorry for that09:20
mvopedronis: are you on it or shall I?09:21
pedronisI'm on it09:21
pedronismvo ^09:22
mvook09:25
pedronismvo: https://github.com/snapcore/snapd/pull/1020609:51
mupPR #10206: o/servicestate: test has internal ordering issues, consider both cases <Test Robustness> <âš  Critical> <Created by pedronis> <https://github.com/snapcore/snapd/pull/10206>09:51
mupPR snapd#10206 opened: o/servicestate: test has internal ordering issues, consider both cases <Test Robustness> <âš  Critical> <Created by pedronis> <https://github.com/snapcore/snapd/pull/10206>09:52
cjwatsonamurray: also I went to lots of effort to add apparmor and seccomp to man-db to mitigate all these (IMO overblown in this case anyway) fears about untrusted input.  Just hasn't been integrated on the snapd side yet09:59
mupPR snapd#10207 opened: vendor: bump github.com/canonical/go-tpm2 revision <Created by mvo5> <https://github.com/snapcore/snapd/pull/10207>10:02
mupPR snapd#10208 opened: daemon: implement REST API for quota groups (create / list / get) <quota> <Created by stolowski> <https://github.com/snapcore/snapd/pull/10208>10:27
pedronismmh. I should have set that PR to skip spread10:47
mupPR snapd#10206 closed: o/servicestate: test has internal ordering issues, consider both cases <Test Robustness> <âš  Critical> <Created by pedronis> <Closed by pedronis> <https://github.com/snapcore/snapd/pull/10206>10:47
mupPR snapd#10206 opened: o/servicestate: test has internal ordering issues, consider both cases <Skip spread> <Test Robustness> <âš  Critical> <Created by pedronis> <https://github.com/snapcore/snapd/pull/10206>10:52
pedronisijohnson: pstolowski: what's the next PRs in order I should review or re-review? there are quite a few11:02
pstolowskipedronis: #10197, then #1020811:05
mupBug #10197: folder widget text entry loves to crash evo <evolution (Ubuntu):Fix Released by seb128> <https://launchpad.net/bugs/10197>11:05
mupPR #10197: cmd/snap: introduce 'snap quota' command <Needs Samuele review> <quota> <Created by stolowski> <https://github.com/snapcore/snapd/pull/10197>11:05
mupBug #10208: Needs rebuild with new libneon <openoffice.org (Ubuntu):Invalid by doko> <openoffice.org (Debian):Fix Released> <https://launchpad.net/bugs/10208>11:05
mupPR #10208: daemon: implement REST API for quota groups (create / list / get) <quota> <Created by stolowski> <https://github.com/snapcore/snapd/pull/10208>11:05
pedronispstolowski: thx11:12
pstolowskii see quotas_test.go:43: servicestateQuotasSuite.TestQuotas test failure due to ordering, but i think it's fixed in on of Ian's PRs11:18
mupPR snapd#10206 closed: o/servicestate: test has internal ordering issues, consider both cases <Skip spread> <Test Robustness> <âš  Critical> <Created by pedronis> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/10206>11:22
pedronispstolowski: I fixed independently given that it broke master and Ian's PR don't have enough +1 yet11:24
pedronisa possible fix is now merged11:24
pstolowskithanks11:27
pstolowskipedronis: i think i pulled the trigger too fast on API PR, i now see ServiceManager methods that I should probably be using instead of servicestate11:28
pstolowskii'm marking it blocked and need to rework some bits11:28
mupPR snapd#10088 closed: o/configstate/configcore/picfg.go: use ubuntu-seed config.txt in uc20 run mode <Bug> <Needs Samuele review> <UC20> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10088>11:32
pstolowskipedronis: what output do we want from 'snap quotas'?11:53
mupPR snapd#10209 opened: add dm-crypt interface to support external storage encryption <Needs Samuele review> <Created by kubiko> <https://github.com/snapcore/snapd/pull/10209>12:02
pedronispstolowski: we don't have anything like it so far I suppose12:03
pstolowskipedronis: not really... closest is probably debug timings (as far as nesting is depicted in tabular output)12:05
pedronisyea12:05
amurraycjwatson: nice - ok I'll try follow-up with the snapd folks then :)12:40
ograhmm ... having a daemon with "install-mode: disable" and a "timer:" entry still seems to start the timer on install it seems ... is that a bug or expected behaviour (the doc doesnt say anything about combining the two)13:17
mupBug #1926442 opened: cannot execute 'netplan generate' from within a snap <Snappy:New> <https://launchpad.net/bugs/1926442>13:36
pstolowskipedronis: for 'snap quotas', what do you think about tabular output with just "Name Parent Memory Limit" columns (and otherwise the details can be inspected with snap quota <group>)?14:26
pedronis"Quota Parent Max-Memory" ?14:27
pstolowskipedronis: ok, sure14:27
pedronislet's start there14:27
pstolowskiok14:27
pstolowskito be clear the api has all the details so we can extend14:27
pedronisit's maybe obvious but we should sort them by hierarchy14:28
pedronisand otherwise by name14:28
pstolowskimakes sense14:31
pstolowskimvo: will you find time to do 2nd review of https://github.com/snapcore/snapd/pull/10197 ?15:25
mupPR #10197: cmd/snap: introduce 'snap quota' command <Needs Samuele review> <quota> <Created by stolowski> <https://github.com/snapcore/snapd/pull/10197>15:25
mvopstolowski: yeah, happy to do right after my current meeting15:25
pstolowskimvo: thanks!15:25
ijohnsonpstolowski: pedronis I updated https://github.com/snapcore/snapd/pull/1019815:35
mupPR #10198: snap/quotas: followups from previous PR <quota> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/10198>15:35
pedronisijohnson: thx15:35
pstolowskiijohnson: ack, thanks, i'll review15:37
ijohnsonogra: that sounds like a bug re install-mode and timer, can you file a LP bug please?15:37
ograyep15:38
ijohnsonthanks15:38
ograijohnson, https://bugs.launchpad.net/snapd/+bug/192647415:43
mupBug #1926474: combining timer and "install-mode: disabled" for a daemon seems not respected <snapd:New> <https://launchpad.net/bugs/1926474>15:43
ijohnsongreat thank you15:43
pstolowskiijohnson: a few small comments15:55
ijohnsonpstolowski: thanks I asked a question there15:58
pedronisijohnson: I actually put that TODO there, so I clarified what I meant in a couple of comments16:08
ijohnsonok, sorry I pushed right as you left your review16:08
mupPR snapd#10197 closed: cmd/snap: introduce 'snap quota' command <Needs Samuele review> <quota> <Created by stolowski> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10197>16:08
pedronisijohnson: my main point was: https://github.com/snapcore/snapd/pull/10198#discussion_r622326464, which is not really about this PR but higher levels16:11
mupPR #10198: snap/quotas: followups from previous PR <quota> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/10198>16:11
mvopstolowski: will you merge master into 10205 or shall I (I realize it's late for you)16:11
ijohnsonpedronis: I guess my main question is should I make further changes to that PR or are we happy with that PR16:11
pstolowskimvo: i'll merge (i didn't realize you just landed the previous PR, thanks!)16:13
mvopstolowski: \o/ thank you16:13
pedronisijohnson: +1 from me, but do consider that question and also my last small remark that probably can be covered in one of the follow-ups16:14
pedronisI mean do consider the question in the higher levels16:15
pstolowskimvo: done16:15
ijohnsonok, I left some TODOs I think it is ready to land after the spread tests run16:18
* ijohnson moves on to the other changes16:18
pstolowskiijohnson: +116:19
pedronisijohnson: thx16:26
* cachio lunch16:39
mupPR snapd#10198 closed: snap/quotas: followups from previous PR <quota> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10198>18:04
mupPR snapcraft#3515 opened: Use snapd-spread gce project instead of computeengine project <Created by sergiocazzolato> <https://github.com/snapcore/snapcraft/pull/3515>19:21
=== not_phunyguy is now known as phunyguy
jdstrandjamesh and amurray: you're right that @{pid} is supposed to mean your own pid, hence the distinction between base template and system-observe of @{pid} vs * (ie, trying to have a reasonable experience if we get the kernelvar support). so yeah there is overlap. it's also possible we have duplicated rules (as opposed to overlapping) which imho we could remove from the interfaces if they are in the default20:45
jdstrandtemplate (where @{pid} and * are overlapping, not duplicate of course)20:45
jdstrandjamesh and amurray: but like you said, I imagine whenever kernel support landed, there would be stuff that would break since they all of a sudden might need system-observe (or changes to the base template). that would have to be a careful rollout20:47
jdstrandamurray: cjwatson is right. the man page thing is fixable now. someone needs to do the work. though, with man pages, the idea was that we'd allow any snap to install a man page. that might be different than with policykit files (I certainly like the idea of restricing js as mentioned; it is also possible to make the interface restricted with some sort of vetting procedure like with other stuff (I didn't20:50
jdstrandread all backscroll or through the PR carefully, so forgive me if that was discussed. I'm just tossing out a couple of ideas))20:50
jdstrandI'd love to see the man pages work picked up (on the snapd side)20:52
mupPR snapd#10153 closed: wrappers, quota: implement quota groups slice generation <Squash-merge> <quota> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10153>20:59
mupPR snapcraft#3516 opened: github: update workflows that to use pull_request_target <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/3516>21:11
amurrayjdstrand: hey :) - yeah I would also love to see man pages surfaced by snapd so hopefully we can make that happen23:10

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!